From 0b380204a4bb7b522e38ac38827d80a69f4fb5d4 Mon Sep 17 00:00:00 2001 From: "Xamarin Public Jenkins (auto-signing)" Date: Fri, 10 Jul 2020 08:44:59 +0000 Subject: [PATCH] Imported Upstream version 6.12.0.86 Former-commit-id: 7a84ce7d08c42c458ac8e74b27186ca863315d79 --- autogen.sh | 19 +- config.h.in | 9 + configure.REMOVED.git-id | 2 +- configure.ac.REMOVED.git-id | 2 +- .../HtmlAttributeCollection.cs | 2 +- docs/deploy/mono-api-counters.html | 2 +- .../monodroid/System.cs.REMOVED.git-id | 2 +- .../monotouch/System.cs.REMOVED.git-id | 2 +- .../profiles/net_4_x/Mono.Cecil.Mdb.cs | 6 +- .../net_4_x/Mono.Cecil.cs.REMOVED.git-id | 2 +- .../profiles/net_4_x/Mono.Debugger.Soft.cs | 3 + .../System.Windows.Forms.cs.REMOVED.git-id | 2 +- .../profiles/net_4_x/System.cs.REMOVED.git-id | 2 +- external/bdwgc/autom4te.cache/requests | 690 ++-- external/bdwgc/config.log | 8 +- external/bdwgc/libatomic_ops/Makefile.in | 895 +++++ external/bdwgc/libatomic_ops/aclocal.m4 | 1213 +++++++ .../autom4te.cache/output.0.REMOVED.git-id | 1 + .../autom4te.cache/output.1.REMOVED.git-id | 1 + .../autom4te.cache/output.2.REMOVED.git-id | 1 + .../libatomic_ops/autom4te.cache/requests | 471 +++ .../libatomic_ops/autom4te.cache/traces.0 | 2091 +++++++++++ .../libatomic_ops/autom4te.cache/traces.1 | 682 ++++ .../libatomic_ops/autom4te.cache/traces.2 | 2091 +++++++++++ external/bdwgc/libatomic_ops/compile | 347 ++ external/bdwgc/libatomic_ops/config.guess | 1441 ++++++++ external/bdwgc/libatomic_ops/config.sub | 1813 +++++++++ .../libatomic_ops/configure.REMOVED.git-id | 1 + external/bdwgc/libatomic_ops/depcomp | 791 ++++ .../bdwgc/libatomic_ops/doc}/Makefile.in | 285 +- external/bdwgc/libatomic_ops/install-sh | 508 +++ .../libatomic_ops/ltmain.sh.REMOVED.git-id | 1 + .../m4/libtool.m4.REMOVED.git-id | 1 + external/bdwgc/libatomic_ops/m4/ltoptions.m4 | 437 +++ external/bdwgc/libatomic_ops/m4/ltsugar.m4 | 124 + external/bdwgc/libatomic_ops/m4/ltversion.m4 | 23 + .../bdwgc/libatomic_ops/m4/lt~obsolete.m4 | 99 + external/bdwgc/libatomic_ops/missing | 215 ++ external/bdwgc/libatomic_ops/src/Makefile.in | 999 +++++ external/bdwgc/libatomic_ops/src/config.h.in | 148 + external/bdwgc/libtool.REMOVED.git-id | 2 +- .../build/monowasm/Makefile | 8 +- .../monowasm/System.Core.dll.REMOVED.git-id | 2 +- .../build/monowasm/System.Net.Http.dll | Bin 30720 -> 30720 bytes .../build/monowasm/System.Numerics.dll | Bin 23040 -> 23040 bytes .../monowasm/System.Xml.dll.REMOVED.git-id | 2 +- .../build/monowasm/System.dll.REMOVED.git-id | 2 +- .../build/monowasm/WebAssembly.Net.Http.dll | Bin 6144 -> 6144 bytes .../monowasm/WebAssembly.Net.WebSockets.dll | Bin 0 -> 6656 bytes .../src/monowasm/System.cs.REMOVED.git-id | 2 +- .../monowasm/WebAssembly.Net.WebSockets.cs | 48 + external/bockbuild/bockbuild/darwinprofile.py | 18 +- external/boringssl/THIRD-PARTY-NOTICES.TXT | 20 + .../boringssl/crypto/aes/asm/aesv8-armx.pl | 8 - external/boringssl/crypto/cpu-aarch64-linux.c | 44 + .../crypto/modes/asm/ghashv8-armx.pl | 8 - external/cecil/.github/FUNDING.yml | 1 + external/cecil/Directory.Build.props | 6 +- external/cecil/Mono.Cecil.Cil/ILProcessor.cs | 27 + external/cecil/Mono.Cecil.Cil/MethodBody.cs | 2 +- external/cecil/Mono.Cecil.nuspec | 2 +- .../AssemblyReader.cs.REMOVED.git-id | 2 +- .../cecil/Mono.Cecil/GenericInstanceMethod.cs | 6 + .../cecil/Mono.Cecil/GenericInstanceType.cs | 6 + external/cecil/Mono.Cecil/Import.cs | 5 +- external/cecil/Mono.Cecil/TypeParser.cs | 2 +- .../Mono.Collections.Generic/Collection.cs | 4 +- external/cecil/ProjectInfo.cs | 6 +- external/cecil/README.md | 1 + .../cecil/Test/Mono.Cecil.Tests/Extensions.cs | 2 +- .../Test/Mono.Cecil.Tests/ILProcessorTests.cs | 24 + .../Mono.Cecil.Rocks/TypeReferenceRocks.cs | 2 +- .../System/Globalization/CharUnicodeInfo.cs | 580 ++- .../CharUnicodeInfoData.cs.REMOVED.git-id | 1 + .../System/Globalization/CompareInfo.cs | 48 +- .../Globalization/FormatProvider.Number.cs | 59 +- .../tests/HashtableTests.cs | 1 + .../Headers/ContentDispositionHeaderValue.cs | 28 +- .../Net/Http/Headers/HeaderUtilities.cs | 56 +- .../src/System/Net/Http/HttpContent.cs | 33 + .../AuthenticationHelper.Digest.cs | 34 +- .../ChunkedEncodingReadStream.cs | 22 + .../ConnectionCloseReadStream.cs | 22 + .../ContentLengthReadStream.cs | 22 + .../Http/SocketsHttpHandler/HttpConnection.cs | 12 + .../SocketsHttpHandler/HttpConnectionPool.cs | 14 + .../SocketsHttpHandler/RawConnectionStream.cs | 33 + .../UnitTests/DigestAuthenticationTests.cs | 15 + .../tests/UnitTests/HttpContentTest.cs | 4 +- .../tests/System/BitConverter.cs | 1 + .../tests/BigInteger/parse.netcoreapp.cs | 18 + external/linker/.editorconfig | 1 + external/linker/.gitignore | 2 +- external/linker/Directory.Build.props | 2 +- external/linker/Directory.Build.targets | 8 +- external/linker/build.cmd | 2 + external/linker/build.sh | 16 + external/linker/eng/Signing.props | 1 - external/linker/eng/Version.Details.xml | 4 +- external/linker/eng/Versions.props | 1 + external/linker/eng/azure-pipelines.yml | 176 +- .../linker/eng/common/SetupNugetSources.ps1 | 65 +- .../linker/eng/common/SetupNugetSources.sh | 78 +- external/linker/eng/common/build.ps1 | 11 +- .../linker/eng/common/cross/build-rootfs.sh | 19 +- external/linker/eng/common/darc-init.ps1 | 4 +- .../common/enable-cross-org-publishing.ps1 | 9 +- .../eng/common/generate-graph-files.ps1 | 2 +- .../linker/eng/common/init-tools-native.ps1 | 6 +- .../linker/eng/common/native/install-tool.ps1 | 2 +- .../common/performance/performance-setup.ps1 | 7 +- .../common/performance/performance-setup.sh | 6 +- .../eng/common/pipeline-logging-functions.ps1 | 6 +- ...ote-build.ps1 => add-build-to-channel.ps1} | 2 +- .../eng/common/templates/job/execute-sdl.yml | 20 +- .../channels/generic-internal-channel.yml | 64 +- .../channels/generic-public-channel.yml | 65 +- .../templates/post-build/post-build.yml | 227 +- .../templates/post-build/promote-build.yml | 25 - .../post-build/setup-maestro-vars.yml | 51 +- ...ote-build.yml => add-build-to-channel.yml} | 4 +- .../common/templates/steps/publish-logs.yml | 2 +- external/linker/eng/common/tools.ps1 | 71 +- external/linker/eng/common/tools.sh | 40 +- external/linker/eng/ilasm.ilproj | 3 - external/linker/external/Mono.Cecil.overrides | 2 +- .../linker/external/cecil/.github/FUNDING.yml | 1 + .../external/cecil/Directory.Build.props | 6 +- .../cecil/Mono.Cecil.Cil/ILProcessor.cs | 27 + .../cecil/Mono.Cecil.Cil/MethodBody.cs | 2 +- .../linker/external/cecil/Mono.Cecil.nuspec | 2 +- .../AssemblyReader.cs.REMOVED.git-id | 2 +- .../cecil/Mono.Cecil/GenericInstanceMethod.cs | 6 + .../cecil/Mono.Cecil/GenericInstanceType.cs | 6 + .../external/cecil/Mono.Cecil/Import.cs | 5 +- .../external/cecil/Mono.Cecil/TypeParser.cs | 2 +- .../Mono.Collections.Generic/Collection.cs | 4 +- external/linker/external/cecil/ProjectInfo.cs | 6 +- external/linker/external/cecil/README.md | 1 + .../cecil/Test/Mono.Cecil.Tests/Extensions.cs | 2 +- .../Test/Mono.Cecil.Tests/ILProcessorTests.cs | 24 + .../Mono.Cecil.Rocks/TypeReferenceRocks.cs | 2 +- external/linker/global.json | 9 +- external/linker/illink.sln | 131 +- external/linker/monobuild/Makefile | 18 +- external/linker/monolinker.sln | 6 + .../src/ILLink.Tasks/ILLink.Tasks.csproj | 30 +- .../src/ILLink.Tasks/ILLink.Tasks.targets | 2 +- external/linker/src/ILLink.Tasks/LinkTask.cs | 2 +- .../linker/src/ILLink.Tasks/Sdk/Sdk.props | 2 +- external/linker/src/analyzer/analyzer.csproj | 60 +- .../src/linker/Linker.Steps/BlacklistStep.cs | 12 +- .../Linker.Steps/BodySubstituterStep.cs | 310 ++ .../linker/Linker.Steps/CodeRewriterStep.cs | 197 +- .../src/linker/Linker.Steps/MarkStep.cs | 3229 ----------------- .../Linker.Steps/MarkStep.cs.REMOVED.git-id | 1 + .../linker/Linker.Steps/RemoveFeaturesStep.cs | 2 +- .../RemoveUnreachableBlocksStep.cs | 1295 +++++++ .../Linker.Steps/ResolveFromAssemblyStep.cs | 7 +- .../linker/Linker.Steps/ResolveFromXmlStep.cs | 9 +- .../linker/src/linker/Linker/Annotations.cs | 49 +- external/linker/src/linker/Linker/BCL.cs | 19 +- external/linker/src/linker/Linker/Driver.cs | 698 ++-- .../src/linker/Linker/IDependencyRecorder.cs | 44 + .../Linker/IReflectionPatternRecorder.cs | 62 + .../linker/src/linker/Linker/KnownMembers.cs | 1 + .../linker/src/linker/Linker/LinkContext.cs | 37 +- .../LoggingReflectionPatternRecorder.cs | 48 +- .../linker/src/linker/Linker/MethodAction.cs | 1 - .../Linker/MethodDefinitionExtensions.cs | 52 + external/linker/src/linker/Linker/Tracer.cs | 207 +- .../linker/Linker/TypeDefinitionExtensions.cs | 23 + .../linker/Linker/XmlDependencyRecorder.cs | 215 ++ external/linker/src/linker/Mono.Linker.csproj | 40 +- .../Commands/FlakyTestRetriesCommand.cs | 3 +- m4/mono-output.m4 | 1 - man/mono.1 | 6 +- mcs/build/common/Consts.cs | 4 +- mcs/build/config-default.make | 3 +- .../SymbolWriterImpl.cs | 13 +- .../Mono.Debugger.Soft/Connection.cs | 15 +- .../Mono.Debugger.Soft/EventRequest.cs | 5 + .../Mono.Debugger.Soft/PointerValue.cs | 13 +- .../Mono.Debugger.Soft/VirtualMachine.cs | 13 +- .../Mono.Debugger.Soft/Test/dtest-app.cs | 42 + .../Test/dtest.cs.REMOVED.git-id | 2 +- .../Mono.Posix/Mono.Unix/UnixEncoding.cs | 4 +- .../Test/Mono.Unix/UnixEncodingTest.cs | 17 + .../ContractReference.xml | 2 +- .../DiscoveryDocument.xml | 2 +- .../DiscoveryDocumentReference.xml | 2 +- .../SchemaReference.xml | 2 +- .../System.Windows.Forms.RTF/Charcode.cs | 413 --- .../System.Windows.Forms.RTF/Charset.cs | 157 - .../CharsetToCodepage.cs | 79 + .../System.Windows.Forms.RTF/CharsetType.cs | 28 +- .../System.Windows.Forms.RTF/KeysInit.cs | 3 + .../System.Windows.Forms.RTF/Minor.cs | 3 + .../System.Windows.Forms.RTF/Picture.cs | 16 +- .../System.Windows.Forms.RTF/RTF.cs | 181 +- .../StandardCharCode.cs | 392 -- .../StandardCharName.cs | 411 --- .../System.Windows.Forms.RTF/TextMap.cs | 440 --- .../Default/LabelPainter.cs | 2 + .../System.Windows.Forms.dll.sources | 8 +- .../System.Windows.Forms/Button.cs | 14 +- .../System.Windows.Forms/ComboBox.cs | 14 +- .../System.Windows.Forms/ContextMenuStrip.cs | 19 +- .../Control.cs.REMOVED.git-id | 2 +- .../System.Windows.Forms/ControlPaint.cs | 4 +- .../DataGridViewImageCell.cs | 1 + .../DataGridViewLinkCell.cs | 1 + .../DataGridViewLinkColumn.cs | 29 +- .../System.Windows.Forms/Form.cs | 48 +- .../System.Windows.Forms/GroupBox.cs | 28 +- .../System.Windows.Forms/Line.cs | 525 ++- .../System.Windows.Forms/LineTag.cs | 185 +- .../System.Windows.Forms/ListBox.cs | 2 +- .../System.Windows.Forms/RadioButton.cs | 2 - .../System.Windows.Forms/RichTextBox.cs | 997 ++++- .../System.Windows.Forms/TabStops.cs | 258 ++ .../TableLayoutSettings.cs | 8 +- .../System.Windows.Forms/TextBoxBase.cs | 101 +- .../TextControl.cs.REMOVED.git-id | 2 +- .../System.Windows.Forms/ToolStripDropDown.cs | 53 +- .../System.Windows.Forms/ToolStripMenuItem.cs | 6 +- .../System.Windows.Forms/TreeView.cs | 22 +- .../System.Windows.Forms/X11Keyboard.cs | 31 +- .../System.Windows.Forms/X11Structs.cs | 31 + .../XplatUIX11.cs.REMOVED.git-id | 2 +- .../System.Windows.Forms_test.dll.sources | 1 + .../Test/System.Windows.Forms/ComboBoxTest.cs | 16 + .../ContextMenuStripTest.cs | 166 + mcs/class/System/Assembly/AssemblyInfo.cs | 4 + mcs/class/System/Makefile | 4 + .../AixIPInterfaceProperties.cs | 4 +- .../MacOsIPInterfaceProperties.cs | 4 +- .../System/System.Net.Security/SslStream.cs | 20 + .../System.Net.Sockets/SafeSocketHandle.cs | 6 +- mcs/class/System/System.Net.Sockets/Socket.cs | 110 +- .../WebSocketHandle.wasm.cs | 108 + mcs/class/System/System.Net/Dns.cs | 12 +- mcs/class/System/System.Net/HttpConnection.cs | 8 +- .../System/System.Net/HttpListenerRequest.cs | 12 +- .../ConcurrentBagTests.cs | 6 + .../NameValueCollectionTest.cs | 12 + .../AsyncOperationManagerTest.cs | 1 + .../BackgroundWorkerTest.cs | 9 + .../EventDescriptorCollectionTests.cs | 12 + .../PropertyDescriptorCollectionTests.cs | 12 + .../Test/System.Net.Mail/SmtpClientTest.cs | 42 +- .../IPInterfacePropertiesTest.cs | 11 +- .../NetworkInterfaceTest.cs | 27 + .../System.Net.Sockets/TcpListenerTest.cs | 6 +- .../Test/System.Net.Sockets/UdpClientTest.cs | 14 +- .../HttpListenerPrefixCollectionTest.cs | 36 +- .../Test/System.Net/HttpListenerTest.cs | 35 +- .../Test/System.Net/ServicePointTest.cs | 2 + .../Test/System.Net/WebClientTestAsync.cs | 1 + .../System/Test/System.Net/WebProxyTest.cs | 6 + .../System/Test/System.Net/WebRequestTest.cs | 2 +- .../X509Certificate2CollectionTest.cs | 6 + .../System/Test/System.Timers/TimerTest.cs | 2 + .../System/wasm_System.dll.exclude.sources | 1 + mcs/class/System/wasm_System.dll.sources | 3 +- .../corlib/LinkerDescriptor/mscorlib.xml | 1 - mcs/class/corlib/Makefile | 10 +- .../corlib/Mono.Interop/ComInteropProxy.cs | 18 +- mcs/class/corlib/Mono/Runtime.cs | 38 + mcs/class/corlib/ReferenceSources/Buffer.cs | 24 +- .../corlib/System.Diagnostics/StackTrace.cs | 2 + .../System.Globalization/CultureInfo.cs | 3 + .../System.Reflection.Emit/ModuleBuilder.cs | 6 - .../System.Runtime.CompilerServices/Unsafe.cs | 5 + .../SecurityIdentifier.cs | 97 +- mcs/class/corlib/System.Threading/Thread.cs | 11 +- mcs/class/corlib/System/Console.cs | 6 +- mcs/class/corlib/System/MonoCustomAttrs.cs | 4 +- .../RawSecurityDescriptorTest.cs | 37 +- .../Test/System.Threading/ThreadTest.cs | 3 + mcs/class/corlib/Test/System/BufferTest.cs | 22 + .../corlib/Test/System/CharCategoryTest.cs | 12 +- .../corlib/corlib.dll.sources.REMOVED.git-id | 2 +- .../Facades/System.Collections.Concurrent.dll | Bin .../Facades/System.Collections.dll | Bin .../Facades/System.Diagnostics.Debug.dll | Bin .../System.Diagnostics.FileVersionInfo.dll | Bin .../Facades/System.Diagnostics.Tools.dll | Bin .../Facades/System.Dynamic.Runtime.dll | Bin .../Facades/System.Globalization.dll | Bin 5120 -> 5120 bytes .../System.IO.FileSystem.Primitives.dll | Bin .../Facades/System.IO.FileSystem.dll | Bin .../Facades/System.IO.dll | Bin .../Facades/System.Linq.Expressions.dll | Bin .../Facades/System.Linq.dll | Bin .../Facades/System.Reflection.Extensions.dll | Bin .../Facades/System.Reflection.Primitives.dll | Bin .../Facades/System.Reflection.dll | Bin .../System.Resources.ResourceManager.dll | Bin .../Facades/System.Runtime.Extensions.dll | Bin .../System.Runtime.InteropServices.dll | Bin .../Facades/System.Runtime.Numerics.dll | Bin .../Facades/System.Runtime.dll | Bin ...ystem.Security.Cryptography.Algorithms.dll | Bin ...ystem.Security.Cryptography.Primitives.dll | Bin .../System.Text.Encoding.CodePages.dll | Bin .../System.Text.Encoding.Extensions.dll | Bin .../Facades/System.Text.Encoding.dll | Bin .../System.Threading.Tasks.Parallel.dll | Bin .../Facades/System.Threading.Tasks.dll | Bin .../Facades/System.Threading.dll | Bin .../Facades/System.ValueTuple.dll | Bin .../Facades/System.Xml.ReaderWriter.dll | Bin .../Facades/System.Xml.XDocument.dll | Bin .../Facades/netstandard.dll.REMOVED.git-id | 1 + .../Mono.Cecil.dll.REMOVED.git-id | 1 + .../Mono.Security.dll.REMOVED.git-id | 1 + .../System.Configuration.dll.REMOVED.git-id | 1 + .../System.Core.dll.REMOVED.git-id | 1 + .../System.IO.Compression.dll.REMOVED.git-id | 1 + .../System.Numerics.dll.REMOVED.git-id | 1 + .../System.Security.dll.REMOVED.git-id | 1 + .../System.Xml.Linq.dll.REMOVED.git-id | 0 .../System.Xml.dll.REMOVED.git-id | 1 + .../System.dll.REMOVED.git-id | 1 + .../mcs.exe.REMOVED.git-id | 1 + .../mscorlib.dll.REMOVED.git-id | 1 + .../Facades/netstandard.dll.REMOVED.git-id | 1 - .../Mono.Cecil.dll.REMOVED.git-id | 1 - .../Mono.Security.dll.REMOVED.git-id | 1 - .../System.Configuration.dll.REMOVED.git-id | 1 - .../System.Core.dll.REMOVED.git-id | 1 - .../System.IO.Compression.dll.REMOVED.git-id | 1 - .../System.Numerics.dll.REMOVED.git-id | 1 - .../System.Security.dll.REMOVED.git-id | 1 - .../System.Xml.dll.REMOVED.git-id | 1 - .../System.dll.REMOVED.git-id | 1 - .../mcs.exe.REMOVED.git-id | 1 - .../mscorlib.dll.REMOVED.git-id | 1 - .../Facades/System.Collections.Concurrent.dll | Bin .../Facades/System.Collections.dll | Bin .../Facades/System.Diagnostics.Debug.dll | Bin .../System.Diagnostics.FileVersionInfo.dll | Bin .../Facades/System.Diagnostics.Tools.dll | Bin .../Facades/System.Dynamic.Runtime.dll | Bin .../Facades/System.Globalization.dll | Bin 5120 -> 5120 bytes .../System.IO.FileSystem.Primitives.dll | Bin .../Facades/System.IO.FileSystem.dll | Bin .../Facades/System.IO.dll | Bin .../Facades/System.Linq.Expressions.dll | Bin .../Facades/System.Linq.dll | Bin .../Facades/System.Reflection.Extensions.dll | Bin .../Facades/System.Reflection.Primitives.dll | Bin .../Facades/System.Reflection.dll | Bin .../System.Resources.ResourceManager.dll | Bin .../Facades/System.Runtime.Extensions.dll | Bin .../System.Runtime.InteropServices.dll | Bin .../Facades/System.Runtime.Numerics.dll | Bin .../Facades/System.Runtime.dll | Bin ...ystem.Security.Cryptography.Algorithms.dll | Bin ...ystem.Security.Cryptography.Primitives.dll | Bin .../System.Text.Encoding.CodePages.dll | Bin .../System.Text.Encoding.Extensions.dll | Bin .../Facades/System.Text.Encoding.dll | Bin .../System.Threading.Tasks.Parallel.dll | Bin .../Facades/System.Threading.Tasks.dll | Bin .../Facades/System.Threading.dll | Bin .../Facades/System.ValueTuple.dll | Bin .../Facades/System.Xml.ReaderWriter.dll | Bin .../Facades/System.Xml.XDocument.dll | Bin .../Facades/netstandard.dll.REMOVED.git-id | 1 + .../Mono.Cecil.dll.REMOVED.git-id | 1 + .../Mono.Security.dll.REMOVED.git-id | 1 + .../System.Configuration.dll.REMOVED.git-id | 1 + .../System.Core.dll.REMOVED.git-id | 1 + .../System.IO.Compression.dll.REMOVED.git-id | 1 + .../System.Numerics.dll.REMOVED.git-id | 1 + .../System.Security.dll.REMOVED.git-id | 1 + .../System.Xml.Linq.dll.REMOVED.git-id | 0 .../System.Xml.dll.REMOVED.git-id | 1 + .../System.dll.REMOVED.git-id | 1 + .../mcs.exe.REMOVED.git-id | 1 + .../mscorlib.dll.REMOVED.git-id | 1 + .../Facades/netstandard.dll.REMOVED.git-id | 1 - .../Mono.Cecil.dll.REMOVED.git-id | 1 - .../Mono.Security.dll.REMOVED.git-id | 1 - .../System.Configuration.dll.REMOVED.git-id | 1 - .../System.Core.dll.REMOVED.git-id | 1 - .../System.IO.Compression.dll.REMOVED.git-id | 1 - .../System.Numerics.dll.REMOVED.git-id | 1 - .../System.Security.dll.REMOVED.git-id | 1 - .../System.Xml.dll.REMOVED.git-id | 1 - .../System.dll.REMOVED.git-id | 1 - .../mcs.exe.REMOVED.git-id | 1 - .../mscorlib.dll.REMOVED.git-id | 1 - .../Facades/System.Collections.Concurrent.dll | Bin .../Facades/System.Collections.dll | Bin .../Facades/System.Diagnostics.Debug.dll | Bin .../System.Diagnostics.FileVersionInfo.dll | Bin .../Facades/System.Diagnostics.Tools.dll | Bin .../Facades/System.Dynamic.Runtime.dll | Bin .../Facades/System.Globalization.dll | Bin 5120 -> 5120 bytes .../System.IO.FileSystem.Primitives.dll | Bin .../Facades/System.IO.FileSystem.dll | Bin .../Facades/System.IO.dll | Bin .../Facades/System.Linq.Expressions.dll | Bin .../Facades/System.Linq.dll | Bin .../Facades/System.Reflection.Extensions.dll | Bin .../Facades/System.Reflection.Primitives.dll | Bin .../Facades/System.Reflection.dll | Bin .../System.Resources.ResourceManager.dll | Bin .../Facades/System.Runtime.Extensions.dll | Bin .../System.Runtime.InteropServices.dll | Bin .../Facades/System.Runtime.Numerics.dll | Bin .../Facades/System.Runtime.dll | Bin ...ystem.Security.Cryptography.Algorithms.dll | Bin ...ystem.Security.Cryptography.Primitives.dll | Bin .../System.Text.Encoding.CodePages.dll | Bin .../System.Text.Encoding.Extensions.dll | Bin .../Facades/System.Text.Encoding.dll | Bin .../System.Threading.Tasks.Parallel.dll | Bin .../Facades/System.Threading.Tasks.dll | Bin .../Facades/System.Threading.dll | Bin .../Facades/System.ValueTuple.dll | Bin .../Facades/System.Xml.ReaderWriter.dll | Bin .../Facades/System.Xml.XDocument.dll | Bin .../Facades/netstandard.dll.REMOVED.git-id | 1 + .../Mono.Cecil.dll.REMOVED.git-id | 1 + .../Mono.Security.dll.REMOVED.git-id | 1 + .../System.Configuration.dll.REMOVED.git-id | 1 + .../System.Core.dll.REMOVED.git-id | 1 + .../System.IO.Compression.dll.REMOVED.git-id | 1 + .../System.Numerics.dll.REMOVED.git-id | 1 + .../System.Security.dll.REMOVED.git-id | 1 + .../System.Xml.Linq.dll.REMOVED.git-id | 0 .../System.Xml.dll.REMOVED.git-id | 1 + .../System.dll.REMOVED.git-id | 1 + .../mcs.exe.REMOVED.git-id | 1 + .../mscorlib.dll.REMOVED.git-id | 1 + .../Facades/netstandard.dll.REMOVED.git-id | 1 - .../Mono.Cecil.dll.REMOVED.git-id | 1 - .../Mono.Security.dll.REMOVED.git-id | 1 - .../System.Configuration.dll.REMOVED.git-id | 1 - .../System.Core.dll.REMOVED.git-id | 1 - .../System.IO.Compression.dll.REMOVED.git-id | 1 - .../System.Numerics.dll.REMOVED.git-id | 1 - .../System.Security.dll.REMOVED.git-id | 1 - .../System.Xml.dll.REMOVED.git-id | 1 - .../System.dll.REMOVED.git-id | 1 - .../mcs.exe.REMOVED.git-id | 1 - .../mscorlib.dll.REMOVED.git-id | 1 - .../Facades/System.Collections.Concurrent.dll | Bin .../Facades/System.Collections.dll | Bin .../Facades/System.Diagnostics.Debug.dll | Bin .../System.Diagnostics.FileVersionInfo.dll | Bin .../Facades/System.Diagnostics.Tools.dll | Bin .../Facades/System.Dynamic.Runtime.dll | Bin .../Facades/System.Globalization.dll | Bin 5120 -> 5120 bytes .../System.IO.FileSystem.Primitives.dll | Bin .../Facades/System.IO.FileSystem.dll | Bin .../Facades/System.IO.dll | Bin .../Facades/System.Linq.Expressions.dll | Bin .../Facades/System.Linq.dll | Bin .../Facades/System.Reflection.Extensions.dll | Bin .../Facades/System.Reflection.Primitives.dll | Bin .../Facades/System.Reflection.dll | Bin .../System.Resources.ResourceManager.dll | Bin .../Facades/System.Runtime.Extensions.dll | Bin .../System.Runtime.InteropServices.dll | Bin .../Facades/System.Runtime.Numerics.dll | Bin .../Facades/System.Runtime.dll | Bin ...ystem.Security.Cryptography.Algorithms.dll | Bin ...ystem.Security.Cryptography.Primitives.dll | Bin .../System.Text.Encoding.CodePages.dll | Bin .../System.Text.Encoding.Extensions.dll | Bin .../Facades/System.Text.Encoding.dll | Bin .../System.Threading.Tasks.Parallel.dll | Bin .../Facades/System.Threading.Tasks.dll | Bin .../Facades/System.Threading.dll | Bin .../Facades/System.ValueTuple.dll | Bin .../Facades/System.Xml.ReaderWriter.dll | Bin .../Facades/System.Xml.XDocument.dll | Bin .../Facades/netstandard.dll.REMOVED.git-id | 1 + .../Mono.Cecil.dll.REMOVED.git-id | 1 + .../Mono.Security.dll.REMOVED.git-id | 1 + .../System.Configuration.dll.REMOVED.git-id | 1 + .../System.Core.dll.REMOVED.git-id | 1 + .../System.IO.Compression.dll.REMOVED.git-id | 1 + .../System.Numerics.dll.REMOVED.git-id | 1 + .../System.Security.dll.REMOVED.git-id | 1 + .../System.Xml.Linq.dll.REMOVED.git-id | 0 .../System.Xml.dll.REMOVED.git-id | 1 + .../System.dll.REMOVED.git-id | 1 + .../mcs.exe.REMOVED.git-id | 1 + .../mscorlib.dll.REMOVED.git-id | 1 + .../Facades/netstandard.dll.REMOVED.git-id | 1 - .../Mono.Cecil.dll.REMOVED.git-id | 1 - .../Mono.Security.dll.REMOVED.git-id | 1 - .../System.Configuration.dll.REMOVED.git-id | 1 - .../System.Core.dll.REMOVED.git-id | 1 - .../System.IO.Compression.dll.REMOVED.git-id | 1 - .../System.Numerics.dll.REMOVED.git-id | 1 - .../System.Security.dll.REMOVED.git-id | 1 - .../System.Xml.dll.REMOVED.git-id | 1 - .../System.dll.REMOVED.git-id | 1 - .../mcs.exe.REMOVED.git-id | 1 - .../mscorlib.dll.REMOVED.git-id | 1 - .../Validation/ForeignConstraint.cs | 2 +- .../TransformationRules.cs.REMOVED.git-id | 2 +- .../System/Data/Common/DBConnectionString.cs | 2 +- .../System/Data/Odbc/odbcmetadatafactory.cs | 10 +- .../System/Data/OleDb/OleDbMetaDataFactory.cs | 8 +- .../Data/OleDb/oledbconnectionstring.cs | 2 +- .../Data/SqlClient/sqlmetadatafactory.cs | 2 +- .../Common/ChartTypes/BoxPlotChart.cs | 32 +- .../Common/ChartTypes/ErrorBarChart.cs | 34 +- .../NetworkInformation/NetworkInterface.cs | 12 + .../System/net/System/Net/SocketException.cs | 4 +- .../Net/Sockets/Socket.cs.REMOVED.git-id | 2 +- .../net/System/Net/WebRequestMethods.cs | 2 +- .../system/globalization/charunicodeinfo.cs | 2 + .../system/globalization/numberformatinfo.cs | 7 + mcs/errors/cs1013-3.cs | 7 + mcs/errors/cs1013-4.cs | 7 + mcs/errors/cs1013-5.cs | 7 + mcs/errors/cs1013-6.cs | 7 + mcs/errors/cs1013-7.cs | 7 + mcs/errors/cs1013-8.cs | 7 + mcs/mcs/cs-tokenizer.cs.REMOVED.git-id | 2 +- mcs/tests/test-950.cs | 4 +- mcs/tests/ver-il-net_4_x.xml.REMOVED.git-id | 2 +- mcs/tools/aprofutil/Program.cs | 2 +- mcs/tools/linker/Makefile | 5 +- mcs/tools/linker/monolinker.exe.sources | 6 + mk/Makefile.am | 1 - mk/common.mk | 2 - mono/Makefile.am | 2 +- mono/Makefile.in | 6 +- mono/arch/Makefile.am | 2 +- mono/arch/Makefile.in | 6 +- mono/arch/amd64/Makefile.am | 2 +- mono/arch/amd64/Makefile.in | 6 +- mono/arch/arm/Makefile.am | 2 +- mono/arch/arm/Makefile.in | 6 +- mono/arch/arm64/Makefile.am | 2 +- mono/arch/arm64/Makefile.in | 6 +- mono/arch/mips/Makefile.am | 2 +- mono/arch/mips/Makefile.in | 6 +- mono/arch/ppc/Makefile.am | 2 +- mono/arch/ppc/Makefile.in | 6 +- mono/arch/s390x/Makefile.am | 2 +- mono/arch/s390x/Makefile.in | 5 +- mono/arch/sparc/Makefile.am | 2 +- mono/arch/sparc/Makefile.in | 6 +- mono/arch/x86/Makefile.am | 2 +- mono/arch/x86/Makefile.in | 6 +- mono/benchmark/Makefile.am | 2 +- mono/benchmark/Makefile.in | 6 +- mono/cil/Makefile.am | 2 +- mono/cil/Makefile.in | 7 +- mono/dis/Makefile.am | 2 +- mono/dis/Makefile.in | 5 +- mono/dis/declsec.c | 4 +- mono/dis/dis-cil.c | 2 +- mono/dis/dump.c | 2 +- mono/dis/main.c | 2 +- mono/eglib/Makefile.am | 2 +- mono/eglib/Makefile.in | 6 +- mono/eglib/glib.h | 16 +- mono/eglib/goutput.c | 23 +- mono/eglib/gpath.c | 1 - mono/eglib/gstr.c | 13 - mono/eglib/test/Makefile.am | 2 +- mono/eglib/test/Makefile.in | 5 +- mono/eglib/test/endian.c | 2 +- mono/eglib/test/memory.c | 131 +- mono/metadata/Makefile.am | 2 +- mono/metadata/Makefile.in.REMOVED.git-id | 2 +- mono/metadata/appdomain.c.REMOVED.git-id | 2 +- mono/metadata/assembly-internals.h | 3 + mono/metadata/assembly-load-context.c | 30 +- mono/metadata/assembly.c.REMOVED.git-id | 2 +- mono/metadata/boehm-gc.c | 27 +- mono/metadata/class-init.c.REMOVED.git-id | 2 +- mono/metadata/class-internals.h | 59 +- mono/metadata/class.h | 10 + mono/metadata/cominterop.c.REMOVED.git-id | 2 +- .../culture-info-tables.h.REMOVED.git-id | 2 +- mono/metadata/custom-attrs.c | 40 +- mono/metadata/debug-helpers.c | 4 +- mono/metadata/domain.c | 22 +- mono/metadata/gc-internals.h | 3 + mono/metadata/icall-decl.h | 51 +- mono/metadata/icall-def.h.REMOVED.git-id | 2 +- mono/metadata/icall-signatures.h | 2 + mono/metadata/icall.c.REMOVED.git-id | 2 +- mono/metadata/image.c | 4 - mono/metadata/marshal-ilgen.c.REMOVED.git-id | 2 +- mono/metadata/marshal-internals.h | 15 +- mono/metadata/marshal-windows.c | 31 +- mono/metadata/marshal.c.REMOVED.git-id | 2 +- mono/metadata/metadata-internals.h | 20 +- mono/metadata/metadata.c.REMOVED.git-id | 2 +- mono/metadata/monitor.c | 95 +- mono/metadata/mono-config.c | 5 +- mono/metadata/mono-route.c | 4 +- mono/metadata/mono-security-windows.c | 31 +- mono/metadata/mono-security.c | 12 +- mono/metadata/native-library.c | 29 +- mono/metadata/null-gc.c | 5 + mono/metadata/object-internals.h | 3 +- mono/metadata/object.c.REMOVED.git-id | 2 +- mono/metadata/reflection-internals.h | 4 +- mono/metadata/reflection.c.REMOVED.git-id | 2 +- mono/metadata/remoting.c | 20 +- mono/metadata/sgen-bridge-internals.h | 3 + mono/metadata/sgen-bridge.c | 6 +- mono/metadata/sgen-mono.c | 15 +- mono/metadata/sgen-tarjan-bridge.c | 104 +- mono/metadata/sgen-toggleref.c | 7 +- mono/metadata/sre.c.REMOVED.git-id | 2 +- mono/metadata/threadpool-worker-default.c | 2 +- mono/metadata/threadpool.c | 44 +- mono/metadata/threads-types.h | 3 +- mono/metadata/threads.c.REMOVED.git-id | 2 +- mono/metadata/verify.c.REMOVED.git-id | 2 +- mono/metadata/w32handle.c | 2 +- .../metadata/w32process-unix.c.REMOVED.git-id | 2 +- mono/metadata/w32semaphore-unix.c | 11 +- mono/metadata/w32semaphore-win32.c | 6 +- mono/metadata/w32socket-unix.c | 3 +- mono/metadata/w32socket-win32.c | 3 +- mono/metadata/w32socket.c | 81 +- mono/metadata/w32socket.h | 2 +- mono/mini/Makefile.am | 26 +- mono/mini/Makefile.am.in | 26 +- mono/mini/Makefile.in.REMOVED.git-id | 2 +- mono/mini/alias-analysis.c | 9 +- mono/mini/aot-compiler.c.REMOVED.git-id | 2 +- mono/mini/aot-compiler.h | 1 + mono/mini/aot-runtime.c.REMOVED.git-id | 2 +- mono/mini/aot-runtime.h | 4 +- mono/mini/branch-opts.c | 16 +- mono/mini/cfold.c | 4 +- mono/mini/debugger-agent.c.REMOVED.git-id | 2 +- mono/mini/debugger-engine.c | 96 +- mono/mini/debugger-engine.h | 6 +- mono/mini/decompose.c | 2 +- mono/mini/driver.c | 124 +- mono/mini/ee.h | 2 + mono/mini/exceptions-amd64.c | 8 +- mono/mini/exceptions-arm.c | 2 +- mono/mini/exceptions-arm64.c | 2 +- mono/mini/exceptions-ppc.c | 7 +- mono/mini/exceptions-x86.c | 4 +- mono/mini/generics.cs | 22 + mono/mini/iltests.il | 183 + mono/mini/interp-stubs.c | 10 + mono/mini/interp/interp-internals.h | 25 +- mono/mini/interp/interp.c.REMOVED.git-id | 2 +- mono/mini/interp/interp.h | 8 + mono/mini/interp/mintops.c | 2 +- mono/mini/interp/mintops.h | 2 + mono/mini/interp/transform.c.REMOVED.git-id | 2 +- mono/mini/interp/transform.h | 173 + mono/mini/interp/whitebox-snippets.il | 36 + mono/mini/interp/whitebox.c | 236 ++ mono/mini/intrinsics.c | 29 +- mono/mini/jit-icalls.c | 6 +- mono/mini/jit-icalls.h | 204 +- mono/mini/lldb.c | 28 - mono/mini/llvm-jit.cpp | 13 +- mono/mini/llvmonly-runtime.c | 8 +- mono/mini/llvmonly-runtime.h | 9 +- mono/mini/main-core.c | 8 +- mono/mini/memory-access.c | 11 +- mono/mini/method-to-ir.c.REMOVED.git-id | 2 +- mono/mini/mini-arm64.c.REMOVED.git-id | 2 +- mono/mini/mini-codegen.c | 6 +- mono/mini/mini-exceptions.c.REMOVED.git-id | 2 +- .../mini-generic-sharing.c.REMOVED.git-id | 2 +- mono/mini/mini-llvm-cpp.cpp | 19 + mono/mini/mini-llvm-cpp.h | 6 + mono/mini/mini-llvm.c.REMOVED.git-id | 2 +- mono/mini/mini-ops.h | 34 +- mono/mini/mini-posix.c | 11 +- mono/mini/mini-runtime.c.REMOVED.git-id | 2 +- mono/mini/mini-runtime.h | 11 +- mono/mini/mini-trampolines.c | 4 +- mono/mini/mini-wasm-debugger.c | 27 +- mono/mini/mini-windows.c | 2 +- mono/mini/mini.c.REMOVED.git-id | 2 +- mono/mini/mini.h.REMOVED.git-id | 2 +- mono/mini/simd-intrinsics-netcore.c | 453 ++- mono/mini/simd-methods-netcore.h | 49 +- mono/mini/trace.c | 8 +- mono/mini/tramp-amd64.c | 4 +- mono/mini/tramp-arm64.c | 16 +- mono/mini/version.h | 2 +- mono/mini/wasm_m2n_invoke.g.h | 149 +- mono/profiler/Makefile.am | 2 +- mono/profiler/Makefile.in | 5 +- mono/profiler/mprof-report.c.REMOVED.git-id | 2 +- mono/sgen/Makefile.am | 2 +- mono/sgen/Makefile.in | 5 +- mono/sgen/sgen-alloc.c | 8 +- mono/sgen/sgen-gc.c.REMOVED.git-id | 2 +- mono/sgen/sgen-gc.h | 2 +- mono/sgen/sgen-internal.c | 4 +- mono/sgen/sgen-los.c | 4 +- mono/sgen/sgen-marksweep.c | 10 +- mono/sgen/sgen-memory-governor.c | 2 +- mono/sgen/sgen-nursery-allocator.c | 10 +- mono/sgen/sgen-pinning.c | 2 +- mono/sgen/sgen-protocol-def.h | 6 +- mono/sgen/sgen-protocol.c | 3 +- mono/tests/Makefile.am.REMOVED.git-id | 2 +- mono/tests/Makefile.in.REMOVED.git-id | 2 +- mono/tests/TestingReferenceAssembly.cs | 7 + .../TestingReferenceReferenceAssembly.cs | 11 + .../tests/assembly-load-reference/Makefile.am | 7 +- .../tests/assembly-load-reference/Makefile.in | 13 +- .../mainanddep/LoadFileMain.cs | 14 + .../mainanddep/LoadFromMain.cs | 14 + .../samedir/LoadFileMain.cs | 14 + .../samedir/LoadFromMain.cs | 14 + .../separatedir/LoadFileMain.cs | 32 + .../separatedir/LoadFromMain.cs | 14 + mono/tests/assembly-load-reference/src/Dep.cs | 6 + mono/tests/assembly-load-reference/src/Mid.cs | 14 + mono/tests/delegate17.cs | 59 +- mono/tests/dim-issue-18917.cs | 38 + mono/tests/event-il.il | 136 + mono/tests/gc-descriptors/Makefile.am | 2 +- mono/tests/gc-descriptors/Makefile.in | 6 +- mono/tests/libtest.c.REMOVED.git-id | 2 +- mono/tests/merp-crash-test.cs | 151 +- mono/tests/module-cctor.il | 32 + mono/tests/pinvoke2.cs | 17 + mono/tests/process-leak.cs | 92 + mono/tests/process-stress-1.cs | 39 + mono/tests/process-stress-2.cs | 91 + mono/tests/process-stress-3.cs | 99 + mono/tests/rgctx-thread-static.cs | 30 + mono/tests/testing_gac/Makefile.am | 5 +- mono/tests/testing_gac/Makefile.in | 10 +- mono/tests/testing_gac/app-both.cs | 23 + mono/tests/testing_gac/v1/app-refl-load.cs | 45 + mono/tests/testing_gac/v1/app.cs | 8 + mono/tests/threadpool-exceptions2.cs | 48 + mono/tests/threadpool-exceptions5.cs | 49 + mono/tests/unhandled-exception-1.cs | 32 + mono/tests/unhandled-exception-2.cs | 39 + mono/tests/unhandled-exception-3.cs | 31 + mono/tests/unhandled-exception-4.cs | 41 + mono/tests/unhandled-exception-5.cs | 46 + mono/tests/unhandled-exception-6.cs | 36 + mono/tests/unhandled-exception-7.cs | 58 + mono/tests/unhandled-exception-8.cs | 24 + mono/tests/unhandled-exception-9.cs | 16 + mono/unit-tests/Makefile.am | 2 +- mono/unit-tests/Makefile.in | 6 +- mono/utils/Makefile.am | 2 +- mono/utils/Makefile.in.REMOVED.git-id | 2 +- mono/utils/atomic.c | 5 +- mono/utils/atomic.h | 1 + mono/utils/dlmalloc.c.REMOVED.git-id | 2 +- mono/utils/dlmalloc.h | 24 - mono/utils/jemalloc/Makefile.am | 2 +- mono/utils/jemalloc/Makefile.in | 7 +- mono/utils/mono-counters.c | 48 +- mono/utils/mono-dl-fallback.h | 12 +- mono/utils/mono-dl-posix.c | 13 +- mono/utils/mono-dl-wasm.c | 13 +- mono/utils/mono-dl.c | 2 +- mono/utils/mono-internal-hash.c | 12 + mono/utils/mono-internal-hash.h | 4 + mono/utils/mono-log-flight-recorder.c | 4 +- mono/utils/mono-md5.c | 2 +- mono/utils/mono-memory-model.h | 26 +- mono/utils/mono-merp.c | 16 +- mono/utils/mono-mmap-wasm.c | 2 +- mono/utils/mono-mmap-windows.c | 2 +- mono/utils/mono-mmap.c | 8 +- mono/utils/mono-proclib.c | 2 +- mono/utils/mono-state.c | 7 +- mono/utils/mono-threads-debug.h | 1 + mono/utils/mono-threads-posix.c | 10 + mono/utils/mono-threads-state-machine.c | 4 + mono/utils/mono-threads-wasm.c | 6 + mono/utils/mono-threads-windows.c | 9 +- mono/utils/mono-threads.h | 2 + mono/zlib/Makefile.am | 2 +- mono/zlib/Makefile.in | 5 +- msvc/runmdesc.bat | 44 +- msvc/winsetup.bat | 46 +- netcore/Makefile | 24 +- po/mcs/de.gmo | Bin 5406 -> 5406 bytes po/mcs/de.po.REMOVED.git-id | 2 +- po/mcs/es.gmo | Bin 16329 -> 16329 bytes po/mcs/es.po.REMOVED.git-id | 2 +- po/mcs/ja.gmo | Bin 20863 -> 20863 bytes po/mcs/ja.po.REMOVED.git-id | 2 +- po/mcs/mcs.pot | 68 +- po/mcs/pt_BR.gmo | Bin 72806 -> 72806 bytes po/mcs/pt_BR.po.REMOVED.git-id | 2 +- runtime/Makefile.am | 2 +- runtime/Makefile.in | 3 +- samples/embed/teste.c | 2 +- support/signal.c | 7 - tools/locale-builder/Driver.cs | 2 +- tools/pedump/pedump.c | 2 +- 812 files changed, 26901 insertions(+), 9053 deletions(-) create mode 100644 external/bdwgc/libatomic_ops/Makefile.in create mode 100644 external/bdwgc/libatomic_ops/aclocal.m4 create mode 100644 external/bdwgc/libatomic_ops/autom4te.cache/output.0.REMOVED.git-id create mode 100644 external/bdwgc/libatomic_ops/autom4te.cache/output.1.REMOVED.git-id create mode 100644 external/bdwgc/libatomic_ops/autom4te.cache/output.2.REMOVED.git-id create mode 100644 external/bdwgc/libatomic_ops/autom4te.cache/requests create mode 100644 external/bdwgc/libatomic_ops/autom4te.cache/traces.0 create mode 100644 external/bdwgc/libatomic_ops/autom4te.cache/traces.1 create mode 100644 external/bdwgc/libatomic_ops/autom4te.cache/traces.2 create mode 100755 external/bdwgc/libatomic_ops/compile create mode 100755 external/bdwgc/libatomic_ops/config.guess create mode 100755 external/bdwgc/libatomic_ops/config.sub create mode 100644 external/bdwgc/libatomic_ops/configure.REMOVED.git-id create mode 100755 external/bdwgc/libatomic_ops/depcomp rename {mk => external/bdwgc/libatomic_ops/doc}/Makefile.in (61%) create mode 100755 external/bdwgc/libatomic_ops/install-sh create mode 100644 external/bdwgc/libatomic_ops/ltmain.sh.REMOVED.git-id create mode 100644 external/bdwgc/libatomic_ops/m4/libtool.m4.REMOVED.git-id create mode 100644 external/bdwgc/libatomic_ops/m4/ltoptions.m4 create mode 100644 external/bdwgc/libatomic_ops/m4/ltsugar.m4 create mode 100644 external/bdwgc/libatomic_ops/m4/ltversion.m4 create mode 100644 external/bdwgc/libatomic_ops/m4/lt~obsolete.m4 create mode 100755 external/bdwgc/libatomic_ops/missing create mode 100644 external/bdwgc/libatomic_ops/src/Makefile.in create mode 100644 external/bdwgc/libatomic_ops/src/config.h.in create mode 100644 external/binary-reference-assemblies/build/monowasm/WebAssembly.Net.WebSockets.dll create mode 100644 external/binary-reference-assemblies/src/monowasm/WebAssembly.Net.WebSockets.cs create mode 100644 external/boringssl/THIRD-PARTY-NOTICES.TXT create mode 100644 external/cecil/.github/FUNDING.yml create mode 100644 external/corefx/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs.REMOVED.git-id create mode 100644 external/linker/build.cmd create mode 100755 external/linker/build.sh rename external/linker/eng/common/post-build/{promote-build.ps1 => add-build-to-channel.ps1} (95%) delete mode 100644 external/linker/eng/common/templates/post-build/promote-build.yml rename external/linker/eng/common/templates/steps/{promote-build.yml => add-build-to-channel.yml} (68%) create mode 100644 external/linker/external/cecil/.github/FUNDING.yml create mode 100644 external/linker/src/linker/Linker.Steps/BodySubstituterStep.cs delete mode 100644 external/linker/src/linker/Linker.Steps/MarkStep.cs create mode 100644 external/linker/src/linker/Linker.Steps/MarkStep.cs.REMOVED.git-id create mode 100644 external/linker/src/linker/Linker.Steps/RemoveUnreachableBlocksStep.cs create mode 100644 external/linker/src/linker/Linker/IDependencyRecorder.cs create mode 100644 external/linker/src/linker/Linker/IReflectionPatternRecorder.cs rename mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetFlags.cs => external/linker/src/linker/Linker/LoggingReflectionPatternRecorder.cs (57%) create mode 100644 external/linker/src/linker/Linker/XmlDependencyRecorder.cs delete mode 100644 mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Charcode.cs delete mode 100644 mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Charset.cs create mode 100644 mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetToCodepage.cs delete mode 100644 mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/StandardCharCode.cs delete mode 100644 mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/StandardCharName.cs delete mode 100644 mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/TextMap.cs create mode 100644 mcs/class/System.Windows.Forms/System.Windows.Forms/TabStops.cs create mode 100644 mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ContextMenuStripTest.cs create mode 100644 mcs/class/System/System.Net.WebSockets/WebSocketHandle.wasm.cs rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Collections.Concurrent.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Collections.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Diagnostics.Debug.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Diagnostics.FileVersionInfo.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Diagnostics.Tools.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Dynamic.Runtime.dll (100%) rename mcs/class/lib/{monolite-win32/97b07b51-46d8-4084-b48e-77aa5c192654 => monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Globalization.dll (52%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.IO.FileSystem.Primitives.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.IO.FileSystem.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.IO.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Linq.Expressions.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Linq.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Reflection.Extensions.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Reflection.Primitives.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Reflection.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Resources.ResourceManager.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.Extensions.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.InteropServices.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.Numerics.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Security.Cryptography.Algorithms.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Security.Cryptography.Primitives.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Text.Encoding.CodePages.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Text.Encoding.Extensions.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Text.Encoding.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Threading.Tasks.Parallel.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Threading.Tasks.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Threading.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.ValueTuple.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Xml.ReaderWriter.dll (100%) rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Xml.XDocument.dll (100%) create mode 100644 mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/netstandard.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Mono.Cecil.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Mono.Security.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Configuration.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Core.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.IO.Compression.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Numerics.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Security.dll.REMOVED.git-id rename mcs/class/lib/monolite-linux/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/System.Xml.Linq.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Xml.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/mcs.exe.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/mscorlib.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/netstandard.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/Mono.Cecil.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/Mono.Security.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/System.Configuration.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/System.Core.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/System.IO.Compression.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/System.Numerics.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/System.Security.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/System.Xml.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/System.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/mcs.exe.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/mscorlib.dll.REMOVED.git-id rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Collections.Concurrent.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Collections.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Diagnostics.Debug.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Diagnostics.FileVersionInfo.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Diagnostics.Tools.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Dynamic.Runtime.dll (100%) rename mcs/class/lib/{monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654 => monolite-macos/1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Globalization.dll (52%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.IO.FileSystem.Primitives.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.IO.FileSystem.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.IO.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Linq.Expressions.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Linq.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Reflection.Extensions.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Reflection.Primitives.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Reflection.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Resources.ResourceManager.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.Extensions.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.InteropServices.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.Numerics.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Security.Cryptography.Algorithms.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Security.Cryptography.Primitives.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Text.Encoding.CodePages.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Text.Encoding.Extensions.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Text.Encoding.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Threading.Tasks.Parallel.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Threading.Tasks.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Threading.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.ValueTuple.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Xml.ReaderWriter.dll (100%) rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Xml.XDocument.dll (100%) create mode 100644 mcs/class/lib/monolite-macos/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/netstandard.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-macos/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Mono.Cecil.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-macos/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Mono.Security.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-macos/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Configuration.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-macos/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Core.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-macos/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.IO.Compression.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-macos/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Numerics.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-macos/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Security.dll.REMOVED.git-id rename mcs/class/lib/monolite-macos/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/System.Xml.Linq.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-macos/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Xml.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-macos/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-macos/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/mcs.exe.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-macos/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/mscorlib.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/netstandard.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/97b07b51-46d8-4084-b48e-77aa5c192654/Mono.Cecil.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/97b07b51-46d8-4084-b48e-77aa5c192654/Mono.Security.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/97b07b51-46d8-4084-b48e-77aa5c192654/System.Configuration.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/97b07b51-46d8-4084-b48e-77aa5c192654/System.Core.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/97b07b51-46d8-4084-b48e-77aa5c192654/System.IO.Compression.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/97b07b51-46d8-4084-b48e-77aa5c192654/System.Numerics.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/97b07b51-46d8-4084-b48e-77aa5c192654/System.Security.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/97b07b51-46d8-4084-b48e-77aa5c192654/System.Xml.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/97b07b51-46d8-4084-b48e-77aa5c192654/System.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/97b07b51-46d8-4084-b48e-77aa5c192654/mcs.exe.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/97b07b51-46d8-4084-b48e-77aa5c192654/mscorlib.dll.REMOVED.git-id rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Collections.Concurrent.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Collections.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Diagnostics.Debug.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Diagnostics.FileVersionInfo.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Diagnostics.Tools.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Dynamic.Runtime.dll (100%) rename mcs/class/lib/{monolite-macos/97b07b51-46d8-4084-b48e-77aa5c192654 => monolite-unix/1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Globalization.dll (52%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.IO.FileSystem.Primitives.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.IO.FileSystem.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.IO.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Linq.Expressions.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Linq.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Reflection.Extensions.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Reflection.Primitives.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Reflection.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Resources.ResourceManager.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.Extensions.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.InteropServices.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.Numerics.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Security.Cryptography.Algorithms.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Security.Cryptography.Primitives.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Text.Encoding.CodePages.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Text.Encoding.Extensions.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Text.Encoding.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Threading.Tasks.Parallel.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Threading.Tasks.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Threading.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.ValueTuple.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Xml.ReaderWriter.dll (100%) rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Xml.XDocument.dll (100%) create mode 100644 mcs/class/lib/monolite-unix/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/netstandard.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-unix/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Mono.Cecil.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-unix/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Mono.Security.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-unix/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Configuration.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-unix/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Core.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-unix/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.IO.Compression.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-unix/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Numerics.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-unix/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Security.dll.REMOVED.git-id rename mcs/class/lib/monolite-unix/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/System.Xml.Linq.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-unix/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Xml.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-unix/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-unix/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/mcs.exe.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-unix/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/mscorlib.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/netstandard.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/97b07b51-46d8-4084-b48e-77aa5c192654/Mono.Cecil.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/97b07b51-46d8-4084-b48e-77aa5c192654/Mono.Security.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/97b07b51-46d8-4084-b48e-77aa5c192654/System.Configuration.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/97b07b51-46d8-4084-b48e-77aa5c192654/System.Core.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/97b07b51-46d8-4084-b48e-77aa5c192654/System.IO.Compression.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/97b07b51-46d8-4084-b48e-77aa5c192654/System.Numerics.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/97b07b51-46d8-4084-b48e-77aa5c192654/System.Security.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/97b07b51-46d8-4084-b48e-77aa5c192654/System.Xml.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/97b07b51-46d8-4084-b48e-77aa5c192654/System.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/97b07b51-46d8-4084-b48e-77aa5c192654/mcs.exe.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/97b07b51-46d8-4084-b48e-77aa5c192654/mscorlib.dll.REMOVED.git-id rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Collections.Concurrent.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Collections.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Diagnostics.Debug.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Diagnostics.FileVersionInfo.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Diagnostics.Tools.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Dynamic.Runtime.dll (100%) rename mcs/class/lib/{monolite-unix/97b07b51-46d8-4084-b48e-77aa5c192654 => monolite-win32/1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Globalization.dll (52%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.IO.FileSystem.Primitives.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.IO.FileSystem.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.IO.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Linq.Expressions.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Linq.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Reflection.Extensions.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Reflection.Primitives.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Reflection.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Resources.ResourceManager.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.Extensions.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.InteropServices.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.Numerics.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Runtime.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Security.Cryptography.Algorithms.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Security.Cryptography.Primitives.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Text.Encoding.CodePages.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Text.Encoding.Extensions.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Text.Encoding.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Threading.Tasks.Parallel.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Threading.Tasks.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Threading.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.ValueTuple.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Xml.ReaderWriter.dll (100%) rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/Facades/System.Xml.XDocument.dll (100%) create mode 100644 mcs/class/lib/monolite-win32/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/netstandard.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-win32/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Mono.Cecil.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-win32/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Mono.Security.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-win32/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Configuration.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-win32/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Core.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-win32/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.IO.Compression.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-win32/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Numerics.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-win32/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Security.dll.REMOVED.git-id rename mcs/class/lib/monolite-win32/{97b07b51-46d8-4084-b48e-77aa5c192654 => 1A5E0066-58DC-428A-B21C-0AD6CDAE2789}/System.Xml.Linq.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-win32/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.Xml.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-win32/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/System.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-win32/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/mcs.exe.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-win32/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/mscorlib.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/netstandard.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/97b07b51-46d8-4084-b48e-77aa5c192654/Mono.Cecil.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/97b07b51-46d8-4084-b48e-77aa5c192654/Mono.Security.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/97b07b51-46d8-4084-b48e-77aa5c192654/System.Configuration.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/97b07b51-46d8-4084-b48e-77aa5c192654/System.Core.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/97b07b51-46d8-4084-b48e-77aa5c192654/System.IO.Compression.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/97b07b51-46d8-4084-b48e-77aa5c192654/System.Numerics.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/97b07b51-46d8-4084-b48e-77aa5c192654/System.Security.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/97b07b51-46d8-4084-b48e-77aa5c192654/System.Xml.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/97b07b51-46d8-4084-b48e-77aa5c192654/System.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/97b07b51-46d8-4084-b48e-77aa5c192654/mcs.exe.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/97b07b51-46d8-4084-b48e-77aa5c192654/mscorlib.dll.REMOVED.git-id create mode 100644 mcs/errors/cs1013-3.cs create mode 100644 mcs/errors/cs1013-4.cs create mode 100644 mcs/errors/cs1013-5.cs create mode 100644 mcs/errors/cs1013-6.cs create mode 100644 mcs/errors/cs1013-7.cs create mode 100644 mcs/errors/cs1013-8.cs delete mode 100644 mk/Makefile.am delete mode 100644 mk/common.mk create mode 100644 mono/mini/interp/transform.h create mode 100644 mono/mini/interp/whitebox-snippets.il create mode 100644 mono/mini/interp/whitebox.c create mode 100644 mono/tests/TestingReferenceAssembly.cs create mode 100644 mono/tests/TestingReferenceReferenceAssembly.cs create mode 100644 mono/tests/assembly-load-reference/mainanddep/LoadFileMain.cs create mode 100644 mono/tests/assembly-load-reference/mainanddep/LoadFromMain.cs create mode 100644 mono/tests/assembly-load-reference/samedir/LoadFileMain.cs create mode 100644 mono/tests/assembly-load-reference/samedir/LoadFromMain.cs create mode 100644 mono/tests/assembly-load-reference/separatedir/LoadFileMain.cs create mode 100644 mono/tests/assembly-load-reference/separatedir/LoadFromMain.cs create mode 100644 mono/tests/assembly-load-reference/src/Dep.cs create mode 100644 mono/tests/assembly-load-reference/src/Mid.cs create mode 100644 mono/tests/dim-issue-18917.cs create mode 100644 mono/tests/event-il.il create mode 100644 mono/tests/module-cctor.il create mode 100644 mono/tests/process-leak.cs create mode 100644 mono/tests/process-stress-1.cs create mode 100644 mono/tests/process-stress-2.cs create mode 100644 mono/tests/process-stress-3.cs create mode 100644 mono/tests/rgctx-thread-static.cs create mode 100644 mono/tests/testing_gac/app-both.cs create mode 100644 mono/tests/testing_gac/v1/app-refl-load.cs create mode 100644 mono/tests/testing_gac/v1/app.cs create mode 100644 mono/tests/threadpool-exceptions2.cs create mode 100644 mono/tests/threadpool-exceptions5.cs create mode 100644 mono/tests/unhandled-exception-1.cs create mode 100644 mono/tests/unhandled-exception-2.cs create mode 100644 mono/tests/unhandled-exception-3.cs create mode 100644 mono/tests/unhandled-exception-4.cs create mode 100644 mono/tests/unhandled-exception-5.cs create mode 100644 mono/tests/unhandled-exception-6.cs create mode 100644 mono/tests/unhandled-exception-7.cs create mode 100644 mono/tests/unhandled-exception-8.cs create mode 100644 mono/tests/unhandled-exception-9.cs mode change 100755 => 100644 netcore/Makefile diff --git a/autogen.sh b/autogen.sh index d191cd03a0..3f0fcd49ee 100755 --- a/autogen.sh +++ b/autogen.sh @@ -104,12 +104,10 @@ if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then fi fi - -# -# Plug in the extension module -# +# Parse parameters has_ext_mod=false ext_mod_args='' +has_disable_boehm=false for PARAM; do if [[ $PARAM =~ "--enable-extension-module" ]] ; then has_ext_mod=true @@ -117,8 +115,14 @@ for PARAM; do ext_mod_args=`echo $PARAM | cut -d= -f2` fi fi + if [[ $PARAM =~ "--disable-boehm" ]] ; then + has_disable_boehm=true + fi done +# +# Plug in the extension module +# if test x$has_ext_mod = xtrue; then pushd $top_srcdir../mono-extensions/scripts sh ./prepare-repo.sh $ext_mod_args || exit 1 @@ -150,7 +154,12 @@ automake $am_opt || echo "Running autoconf ..." autoconf || { echo "**Error**: autoconf failed."; exit 1; } -if test -d $srcdir/external/bdwgc; then +# Update all submodules recursively to ensure everything is checked out +if test -e $srcdir/scripts/update_submodules.sh; then + (cd $srcdir && scripts/update_submodules.sh) +fi + +if test x$has_disable_boehm = xfalse -a -d $srcdir/external/bdwgc; then echo Running external/bdwgc/autogen.sh ... (cd $srcdir/external/bdwgc ; NOCONFIGURE=1 ./autogen.sh "$@") echo Done running external/bdwgc/autogen.sh ... diff --git a/config.h.in b/config.h.in index 46e8999704..78ea6355e3 100644 --- a/config.h.in +++ b/config.h.in @@ -27,6 +27,9 @@ /* Disable agent attach support */ #undef DISABLE_ATTACH +/* Disable config directories. */ +#undef DISABLE_CFGDIR_CONFIG + /* Disable runtime cleanup. */ #undef DISABLE_CLEANUP @@ -1532,6 +1535,12 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* PowerPC ELFv1 */ +#undef POWERPC_ELF + +/* PowerPC ELFv2 */ +#undef POWERPC_ELFV2 + /* getpriority with int who */ #undef PRIORITY_REQUIRES_INT_WHO diff --git a/configure.REMOVED.git-id b/configure.REMOVED.git-id index 94b11c96ce..bb8ba6ae2d 100644 --- a/configure.REMOVED.git-id +++ b/configure.REMOVED.git-id @@ -1 +1 @@ -57151bd040b7d72a70d75fc7b3935fb3ece1abc3 \ No newline at end of file +8881f9e3281be1b876b8e97720363b2ce45b5244 \ No newline at end of file diff --git a/configure.ac.REMOVED.git-id b/configure.ac.REMOVED.git-id index 1bc02dd60b..cd07f0df81 100644 --- a/configure.ac.REMOVED.git-id +++ b/configure.ac.REMOVED.git-id @@ -1 +1 @@ -d9eb465c39764c44d304b411dd7a31baa2d4bcc9 \ No newline at end of file +b736fbcec00fc8bd8dbad8a763bc97bb709e56f0 \ No newline at end of file diff --git a/docs/HtmlAgilityPack/HtmlAttributeCollection.cs b/docs/HtmlAgilityPack/HtmlAttributeCollection.cs index 07af9979dd..3565897d7c 100644 --- a/docs/HtmlAgilityPack/HtmlAttributeCollection.cs +++ b/docs/HtmlAgilityPack/HtmlAttributeCollection.cs @@ -242,7 +242,7 @@ namespace HtmlAgilityPack } /// - /// Checks for existance of attribute with given name + /// Checks for existence of attribute with given name /// /// /// diff --git a/docs/deploy/mono-api-counters.html b/docs/deploy/mono-api-counters.html index 72d3d6766a..81694e144e 100644 --- a/docs/deploy/mono-api-counters.html +++ b/docs/deploy/mono-api-counters.html @@ -253,7 +253,7 @@ mono_counters_dump (int section_mask, FILE *outfile)

Parameters
-
section_mask The sections to dump counters for
outfile a FILE to dump the results to
Description
+
section_mask The sections to dump counters for
outfile a FILE to dump the results to; NULL will default to g_print
Description
Displays the counts of all the enabled counters registered. To filter by variance, you can OR one or more variance with the specific section you want. diff --git a/external/api-snapshot/profiles/monodroid/System.cs.REMOVED.git-id b/external/api-snapshot/profiles/monodroid/System.cs.REMOVED.git-id index 59c7712756..74d9b08e0c 100644 --- a/external/api-snapshot/profiles/monodroid/System.cs.REMOVED.git-id +++ b/external/api-snapshot/profiles/monodroid/System.cs.REMOVED.git-id @@ -1 +1 @@ -3e8933930502d0d8ded2c9654341153068d92d73 \ No newline at end of file +e52ae1321cb12d23e3b585c7556602edad61b435 \ No newline at end of file diff --git a/external/api-snapshot/profiles/monotouch/System.cs.REMOVED.git-id b/external/api-snapshot/profiles/monotouch/System.cs.REMOVED.git-id index 1a3d088996..d34f54d176 100644 --- a/external/api-snapshot/profiles/monotouch/System.cs.REMOVED.git-id +++ b/external/api-snapshot/profiles/monotouch/System.cs.REMOVED.git-id @@ -1 +1 @@ -ed1414ca828ee9519a6607ede29370c74a68f69b \ No newline at end of file +2c9ad44ed0aa5722e9ba1a8610b6b7dfa4c7dfc0 \ No newline at end of file diff --git a/external/api-snapshot/profiles/net_4_x/Mono.Cecil.Mdb.cs b/external/api-snapshot/profiles/net_4_x/Mono.Cecil.Mdb.cs index 52c351c5a3..427982fae5 100644 --- a/external/api-snapshot/profiles/net_4_x/Mono.Cecil.Mdb.cs +++ b/external/api-snapshot/profiles/net_4_x/Mono.Cecil.Mdb.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -[assembly:System.Reflection.AssemblyVersionAttribute("0.11.0.0")] +[assembly:System.Reflection.AssemblyVersionAttribute("0.11.1.0")] [assembly:System.CLSCompliantAttribute(false)] [assembly:System.Diagnostics.DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly:System.Reflection.AssemblyCopyrightAttribute("Copyright © 2008 - 2018 Jb Evain")] -[assembly:System.Reflection.AssemblyFileVersionAttribute("0.11.0.0")] -[assembly:System.Reflection.AssemblyInformationalVersionAttribute("0.11.0.0")] +[assembly:System.Reflection.AssemblyFileVersionAttribute("0.11.1.0")] +[assembly:System.Reflection.AssemblyInformationalVersionAttribute("0.11.1.0")] [assembly:System.Reflection.AssemblyProductAttribute("Mono.Cecil")] [assembly:System.Reflection.AssemblyTitleAttribute("Mono.Cecil.Mdb")] [assembly:System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8)] diff --git a/external/api-snapshot/profiles/net_4_x/Mono.Cecil.cs.REMOVED.git-id b/external/api-snapshot/profiles/net_4_x/Mono.Cecil.cs.REMOVED.git-id index 9187b400da..f5b36dd50b 100644 --- a/external/api-snapshot/profiles/net_4_x/Mono.Cecil.cs.REMOVED.git-id +++ b/external/api-snapshot/profiles/net_4_x/Mono.Cecil.cs.REMOVED.git-id @@ -1 +1 @@ -7d65de02df2ecf34d5528debc47da5e04ca08c3c \ No newline at end of file +d885583bf5126fa7cef592508f257eead32e1fd6 \ No newline at end of file diff --git a/external/api-snapshot/profiles/net_4_x/Mono.Debugger.Soft.cs b/external/api-snapshot/profiles/net_4_x/Mono.Debugger.Soft.cs index c5fcf2e87e..a87a1ef445 100644 --- a/external/api-snapshot/profiles/net_4_x/Mono.Debugger.Soft.cs +++ b/external/api-snapshot/profiles/net_4_x/Mono.Debugger.Soft.cs @@ -103,6 +103,7 @@ namespace Mono.Debugger.Soft { internal CommandException() { } public Mono.Debugger.Soft.ErrorCode ErrorCode { get { throw null; } set { } } + public string ErrorMessage { get { throw null; } } } public abstract partial class Connection { @@ -174,6 +175,7 @@ namespace Mono.Debugger.Soft { public ErrorHandlerEventArgs() { } public Mono.Debugger.Soft.ErrorCode ErrorCode { get { throw null; } set { } } + public string ErrorMessage { get { throw null; } set { } } } public abstract partial class Event { @@ -204,6 +206,7 @@ namespace Mono.Debugger.Soft protected void CheckMirror(Mono.Debugger.Soft.VirtualMachine vm, Mono.Debugger.Soft.Mirror m) { } public void Disable() { } public virtual void Enable() { } + public int GetId() { throw null; } protected void SetEnabled(int id) { } } public partial class EventSet diff --git a/external/api-snapshot/profiles/net_4_x/System.Windows.Forms.cs.REMOVED.git-id b/external/api-snapshot/profiles/net_4_x/System.Windows.Forms.cs.REMOVED.git-id index ac5c503762..f6795f492b 100644 --- a/external/api-snapshot/profiles/net_4_x/System.Windows.Forms.cs.REMOVED.git-id +++ b/external/api-snapshot/profiles/net_4_x/System.Windows.Forms.cs.REMOVED.git-id @@ -1 +1 @@ -971ec0433e2549af734d0be493c45056564c2b41 \ No newline at end of file +d227de624686ae491802de93462fadfaf51e3d05 \ No newline at end of file diff --git a/external/api-snapshot/profiles/net_4_x/System.cs.REMOVED.git-id b/external/api-snapshot/profiles/net_4_x/System.cs.REMOVED.git-id index c73899ad47..d1f6b2b790 100644 --- a/external/api-snapshot/profiles/net_4_x/System.cs.REMOVED.git-id +++ b/external/api-snapshot/profiles/net_4_x/System.cs.REMOVED.git-id @@ -1 +1 @@ -d22c0752cbf3a18e72df8083ab5354f346c648f8 \ No newline at end of file +f335934c8d138cba6480252052ba3f3ea71d10fc \ No newline at end of file diff --git a/external/bdwgc/autom4te.cache/requests b/external/bdwgc/autom4te.cache/requests index dbd5cd51f4..2ad1b61490 100644 --- a/external/bdwgc/autom4te.cache/requests +++ b/external/bdwgc/autom4te.cache/requests @@ -42,162 +42,162 @@ 'configure.ac' ], { - 'AM_AUTOMAKE_VERSION' => 1, - 'include' => 1, - 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, - 'AC_DISABLE_FAST_INSTALL' => 1, - '_LT_AC_TRY_DLOPEN_SELF' => 1, - 'AC_DEFUN_ONCE' => 1, - 'AM_DISABLE_STATIC' => 1, - 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, - 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, - 'LT_PROG_GO' => 1, - 'LTOBSOLETE_VERSION' => 1, - '_LT_DLL_DEF_P' => 1, - '_LT_PROG_CXX' => 1, - 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, - 'AC_DISABLE_SHARED' => 1, - '_LT_AC_LANG_CXX_CONFIG' => 1, - 'LT_INIT' => 1, - 'AC_LIBTOOL_LINKER_OPTION' => 1, - 'AC_ENABLE_SHARED' => 1, - '_LT_AC_LANG_GCJ_CONFIG' => 1, - 'AM_PROG_NM' => 1, - 'AM_PROG_CC_C_O' => 1, - 'm4_include' => 1, - 'AC_LIBTOOL_LANG_C_CONFIG' => 1, - 'AC_LIBTOOL_PICMODE' => 1, - 'AM_DEP_TRACK' => 1, - 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, - '_LT_AC_LANG_CXX' => 1, - '_LT_PROG_ECHO_BACKSLASH' => 1, - '_m4_warn' => 1, - '_LT_AC_SYS_LIBPATH_AIX' => 1, - 'AC_PATH_MAGIC' => 1, - 'LT_PROG_GCJ' => 1, - '_AM_CONFIG_MACRO_DIRS' => 1, 'LT_CMD_MAX_LEN' => 1, - '_LT_AC_LANG_C_CONFIG' => 1, - 'AC_CHECK_LIBM' => 1, - 'LT_AC_PROG_EGREP' => 1, - 'AM_SET_DEPDIR' => 1, - '_AM_SET_OPTIONS' => 1, - 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, - 'AC_LIBTOOL_WIN32_DLL' => 1, - 'AC_PATH_TOOL_PREFIX' => 1, - 'AC_LIBTOOL_RC' => 1, - 'AC_LIBTOOL_FC' => 1, - 'm4_pattern_forbid' => 1, - 'AC_ENABLE_STATIC' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'AC_PROG_LD_RELOAD_FLAG' => 1, - 'AM_ENABLE_STATIC' => 1, - 'AM_SILENT_RULES' => 1, - '_LT_COMPILER_BOILERPLATE' => 1, - '_LT_COMPILER_OPTION' => 1, - '_LT_AC_LANG_F77' => 1, - 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, - 'AM_MISSING_HAS_RUN' => 1, - '_LT_PROG_FC' => 1, - 'LTSUGAR_VERSION' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AM_PROG_INSTALL_SH' => 1, - 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, - 'AC_DEFUN' => 1, - 'm4_pattern_allow' => 1, - 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, - 'AC_CONFIG_MACRO_DIR_TRACE' => 1, - 'AC_LIBTOOL_DLOPEN' => 1, - 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, - '_LT_PATH_TOOL_PREFIX' => 1, - 'AC_LIBTOOL_COMPILER_OPTION' => 1, - '_LT_CC_BASENAME' => 1, - 'AC_DISABLE_STATIC' => 1, - '_LT_AC_LANG_RC_CONFIG' => 1, - '_LT_AC_SYS_COMPILER' => 1, - 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - '_LT_REQUIRED_DARWIN_CHECKS' => 1, - 'LT_SYS_DLOPEN_SELF' => 1, - '_LT_AC_FILE_LTDLL_C' => 1, - 'LT_AC_PROG_SED' => 1, - 'AM_DISABLE_SHARED' => 1, - 'LT_OUTPUT' => 1, - 'AC_PROG_LD' => 1, - 'LT_LANG' => 1, - 'AM_PROG_INSTALL_STRIP' => 1, - 'AC_PROG_LD_GNU' => 1, - 'AC_LIBTOOL_DLOPEN_SELF' => 1, - '_LT_WITH_SYSROOT' => 1, - 'LT_PROG_RC' => 1, - 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1, - '_AM_MANGLE_OPTION' => 1, - 'AM_PROG_LD' => 1, - 'LT_PATH_LD' => 1, - 'AC_PROG_EGREP' => 1, - '_LT_LINKER_OPTION' => 1, - 'GC_SET_VERSION' => 1, - 'AC_PROG_NM' => 1, - '_AM_SET_OPTION' => 1, - '_AM_PROG_CC_C_O' => 1, - '_LT_AC_LANG_GCJ' => 1, 'AC_LIBTOOL_PROG_CC_C_O' => 1, - '_LT_AC_PROG_ECHO_BACKSLASH' => 1, - 'AM_AUX_DIR_EXPAND' => 1, - 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, - 'AC_LIBTOOL_GCJ' => 1, - 'AC_PROG_LIBTOOL' => 1, 'AM_SUBST_NOTMAKE' => 1, + 'AC_DISABLE_FAST_INSTALL' => 1, + '_AM_IF_OPTION' => 1, + 'LT_SYS_DLOPEN_SELF' => 1, + '_AM_DEPENDENCIES' => 1, + '_LT_AC_TAGCONFIG' => 1, + '_LT_AC_LANG_GCJ' => 1, + 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, + 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, + 'AC_PROG_LIBTOOL' => 1, + 'AC_LIBTOOL_LINKER_OPTION' => 1, '_AM_PROG_TAR' => 1, - 'LT_AC_PROG_RC' => 1, - 'AM_MISSING_PROG' => 1, - '_LT_LINKER_BOILERPLATE' => 1, - 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, - 'LTOPTIONS_VERSION' => 1, - 'AM_CONDITIONAL' => 1, - 'AC_LIBTOOL_CONFIG' => 1, + 'AC_LTDL_PREOPEN' => 1, + 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1, + 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, + 'AM_ENABLE_SHARED' => 1, + 'AM_PROG_INSTALL_SH' => 1, + 'LT_PROG_GCJ' => 1, + 'LTVERSION_VERSION' => 1, '_LT_AC_PROG_CXXCPP' => 1, - 'AM_RUN_LOG' => 1, - 'AM_PROG_LIBTOOL' => 1, - 'LT_PATH_NM' => 1, - '_LT_PROG_LTMAIN' => 1, - 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, + 'LT_AC_PROG_SED' => 1, + 'AM_PROG_INSTALL_STRIP' => 1, + 'AM_SET_LEADING_DOT' => 1, + 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, + 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, '_LT_AC_SHELL_INIT' => 1, '_AC_AM_CONFIG_HEADER_HOOK' => 1, + 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, + 'AM_MISSING_PROG' => 1, 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, - 'AC_LTDL_PREOPEN' => 1, - '_AM_AUTOCONF_VERSION' => 1, - 'AC_CONFIG_MACRO_DIR' => 1, - 'AC_LIBTOOL_SETUP' => 1, - 'AC_LTDL_ENABLE_INSTALL' => 1, + 'AC_CONFIG_MACRO_DIR_TRACE' => 1, + 'AM_MAINTAINER_MODE' => 1, + 'LT_PATH_LD' => 1, + 'AC_DISABLE_SHARED' => 1, + 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, + 'LT_OUTPUT' => 1, + 'AC_LIBTOOL_DLOPEN_SELF' => 1, + '_AM_CONFIG_MACRO_DIRS' => 1, + 'AM_DISABLE_SHARED' => 1, 'AC_LIBTOOL_OBJDIR' => 1, - 'LTVERSION_VERSION' => 1, - 'AC_LIBTOOL_CXX' => 1, - 'AM_SET_LEADING_DOT' => 1, - 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, - 'AC_DEPLIBS_CHECK_METHOD' => 1, - '_LT_AC_TAGVAR' => 1, - '_AM_DEPENDENCIES' => 1, + 'LT_LANG' => 1, + 'AC_PATH_TOOL_PREFIX' => 1, + 'LT_PATH_NM' => 1, + '_AC_PROG_LIBTOOL' => 1, + '_LT_AC_LANG_CXX' => 1, 'AM_MAKE_INCLUDE' => 1, - '_LT_PREPARE_SED_QUOTE_VARS' => 1, + 'AM_MISSING_HAS_RUN' => 1, + 'AC_ENABLE_SHARED' => 1, '_LT_PROG_F77' => 1, - '_LT_AC_LANG_F77_CONFIG' => 1, - 'AM_SANITY_CHECK' => 1, - '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - 'LT_AC_PROG_GCJ' => 1, + 'LTOPTIONS_VERSION' => 1, + 'AM_AUX_DIR_EXPAND' => 1, + 'AC_LIBTOOL_DLOPEN' => 1, + 'AC_DEFUN' => 1, + 'include' => 1, + '_LT_AC_TAGVAR' => 1, + '_LT_AC_SYS_LIBPATH_AIX' => 1, + 'AM_RUN_LOG' => 1, + 'AC_LTDL_ENABLE_INSTALL' => 1, + 'LT_SUPPORTED_TAG' => 1, + '_AM_SET_OPTION' => 1, + 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'LT_LIB_M' => 1, '_LT_AC_CHECK_DLFCN' => 1, - 'AM_PROG_AS' => 1, - '_LT_AC_TAGCONFIG' => 1, - 'AM_MAINTAINER_MODE' => 1, - '_LT_AC_LOCK' => 1, - 'AM_ENABLE_SHARED' => 1, - '_AC_PROG_LIBTOOL' => 1, - 'AU_DEFUN' => 1, + '_LT_COMPILER_BOILERPLATE' => 1, + 'AC_DEPLIBS_CHECK_METHOD' => 1, + 'AM_PROG_LIBTOOL' => 1, + 'AM_SET_DEPDIR' => 1, + '_LT_AC_LANG_F77_CONFIG' => 1, + 'AC_PATH_MAGIC' => 1, + 'AC_PROG_LD_GNU' => 1, + 'LT_INIT' => 1, + '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'AC_ENABLE_FAST_INSTALL' => 1, - 'LT_SUPPORTED_TAG' => 1, - '_AM_IF_OPTION' => 1, + 'AC_LIBTOOL_PICMODE' => 1, + 'LT_PROG_RC' => 1, + 'AC_CONFIG_MACRO_DIR' => 1, + 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, + '_LT_AC_LANG_F77' => 1, + 'AC_LIBTOOL_FC' => 1, + '_LT_AC_LANG_CXX_CONFIG' => 1, + 'AM_SANITY_CHECK' => 1, + '_LT_AC_PROG_ECHO_BACKSLASH' => 1, + '_LT_LINKER_OPTION' => 1, + 'AC_DEFUN_ONCE' => 1, + 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, + '_LT_LINKER_BOILERPLATE' => 1, + '_LT_AC_LANG_C_CONFIG' => 1, + 'm4_pattern_forbid' => 1, + 'AC_LTDL_OBJDIR' => 1, + 'AM_CONDITIONAL' => 1, + '_LT_PROG_LTMAIN' => 1, + 'LT_AC_PROG_GCJ' => 1, + 'AC_LIBTOOL_CONFIG' => 1, + 'm4_include' => 1, + '_m4_warn' => 1, + '_LT_PREPARE_SED_QUOTE_VARS' => 1, + '_LT_COMPILER_OPTION' => 1, + 'AM_PROG_AS' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'AU_DEFUN' => 1, + 'LT_AC_PROG_EGREP' => 1, + 'AC_LIBTOOL_RC' => 1, + '_LT_PATH_TOOL_PREFIX' => 1, + '_LT_AC_TRY_DLOPEN_SELF' => 1, + '_LT_AC_SYS_COMPILER' => 1, + 'AC_LIBTOOL_COMPILER_OPTION' => 1, + 'AM_INIT_AUTOMAKE' => 1, + '_LT_AC_LOCK' => 1, + 'AC_LIBTOOL_LANG_C_CONFIG' => 1, + 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, + 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, + '_LT_AC_LANG_GCJ_CONFIG' => 1, + '_LT_PROG_CXX' => 1, + 'AM_PROG_CC_C_O' => 1, + 'AM_PROG_NM' => 1, + 'LTOBSOLETE_VERSION' => 1, + 'AC_PROG_LD_RELOAD_FLAG' => 1, + 'm4_pattern_allow' => 1, + 'AC_PROG_NM' => 1, + 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, + '_AM_SET_OPTIONS' => 1, + '_LT_AC_LANG_RC_CONFIG' => 1, + '_AM_PROG_CC_C_O' => 1, + 'LT_AC_PROG_RC' => 1, + 'AM_ENABLE_STATIC' => 1, + 'AM_PROG_LD' => 1, + 'AC_LIBTOOL_CXX' => 1, + '_LT_CC_BASENAME' => 1, + '_AM_MANGLE_OPTION' => 1, + 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, 'AC_LIBTOOL_F77' => 1, - 'AC_LTDL_OBJDIR' => 1 + '_AM_AUTOCONF_VERSION' => 1, + 'AC_LIBTOOL_WIN32_DLL' => 1, + 'AC_CHECK_LIBM' => 1, + '_LT_WITH_SYSROOT' => 1, + 'LTSUGAR_VERSION' => 1, + 'AC_DISABLE_STATIC' => 1, + 'GC_SET_VERSION' => 1, + '_LT_PROG_FC' => 1, + '_AM_SUBST_NOTMAKE' => 1, + '_LT_REQUIRED_DARWIN_CHECKS' => 1, + 'AC_ENABLE_STATIC' => 1, + 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, + '_LT_AC_FILE_LTDLL_C' => 1, + 'AM_DEP_TRACK' => 1, + 'AC_PROG_LD' => 1, + '_LT_PROG_ECHO_BACKSLASH' => 1, + 'AC_LIBTOOL_SETUP' => 1, + 'AC_PROG_EGREP' => 1, + 'AM_SILENT_RULES' => 1, + 'AM_DISABLE_STATIC' => 1, + '_LT_DLL_DEF_P' => 1, + 'AC_LIBTOOL_GCJ' => 1, + 'LT_PROG_GO' => 1 } ], 'Autom4te::Request' ), bless( [ @@ -212,66 +212,66 @@ 'configure.ac' ], { - 'AC_REQUIRE_AUX_FILE' => 1, - '_AM_COND_ELSE' => 1, 'm4_sinclude' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AM_EXTRA_RECURSIVE_TARGETS' => 1, - 'AM_XGETTEXT_OPTION' => 1, - 'AM_PROG_AR' => 1, - 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, - 'AM_PATH_GUILE' => 1, - 'AM_NLS' => 1, - '_AM_MAKEFILE_INCLUDE' => 1, - 'm4_include' => 1, - 'AC_LIBSOURCE' => 1, - 'AM_PROG_CC_C_O' => 1, - 'AC_DEFINE_TRACE_LITERAL' => 1, - 'LT_INIT' => 1, - 'm4_pattern_allow' => 1, - 'AC_CONFIG_SUBDIRS' => 1, - 'AC_CANONICAL_HOST' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'AM_PROG_FC_C_O' => 1, - 'AC_FC_FREEFORM' => 1, - 'm4_pattern_forbid' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'include' => 1, - 'AC_SUBST' => 1, - 'AM_MAKEFILE_INCLUDE' => 1, - 'AM_GNU_GETTEXT' => 1, - 'AC_FC_PP_SRCEXT' => 1, - 'AM_PROG_MOC' => 1, - 'AC_INIT' => 1, - 'AM_ENABLE_MULTILIB' => 1, - 'AC_CONFIG_FILES' => 1, - 'AM_POT_TOOLS' => 1, - 'AM_SILENT_RULES' => 1, - 'AM_PROG_CXX_C_O' => 1, - 'AC_CANONICAL_BUILD' => 1, - 'AC_CONFIG_HEADERS' => 1, - 'AC_SUBST_TRACE' => 1, - 'AC_CONFIG_LINKS' => 1, - 'LT_CONFIG_LTDL_DIR' => 1, - 'AM_PROG_LIBTOOL' => 1, - 'AC_FC_SRCEXT' => 1, - 'LT_SUPPORTED_TAG' => 1, - 'AC_CONFIG_AUX_DIR' => 1, - 'AC_CONFIG_LIBOBJ_DIR' => 1, - 'AM_PROG_MKDIR_P' => 1, '_AM_COND_IF' => 1, - 'AM_CONDITIONAL' => 1, - 'AC_CANONICAL_SYSTEM' => 1, - '_m4_warn' => 1, - 'AH_OUTPUT' => 1, - 'AC_CANONICAL_TARGET' => 1, - 'AM_PROG_F77_C_O' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'AC_FC_PP_DEFINE' => 1, + 'AM_PATH_GUILE' => 1, + 'AC_LIBSOURCE' => 1, + 'AM_PROG_CXX_C_O' => 1, + 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, + 'AM_EXTRA_RECURSIVE_TARGETS' => 1, + 'AM_ENABLE_MULTILIB' => 1, + 'm4_pattern_allow' => 1, + '_AM_COND_ELSE' => 1, + 'AC_CANONICAL_HOST' => 1, '_AM_COND_ENDIF' => 1, - 'AM_MAINTAINER_MODE' => 1, + 'AM_MAKEFILE_INCLUDE' => 1, + 'AC_CONFIG_SUBDIRS' => 1, + '_m4_warn' => 1, + 'm4_include' => 1, + 'AM_GNU_GETTEXT' => 1, + 'AC_FC_FREEFORM' => 1, + 'AM_XGETTEXT_OPTION' => 1, + 'include' => 1, + 'AC_REQUIRE_AUX_FILE' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'AC_FC_SRCEXT' => 1, + 'AM_CONDITIONAL' => 1, + 'AM_POT_TOOLS' => 1, + 'm4_pattern_forbid' => 1, + 'AM_PROG_MKDIR_P' => 1, '_LT_AC_TAGCONFIG' => 1, - 'sinclude' => 1 + 'AC_CONFIG_FILES' => 1, + 'AC_CONFIG_LIBOBJ_DIR' => 1, + 'AM_PROG_AR' => 1, + 'AM_PROG_MOC' => 1, + 'AC_PROG_LIBTOOL' => 1, + 'AH_OUTPUT' => 1, + 'AC_CONFIG_HEADERS' => 1, + 'AC_FC_PP_DEFINE' => 1, + 'AM_PROG_FC_C_O' => 1, + 'LT_SUPPORTED_TAG' => 1, + 'AC_CANONICAL_BUILD' => 1, + '_AM_MAKEFILE_INCLUDE' => 1, + '_AM_SUBST_NOTMAKE' => 1, + 'AC_CANONICAL_TARGET' => 1, + 'AC_CONFIG_AUX_DIR' => 1, + 'AC_CANONICAL_SYSTEM' => 1, + 'LT_INIT' => 1, + 'AC_FC_PP_SRCEXT' => 1, + 'LT_CONFIG_LTDL_DIR' => 1, + 'AM_PROG_CC_C_O' => 1, + 'AM_SILENT_RULES' => 1, + 'AC_CONFIG_LINKS' => 1, + 'AM_PROG_F77_C_O' => 1, + 'sinclude' => 1, + 'AM_NLS' => 1, + 'AM_INIT_AUTOMAKE' => 1, + 'AC_SUBST' => 1, + 'AC_SUBST_TRACE' => 1, + 'AC_INIT' => 1, + 'AC_DEFINE_TRACE_LITERAL' => 1, + 'AM_PROG_LIBTOOL' => 1, + 'AM_MAINTAINER_MODE' => 1 } ], 'Autom4te::Request' ), bless( [ @@ -313,162 +313,162 @@ 'configure.ac' ], { - '_LT_AC_LANG_F77' => 1, - '_LT_COMPILER_OPTION' => 1, - 'AM_SILENT_RULES' => 1, - '_LT_COMPILER_BOILERPLATE' => 1, - 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, - 'AM_MISSING_HAS_RUN' => 1, - 'm4_pattern_forbid' => 1, - 'AM_ENABLE_STATIC' => 1, - 'AC_ENABLE_STATIC' => 1, - 'AC_PROG_LD_RELOAD_FLAG' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, - 'm4_pattern_allow' => 1, - 'LTSUGAR_VERSION' => 1, - 'AM_INIT_AUTOMAKE' => 1, - '_LT_PROG_FC' => 1, - 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, - 'AC_DEFUN' => 1, - 'AM_PROG_INSTALL_SH' => 1, - 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, - '_LT_PATH_TOOL_PREFIX' => 1, - 'AC_CONFIG_MACRO_DIR_TRACE' => 1, - 'AC_LIBTOOL_DLOPEN' => 1, - 'LT_OUTPUT' => 1, - 'AC_PROG_LD' => 1, - 'LT_LANG' => 1, - 'AC_LIBTOOL_COMPILER_OPTION' => 1, - '_LT_CC_BASENAME' => 1, - 'AC_DISABLE_STATIC' => 1, - '_LT_AC_SYS_COMPILER' => 1, - '_LT_AC_LANG_RC_CONFIG' => 1, - 'AM_DISABLE_SHARED' => 1, - 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - '_LT_REQUIRED_DARWIN_CHECKS' => 1, - 'LT_SYS_DLOPEN_SELF' => 1, - '_LT_AC_FILE_LTDLL_C' => 1, - 'LT_AC_PROG_SED' => 1, - '_LT_PROG_CXX' => 1, - 'LTOBSOLETE_VERSION' => 1, - '_LT_DLL_DEF_P' => 1, - 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, - 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'include' => 1, - 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, - 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, - 'LT_PROG_GO' => 1, - '_LT_AC_TRY_DLOPEN_SELF' => 1, - 'AC_DISABLE_FAST_INSTALL' => 1, - 'AC_DEFUN_ONCE' => 1, - 'AM_DISABLE_STATIC' => 1, 'm4_include' => 1, - 'AM_PROG_CC_C_O' => 1, - 'AC_LIBTOOL_LANG_C_CONFIG' => 1, - 'LT_INIT' => 1, - 'AC_ENABLE_SHARED' => 1, - 'AC_LIBTOOL_LINKER_OPTION' => 1, - '_LT_AC_LANG_GCJ_CONFIG' => 1, - 'AM_PROG_NM' => 1, - 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, - 'AC_LIBTOOL_PICMODE' => 1, - 'AM_DEP_TRACK' => 1, - 'AC_DISABLE_SHARED' => 1, - '_LT_AC_LANG_CXX_CONFIG' => 1, - 'LT_CMD_MAX_LEN' => 1, - '_AM_CONFIG_MACRO_DIRS' => 1, - 'LT_AC_PROG_EGREP' => 1, - '_LT_AC_LANG_C_CONFIG' => 1, - 'AC_CHECK_LIBM' => 1, - '_LT_PROG_ECHO_BACKSLASH' => 1, - '_LT_AC_LANG_CXX' => 1, - 'AC_PATH_MAGIC' => 1, - 'LT_PROG_GCJ' => 1, '_m4_warn' => 1, - '_LT_AC_SYS_LIBPATH_AIX' => 1, - 'AC_PATH_TOOL_PREFIX' => 1, - 'AC_LIBTOOL_RC' => 1, - 'AC_LIBTOOL_FC' => 1, - 'AM_SET_DEPDIR' => 1, - 'AC_LIBTOOL_WIN32_DLL' => 1, - 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, - '_AM_SET_OPTIONS' => 1, - 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, - 'AC_LTDL_PREOPEN' => 1, - 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, - '_LT_AC_SHELL_INIT' => 1, - '_LT_PROG_LTMAIN' => 1, - '_AC_AM_CONFIG_HEADER_HOOK' => 1, - 'LTVERSION_VERSION' => 1, - 'AM_SET_LEADING_DOT' => 1, - 'AC_LIBTOOL_CXX' => 1, - 'AC_LTDL_ENABLE_INSTALL' => 1, - 'AC_LIBTOOL_SETUP' => 1, - 'AC_LIBTOOL_OBJDIR' => 1, - 'AC_DEPLIBS_CHECK_METHOD' => 1, - 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, - '_AM_AUTOCONF_VERSION' => 1, - 'AC_CONFIG_MACRO_DIR' => 1, + '_LT_COMPILER_OPTION' => 1, + '_LT_PREPARE_SED_QUOTE_VARS' => 1, 'AM_PROG_AS' => 1, - 'AM_MAINTAINER_MODE' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + '_LT_AC_LANG_C_CONFIG' => 1, + 'm4_pattern_forbid' => 1, + 'AC_LTDL_OBJDIR' => 1, + 'AM_CONDITIONAL' => 1, + '_LT_PROG_LTMAIN' => 1, + 'LT_AC_PROG_GCJ' => 1, + 'AC_LIBTOOL_CONFIG' => 1, + '_LT_LINKER_OPTION' => 1, + 'AC_DEFUN_ONCE' => 1, + 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, + '_LT_LINKER_BOILERPLATE' => 1, + 'LT_PROG_RC' => 1, + 'AC_LIBTOOL_PICMODE' => 1, + 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, + 'AC_CONFIG_MACRO_DIR' => 1, + '_LT_AC_LANG_F77' => 1, + '_LT_AC_LANG_CXX_CONFIG' => 1, + 'AC_LIBTOOL_FC' => 1, + 'AM_SANITY_CHECK' => 1, + '_LT_AC_PROG_ECHO_BACKSLASH' => 1, + '_LT_AC_LANG_GCJ_CONFIG' => 1, + '_LT_PROG_CXX' => 1, + 'AM_PROG_CC_C_O' => 1, + 'AM_INIT_AUTOMAKE' => 1, + '_LT_AC_LOCK' => 1, + 'AC_LIBTOOL_LANG_C_CONFIG' => 1, + 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, + 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, + '_LT_PATH_TOOL_PREFIX' => 1, + '_LT_AC_SYS_COMPILER' => 1, + '_LT_AC_TRY_DLOPEN_SELF' => 1, + 'AC_LIBTOOL_COMPILER_OPTION' => 1, + 'AU_DEFUN' => 1, + 'AC_LIBTOOL_RC' => 1, + 'LT_AC_PROG_EGREP' => 1, + '_LT_WITH_SYSROOT' => 1, + 'LTSUGAR_VERSION' => 1, + 'AC_DISABLE_STATIC' => 1, + '_LT_CC_BASENAME' => 1, + 'AC_LIBTOOL_CXX' => 1, + '_AM_MANGLE_OPTION' => 1, + 'AM_ENABLE_STATIC' => 1, + 'AM_PROG_LD' => 1, + 'AC_LIBTOOL_F77' => 1, + '_AM_AUTOCONF_VERSION' => 1, + 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, + 'AC_LIBTOOL_WIN32_DLL' => 1, + 'AC_CHECK_LIBM' => 1, + 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, + '_AM_SET_OPTIONS' => 1, + '_LT_AC_LANG_RC_CONFIG' => 1, + 'LT_AC_PROG_RC' => 1, + '_AM_PROG_CC_C_O' => 1, + 'AM_PROG_NM' => 1, + 'LTOBSOLETE_VERSION' => 1, + 'AC_PROG_LD_RELOAD_FLAG' => 1, + 'm4_pattern_allow' => 1, + 'AC_PROG_NM' => 1, + 'AM_DEP_TRACK' => 1, + 'AC_PROG_LD' => 1, + '_LT_PROG_ECHO_BACKSLASH' => 1, + 'AC_LIBTOOL_SETUP' => 1, + 'AC_PROG_EGREP' => 1, + 'AM_DISABLE_STATIC' => 1, + 'AM_SILENT_RULES' => 1, + 'AC_LIBTOOL_GCJ' => 1, + '_LT_DLL_DEF_P' => 1, + 'LT_PROG_GO' => 1, + 'AC_ENABLE_STATIC' => 1, + 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, + '_LT_AC_FILE_LTDLL_C' => 1, + '_LT_PROG_FC' => 1, + '_AM_SUBST_NOTMAKE' => 1, + '_LT_REQUIRED_DARWIN_CHECKS' => 1, + 'GC_SET_VERSION' => 1, + 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, + 'AM_ENABLE_SHARED' => 1, + 'AM_PROG_INSTALL_SH' => 1, + 'LTVERSION_VERSION' => 1, + 'LT_PROG_GCJ' => 1, + '_LT_AC_PROG_CXXCPP' => 1, + 'LT_AC_PROG_SED' => 1, '_LT_AC_TAGCONFIG' => 1, + '_LT_AC_LANG_GCJ' => 1, + 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, + 'AC_PROG_LIBTOOL' => 1, + 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, + 'AC_LIBTOOL_LINKER_OPTION' => 1, + '_AM_PROG_TAR' => 1, + 'AC_LTDL_PREOPEN' => 1, + 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1, + '_AM_IF_OPTION' => 1, + 'LT_SYS_DLOPEN_SELF' => 1, + '_AM_DEPENDENCIES' => 1, + 'LT_CMD_MAX_LEN' => 1, + 'AC_LIBTOOL_PROG_CC_C_O' => 1, + 'AM_SUBST_NOTMAKE' => 1, + 'AC_DISABLE_FAST_INSTALL' => 1, + 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, + 'AC_DISABLE_SHARED' => 1, + 'LT_OUTPUT' => 1, + 'AC_LIBTOOL_DLOPEN_SELF' => 1, + '_AM_CONFIG_MACRO_DIRS' => 1, + 'AC_CONFIG_MACRO_DIR_TRACE' => 1, + 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, + 'AM_MAINTAINER_MODE' => 1, + 'LT_PATH_LD' => 1, + '_AC_AM_CONFIG_HEADER_HOOK' => 1, + 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, + 'AM_MISSING_PROG' => 1, + 'AM_PROG_INSTALL_STRIP' => 1, + 'AM_SET_LEADING_DOT' => 1, + 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, + 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, + '_LT_AC_SHELL_INIT' => 1, + 'LTOPTIONS_VERSION' => 1, + 'AM_AUX_DIR_EXPAND' => 1, + 'AC_LIBTOOL_DLOPEN' => 1, + 'include' => 1, + 'AC_DEFUN' => 1, + 'AM_MISSING_HAS_RUN' => 1, + 'AM_MAKE_INCLUDE' => 1, + 'AC_ENABLE_SHARED' => 1, + '_LT_PROG_F77' => 1, + 'AC_PATH_TOOL_PREFIX' => 1, + 'LT_PATH_NM' => 1, + '_AC_PROG_LIBTOOL' => 1, + '_LT_AC_LANG_CXX' => 1, + 'AC_LIBTOOL_OBJDIR' => 1, + 'AM_DISABLE_SHARED' => 1, + 'LT_LANG' => 1, + 'LT_INIT' => 1, + 'AC_PROG_LD_GNU' => 1, + '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + 'AC_ENABLE_FAST_INSTALL' => 1, + '_LT_COMPILER_BOILERPLATE' => 1, + 'AC_DEPLIBS_CHECK_METHOD' => 1, + 'AM_PROG_LIBTOOL' => 1, + 'AM_SET_DEPDIR' => 1, + 'AC_PATH_MAGIC' => 1, + '_LT_AC_LANG_F77_CONFIG' => 1, + 'AC_LTDL_ENABLE_INSTALL' => 1, + 'LT_SUPPORTED_TAG' => 1, + 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + '_AM_SET_OPTION' => 1, 'LT_LIB_M' => 1, '_LT_AC_CHECK_DLFCN' => 1, - '_LT_AC_LOCK' => 1, '_LT_AC_TAGVAR' => 1, - '_AM_DEPENDENCIES' => 1, - 'AM_SANITY_CHECK' => 1, - 'LT_AC_PROG_GCJ' => 1, - '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - '_LT_PREPARE_SED_QUOTE_VARS' => 1, - 'AM_MAKE_INCLUDE' => 1, - '_LT_PROG_F77' => 1, - '_LT_AC_LANG_F77_CONFIG' => 1, - 'AC_ENABLE_FAST_INSTALL' => 1, - 'LT_SUPPORTED_TAG' => 1, - 'AU_DEFUN' => 1, - 'AC_LIBTOOL_F77' => 1, - 'AC_LTDL_OBJDIR' => 1, - '_AM_IF_OPTION' => 1, - 'AM_ENABLE_SHARED' => 1, - '_AC_PROG_LIBTOOL' => 1, - 'AM_PROG_LD' => 1, - 'LT_PATH_LD' => 1, - '_AM_MANGLE_OPTION' => 1, - '_LT_LINKER_OPTION' => 1, - 'AC_PROG_EGREP' => 1, - 'AC_PROG_LD_GNU' => 1, - 'AC_LIBTOOL_DLOPEN_SELF' => 1, - 'AM_PROG_INSTALL_STRIP' => 1, - 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1, - '_LT_WITH_SYSROOT' => 1, - 'LT_PROG_RC' => 1, - '_AM_SET_OPTION' => 1, - '_LT_AC_LANG_GCJ' => 1, - '_AM_PROG_CC_C_O' => 1, - 'GC_SET_VERSION' => 1, - 'AC_PROG_NM' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'AM_SUBST_NOTMAKE' => 1, - 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, - 'AC_LIBTOOL_GCJ' => 1, - '_LT_AC_PROG_ECHO_BACKSLASH' => 1, - 'AC_LIBTOOL_PROG_CC_C_O' => 1, - 'AM_AUX_DIR_EXPAND' => 1, - 'AC_LIBTOOL_CONFIG' => 1, - '_LT_AC_PROG_CXXCPP' => 1, - 'AM_CONDITIONAL' => 1, - 'LT_PATH_NM' => 1, - 'AM_PROG_LIBTOOL' => 1, 'AM_RUN_LOG' => 1, - '_AM_PROG_TAR' => 1, - 'AM_MISSING_PROG' => 1, - 'LT_AC_PROG_RC' => 1, - 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, - 'LTOPTIONS_VERSION' => 1, - '_LT_LINKER_BOILERPLATE' => 1 + '_LT_AC_SYS_LIBPATH_AIX' => 1 } ], 'Autom4te::Request' ) ); diff --git a/external/bdwgc/config.log b/external/bdwgc/config.log index ac5e81ba89..1a1a6fe142 100644 --- a/external/bdwgc/config.log +++ b/external/bdwgc/config.log @@ -10,11 +10,11 @@ generated by GNU Autoconf 2.69. Invocation command line was ## Platform. ## ## --------- ## -hostname = az-ubuntu-generala37872 +hostname = az-ubuntu-general34f900 uname -m = x86_64 -uname -r = 4.15.0-1082-azure +uname -r = 4.15.0-1091-azure uname -s = Linux -uname -v = #92~16.04.1-Ubuntu SMP Tue Apr 14 22:28:34 UTC 2020 +uname -v = #101~16.04.1-Ubuntu SMP Fri Jun 26 01:14:12 UTC 2020 /usr/bin/uname -p = unknown /bin/uname -X = unknown @@ -747,7 +747,7 @@ generated by GNU Autoconf 2.69. Invocation command line was CONFIG_COMMANDS = $ ./config.status -on az-ubuntu-generala37872 +on az-ubuntu-general34f900 config.status:1238: creating Makefile config.status:1238: creating bdw-gc.pc diff --git a/external/bdwgc/libatomic_ops/Makefile.in b/external/bdwgc/libatomic_ops/Makefile.in new file mode 100644 index 0000000000..ea61f29d5b --- /dev/null +++ b/external/bdwgc/libatomic_ops/Makefile.in @@ -0,0 +1,895 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(dist_pkgdata_DATA) $(am__DIST_COMMON) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = pkgconfig/atomic_ops.pc \ + pkgconfig/atomic_ops-uninstalled.pc +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(pkgdatadir)" \ + "$(DESTDIR)$(pkgconfigdir)" +DATA = $(dist_pkgdata_DATA) $(noinst_DATA) $(pkgconfig_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/pkgconfig/atomic_ops-uninstalled.pc.in \ + $(top_srcdir)/pkgconfig/atomic_ops.pc.in AUTHORS COPYING \ + ChangeLog TODO compile config.guess config.sub install-sh \ + ltmain.sh missing +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +GZIP_ENV = --best +DIST_TARGETS = dist-bzip2 dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PICFLAG = @PICFLAG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +THREADDLLIBS = @THREADDLLIBS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = src doc +ACLOCAL_AMFLAGS = -I m4 +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = pkgconfig/atomic_ops.pc +noinst_DATA = pkgconfig/atomic_ops-uninstalled.pc +dist_pkgdata_DATA = COPYING README.md +EXTRA_DIST = autogen.sh +all: all-recursive + +.SUFFIXES: +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): +pkgconfig/atomic_ops.pc: $(top_builddir)/config.status $(top_srcdir)/pkgconfig/atomic_ops.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +pkgconfig/atomic_ops-uninstalled.pc: $(top_builddir)/config.status $(top_srcdir)/pkgconfig/atomic_ops-uninstalled.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-dist_pkgdataDATA: $(dist_pkgdata_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ + done + +uninstall-dist_pkgdataDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir) +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgconfigdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-dist_pkgdataDATA install-pkgconfigDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-dist_pkgdataDATA uninstall-pkgconfigDATA + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_pkgdataDATA install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-dist_pkgdataDATA uninstall-pkgconfigDATA + +.PRECIOUS: Makefile + + +#distclean-local: + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/external/bdwgc/libatomic_ops/aclocal.m4 b/external/bdwgc/libatomic_ops/aclocal.m4 new file mode 100644 index 0000000000..2693665ae2 --- /dev/null +++ b/external/bdwgc/libatomic_ops/aclocal.m4 @@ -0,0 +1,1213 @@ +# generated automatically by aclocal 1.15 -*- Autoconf -*- + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.15' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.15], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.15])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# Figure out how to run the assembler. -*- Autoconf -*- + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_AS +# ---------- +AC_DEFUN([AM_PROG_AS], +[# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS +AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) +AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) +_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl +]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each '.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.65])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) diff --git a/external/bdwgc/libatomic_ops/autom4te.cache/output.0.REMOVED.git-id b/external/bdwgc/libatomic_ops/autom4te.cache/output.0.REMOVED.git-id new file mode 100644 index 0000000000..656a2002f0 --- /dev/null +++ b/external/bdwgc/libatomic_ops/autom4te.cache/output.0.REMOVED.git-id @@ -0,0 +1 @@ +503d73065590595e5d71ea576187d317e0a74368 \ No newline at end of file diff --git a/external/bdwgc/libatomic_ops/autom4te.cache/output.1.REMOVED.git-id b/external/bdwgc/libatomic_ops/autom4te.cache/output.1.REMOVED.git-id new file mode 100644 index 0000000000..656a2002f0 --- /dev/null +++ b/external/bdwgc/libatomic_ops/autom4te.cache/output.1.REMOVED.git-id @@ -0,0 +1 @@ +503d73065590595e5d71ea576187d317e0a74368 \ No newline at end of file diff --git a/external/bdwgc/libatomic_ops/autom4te.cache/output.2.REMOVED.git-id b/external/bdwgc/libatomic_ops/autom4te.cache/output.2.REMOVED.git-id new file mode 100644 index 0000000000..656a2002f0 --- /dev/null +++ b/external/bdwgc/libatomic_ops/autom4te.cache/output.2.REMOVED.git-id @@ -0,0 +1 @@ +503d73065590595e5d71ea576187d317e0a74368 \ No newline at end of file diff --git a/external/bdwgc/libatomic_ops/autom4te.cache/requests b/external/bdwgc/libatomic_ops/autom4te.cache/requests new file mode 100644 index 0000000000..dc9e831bf6 --- /dev/null +++ b/external/bdwgc/libatomic_ops/autom4te.cache/requests @@ -0,0 +1,471 @@ +# This file was generated by Autom4te Fri Oct 23 20:57:39 UTC 2015. +# It contains the lists of macros which have been traced. +# It can be safely removed. + +@request = ( + bless( [ + '0', + 1, + [ + '/usr/share/autoconf' + ], + [ + '/usr/share/autoconf/autoconf/autoconf.m4f', + '-', + '/usr/share/aclocal-1.15/internal/ac-config-macro-dirs.m4', + '/usr/share/aclocal/libtool.m4', + '/usr/share/aclocal/ltoptions.m4', + '/usr/share/aclocal/ltsugar.m4', + '/usr/share/aclocal/ltversion.m4', + '/usr/share/aclocal/lt~obsolete.m4', + '/usr/share/aclocal-1.15/amversion.m4', + '/usr/share/aclocal-1.15/as.m4', + '/usr/share/aclocal-1.15/auxdir.m4', + '/usr/share/aclocal-1.15/cond.m4', + '/usr/share/aclocal-1.15/depend.m4', + '/usr/share/aclocal-1.15/depout.m4', + '/usr/share/aclocal-1.15/init.m4', + '/usr/share/aclocal-1.15/install-sh.m4', + '/usr/share/aclocal-1.15/lead-dot.m4', + '/usr/share/aclocal-1.15/maintainer.m4', + '/usr/share/aclocal-1.15/make.m4', + '/usr/share/aclocal-1.15/missing.m4', + '/usr/share/aclocal-1.15/options.m4', + '/usr/share/aclocal-1.15/prog-cc-c-o.m4', + '/usr/share/aclocal-1.15/runlog.m4', + '/usr/share/aclocal-1.15/sanity.m4', + '/usr/share/aclocal-1.15/silent.m4', + '/usr/share/aclocal-1.15/strip.m4', + '/usr/share/aclocal-1.15/substnot.m4', + '/usr/share/aclocal-1.15/tar.m4', + 'configure.ac' + ], + { + 'AM_CONDITIONAL' => 1, + 'AC_LTDL_OBJDIR' => 1, + '_LT_AC_SHELL_INIT' => 1, + 'LT_INIT' => 1, + '_LT_AC_SYS_LIBPATH_AIX' => 1, + 'AM_MISSING_HAS_RUN' => 1, + 'LT_PATH_NM' => 1, + '_AC_PROG_LIBTOOL' => 1, + 'AM_PROG_CC_C_O' => 1, + 'AC_LTDL_ENABLE_INSTALL' => 1, + 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, + '_AC_AM_CONFIG_HEADER_HOOK' => 1, + '_AM_PROG_TAR' => 1, + '_LT_AC_TRY_DLOPEN_SELF' => 1, + 'AC_LIBTOOL_LINKER_OPTION' => 1, + 'AC_PROG_LD_RELOAD_FLAG' => 1, + 'AC_LIBTOOL_CXX' => 1, + 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, + 'AC_PROG_NM' => 1, + 'LT_LANG' => 1, + '_LT_WITH_SYSROOT' => 1, + 'm4_include' => 1, + '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + '_AM_SET_OPTION' => 1, + '_AM_MANGLE_OPTION' => 1, + 'AC_ENABLE_SHARED' => 1, + 'AC_LIBTOOL_DLOPEN' => 1, + 'AC_LIBTOOL_CONFIG' => 1, + 'AM_PROG_INSTALL_SH' => 1, + 'AC_PROG_LD' => 1, + '_LT_REQUIRED_DARWIN_CHECKS' => 1, + 'm4_pattern_forbid' => 1, + '_LT_AC_SYS_COMPILER' => 1, + '_LT_AC_LANG_RC_CONFIG' => 1, + 'AC_PROG_EGREP' => 1, + '_AM_CONFIG_MACRO_DIRS' => 1, + 'm4_pattern_allow' => 1, + 'LT_AC_PROG_EGREP' => 1, + '_m4_warn' => 1, + '_LT_LINKER_OPTION' => 1, + 'AC_DEFUN' => 1, + 'LT_AC_PROG_RC' => 1, + 'AC_PATH_TOOL_PREFIX' => 1, + 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, + '_LT_AC_LANG_F77' => 1, + '_LT_PROG_F77' => 1, + '_AM_AUTOCONF_VERSION' => 1, + 'AC_CONFIG_MACRO_DIR_TRACE' => 1, + '_AM_IF_OPTION' => 1, + '_LT_AC_LANG_CXX' => 1, + '_LT_COMPILER_OPTION' => 1, + 'AM_SET_DEPDIR' => 1, + '_LT_PROG_FC' => 1, + '_LT_PROG_CXX' => 1, + 'AC_LIBTOOL_F77' => 1, + 'AM_SILENT_RULES' => 1, + '_LT_PROG_ECHO_BACKSLASH' => 1, + '_AM_DEPENDENCIES' => 1, + 'AM_PROG_LD' => 1, + 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, + 'AC_PATH_MAGIC' => 1, + 'AC_LIBTOOL_SETUP' => 1, + 'AM_MAKE_INCLUDE' => 1, + 'AC_LIBTOOL_FC' => 1, + '_LT_AC_LANG_CXX_CONFIG' => 1, + 'AC_LIBTOOL_PICMODE' => 1, + 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, + '_AM_PROG_CC_C_O' => 1, + '_LT_PREPARE_SED_QUOTE_VARS' => 1, + 'LT_OUTPUT' => 1, + 'AM_SANITY_CHECK' => 1, + 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, + 'LT_CMD_MAX_LEN' => 1, + 'LTVERSION_VERSION' => 1, + '_LT_LINKER_BOILERPLATE' => 1, + 'LT_PATH_LD' => 1, + 'AM_RUN_LOG' => 1, + 'AM_SUBST_NOTMAKE' => 1, + 'AM_MISSING_PROG' => 1, + 'AC_DISABLE_SHARED' => 1, + 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, + 'AM_PROG_NM' => 1, + 'AC_PROG_LIBTOOL' => 1, + 'AC_DEFUN_ONCE' => 1, + '_LT_CC_BASENAME' => 1, + 'AM_DEP_TRACK' => 1, + '_LT_AC_LOCK' => 1, + 'AC_LIBTOOL_WIN32_DLL' => 1, + 'AM_ENABLE_STATIC' => 1, + 'AM_MAINTAINER_MODE' => 1, + '_AM_SET_OPTIONS' => 1, + 'AC_LIBTOOL_COMPILER_OPTION' => 1, + 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, + '_LT_AC_LANG_F77_CONFIG' => 1, + 'include' => 1, + '_LT_AC_TAGCONFIG' => 1, + '_LT_AC_CHECK_DLFCN' => 1, + '_LT_PATH_TOOL_PREFIX' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'LT_PROG_RC' => 1, + 'AC_DEPLIBS_CHECK_METHOD' => 1, + 'AM_DISABLE_STATIC' => 1, + '_LT_DLL_DEF_P' => 1, + 'AC_ENABLE_STATIC' => 1, + '_LT_AC_TAGVAR' => 1, + 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, + 'AC_LIBTOOL_DLOPEN_SELF' => 1, + 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, + 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, + 'LT_AC_PROG_SED' => 1, + 'AC_LIBTOOL_GCJ' => 1, + 'AC_DISABLE_FAST_INSTALL' => 1, + 'AM_INIT_AUTOMAKE' => 1, + 'LT_PROG_GO' => 1, + 'AC_CHECK_LIBM' => 1, + '_LT_AC_LANG_GCJ' => 1, + 'AC_DISABLE_STATIC' => 1, + 'AC_LIBTOOL_PROG_CC_C_O' => 1, + 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, + 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + 'LT_LIB_M' => 1, + '_LT_PROG_LTMAIN' => 1, + 'LTOBSOLETE_VERSION' => 1, + 'AU_DEFUN' => 1, + '_AM_SUBST_NOTMAKE' => 1, + 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, + 'AC_ENABLE_FAST_INSTALL' => 1, + 'AM_SET_LEADING_DOT' => 1, + 'LT_SUPPORTED_TAG' => 1, + 'LT_SYS_DLOPEN_SELF' => 1, + '_LT_AC_PROG_CXXCPP' => 1, + 'AC_LIBTOOL_OBJDIR' => 1, + 'LTSUGAR_VERSION' => 1, + 'AM_AUX_DIR_EXPAND' => 1, + 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, + 'AC_PROG_LD_GNU' => 1, + 'AM_PROG_LIBTOOL' => 1, + 'AM_PROG_INSTALL_STRIP' => 1, + 'AC_LIBTOOL_RC' => 1, + 'AM_ENABLE_SHARED' => 1, + 'LTOPTIONS_VERSION' => 1, + 'LT_PROG_GCJ' => 1, + 'LT_AC_PROG_GCJ' => 1, + 'AC_CONFIG_MACRO_DIR' => 1, + 'AM_DISABLE_SHARED' => 1, + 'AC_LTDL_PREOPEN' => 1, + 'AM_PROG_AS' => 1, + '_LT_AC_LANG_GCJ_CONFIG' => 1, + '_LT_COMPILER_BOILERPLATE' => 1, + '_LT_AC_FILE_LTDLL_C' => 1, + '_LT_AC_PROG_ECHO_BACKSLASH' => 1, + 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1, + 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, + 'AC_LIBTOOL_LANG_C_CONFIG' => 1, + '_LT_AC_LANG_C_CONFIG' => 1 + } + ], 'Autom4te::Request' ), + bless( [ + '1', + 1, + [ + '/usr/share/autoconf' + ], + [ + '/usr/share/autoconf/autoconf/autoconf.m4f', + 'aclocal.m4', + 'configure.ac' + ], + { + 'AM_MAKEFILE_INCLUDE' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'AM_NLS' => 1, + 'AC_FC_FREEFORM' => 1, + '_LT_AC_TAGCONFIG' => 1, + 'include' => 1, + 'm4_include' => 1, + 'AM_SILENT_RULES' => 1, + 'AC_CONFIG_HEADERS' => 1, + 'AM_PROG_FC_C_O' => 1, + 'm4_sinclude' => 1, + 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, + 'AC_CANONICAL_HOST' => 1, + 'AC_CANONICAL_BUILD' => 1, + 'm4_pattern_forbid' => 1, + 'AM_PROG_F77_C_O' => 1, + 'LT_CONFIG_LTDL_DIR' => 1, + 'AM_XGETTEXT_OPTION' => 1, + 'sinclude' => 1, + 'AC_FC_PP_SRCEXT' => 1, + 'm4_pattern_allow' => 1, + 'AM_INIT_AUTOMAKE' => 1, + '_AM_COND_ENDIF' => 1, + 'AC_CANONICAL_TARGET' => 1, + 'AC_CONFIG_FILES' => 1, + 'AC_FC_PP_DEFINE' => 1, + 'AM_PATH_GUILE' => 1, + 'AM_GNU_GETTEXT' => 1, + 'LT_INIT' => 1, + 'AH_OUTPUT' => 1, + 'AC_SUBST' => 1, + '_m4_warn' => 1, + 'AM_CONDITIONAL' => 1, + 'AC_CONFIG_LINKS' => 1, + 'AC_PROG_LIBTOOL' => 1, + 'AM_PROG_CC_C_O' => 1, + 'AC_CONFIG_AUX_DIR' => 1, + 'AM_PROG_AR' => 1, + 'LT_SUPPORTED_TAG' => 1, + 'AM_PROG_CXX_C_O' => 1, + 'AC_CONFIG_SUBDIRS' => 1, + '_AM_SUBST_NOTMAKE' => 1, + 'AC_REQUIRE_AUX_FILE' => 1, + 'AM_PROG_MKDIR_P' => 1, + 'AC_FC_SRCEXT' => 1, + 'AC_DEFINE_TRACE_LITERAL' => 1, + '_AM_COND_ELSE' => 1, + '_AM_MAKEFILE_INCLUDE' => 1, + 'AM_EXTRA_RECURSIVE_TARGETS' => 1, + 'AM_PROG_LIBTOOL' => 1, + 'AM_MAINTAINER_MODE' => 1, + 'AM_ENABLE_MULTILIB' => 1, + 'AC_SUBST_TRACE' => 1, + 'AC_INIT' => 1, + 'AC_LIBSOURCE' => 1, + 'AM_POT_TOOLS' => 1, + 'AM_PROG_MOC' => 1, + 'AC_CANONICAL_SYSTEM' => 1, + '_AM_COND_IF' => 1, + 'AC_CONFIG_LIBOBJ_DIR' => 1 + } + ], 'Autom4te::Request' ), + bless( [ + '2', + 1, + [ + '/usr/share/autoconf' + ], + [ + '/usr/share/autoconf/autoconf/autoconf.m4f', + '-', + '/usr/share/aclocal-1.15/internal/ac-config-macro-dirs.m4', + '/usr/share/aclocal-1.15/amversion.m4', + '/usr/share/aclocal-1.15/as.m4', + '/usr/share/aclocal-1.15/auxdir.m4', + '/usr/share/aclocal-1.15/cond.m4', + '/usr/share/aclocal-1.15/depend.m4', + '/usr/share/aclocal-1.15/depout.m4', + '/usr/share/aclocal-1.15/init.m4', + '/usr/share/aclocal-1.15/install-sh.m4', + '/usr/share/aclocal-1.15/lead-dot.m4', + '/usr/share/aclocal-1.15/maintainer.m4', + '/usr/share/aclocal-1.15/make.m4', + '/usr/share/aclocal-1.15/missing.m4', + '/usr/share/aclocal-1.15/options.m4', + '/usr/share/aclocal-1.15/prog-cc-c-o.m4', + '/usr/share/aclocal-1.15/runlog.m4', + '/usr/share/aclocal-1.15/sanity.m4', + '/usr/share/aclocal-1.15/silent.m4', + '/usr/share/aclocal-1.15/strip.m4', + '/usr/share/aclocal-1.15/substnot.m4', + '/usr/share/aclocal-1.15/tar.m4', + 'm4/libtool.m4', + 'm4/ltoptions.m4', + 'm4/ltsugar.m4', + 'm4/ltversion.m4', + 'm4/lt~obsolete.m4', + 'configure.ac' + ], + { + 'AC_CHECK_LIBM' => 1, + '_LT_AC_LANG_GCJ' => 1, + 'AC_DISABLE_STATIC' => 1, + 'AC_DISABLE_FAST_INSTALL' => 1, + 'AC_LIBTOOL_GCJ' => 1, + 'AM_INIT_AUTOMAKE' => 1, + 'LT_PROG_GO' => 1, + 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, + 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, + 'LT_AC_PROG_SED' => 1, + 'AC_ENABLE_STATIC' => 1, + '_LT_AC_TAGVAR' => 1, + 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, + 'AC_LIBTOOL_DLOPEN_SELF' => 1, + 'AM_DISABLE_STATIC' => 1, + '_LT_DLL_DEF_P' => 1, + 'LT_PROG_RC' => 1, + 'AC_DEPLIBS_CHECK_METHOD' => 1, + '_LT_AC_TAGCONFIG' => 1, + '_LT_PATH_TOOL_PREFIX' => 1, + '_LT_AC_CHECK_DLFCN' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + '_LT_AC_LANG_F77_CONFIG' => 1, + 'include' => 1, + 'AM_ENABLE_STATIC' => 1, + 'AM_MAINTAINER_MODE' => 1, + '_AM_SET_OPTIONS' => 1, + 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, + 'AC_LIBTOOL_COMPILER_OPTION' => 1, + 'AM_DEP_TRACK' => 1, + '_LT_AC_LOCK' => 1, + 'AC_LIBTOOL_WIN32_DLL' => 1, + '_LT_CC_BASENAME' => 1, + 'AC_DEFUN_ONCE' => 1, + 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, + 'AC_DISABLE_SHARED' => 1, + 'AM_PROG_NM' => 1, + 'AC_PROG_LIBTOOL' => 1, + 'AM_SUBST_NOTMAKE' => 1, + 'AM_MISSING_PROG' => 1, + 'LT_PATH_LD' => 1, + '_LT_LINKER_BOILERPLATE' => 1, + 'AM_RUN_LOG' => 1, + '_LT_AC_LANG_C_CONFIG' => 1, + 'AC_LIBTOOL_LANG_C_CONFIG' => 1, + 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1, + 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, + '_LT_AC_LANG_GCJ_CONFIG' => 1, + '_LT_AC_FILE_LTDLL_C' => 1, + '_LT_AC_PROG_ECHO_BACKSLASH' => 1, + '_LT_COMPILER_BOILERPLATE' => 1, + 'AM_DISABLE_SHARED' => 1, + 'AC_LTDL_PREOPEN' => 1, + 'AM_PROG_AS' => 1, + 'LT_AC_PROG_GCJ' => 1, + 'AC_CONFIG_MACRO_DIR' => 1, + 'AM_PROG_INSTALL_STRIP' => 1, + 'AC_LIBTOOL_RC' => 1, + 'AM_ENABLE_SHARED' => 1, + 'LTOPTIONS_VERSION' => 1, + 'LT_PROG_GCJ' => 1, + 'AM_PROG_LIBTOOL' => 1, + 'AC_PROG_LD_GNU' => 1, + 'LTSUGAR_VERSION' => 1, + 'AM_AUX_DIR_EXPAND' => 1, + 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, + 'AM_SET_LEADING_DOT' => 1, + 'AC_ENABLE_FAST_INSTALL' => 1, + 'LT_SYS_DLOPEN_SELF' => 1, + 'LT_SUPPORTED_TAG' => 1, + '_LT_AC_PROG_CXXCPP' => 1, + 'AC_LIBTOOL_OBJDIR' => 1, + 'LTOBSOLETE_VERSION' => 1, + 'AU_DEFUN' => 1, + '_AM_SUBST_NOTMAKE' => 1, + 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, + '_LT_PROG_LTMAIN' => 1, + 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + 'LT_LIB_M' => 1, + 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, + 'AC_LIBTOOL_PROG_CC_C_O' => 1, + 'm4_pattern_allow' => 1, + '_LT_AC_LANG_RC_CONFIG' => 1, + 'AC_PROG_EGREP' => 1, + '_AM_CONFIG_MACRO_DIRS' => 1, + 'm4_pattern_forbid' => 1, + '_LT_AC_SYS_COMPILER' => 1, + '_LT_REQUIRED_DARWIN_CHECKS' => 1, + 'AC_PROG_LD' => 1, + 'AC_LIBTOOL_DLOPEN' => 1, + 'AC_LIBTOOL_CONFIG' => 1, + 'AM_PROG_INSTALL_SH' => 1, + '_AM_SET_OPTION' => 1, + '_AM_MANGLE_OPTION' => 1, + 'AC_ENABLE_SHARED' => 1, + '_LT_WITH_SYSROOT' => 1, + 'm4_include' => 1, + '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, + 'LT_LANG' => 1, + 'AC_PROG_NM' => 1, + 'AC_PROG_LD_RELOAD_FLAG' => 1, + 'AC_LIBTOOL_CXX' => 1, + '_LT_AC_TRY_DLOPEN_SELF' => 1, + 'AC_LIBTOOL_LINKER_OPTION' => 1, + '_AC_AM_CONFIG_HEADER_HOOK' => 1, + '_AM_PROG_TAR' => 1, + 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, + 'LT_PATH_NM' => 1, + 'AM_MISSING_HAS_RUN' => 1, + '_AC_PROG_LIBTOOL' => 1, + 'AM_PROG_CC_C_O' => 1, + 'AC_LTDL_ENABLE_INSTALL' => 1, + '_LT_AC_SHELL_INIT' => 1, + 'LT_INIT' => 1, + '_LT_AC_SYS_LIBPATH_AIX' => 1, + 'AM_CONDITIONAL' => 1, + 'AC_LTDL_OBJDIR' => 1, + 'LT_CMD_MAX_LEN' => 1, + 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, + 'LTVERSION_VERSION' => 1, + 'LT_OUTPUT' => 1, + 'AM_SANITY_CHECK' => 1, + '_AM_PROG_CC_C_O' => 1, + '_LT_PREPARE_SED_QUOTE_VARS' => 1, + 'AC_LIBTOOL_PICMODE' => 1, + 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, + 'AC_LIBTOOL_FC' => 1, + '_LT_AC_LANG_CXX_CONFIG' => 1, + 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, + 'AM_MAKE_INCLUDE' => 1, + 'AC_PATH_MAGIC' => 1, + 'AC_LIBTOOL_SETUP' => 1, + 'AM_PROG_LD' => 1, + 'AM_SILENT_RULES' => 1, + 'AC_LIBTOOL_F77' => 1, + '_LT_PROG_ECHO_BACKSLASH' => 1, + '_AM_DEPENDENCIES' => 1, + 'AM_SET_DEPDIR' => 1, + '_LT_PROG_FC' => 1, + '_LT_PROG_CXX' => 1, + '_LT_AC_LANG_CXX' => 1, + '_LT_COMPILER_OPTION' => 1, + 'AC_CONFIG_MACRO_DIR_TRACE' => 1, + '_AM_IF_OPTION' => 1, + '_LT_AC_LANG_F77' => 1, + '_LT_PROG_F77' => 1, + '_AM_AUTOCONF_VERSION' => 1, + 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, + 'AC_PATH_TOOL_PREFIX' => 1, + 'LT_AC_PROG_RC' => 1, + '_m4_warn' => 1, + 'LT_AC_PROG_EGREP' => 1, + 'AC_DEFUN' => 1, + '_LT_LINKER_OPTION' => 1 + } + ], 'Autom4te::Request' ) + ); + diff --git a/external/bdwgc/libatomic_ops/autom4te.cache/traces.0 b/external/bdwgc/libatomic_ops/autom4te.cache/traces.0 new file mode 100644 index 0000000000..88fea7b24a --- /dev/null +++ b/external/bdwgc/libatomic_ops/autom4te.cache/traces.0 @@ -0,0 +1,2091 @@ +m4trace:/usr/share/aclocal/libtool.m4:61: -1- AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS=$ltmain + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +]) +m4trace:/usr/share/aclocal/libtool.m4:99: -1- AU_DEFUN([AC_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:99: -1- AC_DEFUN([AC_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:100: -1- AU_DEFUN([AM_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:100: -1- AC_DEFUN([AM_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LIBTOOL' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:619: -1- AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +'$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2011 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test 0 != $[#] +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try '$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try '$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +lt_cl_success=: +test yes = "$silent" && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) +]) +m4trace:/usr/share/aclocal/libtool.m4:812: -1- AC_DEFUN([LT_SUPPORTED_TAG], []) +m4trace:/usr/share/aclocal/libtool.m4:823: -1- AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +]) +m4trace:/usr/share/aclocal/libtool.m4:915: -1- AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +m4trace:/usr/share/aclocal/libtool.m4:915: -1- AC_DEFUN([AC_LIBTOOL_CXX], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_CXX' is obsolete. +You should run autoupdate.])dnl +LT_LANG(C++)]) +m4trace:/usr/share/aclocal/libtool.m4:916: -1- AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +m4trace:/usr/share/aclocal/libtool.m4:916: -1- AC_DEFUN([AC_LIBTOOL_F77], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_F77' is obsolete. +You should run autoupdate.])dnl +LT_LANG(Fortran 77)]) +m4trace:/usr/share/aclocal/libtool.m4:917: -1- AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +m4trace:/usr/share/aclocal/libtool.m4:917: -1- AC_DEFUN([AC_LIBTOOL_FC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_FC' is obsolete. +You should run autoupdate.])dnl +LT_LANG(Fortran)]) +m4trace:/usr/share/aclocal/libtool.m4:918: -1- AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +m4trace:/usr/share/aclocal/libtool.m4:918: -1- AC_DEFUN([AC_LIBTOOL_GCJ], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_GCJ' is obsolete. +You should run autoupdate.])dnl +LT_LANG(Java)]) +m4trace:/usr/share/aclocal/libtool.m4:919: -1- AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +m4trace:/usr/share/aclocal/libtool.m4:919: -1- AC_DEFUN([AC_LIBTOOL_RC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_RC' is obsolete. +You should run autoupdate.])dnl +LT_LANG(Windows Resource)]) +m4trace:/usr/share/aclocal/libtool.m4:1247: -1- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], + [Search for dependent libraries within DIR (or the compiler's sysroot + if not specified).])], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case $with_sysroot in #( + yes) + if test yes = "$GCC"; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([$with_sysroot]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and where our libraries should be installed.])]) +m4trace:/usr/share/aclocal/libtool.m4:1578: -1- AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test yes = "[$]$2"; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +]) +m4trace:/usr/share/aclocal/libtool.m4:1620: -1- AU_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:1620: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:1629: -1- AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS +]) + +if test yes = "[$]$2"; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +]) +m4trace:/usr/share/aclocal/libtool.m4:1664: -1- AU_DEFUN([AC_LIBTOOL_LINKER_OPTION], [m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:1664: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_LINKER_OPTION' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:1671: -1- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring=ABCD + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test 17 != "$i" # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n "$lt_cv_sys_max_cmd_len"; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +]) +m4trace:/usr/share/aclocal/libtool.m4:1810: -1- AU_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:1810: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_SYS_MAX_CMD_LEN' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:1921: -1- AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl +if test yes != "$enable_dlopen"; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen=load_add_on + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen=LoadLibrary + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ + lt_cv_dlopen=dyld + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen=shl_load], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen=dlopen], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test no = "$lt_cv_dlopen"; then + enable_dlopen=no + else + enable_dlopen=yes + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS=$LDFLAGS + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS=$LIBS + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test yes = "$lt_cv_dlopen_self"; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +]) +m4trace:/usr/share/aclocal/libtool.m4:2046: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:2046: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN_SELF' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3167: -1- AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$1"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD=$lt_cv_path_MAGIC_CMD + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac]) +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +]) +m4trace:/usr/share/aclocal/libtool.m4:3229: -1- AU_DEFUN([AC_PATH_TOOL_PREFIX], [m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3229: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_DIAGNOSE([obsolete], [The macro `AC_PATH_TOOL_PREFIX' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3252: -1- AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test no = "$withval" || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test yes = "$GCC"; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return, which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD=$ac_prog + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test yes = "$with_gnu_ld"; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD=$ac_dir/$ac_prog + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break 2 + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break 2 + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS=$lt_save_ifs + done + : ${lt_cv_path_NM=no} +fi]) +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols -headers" + ;; + *) + DUMPBIN=: + ;; + esac + fi + AC_SUBST([DUMPBIN]) + if test : != "$DUMPBIN"; then + NM=$DUMPBIN + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +]) +m4trace:/usr/share/aclocal/libtool.m4:3766: -1- AU_DEFUN([AM_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3766: -1- AC_DEFUN([AM_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_NM' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3767: -1- AU_DEFUN([AC_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3767: -1- AC_DEFUN([AC_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_NM' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3838: -1- AC_DEFUN([_LT_DLL_DEF_P], [dnl + test DEF = "`$SED -n dnl + -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace + -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments + -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl + -e q dnl Only consider the first "real" line + $1`" dnl +]) +m4trace:/usr/share/aclocal/libtool.m4:3852: -1- AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM=-lm) + ;; +esac +AC_SUBST([LIBM]) +]) +m4trace:/usr/share/aclocal/libtool.m4:3871: -1- AU_DEFUN([AC_CHECK_LIBM], [m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3871: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_DIAGNOSE([obsolete], [The macro `AC_CHECK_LIBM' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:8141: -1- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) +m4trace:/usr/share/aclocal/libtool.m4:8150: -1- AU_DEFUN([LT_AC_PROG_GCJ], [m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:8150: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_GCJ' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:8157: -1- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) +]) +m4trace:/usr/share/aclocal/libtool.m4:8164: -1- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) +]) +m4trace:/usr/share/aclocal/libtool.m4:8169: -1- AU_DEFUN([LT_AC_PROG_RC], [m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:8169: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_RC' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:8289: -1- AU_DEFUN([LT_AC_PROG_SED], [m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:8289: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_SED' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])]) +m4trace:/usr/share/aclocal/ltoptions.m4:14: -1- AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) +m4trace:/usr/share/aclocal/ltoptions.m4:113: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'dlopen' option into LT_INIT's first parameter.]) +]) +m4trace:/usr/share/aclocal/ltoptions.m4:113: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN' is obsolete. +You should run autoupdate.])dnl +_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'dlopen' option into LT_INIT's first parameter.]) +]) +m4trace:/usr/share/aclocal/ltoptions.m4:148: -1- AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'win32-dll' option into LT_INIT's first parameter.]) +]) +m4trace:/usr/share/aclocal/ltoptions.m4:148: -1- AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete. +You should run autoupdate.])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'win32-dll' option into LT_INIT's first parameter.]) +]) +m4trace:/usr/share/aclocal/ltoptions.m4:197: -1- AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) +m4trace:/usr/share/aclocal/ltoptions.m4:201: -1- AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) +m4trace:/usr/share/aclocal/ltoptions.m4:205: -1- AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +m4trace:/usr/share/aclocal/ltoptions.m4:205: -1- AC_DEFUN([AM_ENABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_SHARED' is obsolete. +You should run autoupdate.])dnl +AC_ENABLE_SHARED($@)]) +m4trace:/usr/share/aclocal/ltoptions.m4:206: -1- AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +m4trace:/usr/share/aclocal/ltoptions.m4:206: -1- AC_DEFUN([AM_DISABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_SHARED' is obsolete. +You should run autoupdate.])dnl +AC_DISABLE_SHARED($@)]) +m4trace:/usr/share/aclocal/ltoptions.m4:251: -1- AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) +m4trace:/usr/share/aclocal/ltoptions.m4:255: -1- AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) +]) +m4trace:/usr/share/aclocal/ltoptions.m4:259: -1- AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +m4trace:/usr/share/aclocal/ltoptions.m4:259: -1- AC_DEFUN([AM_ENABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_STATIC' is obsolete. +You should run autoupdate.])dnl +AC_ENABLE_STATIC($@)]) +m4trace:/usr/share/aclocal/ltoptions.m4:260: -1- AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +m4trace:/usr/share/aclocal/ltoptions.m4:260: -1- AC_DEFUN([AM_DISABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_STATIC' is obsolete. +You should run autoupdate.])dnl +AC_DISABLE_STATIC($@)]) +m4trace:/usr/share/aclocal/ltoptions.m4:305: -1- AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'fast-install' option into LT_INIT's first parameter.]) +]) +m4trace:/usr/share/aclocal/ltoptions.m4:305: -1- AC_DEFUN([AC_ENABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_ENABLE_FAST_INSTALL' is obsolete. +You should run autoupdate.])dnl +_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'fast-install' option into LT_INIT's first parameter.]) +]) +m4trace:/usr/share/aclocal/ltoptions.m4:312: -1- AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'disable-fast-install' option into LT_INIT's first parameter.]) +]) +m4trace:/usr/share/aclocal/ltoptions.m4:312: -1- AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_DISABLE_FAST_INSTALL' is obsolete. +You should run autoupdate.])dnl +_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'disable-fast-install' option into LT_INIT's first parameter.]) +]) +m4trace:/usr/share/aclocal/ltoptions.m4:411: -1- AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'pic-only' option into LT_INIT's first parameter.]) +]) +m4trace:/usr/share/aclocal/ltoptions.m4:411: -1- AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_PICMODE' is obsolete. +You should run autoupdate.])dnl +_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'pic-only' option into LT_INIT's first parameter.]) +]) +m4trace:/usr/share/aclocal/ltsugar.m4:14: -1- AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) +m4trace:/usr/share/aclocal/ltversion.m4:18: -1- AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' +macro_revision='2.4.6' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:37: -1- AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:41: -1- AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:42: -1- AC_DEFUN([_LT_AC_SHELL_INIT]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:43: -1- AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:45: -1- AC_DEFUN([_LT_AC_TAGVAR]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:46: -1- AC_DEFUN([AC_LTDL_ENABLE_INSTALL]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:47: -1- AC_DEFUN([AC_LTDL_PREOPEN]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:48: -1- AC_DEFUN([_LT_AC_SYS_COMPILER]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:49: -1- AC_DEFUN([_LT_AC_LOCK]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:50: -1- AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:51: -1- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:52: -1- AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:53: -1- AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:54: -1- AC_DEFUN([AC_LIBTOOL_OBJDIR]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:55: -1- AC_DEFUN([AC_LTDL_OBJDIR]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:56: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:57: -1- AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:58: -1- AC_DEFUN([AC_PATH_MAGIC]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:59: -1- AC_DEFUN([AC_PROG_LD_GNU]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:60: -1- AC_DEFUN([AC_PROG_LD_RELOAD_FLAG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:61: -1- AC_DEFUN([AC_DEPLIBS_CHECK_METHOD]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:62: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:63: -1- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:64: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:65: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:66: -1- AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:67: -1- AC_DEFUN([LT_AC_PROG_EGREP]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:72: -1- AC_DEFUN([_AC_PROG_LIBTOOL]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:73: -1- AC_DEFUN([AC_LIBTOOL_SETUP]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:74: -1- AC_DEFUN([_LT_AC_CHECK_DLFCN]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:75: -1- AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:76: -1- AC_DEFUN([_LT_AC_TAGCONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:78: -1- AC_DEFUN([_LT_AC_LANG_CXX]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:79: -1- AC_DEFUN([_LT_AC_LANG_F77]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:80: -1- AC_DEFUN([_LT_AC_LANG_GCJ]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:81: -1- AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:82: -1- AC_DEFUN([_LT_AC_LANG_C_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:83: -1- AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:84: -1- AC_DEFUN([_LT_AC_LANG_CXX_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:85: -1- AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:86: -1- AC_DEFUN([_LT_AC_LANG_F77_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:87: -1- AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:88: -1- AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:89: -1- AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:90: -1- AC_DEFUN([_LT_AC_LANG_RC_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:91: -1- AC_DEFUN([AC_LIBTOOL_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:92: -1- AC_DEFUN([_LT_AC_FILE_LTDLL_C]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:94: -1- AC_DEFUN([_LT_AC_PROG_CXXCPP]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:97: -1- AC_DEFUN([_LT_PROG_F77]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:98: -1- AC_DEFUN([_LT_PROG_FC]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:99: -1- AC_DEFUN([_LT_PROG_CXX]) +m4trace:/usr/share/aclocal-1.15/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.15], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) +m4trace:/usr/share/aclocal-1.15/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +m4trace:/usr/share/aclocal-1.15/as.m4:11: -1- AC_DEFUN([AM_PROG_AS], [# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS +AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) +AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) +_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl +]) +m4trace:/usr/share/aclocal-1.15/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` +]) +m4trace:/usr/share/aclocal-1.15/cond.m4:12: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) +m4trace:/usr/share/aclocal-1.15/depend.m4:26: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) +m4trace:/usr/share/aclocal-1.15/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) +m4trace:/usr/share/aclocal-1.15/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) +m4trace:/usr/share/aclocal-1.15/depout.m4:12: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +]) +m4trace:/usr/share/aclocal-1.15/depout.m4:71: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) +m4trace:/usr/share/aclocal-1.15/init.m4:29: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) +m4trace:/usr/share/aclocal-1.15/init.m4:186: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) +m4trace:/usr/share/aclocal-1.15/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) +m4trace:/usr/share/aclocal-1.15/lead-dot.m4:10: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) +m4trace:/usr/share/aclocal-1.15/maintainer.m4:16: -1- AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl + +]) +m4trace:/usr/share/aclocal-1.15/make.m4:12: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) +m4trace:/usr/share/aclocal-1.15/missing.m4:11: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) +m4trace:/usr/share/aclocal-1.15/missing.m4:20: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) +m4trace:/usr/share/aclocal-1.15/options.m4:11: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) +m4trace:/usr/share/aclocal-1.15/options.m4:17: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) +m4trace:/usr/share/aclocal-1.15/options.m4:23: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +m4trace:/usr/share/aclocal-1.15/options.m4:29: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +m4trace:/usr/share/aclocal-1.15/prog-cc-c-o.m4:12: -1- AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) +m4trace:/usr/share/aclocal-1.15/prog-cc-c-o.m4:47: -1- AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) +m4trace:/usr/share/aclocal-1.15/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) +m4trace:/usr/share/aclocal-1.15/sanity.m4:11: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) +m4trace:/usr/share/aclocal-1.15/silent.m4:12: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) +m4trace:/usr/share/aclocal-1.15/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) +m4trace:/usr/share/aclocal-1.15/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) +m4trace:/usr/share/aclocal-1.15/substnot.m4:17: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4trace:/usr/share/aclocal-1.15/tar.m4:23: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) +m4trace:configure.ac:2: -1- m4_pattern_allow([^AS_FLAGS$]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?m4_]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([^dnl$]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?AS_]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^SHELL$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PATH_SEPARATOR$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_URL$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^exec_prefix$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^prefix$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^program_transform_name$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^bindir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^sbindir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^libexecdir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^datarootdir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^datadir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^sysconfdir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^sharedstatedir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^localstatedir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^runstatedir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^includedir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^oldincludedir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^docdir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^infodir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^htmldir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^dvidir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^pdfdir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^psdir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^libdir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^localedir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^mandir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_URL$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^DEFS$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_C$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_N$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_T$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^build_alias$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^host_alias$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^target_alias$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^build$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^build_cpu$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^build_vendor$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^build_os$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^host$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^host_cpu$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^host_vendor$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^host_os$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^target$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^target_cpu$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^target_vendor$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^target_os$]) +m4trace:configure.ac:7: -1- AC_CONFIG_MACRO_DIR([m4]) +m4trace:configure.ac:8: -1- AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) +m4trace:configure.ac:8: -1- AM_SET_CURRENT_AUTOMAKE_VERSION +m4trace:configure.ac:8: -1- AM_AUTOMAKE_VERSION([1.15]) +m4trace:configure.ac:8: -1- _AM_AUTOCONF_VERSION([2.69]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_DATA$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^am__isrc$]) +m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([am__isrc]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^CYGPATH_W$]) +m4trace:configure.ac:8: -1- _AM_SET_OPTIONS([foreign dist-bzip2 nostdinc]) +m4trace:configure.ac:8: -1- _AM_SET_OPTION([foreign]) +m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([foreign]) +m4trace:configure.ac:8: -1- _AM_SET_OPTION([dist-bzip2]) +m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([dist-bzip2]) +m4trace:configure.ac:8: -1- _AM_SET_OPTION([nostdinc]) +m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([nostdinc]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:8: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])]) +m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([no-define]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:8: -1- AM_SANITY_CHECK +m4trace:configure.ac:8: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +m4trace:configure.ac:8: -1- AM_MISSING_HAS_RUN +m4trace:configure.ac:8: -1- AM_AUX_DIR_EXPAND +m4trace:configure.ac:8: -1- m4_pattern_allow([^ACLOCAL$]) +m4trace:configure.ac:8: -1- AM_MISSING_PROG([AUTOCONF], [autoconf]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOCONF$]) +m4trace:configure.ac:8: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOMAKE$]) +m4trace:configure.ac:8: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOHEADER$]) +m4trace:configure.ac:8: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^MAKEINFO$]) +m4trace:configure.ac:8: -1- AM_PROG_INSTALL_SH +m4trace:configure.ac:8: -1- m4_pattern_allow([^install_sh$]) +m4trace:configure.ac:8: -1- AM_PROG_INSTALL_STRIP +m4trace:configure.ac:8: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^MKDIR_P$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^mkdir_p$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AWK$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^SET_MAKE$]) +m4trace:configure.ac:8: -1- AM_SET_LEADING_DOT +m4trace:configure.ac:8: -1- m4_pattern_allow([^am__leading_dot$]) +m4trace:configure.ac:8: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([tar-ustar]) +m4trace:configure.ac:8: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])]) +m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([tar-pax]) +m4trace:configure.ac:8: -1- _AM_PROG_TAR([v7]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AMTAR$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^am__tar$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^am__untar$]) +m4trace:configure.ac:8: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([no-dependencies]) +m4trace:configure.ac:8: -1- AM_SILENT_RULES +m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_V$]) +m4trace:configure.ac:8: -1- AM_SUBST_NOTMAKE([AM_V]) +m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_V]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_DEFAULT_V$]) +m4trace:configure.ac:8: -1- AM_SUBST_NOTMAKE([AM_DEFAULT_V]) +m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_BACKSLASH$]) +m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) +m4trace:configure.ac:9: -1- AM_MAINTAINER_MODE +m4trace:configure.ac:9: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$]) +m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE]) +m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINT$]) +m4trace:configure.ac:14: -1- AM_PROG_CC_C_O +m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CFLAGS$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^ac_ct_CC$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^EXEEXT$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^OBJEXT$]) +m4trace:configure.ac:14: -1- _AM_PROG_CC_C_O +m4trace:configure.ac:14: -1- AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) +m4trace:configure.ac:14: -1- _AM_DEPENDENCIES([CC]) +m4trace:configure.ac:14: -1- AM_SET_DEPDIR +m4trace:configure.ac:14: -1- m4_pattern_allow([^DEPDIR$]) +m4trace:configure.ac:14: -1- AM_OUTPUT_DEPENDENCY_COMMANDS +m4trace:configure.ac:14: -1- AM_MAKE_INCLUDE +m4trace:configure.ac:14: -1- m4_pattern_allow([^am__include$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^am__quote$]) +m4trace:configure.ac:14: -1- AM_DEP_TRACK +m4trace:configure.ac:14: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEP_TRUE$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEP_FALSE$]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^am__nodep$]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__nodep]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:14: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:15: -1- AM_PROG_AS +m4trace:configure.ac:15: -1- m4_pattern_allow([^CCAS$]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^CCASFLAGS$]) +m4trace:configure.ac:15: -1- _AM_IF_OPTION([no-dependencies], [], [_AM_DEPENDENCIES([CCAS])]) +m4trace:configure.ac:15: -2- _AM_MANGLE_OPTION([no-dependencies]) +m4trace:configure.ac:15: -1- _AM_DEPENDENCIES([CCAS]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^CCASDEPMODE$]) +m4trace:configure.ac:15: -1- AM_CONDITIONAL([am__fastdepCCAS], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^am__fastdepCCAS_TRUE$]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^am__fastdepCCAS_FALSE$]) +m4trace:configure.ac:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_TRUE]) +m4trace:configure.ac:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_FALSE]) +m4trace:configure.ac:16: -1- LT_INIT([disable-shared]) +m4trace:configure.ac:16: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$]) +m4trace:configure.ac:16: -1- LTOPTIONS_VERSION +m4trace:configure.ac:16: -1- LTSUGAR_VERSION +m4trace:configure.ac:16: -1- LTVERSION_VERSION +m4trace:configure.ac:16: -1- LTOBSOLETE_VERSION +m4trace:configure.ac:16: -1- _LT_PROG_LTMAIN +m4trace:configure.ac:16: -1- m4_pattern_allow([^LIBTOOL$]) +m4trace:configure.ac:16: -1- _LT_PREPARE_SED_QUOTE_VARS +m4trace:configure.ac:16: -1- _LT_PROG_ECHO_BACKSLASH +m4trace:configure.ac:16: -1- LT_PATH_LD +m4trace:configure.ac:16: -1- m4_pattern_allow([^SED$]) +m4trace:configure.ac:16: -1- AC_PROG_EGREP +m4trace:configure.ac:16: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^EGREP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^FGREP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LD$]) +m4trace:configure.ac:16: -1- LT_PATH_NM +m4trace:configure.ac:16: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^NM$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LN_S$]) +m4trace:configure.ac:16: -1- LT_CMD_MAX_LEN +m4trace:configure.ac:16: -1- m4_pattern_allow([^OBJDUMP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^OBJDUMP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^DLLTOOL$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^DLLTOOL$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AR$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^ac_ct_AR$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^RANLIB$]) +m4trace:configure.ac:16: -1- _LT_WITH_SYSROOT +m4trace:configure.ac:16: -1- m4_pattern_allow([LT_OBJDIR]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LT_OBJDIR$]) +m4trace:configure.ac:16: -1- _LT_CC_BASENAME([$compiler]) +m4trace:configure.ac:16: -1- _LT_PATH_TOOL_PREFIX([${ac_tool_prefix}file], [/usr/bin$PATH_SEPARATOR$PATH]) +m4trace:configure.ac:16: -1- _LT_PATH_TOOL_PREFIX([file], [/usr/bin$PATH_SEPARATOR$PATH]) +m4trace:configure.ac:16: -1- LT_SUPPORTED_TAG([CC]) +m4trace:configure.ac:16: -1- _LT_COMPILER_BOILERPLATE +m4trace:configure.ac:16: -1- _LT_LINKER_BOILERPLATE +m4trace:configure.ac:16: -1- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, )="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, ) -fno-rtti -fno-exceptions"]) +m4trace:configure.ac:16: -1- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, ) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, )], [$_LT_TAGVAR(lt_prog_compiler_pic, )@&t@m4_if([],[],[ -DPIC],[m4_if([],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, ) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, )=" $_LT_TAGVAR(lt_prog_compiler_pic, )" ;; + esac], [_LT_TAGVAR(lt_prog_compiler_pic, )= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, )=no]) +m4trace:configure.ac:16: -1- _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works], [$lt_tmp_static_flag], [], [_LT_TAGVAR(lt_prog_compiler_static, )=]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^MANIFEST_TOOL$]) +m4trace:configure.ac:16: -1- _LT_DLL_DEF_P([$export_symbols]) +m4trace:configure.ac:16: -1- _LT_DLL_DEF_P([$export_symbols]) +m4trace:configure.ac:16: -1- _LT_REQUIRED_DARWIN_CHECKS +m4trace:configure.ac:16: -1- m4_pattern_allow([^DSYMUTIL$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^NMEDIT$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LIPO$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^OTOOL$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^OTOOL64$]) +m4trace:configure.ac:16: -1- _LT_LINKER_OPTION([if $CC understands -b], [lt_cv_prog_compiler__b], [-b], [_LT_TAGVAR(archive_cmds, )='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, )='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags']) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LT_SYS_LIBRARY_PATH$]) +m4trace:configure.ac:16: -1- LT_SYS_DLOPEN_SELF +m4trace:configure.ac:16: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^STDC_HEADERS$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^HAVE_DLFCN_H$]) +m4trace:configure.ac:19: -1- AC_DEFUN([_AC_Header_stdlib_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" stdlib.h"])]) +_AC_HEADERS_EXPANSION]) +m4trace:configure.ac:19: -1- AC_DEFUN([_AC_Header_unistd_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" unistd.h"])]) +_AC_HEADERS_EXPANSION]) +m4trace:configure.ac:19: -1- AC_DEFUN([_AC_Header_sys_param_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/param.h"])]) +_AC_HEADERS_EXPANSION]) +m4trace:configure.ac:19: -1- m4_pattern_allow([^HAVE_GETPAGESIZE$]) +m4trace:configure.ac:19: -1- m4_pattern_allow([^HAVE_MMAP$]) +m4trace:configure.ac:38: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2625: AC_TRY_COMPILE is expanded from... +configure.ac:38: the top level]) +m4trace:configure.ac:54: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2625: AC_TRY_COMPILE is expanded from... +configure.ac:54: the top level]) +m4trace:configure.ac:83: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1473: AC_ARG_ENABLE is expanded from... +configure.ac:83: the top level]) +m4trace:configure.ac:86: -1- m4_pattern_allow([^NDEBUG$]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^PICFLAG$]) +m4trace:configure.ac:90: -1- m4_pattern_allow([^DEFS$]) +m4trace:configure.ac:141: -1- m4_pattern_allow([^_REENTRANT$]) +m4trace:configure.ac:151: -1- m4_pattern_allow([^_PTHREADS$]) +m4trace:configure.ac:169: -1- m4_pattern_allow([^AO_NO_PTHREADS$]) +m4trace:configure.ac:173: -1- m4_pattern_allow([^THREADDLLIBS$]) +m4trace:configure.ac:175: -1- AM_CONDITIONAL([HAVE_PTHREAD_H], [test x$have_pthreads = xtrue]) +m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_PTHREAD_H_TRUE$]) +m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_PTHREAD_H_FALSE$]) +m4trace:configure.ac:175: -1- _AM_SUBST_NOTMAKE([HAVE_PTHREAD_H_TRUE]) +m4trace:configure.ac:175: -1- _AM_SUBST_NOTMAKE([HAVE_PTHREAD_H_FALSE]) +m4trace:configure.ac:176: -1- AM_CONDITIONAL([NEED_ASM], [test x$need_asm = xtrue]) +m4trace:configure.ac:176: -1- m4_pattern_allow([^NEED_ASM_TRUE$]) +m4trace:configure.ac:176: -1- m4_pattern_allow([^NEED_ASM_FALSE$]) +m4trace:configure.ac:176: -1- _AM_SUBST_NOTMAKE([NEED_ASM_TRUE]) +m4trace:configure.ac:176: -1- _AM_SUBST_NOTMAKE([NEED_ASM_FALSE]) +m4trace:configure.ac:190: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:190: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:190: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) +m4trace:configure.ac:190: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) +m4trace:configure.ac:190: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) +m4trace:configure.ac:190: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) +m4trace:configure.ac:190: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) +m4trace:configure.ac:190: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) +m4trace:configure.ac:190: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS +m4trace:configure.ac:190: -1- _LT_PROG_LTMAIN diff --git a/external/bdwgc/libatomic_ops/autom4te.cache/traces.1 b/external/bdwgc/libatomic_ops/autom4te.cache/traces.1 new file mode 100644 index 0000000000..009a47b1e3 --- /dev/null +++ b/external/bdwgc/libatomic_ops/autom4te.cache/traces.1 @@ -0,0 +1,682 @@ +m4trace:aclocal.m4:1209: -1- m4_include([m4/libtool.m4]) +m4trace:aclocal.m4:1210: -1- m4_include([m4/ltoptions.m4]) +m4trace:aclocal.m4:1211: -1- m4_include([m4/ltsugar.m4]) +m4trace:aclocal.m4:1212: -1- m4_include([m4/ltversion.m4]) +m4trace:aclocal.m4:1213: -1- m4_include([m4/lt~obsolete.m4]) +m4trace:configure.ac:2: -1- AC_INIT([libatomic_ops], [7.4.2], [bdwgc@lists.opendylan.org]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) +m4trace:configure.ac:2: -1- m4_pattern_allow([^AS_FLAGS$]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?m4_]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([^dnl$]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?AS_]) +m4trace:configure.ac:2: -1- AC_SUBST([SHELL]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([SHELL]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^SHELL$]) +m4trace:configure.ac:2: -1- AC_SUBST([PATH_SEPARATOR]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([PATH_SEPARATOR]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PATH_SEPARATOR$]) +m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([PACKAGE_NAME]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([PACKAGE_TARNAME]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([PACKAGE_VERSION]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([PACKAGE_STRING]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([PACKAGE_URL]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_URL$]) +m4trace:configure.ac:2: -1- AC_SUBST([exec_prefix], [NONE]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([exec_prefix]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^exec_prefix$]) +m4trace:configure.ac:2: -1- AC_SUBST([prefix], [NONE]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([prefix]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^prefix$]) +m4trace:configure.ac:2: -1- AC_SUBST([program_transform_name], [s,x,x,]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([program_transform_name]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^program_transform_name$]) +m4trace:configure.ac:2: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([bindir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^bindir$]) +m4trace:configure.ac:2: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([sbindir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^sbindir$]) +m4trace:configure.ac:2: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([libexecdir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^libexecdir$]) +m4trace:configure.ac:2: -1- AC_SUBST([datarootdir], ['${prefix}/share']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([datarootdir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^datarootdir$]) +m4trace:configure.ac:2: -1- AC_SUBST([datadir], ['${datarootdir}']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([datadir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^datadir$]) +m4trace:configure.ac:2: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([sysconfdir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^sysconfdir$]) +m4trace:configure.ac:2: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([sharedstatedir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^sharedstatedir$]) +m4trace:configure.ac:2: -1- AC_SUBST([localstatedir], ['${prefix}/var']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([localstatedir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^localstatedir$]) +m4trace:configure.ac:2: -1- AC_SUBST([runstatedir], ['${localstatedir}/run']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([runstatedir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^runstatedir$]) +m4trace:configure.ac:2: -1- AC_SUBST([includedir], ['${prefix}/include']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([includedir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^includedir$]) +m4trace:configure.ac:2: -1- AC_SUBST([oldincludedir], ['/usr/include']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([oldincludedir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^oldincludedir$]) +m4trace:configure.ac:2: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], + ['${datarootdir}/doc/${PACKAGE_TARNAME}'], + ['${datarootdir}/doc/${PACKAGE}'])]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([docdir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^docdir$]) +m4trace:configure.ac:2: -1- AC_SUBST([infodir], ['${datarootdir}/info']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([infodir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^infodir$]) +m4trace:configure.ac:2: -1- AC_SUBST([htmldir], ['${docdir}']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([htmldir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^htmldir$]) +m4trace:configure.ac:2: -1- AC_SUBST([dvidir], ['${docdir}']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([dvidir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^dvidir$]) +m4trace:configure.ac:2: -1- AC_SUBST([pdfdir], ['${docdir}']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([pdfdir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^pdfdir$]) +m4trace:configure.ac:2: -1- AC_SUBST([psdir], ['${docdir}']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([psdir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^psdir$]) +m4trace:configure.ac:2: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([libdir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^libdir$]) +m4trace:configure.ac:2: -1- AC_SUBST([localedir], ['${datarootdir}/locale']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([localedir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^localedir$]) +m4trace:configure.ac:2: -1- AC_SUBST([mandir], ['${datarootdir}/man']) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([mandir]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^mandir$]) +m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ +@%:@undef PACKAGE_NAME]) +m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ +@%:@undef PACKAGE_TARNAME]) +m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ +@%:@undef PACKAGE_VERSION]) +m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ +@%:@undef PACKAGE_STRING]) +m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ +@%:@undef PACKAGE_BUGREPORT]) +m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_URL$]) +m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */ +@%:@undef PACKAGE_URL]) +m4trace:configure.ac:2: -1- AC_SUBST([DEFS]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([DEFS]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^DEFS$]) +m4trace:configure.ac:2: -1- AC_SUBST([ECHO_C]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([ECHO_C]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_C$]) +m4trace:configure.ac:2: -1- AC_SUBST([ECHO_N]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([ECHO_N]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_N$]) +m4trace:configure.ac:2: -1- AC_SUBST([ECHO_T]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([ECHO_T]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_T$]) +m4trace:configure.ac:2: -1- AC_SUBST([LIBS]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:2: -1- AC_SUBST([build_alias]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([build_alias]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^build_alias$]) +m4trace:configure.ac:2: -1- AC_SUBST([host_alias]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([host_alias]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^host_alias$]) +m4trace:configure.ac:2: -1- AC_SUBST([target_alias]) +m4trace:configure.ac:2: -1- AC_SUBST_TRACE([target_alias]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^target_alias$]) +m4trace:configure.ac:5: -1- AC_CANONICAL_TARGET([]) +m4trace:configure.ac:5: -1- AC_CANONICAL_HOST +m4trace:configure.ac:5: -1- AC_CANONICAL_BUILD +m4trace:configure.ac:5: -1- AC_REQUIRE_AUX_FILE([config.sub]) +m4trace:configure.ac:5: -1- AC_REQUIRE_AUX_FILE([config.guess]) +m4trace:configure.ac:5: -1- AC_SUBST([build], [$ac_cv_build]) +m4trace:configure.ac:5: -1- AC_SUBST_TRACE([build]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^build$]) +m4trace:configure.ac:5: -1- AC_SUBST([build_cpu], [$[1]]) +m4trace:configure.ac:5: -1- AC_SUBST_TRACE([build_cpu]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^build_cpu$]) +m4trace:configure.ac:5: -1- AC_SUBST([build_vendor], [$[2]]) +m4trace:configure.ac:5: -1- AC_SUBST_TRACE([build_vendor]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^build_vendor$]) +m4trace:configure.ac:5: -1- AC_SUBST([build_os]) +m4trace:configure.ac:5: -1- AC_SUBST_TRACE([build_os]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^build_os$]) +m4trace:configure.ac:5: -1- AC_SUBST([host], [$ac_cv_host]) +m4trace:configure.ac:5: -1- AC_SUBST_TRACE([host]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^host$]) +m4trace:configure.ac:5: -1- AC_SUBST([host_cpu], [$[1]]) +m4trace:configure.ac:5: -1- AC_SUBST_TRACE([host_cpu]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^host_cpu$]) +m4trace:configure.ac:5: -1- AC_SUBST([host_vendor], [$[2]]) +m4trace:configure.ac:5: -1- AC_SUBST_TRACE([host_vendor]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^host_vendor$]) +m4trace:configure.ac:5: -1- AC_SUBST([host_os]) +m4trace:configure.ac:5: -1- AC_SUBST_TRACE([host_os]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^host_os$]) +m4trace:configure.ac:5: -1- AC_SUBST([target], [$ac_cv_target]) +m4trace:configure.ac:5: -1- AC_SUBST_TRACE([target]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^target$]) +m4trace:configure.ac:5: -1- AC_SUBST([target_cpu], [$[1]]) +m4trace:configure.ac:5: -1- AC_SUBST_TRACE([target_cpu]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^target_cpu$]) +m4trace:configure.ac:5: -1- AC_SUBST([target_vendor], [$[2]]) +m4trace:configure.ac:5: -1- AC_SUBST_TRACE([target_vendor]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^target_vendor$]) +m4trace:configure.ac:5: -1- AC_SUBST([target_os]) +m4trace:configure.ac:5: -1- AC_SUBST_TRACE([target_os]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^target_os$]) +m4trace:configure.ac:8: -1- AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) +m4trace:configure.ac:8: -1- AM_AUTOMAKE_VERSION([1.15]) +m4trace:configure.ac:8: -1- AC_REQUIRE_AUX_FILE([install-sh]) +m4trace:configure.ac:8: -1- AC_SUBST([INSTALL_PROGRAM]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) +m4trace:configure.ac:8: -1- AC_SUBST([INSTALL_SCRIPT]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([INSTALL_SCRIPT]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) +m4trace:configure.ac:8: -1- AC_SUBST([INSTALL_DATA]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([INSTALL_DATA]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_DATA$]) +m4trace:configure.ac:8: -1- AC_SUBST([am__isrc], [' -I$(srcdir)']) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([am__isrc]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^am__isrc$]) +m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([am__isrc]) +m4trace:configure.ac:8: -1- AC_SUBST([CYGPATH_W]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([CYGPATH_W]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^CYGPATH_W$]) +m4trace:configure.ac:8: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME']) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([PACKAGE]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:8: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION']) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([VERSION]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:8: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:8: -1- AH_OUTPUT([PACKAGE], [/* Name of package */ +@%:@undef PACKAGE]) +m4trace:configure.ac:8: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:8: -1- AH_OUTPUT([VERSION], [/* Version number of package */ +@%:@undef VERSION]) +m4trace:configure.ac:8: -1- AC_REQUIRE_AUX_FILE([missing]) +m4trace:configure.ac:8: -1- AC_SUBST([ACLOCAL]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([ACLOCAL]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^ACLOCAL$]) +m4trace:configure.ac:8: -1- AC_SUBST([AUTOCONF]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AUTOCONF]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOCONF$]) +m4trace:configure.ac:8: -1- AC_SUBST([AUTOMAKE]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AUTOMAKE]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOMAKE$]) +m4trace:configure.ac:8: -1- AC_SUBST([AUTOHEADER]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AUTOHEADER]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOHEADER$]) +m4trace:configure.ac:8: -1- AC_SUBST([MAKEINFO]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([MAKEINFO]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^MAKEINFO$]) +m4trace:configure.ac:8: -1- AC_SUBST([install_sh]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([install_sh]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^install_sh$]) +m4trace:configure.ac:8: -1- AC_SUBST([STRIP]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([STRIP]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:8: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) +m4trace:configure.ac:8: -1- AC_REQUIRE_AUX_FILE([install-sh]) +m4trace:configure.ac:8: -1- AC_SUBST([MKDIR_P]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([MKDIR_P]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^MKDIR_P$]) +m4trace:configure.ac:8: -1- AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([mkdir_p]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^mkdir_p$]) +m4trace:configure.ac:8: -1- AC_SUBST([AWK]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AWK]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AWK$]) +m4trace:configure.ac:8: -1- AC_SUBST([SET_MAKE]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([SET_MAKE]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^SET_MAKE$]) +m4trace:configure.ac:8: -1- AC_SUBST([am__leading_dot]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([am__leading_dot]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^am__leading_dot$]) +m4trace:configure.ac:8: -1- AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AMTAR]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AMTAR$]) +m4trace:configure.ac:8: -1- AC_SUBST([am__tar]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([am__tar]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^am__tar$]) +m4trace:configure.ac:8: -1- AC_SUBST([am__untar]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([am__untar]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^am__untar$]) +m4trace:configure.ac:8: -1- AM_SILENT_RULES +m4trace:configure.ac:8: -1- AC_SUBST([AM_V]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AM_V]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_V$]) +m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_V]) +m4trace:configure.ac:8: -1- AC_SUBST([AM_DEFAULT_V]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AM_DEFAULT_V]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_DEFAULT_V$]) +m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) +m4trace:configure.ac:8: -1- AC_SUBST([AM_DEFAULT_VERBOSITY]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AM_DEFAULT_VERBOSITY]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) +m4trace:configure.ac:8: -1- AC_SUBST([AM_BACKSLASH]) +m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AM_BACKSLASH]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_BACKSLASH$]) +m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) +m4trace:configure.ac:9: -1- AM_MAINTAINER_MODE +m4trace:configure.ac:9: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) +m4trace:configure.ac:9: -1- AC_SUBST([MAINTAINER_MODE_TRUE]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([MAINTAINER_MODE_TRUE]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$]) +m4trace:configure.ac:9: -1- AC_SUBST([MAINTAINER_MODE_FALSE]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([MAINTAINER_MODE_FALSE]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$]) +m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE]) +m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE]) +m4trace:configure.ac:9: -1- AC_SUBST([MAINT]) +m4trace:configure.ac:9: -1- AC_SUBST_TRACE([MAINT]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINT$]) +m4trace:configure.ac:11: -1- AC_CONFIG_HEADERS([src/config.h]) +m4trace:configure.ac:14: -1- AM_PROG_CC_C_O +m4trace:configure.ac:14: -1- AC_SUBST([CC]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:14: -1- AC_SUBST([CFLAGS]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CFLAGS]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CFLAGS$]) +m4trace:configure.ac:14: -1- AC_SUBST([LDFLAGS]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([LDFLAGS]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:14: -1- AC_SUBST([LIBS]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:14: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:14: -1- AC_SUBST([CC]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:14: -1- AC_SUBST([CC]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:14: -1- AC_SUBST([CC]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:14: -1- AC_SUBST([CC]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:14: -1- AC_SUBST([ac_ct_CC]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([ac_ct_CC]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^ac_ct_CC$]) +m4trace:configure.ac:14: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([EXEEXT]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^EXEEXT$]) +m4trace:configure.ac:14: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([OBJEXT]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^OBJEXT$]) +m4trace:configure.ac:14: -1- AC_REQUIRE_AUX_FILE([compile]) +m4trace:configure.ac:14: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([DEPDIR]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^DEPDIR$]) +m4trace:configure.ac:14: -1- AC_SUBST([am__include]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([am__include]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^am__include$]) +m4trace:configure.ac:14: -1- AC_SUBST([am__quote]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([am__quote]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^am__quote$]) +m4trace:configure.ac:14: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +m4trace:configure.ac:14: -1- AC_SUBST([AMDEP_TRUE]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([AMDEP_TRUE]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEP_TRUE$]) +m4trace:configure.ac:14: -1- AC_SUBST([AMDEP_FALSE]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([AMDEP_FALSE]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEP_FALSE$]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) +m4trace:configure.ac:14: -1- AC_SUBST([AMDEPBACKSLASH]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([AMDEPBACKSLASH]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) +m4trace:configure.ac:14: -1- AC_SUBST([am__nodep]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([am__nodep]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^am__nodep$]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__nodep]) +m4trace:configure.ac:14: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CCDEPMODE]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:14: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:14: -1- AC_SUBST([am__fastdepCC_TRUE]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:14: -1- AC_SUBST([am__fastdepCC_FALSE]) +m4trace:configure.ac:14: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:15: -1- AC_SUBST([CCAS]) +m4trace:configure.ac:15: -1- AC_SUBST_TRACE([CCAS]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^CCAS$]) +m4trace:configure.ac:15: -1- AC_SUBST([CCASFLAGS]) +m4trace:configure.ac:15: -1- AC_SUBST_TRACE([CCASFLAGS]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^CCASFLAGS$]) +m4trace:configure.ac:15: -1- AC_SUBST([CCASDEPMODE], [depmode=$am_cv_CCAS_dependencies_compiler_type]) +m4trace:configure.ac:15: -1- AC_SUBST_TRACE([CCASDEPMODE]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^CCASDEPMODE$]) +m4trace:configure.ac:15: -1- AM_CONDITIONAL([am__fastdepCCAS], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:15: -1- AC_SUBST([am__fastdepCCAS_TRUE]) +m4trace:configure.ac:15: -1- AC_SUBST_TRACE([am__fastdepCCAS_TRUE]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^am__fastdepCCAS_TRUE$]) +m4trace:configure.ac:15: -1- AC_SUBST([am__fastdepCCAS_FALSE]) +m4trace:configure.ac:15: -1- AC_SUBST_TRACE([am__fastdepCCAS_FALSE]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^am__fastdepCCAS_FALSE$]) +m4trace:configure.ac:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_TRUE]) +m4trace:configure.ac:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_FALSE]) +m4trace:configure.ac:16: -1- LT_INIT([disable-shared]) +m4trace:configure.ac:16: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$]) +m4trace:configure.ac:16: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) +m4trace:configure.ac:16: -1- AC_SUBST([LIBTOOL]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([LIBTOOL]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LIBTOOL$]) +m4trace:configure.ac:16: -1- AC_SUBST([SED]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([SED]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^SED$]) +m4trace:configure.ac:16: -1- AC_SUBST([GREP]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([GREP]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.ac:16: -1- AC_SUBST([EGREP]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([EGREP]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^EGREP$]) +m4trace:configure.ac:16: -1- AC_SUBST([FGREP]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([FGREP]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^FGREP$]) +m4trace:configure.ac:16: -1- AC_SUBST([GREP]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([GREP]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.ac:16: -1- AC_SUBST([LD]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([LD]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LD$]) +m4trace:configure.ac:16: -1- AC_SUBST([DUMPBIN]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([DUMPBIN]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.ac:16: -1- AC_SUBST([ac_ct_DUMPBIN]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) +m4trace:configure.ac:16: -1- AC_SUBST([DUMPBIN]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([DUMPBIN]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.ac:16: -1- AC_SUBST([NM]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([NM]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^NM$]) +m4trace:configure.ac:16: -1- AC_SUBST([LN_S], [$as_ln_s]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([LN_S]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LN_S$]) +m4trace:configure.ac:16: -1- AC_SUBST([OBJDUMP]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([OBJDUMP]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^OBJDUMP$]) +m4trace:configure.ac:16: -1- AC_SUBST([OBJDUMP]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([OBJDUMP]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^OBJDUMP$]) +m4trace:configure.ac:16: -1- AC_SUBST([DLLTOOL]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([DLLTOOL]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^DLLTOOL$]) +m4trace:configure.ac:16: -1- AC_SUBST([DLLTOOL]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([DLLTOOL]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^DLLTOOL$]) +m4trace:configure.ac:16: -1- AC_SUBST([AR]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AR]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AR$]) +m4trace:configure.ac:16: -1- AC_SUBST([ac_ct_AR]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([ac_ct_AR]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^ac_ct_AR$]) +m4trace:configure.ac:16: -1- AC_SUBST([STRIP]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([STRIP]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:16: -1- AC_SUBST([RANLIB]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([RANLIB]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^RANLIB$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([LT_OBJDIR]) +m4trace:configure.ac:16: -1- AC_DEFINE_TRACE_LITERAL([LT_OBJDIR]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LT_OBJDIR$]) +m4trace:configure.ac:16: -1- AH_OUTPUT([LT_OBJDIR], [/* Define to the sub-directory where libtool stores uninstalled libraries. */ +@%:@undef LT_OBJDIR]) +m4trace:configure.ac:16: -1- LT_SUPPORTED_TAG([CC]) +m4trace:configure.ac:16: -1- AC_SUBST([MANIFEST_TOOL]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([MANIFEST_TOOL]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^MANIFEST_TOOL$]) +m4trace:configure.ac:16: -1- AC_SUBST([DSYMUTIL]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([DSYMUTIL]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^DSYMUTIL$]) +m4trace:configure.ac:16: -1- AC_SUBST([NMEDIT]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([NMEDIT]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^NMEDIT$]) +m4trace:configure.ac:16: -1- AC_SUBST([LIPO]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([LIPO]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LIPO$]) +m4trace:configure.ac:16: -1- AC_SUBST([OTOOL]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([OTOOL]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^OTOOL$]) +m4trace:configure.ac:16: -1- AC_SUBST([OTOOL64]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([OTOOL64]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^OTOOL64$]) +m4trace:configure.ac:16: -1- AC_SUBST([LT_SYS_LIBRARY_PATH]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([LT_SYS_LIBRARY_PATH]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LT_SYS_LIBRARY_PATH$]) +m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_DLFCN_H]) +m4trace:configure.ac:16: -1- AC_SUBST([CPP]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([CPP]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.ac:16: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:16: -1- AC_SUBST([CPP]) +m4trace:configure.ac:16: -1- AC_SUBST_TRACE([CPP]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.ac:16: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^STDC_HEADERS$]) +m4trace:configure.ac:16: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ +@%:@undef STDC_HEADERS]) +m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_SYS_TYPES_H]) +m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_SYS_STAT_H]) +m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_STDLIB_H]) +m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_STRING_H]) +m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_MEMORY_H]) +m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_STRINGS_H]) +m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_INTTYPES_H]) +m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_STDINT_H]) +m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_UNISTD_H]) +m4trace:configure.ac:16: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DLFCN_H]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^HAVE_DLFCN_H$]) +m4trace:configure.ac:19: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_STDLIB_H]) +m4trace:configure.ac:19: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_UNISTD_H]) +m4trace:configure.ac:19: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_SYS_PARAM_H]) +m4trace:configure.ac:19: -1- AH_OUTPUT([HAVE_GETPAGESIZE], [/* Define to 1 if you have the `getpagesize\' function. */ +@%:@undef HAVE_GETPAGESIZE]) +m4trace:configure.ac:19: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETPAGESIZE]) +m4trace:configure.ac:19: -1- m4_pattern_allow([^HAVE_GETPAGESIZE$]) +m4trace:configure.ac:19: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MMAP]) +m4trace:configure.ac:19: -1- m4_pattern_allow([^HAVE_MMAP$]) +m4trace:configure.ac:19: -1- AH_OUTPUT([HAVE_MMAP], [/* Define to 1 if you have a working `mmap\' system call. */ +@%:@undef HAVE_MMAP]) +m4trace:configure.ac:38: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2625: AC_TRY_COMPILE is expanded from... +configure.ac:38: the top level]) +m4trace:configure.ac:54: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2625: AC_TRY_COMPILE is expanded from... +configure.ac:54: the top level]) +m4trace:configure.ac:83: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1473: AC_ARG_ENABLE is expanded from... +configure.ac:83: the top level]) +m4trace:configure.ac:86: -1- AC_DEFINE_TRACE_LITERAL([NDEBUG]) +m4trace:configure.ac:86: -1- m4_pattern_allow([^NDEBUG$]) +m4trace:configure.ac:86: -1- AH_OUTPUT([NDEBUG], [/* Define to disable assertion checking. */ +@%:@undef NDEBUG]) +m4trace:configure.ac:89: -1- AC_SUBST([PICFLAG]) +m4trace:configure.ac:89: -1- AC_SUBST_TRACE([PICFLAG]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^PICFLAG$]) +m4trace:configure.ac:90: -1- AC_SUBST([DEFS]) +m4trace:configure.ac:90: -1- AC_SUBST_TRACE([DEFS]) +m4trace:configure.ac:90: -1- m4_pattern_allow([^DEFS$]) +m4trace:configure.ac:92: -1- AH_OUTPUT([_PTHREADS], [/* Indicates the use of pthreads (NetBSD). */ +@%:@undef _PTHREADS]) +m4trace:configure.ac:94: -1- AH_OUTPUT([AO_USE_NANOSLEEP], [/* Use nanosleep() instead of select() (only if atomic operations are + emulated) */ +@%:@undef AO_USE_NANOSLEEP]) +m4trace:configure.ac:97: -1- AH_OUTPUT([AO_USE_NO_SIGNALS], [/* Do not block signals in compare_and_swap (only if atomic operations are + emulated) */ +@%:@undef AO_USE_NO_SIGNALS]) +m4trace:configure.ac:100: -1- AH_OUTPUT([AO_USE_WIN32_PTHREADS], [/* Use Win32 Sleep() instead of select() (only if atomic operations are + emulated) */ +@%:@undef AO_USE_WIN32_PTHREADS]) +m4trace:configure.ac:103: -1- AH_OUTPUT([AO_TRACE_MALLOC], [/* Trace AO_malloc/free calls (for debug only) */ +@%:@undef AO_TRACE_MALLOC]) +m4trace:configure.ac:106: -1- AH_OUTPUT([AO_GENERALIZE_ASM_BOOL_CAS], [/* Force compare_and_swap definition via fetch_compare_and_swap */ +@%:@undef AO_GENERALIZE_ASM_BOOL_CAS]) +m4trace:configure.ac:108: -1- AH_OUTPUT([AO_PREFER_GENERALIZED], [/* Prefer generalized definitions to direct assembly-based ones */ +@%:@undef AO_PREFER_GENERALIZED]) +m4trace:configure.ac:110: -1- AH_OUTPUT([AO_USE_PTHREAD_DEFS], [/* Emulate atomic operations via slow and async-signal-unsafe pthread locking + */ +@%:@undef AO_USE_PTHREAD_DEFS]) +m4trace:configure.ac:113: -1- AH_OUTPUT([AO_ASM_X64_AVAILABLE], [/* Inline assembly avalable (only VC/x86_64) */ +@%:@undef AO_ASM_X64_AVAILABLE]) +m4trace:configure.ac:115: -1- AH_OUTPUT([AO_ASSUME_VISTA], [/* Assume Windows Server 2003, Vista or later target (only VC/x86) */ +@%:@undef AO_ASSUME_VISTA]) +m4trace:configure.ac:117: -1- AH_OUTPUT([AO_ASSUME_WINDOWS98], [/* Assume hardware compare-and-swap functionality available on target (only + VC/x86) */ +@%:@undef AO_ASSUME_WINDOWS98]) +m4trace:configure.ac:120: -1- AH_OUTPUT([AO_CMPXCHG16B_AVAILABLE], [/* Assume target is not old AMD Opteron chip (only x86_64) */ +@%:@undef AO_CMPXCHG16B_AVAILABLE]) +m4trace:configure.ac:122: -1- AH_OUTPUT([AO_FORCE_USE_SWP], [/* Force test_and_set to use SWP instruction instead of LDREX/STREX (only arm + v6+) */ +@%:@undef AO_FORCE_USE_SWP]) +m4trace:configure.ac:125: -1- AH_OUTPUT([AO_NO_SPARC_V9], [/* Assume target is not sparc v9+ (only sparc) */ +@%:@undef AO_NO_SPARC_V9]) +m4trace:configure.ac:126: -1- AH_OUTPUT([AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE], [/* Assume ancient MS VS Win32 headers (only VC/arm v6+, VC/x86) */ +@%:@undef AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE]) +m4trace:configure.ac:128: -1- AH_OUTPUT([AO_UNIPROCESSOR], [/* Assume single-core target (only arm v6+) */ +@%:@undef AO_UNIPROCESSOR]) +m4trace:configure.ac:129: -1- AH_OUTPUT([AO_USE_INTERLOCKED_INTRINSICS], [/* Assume Win32 _Interlocked primitives available as intrinsics (only VC/arm) + */ +@%:@undef AO_USE_INTERLOCKED_INTRINSICS]) +m4trace:configure.ac:132: -1- AH_OUTPUT([AO_USE_PENTIUM4_INSTRS], [/* Use Pentium 4 \'mfence\' instruction (only x86) */ +@%:@undef AO_USE_PENTIUM4_INSTRS]) +m4trace:configure.ac:134: -1- AH_OUTPUT([AO_USE_SYNC_CAS_BUILTIN], [/* Prefer GCC built-in CAS intrinsics in favor of inline assembly (only + gcc/x86, gcc/x86_64) */ +@%:@undef AO_USE_SYNC_CAS_BUILTIN]) +m4trace:configure.ac:137: -1- AH_OUTPUT([AO_WEAK_DOUBLE_CAS_EMULATION], [/* Emulate double-width CAS via pthread locking in case of no hardware support + (only gcc/x86_64, the emulation is unsafe) */ +@%:@undef AO_WEAK_DOUBLE_CAS_EMULATION]) +m4trace:configure.ac:141: -1- AC_DEFINE_TRACE_LITERAL([_REENTRANT]) +m4trace:configure.ac:141: -1- m4_pattern_allow([^_REENTRANT$]) +m4trace:configure.ac:141: -1- AH_OUTPUT([_REENTRANT], [/* Required define if using POSIX threads. */ +@%:@undef _REENTRANT]) +m4trace:configure.ac:151: -1- AC_DEFINE_TRACE_LITERAL([_PTHREADS]) +m4trace:configure.ac:151: -1- m4_pattern_allow([^_PTHREADS$]) +m4trace:configure.ac:169: -1- AC_DEFINE_TRACE_LITERAL([AO_NO_PTHREADS]) +m4trace:configure.ac:169: -1- m4_pattern_allow([^AO_NO_PTHREADS$]) +m4trace:configure.ac:169: -1- AH_OUTPUT([AO_NO_PTHREADS], [/* No pthreads library available */ +@%:@undef AO_NO_PTHREADS]) +m4trace:configure.ac:173: -1- AC_SUBST([THREADDLLIBS]) +m4trace:configure.ac:173: -1- AC_SUBST_TRACE([THREADDLLIBS]) +m4trace:configure.ac:173: -1- m4_pattern_allow([^THREADDLLIBS$]) +m4trace:configure.ac:175: -1- AM_CONDITIONAL([HAVE_PTHREAD_H], [test x$have_pthreads = xtrue]) +m4trace:configure.ac:175: -1- AC_SUBST([HAVE_PTHREAD_H_TRUE]) +m4trace:configure.ac:175: -1- AC_SUBST_TRACE([HAVE_PTHREAD_H_TRUE]) +m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_PTHREAD_H_TRUE$]) +m4trace:configure.ac:175: -1- AC_SUBST([HAVE_PTHREAD_H_FALSE]) +m4trace:configure.ac:175: -1- AC_SUBST_TRACE([HAVE_PTHREAD_H_FALSE]) +m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_PTHREAD_H_FALSE$]) +m4trace:configure.ac:175: -1- _AM_SUBST_NOTMAKE([HAVE_PTHREAD_H_TRUE]) +m4trace:configure.ac:175: -1- _AM_SUBST_NOTMAKE([HAVE_PTHREAD_H_FALSE]) +m4trace:configure.ac:176: -1- AM_CONDITIONAL([NEED_ASM], [test x$need_asm = xtrue]) +m4trace:configure.ac:176: -1- AC_SUBST([NEED_ASM_TRUE]) +m4trace:configure.ac:176: -1- AC_SUBST_TRACE([NEED_ASM_TRUE]) +m4trace:configure.ac:176: -1- m4_pattern_allow([^NEED_ASM_TRUE$]) +m4trace:configure.ac:176: -1- AC_SUBST([NEED_ASM_FALSE]) +m4trace:configure.ac:176: -1- AC_SUBST_TRACE([NEED_ASM_FALSE]) +m4trace:configure.ac:176: -1- m4_pattern_allow([^NEED_ASM_FALSE$]) +m4trace:configure.ac:176: -1- _AM_SUBST_NOTMAKE([NEED_ASM_TRUE]) +m4trace:configure.ac:176: -1- _AM_SUBST_NOTMAKE([NEED_ASM_FALSE]) +m4trace:configure.ac:178: -1- AC_CONFIG_FILES([ + Makefile + doc/Makefile + src/Makefile + pkgconfig/atomic_ops.pc + pkgconfig/atomic_ops-uninstalled.pc ]) +m4trace:configure.ac:190: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) +m4trace:configure.ac:190: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) +m4trace:configure.ac:190: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:190: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) +m4trace:configure.ac:190: -1- AC_SUBST_TRACE([LTLIBOBJS]) +m4trace:configure.ac:190: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:190: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) +m4trace:configure.ac:190: -1- AC_SUBST([am__EXEEXT_TRUE]) +m4trace:configure.ac:190: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE]) +m4trace:configure.ac:190: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) +m4trace:configure.ac:190: -1- AC_SUBST([am__EXEEXT_FALSE]) +m4trace:configure.ac:190: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE]) +m4trace:configure.ac:190: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) +m4trace:configure.ac:190: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) +m4trace:configure.ac:190: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) +m4trace:configure.ac:190: -1- AC_SUBST_TRACE([top_builddir]) +m4trace:configure.ac:190: -1- AC_SUBST_TRACE([top_build_prefix]) +m4trace:configure.ac:190: -1- AC_SUBST_TRACE([srcdir]) +m4trace:configure.ac:190: -1- AC_SUBST_TRACE([abs_srcdir]) +m4trace:configure.ac:190: -1- AC_SUBST_TRACE([top_srcdir]) +m4trace:configure.ac:190: -1- AC_SUBST_TRACE([abs_top_srcdir]) +m4trace:configure.ac:190: -1- AC_SUBST_TRACE([builddir]) +m4trace:configure.ac:190: -1- AC_SUBST_TRACE([abs_builddir]) +m4trace:configure.ac:190: -1- AC_SUBST_TRACE([abs_top_builddir]) +m4trace:configure.ac:190: -1- AC_SUBST_TRACE([INSTALL]) +m4trace:configure.ac:190: -1- AC_SUBST_TRACE([MKDIR_P]) +m4trace:configure.ac:190: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) diff --git a/external/bdwgc/libatomic_ops/autom4te.cache/traces.2 b/external/bdwgc/libatomic_ops/autom4te.cache/traces.2 new file mode 100644 index 0000000000..95372571c8 --- /dev/null +++ b/external/bdwgc/libatomic_ops/autom4te.cache/traces.2 @@ -0,0 +1,2091 @@ +m4trace:/usr/share/aclocal-1.15/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.15], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) +m4trace:/usr/share/aclocal-1.15/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +m4trace:/usr/share/aclocal-1.15/as.m4:11: -1- AC_DEFUN([AM_PROG_AS], [# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS +AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) +AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) +_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl +]) +m4trace:/usr/share/aclocal-1.15/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` +]) +m4trace:/usr/share/aclocal-1.15/cond.m4:12: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) +m4trace:/usr/share/aclocal-1.15/depend.m4:26: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) +m4trace:/usr/share/aclocal-1.15/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) +m4trace:/usr/share/aclocal-1.15/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) +m4trace:/usr/share/aclocal-1.15/depout.m4:12: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +]) +m4trace:/usr/share/aclocal-1.15/depout.m4:71: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) +m4trace:/usr/share/aclocal-1.15/init.m4:29: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) +m4trace:/usr/share/aclocal-1.15/init.m4:186: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) +m4trace:/usr/share/aclocal-1.15/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) +m4trace:/usr/share/aclocal-1.15/lead-dot.m4:10: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) +m4trace:/usr/share/aclocal-1.15/maintainer.m4:16: -1- AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl + +]) +m4trace:/usr/share/aclocal-1.15/make.m4:12: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) +m4trace:/usr/share/aclocal-1.15/missing.m4:11: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) +m4trace:/usr/share/aclocal-1.15/missing.m4:20: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) +m4trace:/usr/share/aclocal-1.15/options.m4:11: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) +m4trace:/usr/share/aclocal-1.15/options.m4:17: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) +m4trace:/usr/share/aclocal-1.15/options.m4:23: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +m4trace:/usr/share/aclocal-1.15/options.m4:29: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +m4trace:/usr/share/aclocal-1.15/prog-cc-c-o.m4:12: -1- AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) +m4trace:/usr/share/aclocal-1.15/prog-cc-c-o.m4:47: -1- AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) +m4trace:/usr/share/aclocal-1.15/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) +m4trace:/usr/share/aclocal-1.15/sanity.m4:11: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) +m4trace:/usr/share/aclocal-1.15/silent.m4:12: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) +m4trace:/usr/share/aclocal-1.15/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) +m4trace:/usr/share/aclocal-1.15/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) +m4trace:/usr/share/aclocal-1.15/substnot.m4:17: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4trace:/usr/share/aclocal-1.15/tar.m4:23: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) +m4trace:m4/libtool.m4:61: -1- AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS=$ltmain + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +]) +m4trace:m4/libtool.m4:99: -1- AU_DEFUN([AC_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) +m4trace:m4/libtool.m4:99: -1- AC_DEFUN([AC_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) +m4trace:m4/libtool.m4:100: -1- AU_DEFUN([AM_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) +m4trace:m4/libtool.m4:100: -1- AC_DEFUN([AM_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LIBTOOL' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) +m4trace:m4/libtool.m4:619: -1- AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +'$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2011 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test 0 != $[#] +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try '$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try '$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +lt_cl_success=: +test yes = "$silent" && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) +]) +m4trace:m4/libtool.m4:812: -1- AC_DEFUN([LT_SUPPORTED_TAG], []) +m4trace:m4/libtool.m4:823: -1- AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +]) +m4trace:m4/libtool.m4:915: -1- AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +m4trace:m4/libtool.m4:915: -1- AC_DEFUN([AC_LIBTOOL_CXX], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_CXX' is obsolete. +You should run autoupdate.])dnl +LT_LANG(C++)]) +m4trace:m4/libtool.m4:916: -1- AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +m4trace:m4/libtool.m4:916: -1- AC_DEFUN([AC_LIBTOOL_F77], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_F77' is obsolete. +You should run autoupdate.])dnl +LT_LANG(Fortran 77)]) +m4trace:m4/libtool.m4:917: -1- AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +m4trace:m4/libtool.m4:917: -1- AC_DEFUN([AC_LIBTOOL_FC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_FC' is obsolete. +You should run autoupdate.])dnl +LT_LANG(Fortran)]) +m4trace:m4/libtool.m4:918: -1- AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +m4trace:m4/libtool.m4:918: -1- AC_DEFUN([AC_LIBTOOL_GCJ], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_GCJ' is obsolete. +You should run autoupdate.])dnl +LT_LANG(Java)]) +m4trace:m4/libtool.m4:919: -1- AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +m4trace:m4/libtool.m4:919: -1- AC_DEFUN([AC_LIBTOOL_RC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_RC' is obsolete. +You should run autoupdate.])dnl +LT_LANG(Windows Resource)]) +m4trace:m4/libtool.m4:1247: -1- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], + [Search for dependent libraries within DIR (or the compiler's sysroot + if not specified).])], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case $with_sysroot in #( + yes) + if test yes = "$GCC"; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([$with_sysroot]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and where our libraries should be installed.])]) +m4trace:m4/libtool.m4:1578: -1- AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test yes = "[$]$2"; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +]) +m4trace:m4/libtool.m4:1620: -1- AU_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])]) +m4trace:m4/libtool.m4:1620: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])]) +m4trace:m4/libtool.m4:1629: -1- AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS +]) + +if test yes = "[$]$2"; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +]) +m4trace:m4/libtool.m4:1664: -1- AU_DEFUN([AC_LIBTOOL_LINKER_OPTION], [m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])]) +m4trace:m4/libtool.m4:1664: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_LINKER_OPTION' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])]) +m4trace:m4/libtool.m4:1671: -1- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring=ABCD + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test 17 != "$i" # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n "$lt_cv_sys_max_cmd_len"; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +]) +m4trace:m4/libtool.m4:1810: -1- AU_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])]) +m4trace:m4/libtool.m4:1810: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_SYS_MAX_CMD_LEN' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])]) +m4trace:m4/libtool.m4:1921: -1- AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl +if test yes != "$enable_dlopen"; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen=load_add_on + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen=LoadLibrary + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ + lt_cv_dlopen=dyld + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen=shl_load], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen=dlopen], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test no = "$lt_cv_dlopen"; then + enable_dlopen=no + else + enable_dlopen=yes + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS=$LDFLAGS + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS=$LIBS + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test yes = "$lt_cv_dlopen_self"; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +]) +m4trace:m4/libtool.m4:2046: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])]) +m4trace:m4/libtool.m4:2046: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN_SELF' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])]) +m4trace:m4/libtool.m4:3167: -1- AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$1"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD=$lt_cv_path_MAGIC_CMD + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac]) +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +]) +m4trace:m4/libtool.m4:3229: -1- AU_DEFUN([AC_PATH_TOOL_PREFIX], [m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) +m4trace:m4/libtool.m4:3229: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_DIAGNOSE([obsolete], [The macro `AC_PATH_TOOL_PREFIX' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) +m4trace:m4/libtool.m4:3252: -1- AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test no = "$withval" || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test yes = "$GCC"; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return, which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD=$ac_prog + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test yes = "$with_gnu_ld"; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD=$ac_dir/$ac_prog + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break 2 + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break 2 + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS=$lt_save_ifs + done + : ${lt_cv_path_NM=no} +fi]) +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols -headers" + ;; + *) + DUMPBIN=: + ;; + esac + fi + AC_SUBST([DUMPBIN]) + if test : != "$DUMPBIN"; then + NM=$DUMPBIN + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +]) +m4trace:m4/libtool.m4:3766: -1- AU_DEFUN([AM_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) +m4trace:m4/libtool.m4:3766: -1- AC_DEFUN([AM_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_NM' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) +m4trace:m4/libtool.m4:3767: -1- AU_DEFUN([AC_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) +m4trace:m4/libtool.m4:3767: -1- AC_DEFUN([AC_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_NM' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) +m4trace:m4/libtool.m4:3838: -1- AC_DEFUN([_LT_DLL_DEF_P], [dnl + test DEF = "`$SED -n dnl + -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace + -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments + -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl + -e q dnl Only consider the first "real" line + $1`" dnl +]) +m4trace:m4/libtool.m4:3852: -1- AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM=-lm) + ;; +esac +AC_SUBST([LIBM]) +]) +m4trace:m4/libtool.m4:3871: -1- AU_DEFUN([AC_CHECK_LIBM], [m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])]) +m4trace:m4/libtool.m4:3871: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_DIAGNOSE([obsolete], [The macro `AC_CHECK_LIBM' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])]) +m4trace:m4/libtool.m4:8141: -1- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) +m4trace:m4/libtool.m4:8150: -1- AU_DEFUN([LT_AC_PROG_GCJ], [m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])]) +m4trace:m4/libtool.m4:8150: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_GCJ' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])]) +m4trace:m4/libtool.m4:8157: -1- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) +]) +m4trace:m4/libtool.m4:8164: -1- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) +]) +m4trace:m4/libtool.m4:8169: -1- AU_DEFUN([LT_AC_PROG_RC], [m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])]) +m4trace:m4/libtool.m4:8169: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_RC' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])]) +m4trace:m4/libtool.m4:8289: -1- AU_DEFUN([LT_AC_PROG_SED], [m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])]) +m4trace:m4/libtool.m4:8289: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_SED' is obsolete. +You should run autoupdate.])dnl +m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])]) +m4trace:m4/ltoptions.m4:14: -1- AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) +m4trace:m4/ltoptions.m4:113: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'dlopen' option into LT_INIT's first parameter.]) +]) +m4trace:m4/ltoptions.m4:113: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN' is obsolete. +You should run autoupdate.])dnl +_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'dlopen' option into LT_INIT's first parameter.]) +]) +m4trace:m4/ltoptions.m4:148: -1- AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'win32-dll' option into LT_INIT's first parameter.]) +]) +m4trace:m4/ltoptions.m4:148: -1- AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete. +You should run autoupdate.])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'win32-dll' option into LT_INIT's first parameter.]) +]) +m4trace:m4/ltoptions.m4:197: -1- AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) +m4trace:m4/ltoptions.m4:201: -1- AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) +m4trace:m4/ltoptions.m4:205: -1- AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +m4trace:m4/ltoptions.m4:205: -1- AC_DEFUN([AM_ENABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_SHARED' is obsolete. +You should run autoupdate.])dnl +AC_ENABLE_SHARED($@)]) +m4trace:m4/ltoptions.m4:206: -1- AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +m4trace:m4/ltoptions.m4:206: -1- AC_DEFUN([AM_DISABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_SHARED' is obsolete. +You should run autoupdate.])dnl +AC_DISABLE_SHARED($@)]) +m4trace:m4/ltoptions.m4:251: -1- AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) +m4trace:m4/ltoptions.m4:255: -1- AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) +]) +m4trace:m4/ltoptions.m4:259: -1- AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +m4trace:m4/ltoptions.m4:259: -1- AC_DEFUN([AM_ENABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_STATIC' is obsolete. +You should run autoupdate.])dnl +AC_ENABLE_STATIC($@)]) +m4trace:m4/ltoptions.m4:260: -1- AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +m4trace:m4/ltoptions.m4:260: -1- AC_DEFUN([AM_DISABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_STATIC' is obsolete. +You should run autoupdate.])dnl +AC_DISABLE_STATIC($@)]) +m4trace:m4/ltoptions.m4:305: -1- AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'fast-install' option into LT_INIT's first parameter.]) +]) +m4trace:m4/ltoptions.m4:305: -1- AC_DEFUN([AC_ENABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_ENABLE_FAST_INSTALL' is obsolete. +You should run autoupdate.])dnl +_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'fast-install' option into LT_INIT's first parameter.]) +]) +m4trace:m4/ltoptions.m4:312: -1- AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'disable-fast-install' option into LT_INIT's first parameter.]) +]) +m4trace:m4/ltoptions.m4:312: -1- AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_DISABLE_FAST_INSTALL' is obsolete. +You should run autoupdate.])dnl +_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'disable-fast-install' option into LT_INIT's first parameter.]) +]) +m4trace:m4/ltoptions.m4:411: -1- AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'pic-only' option into LT_INIT's first parameter.]) +]) +m4trace:m4/ltoptions.m4:411: -1- AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_PICMODE' is obsolete. +You should run autoupdate.])dnl +_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'pic-only' option into LT_INIT's first parameter.]) +]) +m4trace:m4/ltsugar.m4:14: -1- AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) +m4trace:m4/ltversion.m4:18: -1- AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' +macro_revision='2.4.6' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) +m4trace:m4/lt~obsolete.m4:37: -1- AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) +m4trace:m4/lt~obsolete.m4:41: -1- AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH]) +m4trace:m4/lt~obsolete.m4:42: -1- AC_DEFUN([_LT_AC_SHELL_INIT]) +m4trace:m4/lt~obsolete.m4:43: -1- AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX]) +m4trace:m4/lt~obsolete.m4:45: -1- AC_DEFUN([_LT_AC_TAGVAR]) +m4trace:m4/lt~obsolete.m4:46: -1- AC_DEFUN([AC_LTDL_ENABLE_INSTALL]) +m4trace:m4/lt~obsolete.m4:47: -1- AC_DEFUN([AC_LTDL_PREOPEN]) +m4trace:m4/lt~obsolete.m4:48: -1- AC_DEFUN([_LT_AC_SYS_COMPILER]) +m4trace:m4/lt~obsolete.m4:49: -1- AC_DEFUN([_LT_AC_LOCK]) +m4trace:m4/lt~obsolete.m4:50: -1- AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE]) +m4trace:m4/lt~obsolete.m4:51: -1- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF]) +m4trace:m4/lt~obsolete.m4:52: -1- AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O]) +m4trace:m4/lt~obsolete.m4:53: -1- AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS]) +m4trace:m4/lt~obsolete.m4:54: -1- AC_DEFUN([AC_LIBTOOL_OBJDIR]) +m4trace:m4/lt~obsolete.m4:55: -1- AC_DEFUN([AC_LTDL_OBJDIR]) +m4trace:m4/lt~obsolete.m4:56: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH]) +m4trace:m4/lt~obsolete.m4:57: -1- AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP]) +m4trace:m4/lt~obsolete.m4:58: -1- AC_DEFUN([AC_PATH_MAGIC]) +m4trace:m4/lt~obsolete.m4:59: -1- AC_DEFUN([AC_PROG_LD_GNU]) +m4trace:m4/lt~obsolete.m4:60: -1- AC_DEFUN([AC_PROG_LD_RELOAD_FLAG]) +m4trace:m4/lt~obsolete.m4:61: -1- AC_DEFUN([AC_DEPLIBS_CHECK_METHOD]) +m4trace:m4/lt~obsolete.m4:62: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI]) +m4trace:m4/lt~obsolete.m4:63: -1- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) +m4trace:m4/lt~obsolete.m4:64: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC]) +m4trace:m4/lt~obsolete.m4:65: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS]) +m4trace:m4/lt~obsolete.m4:66: -1- AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP]) +m4trace:m4/lt~obsolete.m4:67: -1- AC_DEFUN([LT_AC_PROG_EGREP]) +m4trace:m4/lt~obsolete.m4:72: -1- AC_DEFUN([_AC_PROG_LIBTOOL]) +m4trace:m4/lt~obsolete.m4:73: -1- AC_DEFUN([AC_LIBTOOL_SETUP]) +m4trace:m4/lt~obsolete.m4:74: -1- AC_DEFUN([_LT_AC_CHECK_DLFCN]) +m4trace:m4/lt~obsolete.m4:75: -1- AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) +m4trace:m4/lt~obsolete.m4:76: -1- AC_DEFUN([_LT_AC_TAGCONFIG]) +m4trace:m4/lt~obsolete.m4:78: -1- AC_DEFUN([_LT_AC_LANG_CXX]) +m4trace:m4/lt~obsolete.m4:79: -1- AC_DEFUN([_LT_AC_LANG_F77]) +m4trace:m4/lt~obsolete.m4:80: -1- AC_DEFUN([_LT_AC_LANG_GCJ]) +m4trace:m4/lt~obsolete.m4:81: -1- AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG]) +m4trace:m4/lt~obsolete.m4:82: -1- AC_DEFUN([_LT_AC_LANG_C_CONFIG]) +m4trace:m4/lt~obsolete.m4:83: -1- AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG]) +m4trace:m4/lt~obsolete.m4:84: -1- AC_DEFUN([_LT_AC_LANG_CXX_CONFIG]) +m4trace:m4/lt~obsolete.m4:85: -1- AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG]) +m4trace:m4/lt~obsolete.m4:86: -1- AC_DEFUN([_LT_AC_LANG_F77_CONFIG]) +m4trace:m4/lt~obsolete.m4:87: -1- AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG]) +m4trace:m4/lt~obsolete.m4:88: -1- AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG]) +m4trace:m4/lt~obsolete.m4:89: -1- AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG]) +m4trace:m4/lt~obsolete.m4:90: -1- AC_DEFUN([_LT_AC_LANG_RC_CONFIG]) +m4trace:m4/lt~obsolete.m4:91: -1- AC_DEFUN([AC_LIBTOOL_CONFIG]) +m4trace:m4/lt~obsolete.m4:92: -1- AC_DEFUN([_LT_AC_FILE_LTDLL_C]) +m4trace:m4/lt~obsolete.m4:94: -1- AC_DEFUN([_LT_AC_PROG_CXXCPP]) +m4trace:m4/lt~obsolete.m4:97: -1- AC_DEFUN([_LT_PROG_F77]) +m4trace:m4/lt~obsolete.m4:98: -1- AC_DEFUN([_LT_PROG_FC]) +m4trace:m4/lt~obsolete.m4:99: -1- AC_DEFUN([_LT_PROG_CXX]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) +m4trace:configure.ac:2: -1- m4_pattern_allow([^AS_FLAGS$]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?m4_]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([^dnl$]) +m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?AS_]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^SHELL$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PATH_SEPARATOR$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_URL$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^exec_prefix$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^prefix$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^program_transform_name$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^bindir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^sbindir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^libexecdir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^datarootdir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^datadir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^sysconfdir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^sharedstatedir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^localstatedir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^runstatedir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^includedir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^oldincludedir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^docdir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^infodir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^htmldir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^dvidir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^pdfdir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^psdir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^libdir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^localedir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^mandir$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_URL$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^DEFS$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_C$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_N$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_T$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^build_alias$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^host_alias$]) +m4trace:configure.ac:2: -1- m4_pattern_allow([^target_alias$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^build$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^build_cpu$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^build_vendor$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^build_os$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^host$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^host_cpu$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^host_vendor$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^host_os$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^target$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^target_cpu$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^target_vendor$]) +m4trace:configure.ac:5: -1- m4_pattern_allow([^target_os$]) +m4trace:configure.ac:7: -1- AC_CONFIG_MACRO_DIR([m4]) +m4trace:configure.ac:8: -1- AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) +m4trace:configure.ac:8: -1- AM_SET_CURRENT_AUTOMAKE_VERSION +m4trace:configure.ac:8: -1- AM_AUTOMAKE_VERSION([1.15]) +m4trace:configure.ac:8: -1- _AM_AUTOCONF_VERSION([2.69]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_DATA$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^am__isrc$]) +m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([am__isrc]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^CYGPATH_W$]) +m4trace:configure.ac:8: -1- _AM_SET_OPTIONS([foreign dist-bzip2 nostdinc]) +m4trace:configure.ac:8: -1- _AM_SET_OPTION([foreign]) +m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([foreign]) +m4trace:configure.ac:8: -1- _AM_SET_OPTION([dist-bzip2]) +m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([dist-bzip2]) +m4trace:configure.ac:8: -1- _AM_SET_OPTION([nostdinc]) +m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([nostdinc]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:8: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])]) +m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([no-define]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:8: -1- AM_SANITY_CHECK +m4trace:configure.ac:8: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +m4trace:configure.ac:8: -1- AM_MISSING_HAS_RUN +m4trace:configure.ac:8: -1- AM_AUX_DIR_EXPAND +m4trace:configure.ac:8: -1- m4_pattern_allow([^ACLOCAL$]) +m4trace:configure.ac:8: -1- AM_MISSING_PROG([AUTOCONF], [autoconf]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOCONF$]) +m4trace:configure.ac:8: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOMAKE$]) +m4trace:configure.ac:8: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOHEADER$]) +m4trace:configure.ac:8: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^MAKEINFO$]) +m4trace:configure.ac:8: -1- AM_PROG_INSTALL_SH +m4trace:configure.ac:8: -1- m4_pattern_allow([^install_sh$]) +m4trace:configure.ac:8: -1- AM_PROG_INSTALL_STRIP +m4trace:configure.ac:8: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^MKDIR_P$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^mkdir_p$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AWK$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^SET_MAKE$]) +m4trace:configure.ac:8: -1- AM_SET_LEADING_DOT +m4trace:configure.ac:8: -1- m4_pattern_allow([^am__leading_dot$]) +m4trace:configure.ac:8: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([tar-ustar]) +m4trace:configure.ac:8: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])]) +m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([tar-pax]) +m4trace:configure.ac:8: -1- _AM_PROG_TAR([v7]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AMTAR$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^am__tar$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^am__untar$]) +m4trace:configure.ac:8: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([no-dependencies]) +m4trace:configure.ac:8: -1- AM_SILENT_RULES +m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_V$]) +m4trace:configure.ac:8: -1- AM_SUBST_NOTMAKE([AM_V]) +m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_V]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_DEFAULT_V$]) +m4trace:configure.ac:8: -1- AM_SUBST_NOTMAKE([AM_DEFAULT_V]) +m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) +m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_BACKSLASH$]) +m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) +m4trace:configure.ac:9: -1- AM_MAINTAINER_MODE +m4trace:configure.ac:9: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$]) +m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE]) +m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE]) +m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINT$]) +m4trace:configure.ac:14: -1- AM_PROG_CC_C_O +m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CFLAGS$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^ac_ct_CC$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^EXEEXT$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^OBJEXT$]) +m4trace:configure.ac:14: -1- _AM_PROG_CC_C_O +m4trace:configure.ac:14: -1- AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) +m4trace:configure.ac:14: -1- _AM_DEPENDENCIES([CC]) +m4trace:configure.ac:14: -1- AM_SET_DEPDIR +m4trace:configure.ac:14: -1- m4_pattern_allow([^DEPDIR$]) +m4trace:configure.ac:14: -1- AM_OUTPUT_DEPENDENCY_COMMANDS +m4trace:configure.ac:14: -1- AM_MAKE_INCLUDE +m4trace:configure.ac:14: -1- m4_pattern_allow([^am__include$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^am__quote$]) +m4trace:configure.ac:14: -1- AM_DEP_TRACK +m4trace:configure.ac:14: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEP_TRUE$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEP_FALSE$]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^am__nodep$]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__nodep]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:14: -1- AM_CONDITIONAL([am__fastdepCC], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:14: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:15: -1- AM_PROG_AS +m4trace:configure.ac:15: -1- m4_pattern_allow([^CCAS$]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^CCASFLAGS$]) +m4trace:configure.ac:15: -1- _AM_IF_OPTION([no-dependencies], [], [_AM_DEPENDENCIES([CCAS])]) +m4trace:configure.ac:15: -2- _AM_MANGLE_OPTION([no-dependencies]) +m4trace:configure.ac:15: -1- _AM_DEPENDENCIES([CCAS]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^CCASDEPMODE$]) +m4trace:configure.ac:15: -1- AM_CONDITIONAL([am__fastdepCCAS], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^am__fastdepCCAS_TRUE$]) +m4trace:configure.ac:15: -1- m4_pattern_allow([^am__fastdepCCAS_FALSE$]) +m4trace:configure.ac:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_TRUE]) +m4trace:configure.ac:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_FALSE]) +m4trace:configure.ac:16: -1- LT_INIT([disable-shared]) +m4trace:configure.ac:16: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$]) +m4trace:configure.ac:16: -1- LTOPTIONS_VERSION +m4trace:configure.ac:16: -1- LTSUGAR_VERSION +m4trace:configure.ac:16: -1- LTVERSION_VERSION +m4trace:configure.ac:16: -1- LTOBSOLETE_VERSION +m4trace:configure.ac:16: -1- _LT_PROG_LTMAIN +m4trace:configure.ac:16: -1- m4_pattern_allow([^LIBTOOL$]) +m4trace:configure.ac:16: -1- _LT_PREPARE_SED_QUOTE_VARS +m4trace:configure.ac:16: -1- _LT_PROG_ECHO_BACKSLASH +m4trace:configure.ac:16: -1- LT_PATH_LD +m4trace:configure.ac:16: -1- m4_pattern_allow([^SED$]) +m4trace:configure.ac:16: -1- AC_PROG_EGREP +m4trace:configure.ac:16: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^EGREP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^FGREP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LD$]) +m4trace:configure.ac:16: -1- LT_PATH_NM +m4trace:configure.ac:16: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^NM$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LN_S$]) +m4trace:configure.ac:16: -1- LT_CMD_MAX_LEN +m4trace:configure.ac:16: -1- m4_pattern_allow([^OBJDUMP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^OBJDUMP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^DLLTOOL$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^DLLTOOL$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^AR$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^ac_ct_AR$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^RANLIB$]) +m4trace:configure.ac:16: -1- _LT_WITH_SYSROOT +m4trace:configure.ac:16: -1- m4_pattern_allow([LT_OBJDIR]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LT_OBJDIR$]) +m4trace:configure.ac:16: -1- _LT_CC_BASENAME([$compiler]) +m4trace:configure.ac:16: -1- _LT_PATH_TOOL_PREFIX([${ac_tool_prefix}file], [/usr/bin$PATH_SEPARATOR$PATH]) +m4trace:configure.ac:16: -1- _LT_PATH_TOOL_PREFIX([file], [/usr/bin$PATH_SEPARATOR$PATH]) +m4trace:configure.ac:16: -1- LT_SUPPORTED_TAG([CC]) +m4trace:configure.ac:16: -1- _LT_COMPILER_BOILERPLATE +m4trace:configure.ac:16: -1- _LT_LINKER_BOILERPLATE +m4trace:configure.ac:16: -1- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, )="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, ) -fno-rtti -fno-exceptions"]) +m4trace:configure.ac:16: -1- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, ) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, )], [$_LT_TAGVAR(lt_prog_compiler_pic, )@&t@m4_if([],[],[ -DPIC],[m4_if([],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, ) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, )=" $_LT_TAGVAR(lt_prog_compiler_pic, )" ;; + esac], [_LT_TAGVAR(lt_prog_compiler_pic, )= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, )=no]) +m4trace:configure.ac:16: -1- _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works], [$lt_tmp_static_flag], [], [_LT_TAGVAR(lt_prog_compiler_static, )=]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^MANIFEST_TOOL$]) +m4trace:configure.ac:16: -1- _LT_DLL_DEF_P([$export_symbols]) +m4trace:configure.ac:16: -1- _LT_DLL_DEF_P([$export_symbols]) +m4trace:configure.ac:16: -1- _LT_REQUIRED_DARWIN_CHECKS +m4trace:configure.ac:16: -1- m4_pattern_allow([^DSYMUTIL$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^NMEDIT$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LIPO$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^OTOOL$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^OTOOL64$]) +m4trace:configure.ac:16: -1- _LT_LINKER_OPTION([if $CC understands -b], [lt_cv_prog_compiler__b], [-b], [_LT_TAGVAR(archive_cmds, )='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, )='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags']) +m4trace:configure.ac:16: -1- m4_pattern_allow([^LT_SYS_LIBRARY_PATH$]) +m4trace:configure.ac:16: -1- LT_SYS_DLOPEN_SELF +m4trace:configure.ac:16: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^STDC_HEADERS$]) +m4trace:configure.ac:16: -1- m4_pattern_allow([^HAVE_DLFCN_H$]) +m4trace:configure.ac:19: -1- AC_DEFUN([_AC_Header_stdlib_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" stdlib.h"])]) +_AC_HEADERS_EXPANSION]) +m4trace:configure.ac:19: -1- AC_DEFUN([_AC_Header_unistd_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" unistd.h"])]) +_AC_HEADERS_EXPANSION]) +m4trace:configure.ac:19: -1- AC_DEFUN([_AC_Header_sys_param_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/param.h"])]) +_AC_HEADERS_EXPANSION]) +m4trace:configure.ac:19: -1- m4_pattern_allow([^HAVE_GETPAGESIZE$]) +m4trace:configure.ac:19: -1- m4_pattern_allow([^HAVE_MMAP$]) +m4trace:configure.ac:38: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2625: AC_TRY_COMPILE is expanded from... +configure.ac:38: the top level]) +m4trace:configure.ac:54: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2625: AC_TRY_COMPILE is expanded from... +configure.ac:54: the top level]) +m4trace:configure.ac:83: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... +../../lib/autoconf/general.m4:1473: AC_ARG_ENABLE is expanded from... +configure.ac:83: the top level]) +m4trace:configure.ac:86: -1- m4_pattern_allow([^NDEBUG$]) +m4trace:configure.ac:89: -1- m4_pattern_allow([^PICFLAG$]) +m4trace:configure.ac:90: -1- m4_pattern_allow([^DEFS$]) +m4trace:configure.ac:141: -1- m4_pattern_allow([^_REENTRANT$]) +m4trace:configure.ac:151: -1- m4_pattern_allow([^_PTHREADS$]) +m4trace:configure.ac:169: -1- m4_pattern_allow([^AO_NO_PTHREADS$]) +m4trace:configure.ac:173: -1- m4_pattern_allow([^THREADDLLIBS$]) +m4trace:configure.ac:175: -1- AM_CONDITIONAL([HAVE_PTHREAD_H], [test x$have_pthreads = xtrue]) +m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_PTHREAD_H_TRUE$]) +m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_PTHREAD_H_FALSE$]) +m4trace:configure.ac:175: -1- _AM_SUBST_NOTMAKE([HAVE_PTHREAD_H_TRUE]) +m4trace:configure.ac:175: -1- _AM_SUBST_NOTMAKE([HAVE_PTHREAD_H_FALSE]) +m4trace:configure.ac:176: -1- AM_CONDITIONAL([NEED_ASM], [test x$need_asm = xtrue]) +m4trace:configure.ac:176: -1- m4_pattern_allow([^NEED_ASM_TRUE$]) +m4trace:configure.ac:176: -1- m4_pattern_allow([^NEED_ASM_FALSE$]) +m4trace:configure.ac:176: -1- _AM_SUBST_NOTMAKE([NEED_ASM_TRUE]) +m4trace:configure.ac:176: -1- _AM_SUBST_NOTMAKE([NEED_ASM_FALSE]) +m4trace:configure.ac:190: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:190: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:190: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) +m4trace:configure.ac:190: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) +m4trace:configure.ac:190: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) +m4trace:configure.ac:190: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) +m4trace:configure.ac:190: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) +m4trace:configure.ac:190: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) +m4trace:configure.ac:190: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS +m4trace:configure.ac:190: -1- _LT_PROG_LTMAIN diff --git a/external/bdwgc/libatomic_ops/compile b/external/bdwgc/libatomic_ops/compile new file mode 100755 index 0000000000..a85b723c7e --- /dev/null +++ b/external/bdwgc/libatomic_ops/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/external/bdwgc/libatomic_ops/config.guess b/external/bdwgc/libatomic_ops/config.guess new file mode 100755 index 0000000000..16592509d4 --- /dev/null +++ b/external/bdwgc/libatomic_ops/config.guess @@ -0,0 +1,1441 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2015 Free Software Foundation, Inc. + +timestamp='2015-08-20' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches to . + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2015 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + *:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; +esac + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/external/bdwgc/libatomic_ops/config.sub b/external/bdwgc/libatomic_ops/config.sub new file mode 100755 index 0000000000..1acc966a33 --- /dev/null +++ b/external/bdwgc/libatomic_ops/config.sub @@ -0,0 +1,1813 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2015 Free Software Foundation, Inc. + +timestamp='2015-08-20' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2015 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | e2k-* | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + asmjs) + basic_machine=asmjs-unknown + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/external/bdwgc/libatomic_ops/configure.REMOVED.git-id b/external/bdwgc/libatomic_ops/configure.REMOVED.git-id new file mode 100644 index 0000000000..a15e41258d --- /dev/null +++ b/external/bdwgc/libatomic_ops/configure.REMOVED.git-id @@ -0,0 +1 @@ +ea1205ac335e34027c7b42f3f4ea27f43588c6fd \ No newline at end of file diff --git a/external/bdwgc/libatomic_ops/depcomp b/external/bdwgc/libatomic_ops/depcomp new file mode 100755 index 0000000000..fc98710e2a --- /dev/null +++ b/external/bdwgc/libatomic_ops/depcomp @@ -0,0 +1,791 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2013-05-30.07; # UTC + +# Copyright (C) 1999-2014 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Avoid interferences from the environment. +gccflag= dashmflag= + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The second -e expression handles DOS-style file names with drive + # letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. +## Some versions of gcc put a space before the ':'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for ':' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + "$@" $dashmflag | + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/mk/Makefile.in b/external/bdwgc/libatomic_ops/doc/Makefile.in similarity index 61% rename from mk/Makefile.in rename to external/bdwgc/libatomic_ops/doc/Makefile.in index 0af1e93e66..7118c0fa6e 100644 --- a/mk/Makefile.in +++ b/external/bdwgc/libatomic_ops/doc/Makefile.in @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -88,25 +89,18 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -subdir = mk +subdir = doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/apple-target.m4 \ - $(top_srcdir)/m4/ax_append_flag.m4 \ - $(top_srcdir)/m4/ax_append_link_flags.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_check_link_flag.m4 \ - $(top_srcdir)/m4/ax_require_defined.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/mono-output.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h +DIST_COMMON = $(srcdir)/Makefile.am $(dist_pkgdata_DATA) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -128,161 +122,89 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__extra_recursive_targets = test-recursive test-bundle-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(pkgdatadir)" +DATA = $(dist_pkgdata_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AOT_BUILD_FLAGS = @AOT_BUILD_FLAGS@ -AOT_RUN_FLAGS = @AOT_RUN_FLAGS@ -API_VER = @API_VER@ AR = @AR@ -AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BOEHM_DEFINES = @BOEHM_DEFINES@ -BREAKPOINT = @BREAKPOINT@ -BTLS_ARCH = @BTLS_ARCH@ -BTLS_CFLAGS = @BTLS_CFLAGS@ -BTLS_CMAKE_ARGS = @BTLS_CMAKE_ARGS@ -BTLS_PLATFORM = @BTLS_PLATFORM@ -BTLS_ROOT = @BTLS_ROOT@ -BUILD_EXEEXT = @BUILD_EXEEXT@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ -CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ -CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ -CMAKE = @CMAKE@ -COREARCH = @COREARCH@ -CORETARGETS = @CORETARGETS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CSC = @CSC@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CXXFLAGS_COMMON = @CXXFLAGS_COMMON@ -CXX_ADD_CFLAGS = @CXX_ADD_CFLAGS@ -CXX_REMOVE_CFLAGS = @CXX_REMOVE_CFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFAULT_PROFILE = @DEFAULT_PROFILE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ -DOLT_BASH = @DOLT_BASH@ DSYMUTIL = @DSYMUTIL@ -DTRACE = @DTRACE@ -DTRACEFLAGS = @DTRACEFLAGS@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -EXTERNAL_LLVM_CONFIG = @EXTERNAL_LLVM_CONFIG@ -EXTERNAL_LLVM_CONFIG_WIN32 = @EXTERNAL_LLVM_CONFIG_WIN32@ FGREP = @FGREP@ -GDKX11 = @GDKX11@ -GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GMSGFMT = @GMSGFMT@ -GMSGFMT_015 = @GMSGFMT_015@ -GNUC_NORETURN = @GNUC_NORETURN@ -GNUC_PRETTY = @GNUC_PRETTY@ -GNUC_UNUSED = @GNUC_UNUSED@ GREP = @GREP@ -GSIZE = @GSIZE@ -GSIZE_FORMAT = @GSIZE_FORMAT@ -GSSIZE = @GSSIZE@ -GTKX11 = @GTKX11@ -HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ -HAVE_MSGFMT = @HAVE_MSGFMT@ -HAVE_NINJA = @HAVE_NINJA@ -HAVE_UNISTD_H = @HAVE_UNISTD_H@ -HAVE_YASM = @HAVE_YASM@ -HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTERP_CFLAGS = @INTERP_CFLAGS@ -INTL = @INTL@ -INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@ -JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@ -JEMALLOC_CFLAGS = @JEMALLOC_CFLAGS@ -JEMALLOC_CPPFLAGS = @JEMALLOC_CPPFLAGS@ -JEMALLOC_LDFLAGS = @JEMALLOC_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBC = @LIBC@ -LIBGC_CPPFLAGS = @LIBGC_CPPFLAGS@ -LIBGC_LIBS = @LIBGC_LIBS@ -LIBGC_STATIC_LIBS = @LIBGC_STATIC_LIBS@ -LIBMONO_LA = @LIBMONO_LA@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ -LLVM_CODEGEN_LIBS = @LLVM_CODEGEN_LIBS@ LN_S = @LN_S@ -LTCOMPILE = @LTCOMPILE@ -LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ -MONO_CORLIB_VERSION = @MONO_CORLIB_VERSION@ -MONO_CXXLD = @MONO_CXXLD@ -MONO_JEMALLOC_ASSERT = @MONO_JEMALLOC_ASSERT@ -MONO_JEMALLOC_DEFAULT = @MONO_JEMALLOC_DEFAULT@ -MONO_JEMALLOC_ENABLED = @MONO_JEMALLOC_ENABLED@ -MONO_NATIVE_CC = @MONO_NATIVE_CC@ -MONO_NATIVE_CCASFLAGS = @MONO_NATIVE_CCASFLAGS@ -MONO_NATIVE_CFLAGS = @MONO_NATIVE_CFLAGS@ -MONO_NATIVE_COMPAT_CCASFLAGS = @MONO_NATIVE_COMPAT_CCASFLAGS@ -MONO_NATIVE_COMPAT_CFLAGS = @MONO_NATIVE_COMPAT_CFLAGS@ -MONO_NATIVE_COMPAT_CPPFLAGS = @MONO_NATIVE_COMPAT_CPPFLAGS@ -MONO_NATIVE_COMPAT_CXXFLAGS = @MONO_NATIVE_COMPAT_CXXFLAGS@ -MONO_NATIVE_COMPAT_LDFLAGS = @MONO_NATIVE_COMPAT_LDFLAGS@ -MONO_NATIVE_CPPFLAGS = @MONO_NATIVE_CPPFLAGS@ -MONO_NATIVE_CXX = @MONO_NATIVE_CXX@ -MONO_NATIVE_CXXFLAGS = @MONO_NATIVE_CXXFLAGS@ -MONO_NATIVE_LDFLAGS = @MONO_NATIVE_LDFLAGS@ -MONO_NATIVE_LIBADD = @MONO_NATIVE_LIBADD@ -MONO_NATIVE_LIBRARY_NAME = @MONO_NATIVE_LIBRARY_NAME@ -MONO_NATIVE_PLATFORM = @MONO_NATIVE_PLATFORM@ -MONO_NATIVE_PLATFORM_TYPE = @MONO_NATIVE_PLATFORM_TYPE@ -MONO_NATIVE_PLATFORM_TYPE_COMPAT = @MONO_NATIVE_PLATFORM_TYPE_COMPAT@ -MONO_NATIVE_PLATFORM_TYPE_UNIFIED = @MONO_NATIVE_PLATFORM_TYPE_UNIFIED@ -MONO_NATIVE_UNIFIED_CCASFLAGS = @MONO_NATIVE_UNIFIED_CCASFLAGS@ -MONO_NATIVE_UNIFIED_CFLAGS = @MONO_NATIVE_UNIFIED_CFLAGS@ -MONO_NATIVE_UNIFIED_CPPFLAGS = @MONO_NATIVE_UNIFIED_CPPFLAGS@ -MONO_NATIVE_UNIFIED_CXXFLAGS = @MONO_NATIVE_UNIFIED_CXXFLAGS@ -MONO_NATIVE_UNIFIED_LDFLAGS = @MONO_NATIVE_UNIFIED_LDFLAGS@ -MONO_NOINST_SUBDIRS = @MONO_NOINST_SUBDIRS@ -MONO_SUBDIRS = @MONO_SUBDIRS@ -MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ -MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -ODBC = @ODBC@ -ORDER = @ORDER@ -OS = @OS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ @@ -292,59 +214,27 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ -PATHSEP = @PATHSEP@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PIDTYPE = @PIDTYPE@ -PKG_CONFIG = @PKG_CONFIG@ -PLATFORM_AOT_PREFIX = @PLATFORM_AOT_PREFIX@ -PLATFORM_AOT_SUFFIX = @PLATFORM_AOT_SUFFIX@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ +PICFLAG = @PICFLAG@ RANLIB = @RANLIB@ -RID = @RID@ -SEARCHSEP = @SEARCHSEP@ SED = @SED@ SET_MAKE = @SET_MAKE@ -SGEN_DEFINES = @SGEN_DEFINES@ -SHARED_CFLAGS = @SHARED_CFLAGS@ SHELL = @SHELL@ -SIZEOF_VOID_P = @SIZEOF_VOID_P@ -SQLITE = @SQLITE@ -SQLITE3 = @SQLITE3@ -STATIC_GCC_LIBS = @STATIC_GCC_LIBS@ -STATIC_ZLIB_PATH = @STATIC_ZLIB_PATH@ STRIP = @STRIP@ -TEST_PROFILE = @TEST_PROFILE@ -USE_NLS = @USE_NLS@ +THREADDLLIBS = @THREADDLLIBS@ VERSION = @VERSION@ -VTUNE_CFLAGS = @VTUNE_CFLAGS@ -VTUNE_LIBS = @VTUNE_LIBS@ -WERROR_CFLAGS = @WERROR_CFLAGS@ -X11 = @X11@ -XATTR_LIB = @XATTR_LIB@ -XGETTEXT = @XGETTEXT@ -XGETTEXT_015 = @XGETTEXT_015@ -XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XINERAMA = @XINERAMA@ -XMKMF = @XMKMF@ -ZLIB_CFLAGS = @ZLIB_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ -arch_target = @arch_target@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -357,8 +247,6 @@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ -export_ldflags = @export_ldflags@ -extra_runtime_ldflags = @extra_runtime_ldflags@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -370,39 +258,19 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ -libgdiplus_install_loc = @libgdiplus_install_loc@ -libgdiplus_loc = @libgdiplus_loc@ -libmono_cflags = @libmono_cflags@ -libmono_ldflags = @libmono_ldflags@ -libsuffix = @libsuffix@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ -mcs_topdir = @mcs_topdir@ -mcs_topdir_from_srcdir = @mcs_topdir_from_srcdir@ mkdir_p = @mkdir_p@ -mono_build_root = @mono_build_root@ -mono_cfg_dir = @mono_cfg_dir@ -mono_msvc_build_bin_dir = @mono_msvc_build_bin_dir@ -mono_msvc_build_dir = @mono_msvc_build_dir@ -mono_msvc_build_lib_dir = @mono_msvc_build_lib_dir@ -mono_runtime = @mono_runtime@ -mono_runtime_wrapper = @mono_runtime_wrapper@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -pyexecdir = @pyexecdir@ -pythondir = @pythondir@ -reloc_libdir = @reloc_libdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ -subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ @@ -412,7 +280,12 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = common.mk + +# installed documentation +# +dist_pkgdata_DATA = LICENSING.txt README.txt README_stack.txt \ + README_malloc.txt README_win32.txt + all: all-am .SUFFIXES: @@ -425,9 +298,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign mk/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign mk/Makefile + $(AUTOMAKE) --foreign doc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -451,8 +324,27 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -test-local: -test-bundle-local: +install-dist_pkgdataDATA: $(dist_pkgdata_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ + done + +uninstall-dist_pkgdataDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: @@ -492,8 +384,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(DATA) installdirs: + for dir in "$(DESTDIR)$(pkgdatadir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -544,7 +439,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-dist_pkgdataDATA install-dvi: install-dvi-am @@ -588,30 +483,22 @@ ps: ps-am ps-am: -test: test-am - -test-am: test-local - -test-bundle: test-bundle-am - -test-bundle-am: test-bundle-local - -uninstall-am: +uninstall-am: uninstall-dist_pkgdataDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am test-am test-bundle-am test-bundle-local test-local \ - uninstall uninstall-am + install install-am install-data install-data-am \ + install-dist_pkgdataDATA install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-dist_pkgdataDATA .PRECIOUS: Makefile diff --git a/external/bdwgc/libatomic_ops/install-sh b/external/bdwgc/libatomic_ops/install-sh new file mode 100755 index 0000000000..59990a1049 --- /dev/null +++ b/external/bdwgc/libatomic_ops/install-sh @@ -0,0 +1,508 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2014-09-12.12; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# 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 +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# 'make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +tab=' ' +nl=' +' +IFS=" $tab$nl" + +# Set DOITPROG to "echo" to test this script. + +doit=${DOITPROG-} +doit_exec=${doit:-exec} + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +is_target_a_directory=possibly + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) is_target_a_directory=never;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + dstdir=`dirname "$dst"` + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # $RANDOM is not portable (e.g. dash); use it when possible to + # lower collision chance + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # As "mkdir -p" follows symlinks and we work in /tmp possibly; so + # create the $tmpdir first (and fail if unsuccessful) to make sure + # that nobody tries to guess the $tmpdir name. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + oIFS=$IFS + IFS=/ + set -f + set fnord $dstdir + shift + set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + set +f && + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/external/bdwgc/libatomic_ops/ltmain.sh.REMOVED.git-id b/external/bdwgc/libatomic_ops/ltmain.sh.REMOVED.git-id new file mode 100644 index 0000000000..c78b937b5d --- /dev/null +++ b/external/bdwgc/libatomic_ops/ltmain.sh.REMOVED.git-id @@ -0,0 +1 @@ +147d758abcb48cacb99f268d6b9fecb29205d793 \ No newline at end of file diff --git a/external/bdwgc/libatomic_ops/m4/libtool.m4.REMOVED.git-id b/external/bdwgc/libatomic_ops/m4/libtool.m4.REMOVED.git-id new file mode 100644 index 0000000000..f22add863b --- /dev/null +++ b/external/bdwgc/libatomic_ops/m4/libtool.m4.REMOVED.git-id @@ -0,0 +1 @@ +10ab2844c4edd299059ffcf84b9a61328d9ab6ff \ No newline at end of file diff --git a/external/bdwgc/libatomic_ops/m4/ltoptions.m4 b/external/bdwgc/libatomic_ops/m4/ltoptions.m4 new file mode 100644 index 0000000000..94b0829766 --- /dev/null +++ b/external/bdwgc/libatomic_ops/m4/ltoptions.m4 @@ -0,0 +1,437 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software +# Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 8 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option '$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl 'shared' nor 'disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], + [_LT_WITH_AIX_SONAME([aix])]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [1], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the 'shared' and +# 'disable-shared' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the 'static' and +# 'disable-static' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the 'fast-install' +# and 'disable-fast-install' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_AIX_SONAME([DEFAULT]) +# ---------------------------------- +# implement the --with-aix-soname flag, and support the `aix-soname=aix' +# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT +# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. +m4_define([_LT_WITH_AIX_SONAME], +[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl +shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[[5-9]]*,yes) + AC_MSG_CHECKING([which variant of shared library versioning to provide]) + AC_ARG_WITH([aix-soname], + [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], + [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], + [case $withval in + aix|svr4|both) + ;; + *) + AC_MSG_ERROR([Unknown argument to --with-aix-soname]) + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname], + [AC_CACHE_VAL([lt_cv_with_aix_soname], + [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) + with_aix_soname=$lt_cv_with_aix_soname]) + AC_MSG_RESULT([$with_aix_soname]) + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + +_LT_DECL([], [shared_archive_member_spec], [0], + [Shared archive member basename, for filename based shared library versioning on AIX])dnl +])# _LT_WITH_AIX_SONAME + +LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' +# LT_INIT options. +# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $withval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [pic_mode=m4_default([$1], [default])]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/external/bdwgc/libatomic_ops/m4/ltsugar.m4 b/external/bdwgc/libatomic_ops/m4/ltsugar.m4 new file mode 100644 index 0000000000..48bc9344a4 --- /dev/null +++ b/external/bdwgc/libatomic_ops/m4/ltsugar.m4 @@ -0,0 +1,124 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59, which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/external/bdwgc/libatomic_ops/m4/ltversion.m4 b/external/bdwgc/libatomic_ops/m4/ltversion.m4 new file mode 100644 index 0000000000..fa04b52a3b --- /dev/null +++ b/external/bdwgc/libatomic_ops/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# @configure_input@ + +# serial 4179 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.4.6]) +m4_define([LT_PACKAGE_REVISION], [2.4.6]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.4.6' +macro_revision='2.4.6' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/external/bdwgc/libatomic_ops/m4/lt~obsolete.m4 b/external/bdwgc/libatomic_ops/m4/lt~obsolete.m4 new file mode 100644 index 0000000000..c6b26f88f6 --- /dev/null +++ b/external/bdwgc/libatomic_ops/m4/lt~obsolete.m4 @@ -0,0 +1,99 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software +# Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 5 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/external/bdwgc/libatomic_ops/missing b/external/bdwgc/libatomic_ops/missing new file mode 100755 index 0000000000..f62bbae306 --- /dev/null +++ b/external/bdwgc/libatomic_ops/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2013-10-28.13; # UTC + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/external/bdwgc/libatomic_ops/src/Makefile.in b/external/bdwgc/libatomic_ops/src/Makefile.in new file mode 100644 index 0000000000..25816d9c4c --- /dev/null +++ b/external/bdwgc/libatomic_ops/src/Makefile.in @@ -0,0 +1,999 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \ + $(nobase_private_HEADERS) $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" \ + "$(DESTDIR)$(privatedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libatomic_ops_la_LIBADD = +am__libatomic_ops_la_SOURCES_DIST = atomic_ops.c atomic_ops_sysdeps.S +@NEED_ASM_FALSE@am_libatomic_ops_la_OBJECTS = atomic_ops.lo +@NEED_ASM_TRUE@am_libatomic_ops_la_OBJECTS = atomic_ops.lo \ +@NEED_ASM_TRUE@ atomic_ops_sysdeps.lo +libatomic_ops_la_OBJECTS = $(am_libatomic_ops_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +libatomic_ops_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libatomic_ops_la_LDFLAGS) $(LDFLAGS) \ + -o $@ +libatomic_ops_gpl_la_LIBADD = +am_libatomic_ops_gpl_la_OBJECTS = atomic_ops_stack.lo \ + atomic_ops_malloc.lo +libatomic_ops_gpl_la_OBJECTS = $(am_libatomic_ops_gpl_la_OBJECTS) +libatomic_ops_gpl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libatomic_ops_gpl_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) +LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CCASFLAGS) $(CCASFLAGS) +AM_V_CPPAS = $(am__v_CPPAS_@AM_V@) +am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@) +am__v_CPPAS_0 = @echo " CPPAS " $@; +am__v_CPPAS_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libatomic_ops_la_SOURCES) $(libatomic_ops_gpl_la_SOURCES) +DIST_SOURCES = $(am__libatomic_ops_la_SOURCES_DIST) \ + $(libatomic_ops_gpl_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(include_HEADERS) $(nobase_private_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PICFLAG = @PICFLAG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +THREADDLLIBS = @THREADDLLIBS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CFLAGS = @PICFLAG@ +AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src +include_HEADERS = atomic_ops.h atomic_ops_stack.h atomic_ops_malloc.h +lib_LTLIBRARIES = libatomic_ops.la libatomic_ops_gpl.la +@NEED_ASM_FALSE@libatomic_ops_la_SOURCES = atomic_ops.c +@NEED_ASM_TRUE@libatomic_ops_la_SOURCES = atomic_ops.c atomic_ops_sysdeps.S +libatomic_ops_la_LDFLAGS = -version-info 1:3:0 -no-undefined +libatomic_ops_gpl_la_SOURCES = atomic_ops_stack.c atomic_ops_malloc.c +libatomic_ops_gpl_la_LDFLAGS = -version-info 1:3:0 -no-undefined +EXTRA_DIST = Makefile.msft atomic_ops/sysdeps/README \ + atomic_ops/generalize-arithm.template \ + atomic_ops/generalize-small.template \ + atomic_ops/sysdeps/ao_t_is_int.template \ + atomic_ops/sysdeps/gcc/generic-arithm.template \ + atomic_ops/sysdeps/gcc/generic-small.template \ + atomic_ops/sysdeps/loadstore/acquire_release_volatile.template \ + atomic_ops/sysdeps/loadstore/atomic_load.template \ + atomic_ops/sysdeps/loadstore/atomic_store.template \ + atomic_ops/sysdeps/loadstore/ordered_loads_only.template \ + atomic_ops/sysdeps/loadstore/ordered_stores_only.template \ + atomic_ops/sysdeps/sunc/sparc.S + +BUILT_SOURCES = atomic_ops/generalize-arithm.h \ + atomic_ops/generalize-small.h \ + atomic_ops/sysdeps/ao_t_is_int.h \ + atomic_ops/sysdeps/gcc/generic-arithm.h \ + atomic_ops/sysdeps/gcc/generic-small.h \ + atomic_ops/sysdeps/loadstore/acquire_release_volatile.h \ + atomic_ops/sysdeps/loadstore/atomic_load.h \ + atomic_ops/sysdeps/loadstore/atomic_store.h \ + atomic_ops/sysdeps/loadstore/char_acquire_release_volatile.h \ + atomic_ops/sysdeps/loadstore/char_atomic_load.h \ + atomic_ops/sysdeps/loadstore/char_atomic_store.h \ + atomic_ops/sysdeps/loadstore/int_acquire_release_volatile.h \ + atomic_ops/sysdeps/loadstore/int_atomic_load.h \ + atomic_ops/sysdeps/loadstore/int_atomic_store.h \ + atomic_ops/sysdeps/loadstore/ordered_loads_only.h \ + atomic_ops/sysdeps/loadstore/ordered_stores_only.h \ + atomic_ops/sysdeps/loadstore/short_acquire_release_volatile.h \ + atomic_ops/sysdeps/loadstore/short_atomic_load.h \ + atomic_ops/sysdeps/loadstore/short_atomic_store.h + + +#Private Headers +privatedir = ${includedir}/ +nobase_private_HEADERS = atomic_ops/ao_version.h \ + atomic_ops/generalize.h \ + $(BUILT_SOURCES) \ + \ + atomic_ops/sysdeps/all_acquire_release_volatile.h \ + atomic_ops/sysdeps/all_aligned_atomic_load_store.h \ + atomic_ops/sysdeps/all_atomic_load_store.h \ + atomic_ops/sysdeps/all_atomic_only_load.h \ + atomic_ops/sysdeps/emul_cas.h \ + atomic_ops/sysdeps/generic_pthread.h \ + atomic_ops/sysdeps/ordered.h \ + atomic_ops/sysdeps/ordered_except_wr.h \ + atomic_ops/sysdeps/read_ordered.h \ + atomic_ops/sysdeps/standard_ao_double_t.h \ + atomic_ops/sysdeps/test_and_set_t_is_ao_t.h \ + atomic_ops/sysdeps/test_and_set_t_is_char.h \ + \ + atomic_ops/sysdeps/armcc/arm_v6.h \ + \ + atomic_ops/sysdeps/gcc/aarch64.h \ + atomic_ops/sysdeps/gcc/alpha.h \ + atomic_ops/sysdeps/gcc/arm.h \ + atomic_ops/sysdeps/gcc/avr32.h \ + atomic_ops/sysdeps/gcc/cris.h \ + atomic_ops/sysdeps/gcc/generic.h \ + atomic_ops/sysdeps/gcc/hexagon.h \ + atomic_ops/sysdeps/gcc/hppa.h \ + atomic_ops/sysdeps/gcc/ia64.h \ + atomic_ops/sysdeps/gcc/m68k.h \ + atomic_ops/sysdeps/gcc/mips.h \ + atomic_ops/sysdeps/gcc/powerpc.h \ + atomic_ops/sysdeps/gcc/s390.h \ + atomic_ops/sysdeps/gcc/sh.h \ + atomic_ops/sysdeps/gcc/sparc.h \ + atomic_ops/sysdeps/gcc/x86.h \ + \ + atomic_ops/sysdeps/hpc/hppa.h \ + atomic_ops/sysdeps/hpc/ia64.h \ + \ + atomic_ops/sysdeps/ibmc/powerpc.h \ + \ + atomic_ops/sysdeps/icc/ia64.h \ + \ + atomic_ops/sysdeps/loadstore/double_atomic_load_store.h \ + \ + atomic_ops/sysdeps/msftc/arm.h \ + atomic_ops/sysdeps/msftc/common32_defs.h \ + atomic_ops/sysdeps/msftc/x86.h \ + atomic_ops/sysdeps/msftc/x86_64.h \ + \ + atomic_ops/sysdeps/sunc/sparc.h \ + atomic_ops/sysdeps/sunc/x86.h + +all: $(BUILT_SOURCES) config.h + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .S .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status src/config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libatomic_ops.la: $(libatomic_ops_la_OBJECTS) $(libatomic_ops_la_DEPENDENCIES) $(EXTRA_libatomic_ops_la_DEPENDENCIES) + $(AM_V_CCLD)$(libatomic_ops_la_LINK) -rpath $(libdir) $(libatomic_ops_la_OBJECTS) $(libatomic_ops_la_LIBADD) $(LIBS) + +libatomic_ops_gpl.la: $(libatomic_ops_gpl_la_OBJECTS) $(libatomic_ops_gpl_la_DEPENDENCIES) $(EXTRA_libatomic_ops_gpl_la_DEPENDENCIES) + $(AM_V_CCLD)$(libatomic_ops_gpl_la_LINK) -rpath $(libdir) $(libatomic_ops_gpl_la_OBJECTS) $(libatomic_ops_gpl_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops_malloc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops_stack.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops_sysdeps.Plo@am__quote@ + +.S.o: +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $< + +.S.obj: +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.S.lo: +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $< + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) +install-nobase_privateHEADERS: $(nobase_private_HEADERS) + @$(NORMAL_INSTALL) + @list='$(nobase_private_HEADERS)'; test -n "$(privatedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(privatedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(privatedir)" || exit 1; \ + fi; \ + $(am__nobase_list) | while read dir files; do \ + xfiles=; for file in $$files; do \ + if test -f "$$file"; then xfiles="$$xfiles $$file"; \ + else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ + test -z "$$xfiles" || { \ + test "x$$dir" = x. || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(privatedir)/$$dir'"; \ + $(MKDIR_P) "$(DESTDIR)$(privatedir)/$$dir"; }; \ + echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(privatedir)/$$dir'"; \ + $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(privatedir)/$$dir" || exit $$?; }; \ + done + +uninstall-nobase_privateHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nobase_private_HEADERS)'; test -n "$(privatedir)" || list=; \ + $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ + dir='$(DESTDIR)$(privatedir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(privatedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includeHEADERS install-nobase_privateHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ + uninstall-nobase_privateHEADERS + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-includeHEADERS install-info install-info-am \ + install-libLTLIBRARIES install-man \ + install-nobase_privateHEADERS install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-includeHEADERS \ + uninstall-libLTLIBRARIES uninstall-nobase_privateHEADERS + +.PRECIOUS: Makefile + + +atomic_ops/generalize-small.h: atomic_ops/generalize-small.template + sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ + sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ + sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ + sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@ + sed -e s:XSIZE:double:g -e s:XCTYPE:AO_double_t:g $? >> $@ + +atomic_ops/generalize-arithm.h: atomic_ops/generalize-arithm.template + sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ + sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ + sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ + sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@ + +atomic_ops/sysdeps/ao_t_is_int.h: atomic_ops/sysdeps/ao_t_is_int.template + sed -e s:_XBAR::g $? > $@ + sed -e s:XBAR:full:g $? >> $@ + sed -e s:XBAR:acquire:g $? >> $@ + sed -e s:XBAR:release:g $? >> $@ + sed -e s:XBAR:write:g $? >> $@ + sed -e s:XBAR:read:g $? >> $@ + +atomic_ops/sysdeps/gcc/generic-arithm.h: \ + atomic_ops/sysdeps/gcc/generic-arithm.template + sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \ + -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ + sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \ + -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ + sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \ + -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ + sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \ + -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@ + sed -e s:XBAR:acquire:g -e s:XGCCBAR:ACQUIRE:g \ + -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? >> $@ + sed -e s:XBAR:acquire:g -e s:XGCCBAR:ACQUIRE:g \ + -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ + sed -e s:XBAR:acquire:g -e s:XGCCBAR:ACQUIRE:g \ + -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ + sed -e s:XBAR:acquire:g -e s:XGCCBAR:ACQUIRE:g \ + -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@ + sed -e s:XBAR:release:g -e s:XGCCBAR:RELEASE:g \ + -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? >> $@ + sed -e s:XBAR:release:g -e s:XGCCBAR:RELEASE:g \ + -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ + sed -e s:XBAR:release:g -e s:XGCCBAR:RELEASE:g \ + -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ + sed -e s:XBAR:release:g -e s:XGCCBAR:RELEASE:g \ + -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@ + sed -e s:XBAR:full:g -e s:XGCCBAR:SEQ_CST:g \ + -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? >> $@ + sed -e s:XBAR:full:g -e s:XGCCBAR:SEQ_CST:g \ + -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ + sed -e s:XBAR:full:g -e s:XGCCBAR:SEQ_CST:g \ + -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ + sed -e s:XBAR:full:g -e s:XGCCBAR:SEQ_CST:g \ + -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@ + +atomic_ops/sysdeps/gcc/generic-small.h: \ + atomic_ops/sysdeps/gcc/generic-small.template + sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ + sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ + sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ + sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@ + +atomic_ops/sysdeps/loadstore/ordered_loads_only.h: \ + atomic_ops/sysdeps/loadstore/ordered_loads_only.template + sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ + sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ + sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ + sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@ + sed -e s:XSIZE:double:g -e s:XCTYPE:AO_double_t:g $? >> $@ + +atomic_ops/sysdeps/loadstore/ordered_stores_only.h: \ + atomic_ops/sysdeps/loadstore/ordered_stores_only.template + sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ + sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ + sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ + sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@ + sed -e s:XSIZE:double:g -e s:XCTYPE:AO_double_t:g $? >> $@ + +atomic_ops/sysdeps/loadstore/acquire_release_volatile.h: \ + atomic_ops/sysdeps/loadstore/acquire_release_volatile.template + sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? > $@ + +atomic_ops/sysdeps/loadstore/char_acquire_release_volatile.h: \ + atomic_ops/sysdeps/loadstore/acquire_release_volatile.template + sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ + +atomic_ops/sysdeps/loadstore/int_acquire_release_volatile.h: \ + atomic_ops/sysdeps/loadstore/acquire_release_volatile.template + sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? > $@ + +atomic_ops/sysdeps/loadstore/short_acquire_release_volatile.h: \ + atomic_ops/sysdeps/loadstore/acquire_release_volatile.template + sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? > $@ + +atomic_ops/sysdeps/loadstore/atomic_load.h: \ + atomic_ops/sysdeps/loadstore/atomic_load.template + sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? > $@ + +atomic_ops/sysdeps/loadstore/char_atomic_load.h: \ + atomic_ops/sysdeps/loadstore/atomic_load.template + sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ + +atomic_ops/sysdeps/loadstore/int_atomic_load.h: \ + atomic_ops/sysdeps/loadstore/atomic_load.template + sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? > $@ + +atomic_ops/sysdeps/loadstore/short_atomic_load.h: \ + atomic_ops/sysdeps/loadstore/atomic_load.template + sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? > $@ + +atomic_ops/sysdeps/loadstore/atomic_store.h: \ + atomic_ops/sysdeps/loadstore/atomic_store.template + sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? > $@ + +atomic_ops/sysdeps/loadstore/char_atomic_store.h: \ + atomic_ops/sysdeps/loadstore/atomic_store.template + sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ + +atomic_ops/sysdeps/loadstore/int_atomic_store.h: \ + atomic_ops/sysdeps/loadstore/atomic_store.template + sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? > $@ + +atomic_ops/sysdeps/loadstore/short_atomic_store.h: \ + atomic_ops/sysdeps/loadstore/atomic_store.template + sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? > $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/external/bdwgc/libatomic_ops/src/config.h.in b/external/bdwgc/libatomic_ops/src/config.h.in new file mode 100644 index 0000000000..aa784def5f --- /dev/null +++ b/external/bdwgc/libatomic_ops/src/config.h.in @@ -0,0 +1,148 @@ +/* src/config.h.in. Generated from configure.ac by autoheader. */ + +/* Inline assembly avalable (only VC/x86_64) */ +#undef AO_ASM_X64_AVAILABLE + +/* Assume Windows Server 2003, Vista or later target (only VC/x86) */ +#undef AO_ASSUME_VISTA + +/* Assume hardware compare-and-swap functionality available on target (only + VC/x86) */ +#undef AO_ASSUME_WINDOWS98 + +/* Assume target is not old AMD Opteron chip (only x86_64) */ +#undef AO_CMPXCHG16B_AVAILABLE + +/* Force test_and_set to use SWP instruction instead of LDREX/STREX (only arm + v6+) */ +#undef AO_FORCE_USE_SWP + +/* Force compare_and_swap definition via fetch_compare_and_swap */ +#undef AO_GENERALIZE_ASM_BOOL_CAS + +/* No pthreads library available */ +#undef AO_NO_PTHREADS + +/* Assume target is not sparc v9+ (only sparc) */ +#undef AO_NO_SPARC_V9 + +/* Assume ancient MS VS Win32 headers (only VC/arm v6+, VC/x86) */ +#undef AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE + +/* Prefer generalized definitions to direct assembly-based ones */ +#undef AO_PREFER_GENERALIZED + +/* Trace AO_malloc/free calls (for debug only) */ +#undef AO_TRACE_MALLOC + +/* Assume single-core target (only arm v6+) */ +#undef AO_UNIPROCESSOR + +/* Assume Win32 _Interlocked primitives available as intrinsics (only VC/arm) + */ +#undef AO_USE_INTERLOCKED_INTRINSICS + +/* Use nanosleep() instead of select() (only if atomic operations are + emulated) */ +#undef AO_USE_NANOSLEEP + +/* Do not block signals in compare_and_swap (only if atomic operations are + emulated) */ +#undef AO_USE_NO_SIGNALS + +/* Use Pentium 4 'mfence' instruction (only x86) */ +#undef AO_USE_PENTIUM4_INSTRS + +/* Emulate atomic operations via slow and async-signal-unsafe pthread locking + */ +#undef AO_USE_PTHREAD_DEFS + +/* Prefer GCC built-in CAS intrinsics in favor of inline assembly (only + gcc/x86, gcc/x86_64) */ +#undef AO_USE_SYNC_CAS_BUILTIN + +/* Use Win32 Sleep() instead of select() (only if atomic operations are + emulated) */ +#undef AO_USE_WIN32_PTHREADS + +/* Emulate double-width CAS via pthread locking in case of no hardware support + (only gcc/x86_64, the emulation is unsafe) */ +#undef AO_WEAK_DOUBLE_CAS_EMULATION + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#undef LT_OBJDIR + +/* Define to disable assertion checking. */ +#undef NDEBUG + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Indicates the use of pthreads (NetBSD). */ +#undef _PTHREADS + +/* Required define if using POSIX threads. */ +#undef _REENTRANT diff --git a/external/bdwgc/libtool.REMOVED.git-id b/external/bdwgc/libtool.REMOVED.git-id index 20fd59fe0b..ed475ea958 100644 --- a/external/bdwgc/libtool.REMOVED.git-id +++ b/external/bdwgc/libtool.REMOVED.git-id @@ -1 +1 @@ -c2c3f46f950f38965c2709deeb9dfbc7bf047010 \ No newline at end of file +e5b664eb14cab4f093a824049a1013bdd1e9dcc3 \ No newline at end of file diff --git a/external/binary-reference-assemblies/build/monowasm/Makefile b/external/binary-reference-assemblies/build/monowasm/Makefile index a88c273200..8e608e5d76 100644 --- a/external/binary-reference-assemblies/build/monowasm/Makefile +++ b/external/binary-reference-assemblies/build/monowasm/Makefile @@ -5,7 +5,7 @@ CSC ?= csc CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612,618,809 Q_CSC = $(if $(V),,@echo "CSC [$(PROFILE)] $(1)";) -ASSEMBLIES := mscorlib System System.Xml System.Numerics System.Core System.Net.Http WebAssembly.Net.Http +ASSEMBLIES := mscorlib System System.Xml System.Numerics System.Core System.Net.Http WebAssembly.Net.Http WebAssembly.Net.WebSockets ASSEMBLIES += bare/System @@ -17,6 +17,7 @@ System_REFS := mscorlib System.Numerics_REFS := mscorlib System.Xml_REFS := mscorlib System WebAssembly.Net.Http_REFS := mscorlib System System.Core System.Net.Http +WebAssembly.Net.WebSockets_REFS := mscorlib System System.Core bare/System_REFS := mscorlib @@ -27,9 +28,14 @@ ECMA_KEY := ../../../../mcs/class/ecma.pub # Public Key Token: b77a5c561 ECMA_KEY_ASSEMBLIES := System.Core System.Net.Http System System.Numerics System.Xml mscorlib bare/System WebAssembly.Net.Http_KEYFILE := ../../../../mcs/class/Open.snk +WebAssembly.Net.WebSockets_KEYFILE := ../../../../mcs/class/Open.snk all: $(addsuffix .dll, $(ASSEMBLIES)) +clean: + rm -f *.dll + rm -f bare/*.dll + define KEYFILE_TEMPLATE $(1)_KEYFILE := $(2) endef diff --git a/external/binary-reference-assemblies/build/monowasm/System.Core.dll.REMOVED.git-id b/external/binary-reference-assemblies/build/monowasm/System.Core.dll.REMOVED.git-id index 0e03f0b68e..5eaeaf865a 100644 --- a/external/binary-reference-assemblies/build/monowasm/System.Core.dll.REMOVED.git-id +++ b/external/binary-reference-assemblies/build/monowasm/System.Core.dll.REMOVED.git-id @@ -1 +1 @@ -704d3e02dbd43691d785ec24bee712fe05eaec9f \ No newline at end of file +87607329272bd5f9d6c3bcdcf081c580bea533a6 \ No newline at end of file diff --git a/external/binary-reference-assemblies/build/monowasm/System.Net.Http.dll b/external/binary-reference-assemblies/build/monowasm/System.Net.Http.dll index 45009f8e5ca2356ad8df21639a92bde0ad417196..4ec2ccf2f280ac4901dfcaa86228a2065e3dc6ef 100644 GIT binary patch delta 39 xcmV+?0NDS4@Bx7E0g#9U5y(W9v5ahD5cBoKx%~)yL7@wM<0*|@WU~lk_!N0?5}*J8 delta 39 vcmZqpz}WDCaY6@6G}GL@8+&q+1Xc!jvqYKH_|Ckx%}f6Q+xpEM$v;E@R!k8P diff --git a/external/binary-reference-assemblies/build/monowasm/System.Numerics.dll b/external/binary-reference-assemblies/build/monowasm/System.Numerics.dll index 11d95ed27e3c13c9ddb29a81b397a5dd3de20b2c..2530d28565890a3bb20bc38844f67b99be5be810 100644 GIT binary patch delta 39 vcmZqJ!q~8daY6^nn}lVZ8+!`e1sES#9T$uG={7g7HPcXD|Mg}bk1v7%TDK7f delta 39 xcmV+?0NDS4v;ly$0g#9ULjIzav5as>5PJs1XaV3%PpaLnNHSXHqq7W1^bua|5y=1m diff --git a/external/binary-reference-assemblies/build/monowasm/System.Xml.dll.REMOVED.git-id b/external/binary-reference-assemblies/build/monowasm/System.Xml.dll.REMOVED.git-id index 6acbcbe69e..5653a153af 100644 --- a/external/binary-reference-assemblies/build/monowasm/System.Xml.dll.REMOVED.git-id +++ b/external/binary-reference-assemblies/build/monowasm/System.Xml.dll.REMOVED.git-id @@ -1 +1 @@ -fda0b23237512ee638ff7f71d934b0c6ecc2ca4e \ No newline at end of file +61ffe25f02c34386e713572aa0e3814787501a71 \ No newline at end of file diff --git a/external/binary-reference-assemblies/build/monowasm/System.dll.REMOVED.git-id b/external/binary-reference-assemblies/build/monowasm/System.dll.REMOVED.git-id index 72414abdb6..60397ab302 100644 --- a/external/binary-reference-assemblies/build/monowasm/System.dll.REMOVED.git-id +++ b/external/binary-reference-assemblies/build/monowasm/System.dll.REMOVED.git-id @@ -1 +1 @@ -589327cb425c2811156435a75cd5c0cc003ae1dc \ No newline at end of file +89590f9053246ebac25b2e028ed834c4f941bc19 \ No newline at end of file diff --git a/external/binary-reference-assemblies/build/monowasm/WebAssembly.Net.Http.dll b/external/binary-reference-assemblies/build/monowasm/WebAssembly.Net.Http.dll index dd8a105d63d95c47a92352cefd035d61b38ae08f..91aa20b3c289b99c2bd2cecc85130e99939c0303 100644 GIT binary patch delta 36 ucmV+<0Nek7Fn}Jkv0_y;u}qME)WqOd<+F&D3W=49l`m5m%Zf=LzwVj6 z-8+y{^G}jW@6Ma|d;R+L>({S)dS>%=cTs?d6kMlI6FrSPFI|G3n^aKUH2;|8W;Jd`_>U{k^+?6 zvEVP&-cHa$b-ENMib4|dr1RQwS8;XWBAO|9+4GwVxc{P5Kq2QPKwV>8mH%sZA94}O zOX#MTGhIZl@jy&1yNPB%_5}1Unp$@*tP+Lm>chYr>Tt|uqb~5G2ng!LSbe{NL{W)$ z$85*W0tw%`!0>_2!c|wg;C;+yh6P3LEA7U`ZC!w?u5=Ntt%DxR@! zq6RLkD{+j!QitD2f2by?vd~07LQ{y&K|+^%KXke_b)wu7Jhn8xw0$KP1<3$)gG6mN5uLz&Kk}z7<=VQLcesXuMm&UV11Tzk=c&D$ms+hWqamP>y0~d8%m78j*!=A_U z0^U7DZ_;XI8d-1!4$6-OLiDJ_X^)_Tg8oj>e-M{{U+PstG)Lw%E`3%G(F1`!!4U12 zIDLh#2{lq%=rDMRh60WB`{3bVBON6!X^~c=)t}^(pre63awC079)isobW&-gkBe3< zqSbz(KRv`P90}Zq+DnuuEH?zBp%7UCF25zjB`?a?iIuq!W8|a8Pnt;=hmHo<2qXjD zgZLMKny63ZTH_aVDiPrA0=*FaMQ~7(=+i#>dB6hNDbRR$Jm>&ve%(_v3Y7EF8ljo@ z5Os&RP2ERV(T&hFe3S)J$P#Frw$bgp=cYV}DcS#L&gO57spfsKK33RLQ zx|wbfXgvI!@=d9k#(ea;@+8phKDtSH2IIcNM|UVkf%f}ocJO&ALSOXJCBYv8-R+~3 z@@rC*?)6bP@Kd1sd}M}Rms;q6k48hk2D;xzUzXpLX3>K_dS3oB&_N${2H%ld>0uxB z1^)*0h=*u%U>XwnkdIoGQ_}f#cmgT%9D2-0iqb6eeNUp(m`#~ZBIyHk2k6-(2ax)* zUppVUJ(+(9b^^qAJ;m2aLSLc}La!G+ZWs1@M5`JfAl{cmH^Z__%jE{@R3w@MI*k?x zdYPc@g02)aA!rZi4B84Bp&de^gSOI$kQ@-SEa-7TFQqK~U5?Ro>H}?|9iVfm4BAGw zfnGs(gDw^FRe~nz0Z2B|BcLgIP9|v>7Ak@s6f}$-;05?CAvSzTy&Y`D_+Agp1AQpC z5cCIhDQKUN{7P8@{!XPGbZ4*=bVgtm=y<3L^hJ3+Xgat_mSHgEqsL6&fvpg@j6lF`vFtm)pcDGYnbB1wC*tS+qv3!A< zF5v3TR<2~QtEk{)E!)sDlwxKs;groRB@N4A9^22dOyBE+q-B~c>((jtmfT{=7od6X z;AZAHTAtAm({jw-q7@ij%Q7h|JIq|aE?q7%DtLN=@7A3nI;1>vccom-t!v`J0dp_2 z^+BBvD2bC#!o`y)Q-WeQ%arnYF0aWFj>8HWqny^=da}Q5HDmbTBU-hof#$;k*CgM`9;083aT&w6WnXXzIj^hFO0>7h}9}ZqKVC#fP zhNzpKq-GcyEjvsO^5KK%@dOt}H!@aC7)aM1(`7aWAWWPo zMMhQw6x+hw*hGdpv7BLed05IIsIHZ@3`*p3sXFM?@!nu5jgY1gXi92kmSN@bR7hLH z%p@G&r%0;#kjQeaiFmO=18a**wl9mXtcy(2GO9Ivg^0z;*G0+cW=_`Di=vTph9t$@ zel}8Kj=MoDMl5jGn>fmd8KtCU4eQ7S)75m7*%ZsVmR)tITi5cY<+ys*sfwy|>ZK)8 z0zuZZ%<-2Y<`|m_pm0;zcEk*L{Y;pt1|XKS%SD&JeWtr$ACtGZzL2G0~v z&BGYa3Ws`5)mFLJU$2-R2YV_X z$wa1A#eVb2S;)7{_eoGMwtRo~QlPfG*5w6d>lAu3dyrSvDMUw8U8$MyH~W6(VEB~C zSoTD_>iFvH#3p2XzOh$lD6IPv+)K|K6OsSw=@6CwU!1MW{H+VLR9vr(dr)*-qGGeu{BM0y(3Ky+(lT~lNrtjf`?(H)V2 zW>s#DenyIFtq~>#BLhvU65Zd{@6ej_k_|PUEyAnUVlykWN_}(D-pB(1#981fyuf+zn z#WL58W|>&b{Pb{xBX#0%9NV%kjfH6DG&{GXI*WT@5e=JWO`IqA3CGaN;y8pe^?z33 z@9y>GuLwuAH1Y2mY86en``8_+@cN@lLJW0GGC1c`Y%4<)53^t~AGsW2d669|L z;cC@_<-(AE>o=Z620lE$EJi9>GQ9rmId}-SP+ylDa`|3tV zl($atJ&|vc)wc(J|CGSqw;Hd`7vR>7OM+F6Y}nE9&4ldj%?rKFS!82E>H@ zYjMv|0zEt63g8VYQw%x`{l&mlZS+u!OB}vk>0f-DJ83@jd1PIoYhsK>-AF%*A2G_oh9TmF?GN@h!FFC)<`FF- zQhdaD8bYrmmhhnPqt}=7+2VdwZCpK!y5U&{(ox({smT9$BF;| literal 0 HcmV?d00001 diff --git a/external/binary-reference-assemblies/src/monowasm/System.cs.REMOVED.git-id b/external/binary-reference-assemblies/src/monowasm/System.cs.REMOVED.git-id index 7692f44a4c..65e644da21 100644 --- a/external/binary-reference-assemblies/src/monowasm/System.cs.REMOVED.git-id +++ b/external/binary-reference-assemblies/src/monowasm/System.cs.REMOVED.git-id @@ -1 +1 @@ -c8312281b9f4eec2b32c0586b5c75058f1c83536 \ No newline at end of file +b5d3c5bdeec60d88a308ce86c492e8fa17d8179e \ No newline at end of file diff --git a/external/binary-reference-assemblies/src/monowasm/WebAssembly.Net.WebSockets.cs b/external/binary-reference-assemblies/src/monowasm/WebAssembly.Net.WebSockets.cs new file mode 100644 index 0000000000..14ccac3e31 --- /dev/null +++ b/external/binary-reference-assemblies/src/monowasm/WebAssembly.Net.WebSockets.cs @@ -0,0 +1,48 @@ +[assembly:System.Reflection.AssemblyVersionAttribute("0.2.2.0")] +[assembly:System.Diagnostics.DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes.Default | System.Diagnostics.DebuggableAttribute.DebuggingModes.DisableOptimizations | System.Diagnostics.DebuggableAttribute.DebuggingModes.EnableEditAndContinue | System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] +[assembly:System.Reflection.AssemblyCompanyAttribute("WebAssembly.Net.WebSockets")] +[assembly:System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly:System.Reflection.AssemblyFileVersionAttribute("0.2.2.0")] +[assembly:System.Reflection.AssemblyInformationalVersionAttribute("0.2.2")] +[assembly:System.Reflection.AssemblyProductAttribute("WebAssembly.Net.WebSockets")] +[assembly:System.Reflection.AssemblyTitleAttribute("WebAssembly.Net.WebSockets")] +[assembly:System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8)] +[assembly:System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows=true)] +[assembly:System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.0", FrameworkDisplayName="")] +namespace WebAssembly.Net.WebSockets +{ + public sealed partial class ClientWebSocket : System.Net.WebSockets.WebSocket + { + public ClientWebSocket() { } + public override System.Nullable CloseStatus { get { throw null; } } + public override string CloseStatusDescription { get { throw null; } } + public WebAssembly.Net.WebSockets.ClientWebSocket.ClientWebSocketOptions Options { get { throw null; } } + public override System.Net.WebSockets.WebSocketState State { get { throw null; } } + public override string SubProtocol { get { throw null; } } + public override void Abort() { } + [System.Diagnostics.DebuggerStepThroughAttribute] + public override System.Threading.Tasks.Task CloseAsync(System.Net.WebSockets.WebSocketCloseStatus closeStatus, string statusDescription, System.Threading.CancellationToken cancellationToken) { throw null; } + public override System.Threading.Tasks.Task CloseOutputAsync(System.Net.WebSockets.WebSocketCloseStatus closeStatus, string statusDescription, System.Threading.CancellationToken cancellationToken) { throw null; } + public System.Threading.Tasks.Task ConnectAsync(System.Uri uri, System.Threading.CancellationToken cancellationToken) { throw null; } + public override void Dispose() { } + [System.Diagnostics.DebuggerStepThroughAttribute] + public override System.Threading.Tasks.Task ReceiveAsync(System.ArraySegment buffer, System.Threading.CancellationToken cancellationToken) { throw null; } + [System.Diagnostics.DebuggerStepThroughAttribute] + public override System.Threading.Tasks.Task SendAsync(System.ArraySegment buffer, System.Net.WebSockets.WebSocketMessageType messageType, bool endOfMessage, System.Threading.CancellationToken cancellationToken) { throw null; } + public sealed partial class ClientWebSocketOptions + { + internal ClientWebSocketOptions() { } + public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get { throw null; } set { } } + public System.Net.CookieContainer Cookies { get { throw null; } set { } } + public System.Net.ICredentials Credentials { get { throw null; } set { } } + public System.TimeSpan KeepAliveInterval { get { throw null; } set { } } + public System.Net.IWebProxy Proxy { get { throw null; } set { } } + public System.Net.Security.RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get { throw null; } set { } } + public bool UseDefaultCredentials { get { throw null; } set { } } + public void AddSubProtocol(string subProtocol) { } + public void SetBuffer(int receiveBufferSize, int sendBufferSize) { } + public void SetBuffer(int receiveBufferSize, int sendBufferSize, System.ArraySegment buffer) { } + public void SetRequestHeader(string headerName, string headerValue) { } + } + } +} diff --git a/external/bockbuild/bockbuild/darwinprofile.py b/external/bockbuild/bockbuild/darwinprofile.py index 6f156802c3..026a0da7d0 100644 --- a/external/bockbuild/bockbuild/darwinprofile.py +++ b/external/bockbuild/bockbuild/darwinprofile.py @@ -28,8 +28,8 @@ def match_stageable_binary(path, filetype): return 'Mach-O' in filetype and not path.endswith('.a') and not 'dSYM' in path -def match_symlinks(path, filetype): - return os.path.islink(path) +def match_all(path, filetype): + return True def match_real_files(path, filetype): @@ -248,8 +248,13 @@ class DarwinProfile (UnixProfile): warn ('Critical: Destaging failed for ''%s''' % path) raise + def nop_harness(path, func): + trace('Processing %s' % path) + func(path, None) + procs = [self.stage_textfiles(harness=destaging_harness, match=match_text), - self.stage_binaries(harness=destaging_harness, match=match_stageable_binary)] + self.stage_binaries(harness=destaging_harness, match=match_stageable_binary), + self.validate_symlinks(harness=nop_harness, match=match_all)] Profile.postprocess(self, procs, directory, lambda l: l.endswith('.release')) @@ -278,10 +283,11 @@ class DarwinProfile (UnixProfile): class validate_symlinks (Profile.FileProcessor): problem_links = [] - def process(self, path): - if path.endswith('.release'): + def process(self, path, fixup_func): + trace(path) + if os.path.islink(path) and path.endswith('.release'): # get rid of these symlinks - os.remove(path) + os.unlink(path) return target = os.path.realpath(path) diff --git a/external/boringssl/THIRD-PARTY-NOTICES.TXT b/external/boringssl/THIRD-PARTY-NOTICES.TXT new file mode 100644 index 0000000000..069ac8f2ae --- /dev/null +++ b/external/boringssl/THIRD-PARTY-NOTICES.TXT @@ -0,0 +1,20 @@ +Mono uses third-party libraries or other resources that may be +distributed under licenses different than the .NET Core software. + + Attributions and license notices for test cases originally authored by +third parties can be found in the respective test directories. + + In the event that we accidentally failed to list a required notice, please +bring it to our attention. Post an issue or email us: + + dotnet@microsoft.com + + The attached notices are provided for information only. + + License notice for Code Project +-------------------------------- + +Title: Thread Local Storage - The C++ Way +Content: https://www.codeproject.com/Articles/8113/Thread-Local-Storage-The-C-Way +Reference: https://github.com/mono/boringssl/blob/eec2ca7e76c04ca41ef5bfc875ee3b0374cb7a94/crypto/thread_win.c#L138-L148 +License: https://www.codeproject.com/info/EULA.aspx diff --git a/external/boringssl/crypto/aes/asm/aesv8-armx.pl b/external/boringssl/crypto/aes/asm/aesv8-armx.pl index 89e6f874d0..c41175a6f8 100644 --- a/external/boringssl/crypto/aes/asm/aesv8-armx.pl +++ b/external/boringssl/crypto/aes/asm/aesv8-armx.pl @@ -51,15 +51,7 @@ $code=<<___; .text ___ $code.=<<___ if ($flavour =~ /64/); -#if !defined(__clang__) .arch armv8-a+crypto -#elif defined(ANDROID) && defined(__clang__) -#if __clang_major__ > 3 -.arch armv8-a+crypto -#else -.arch armv8-a+crypto,+neon -#endif -#endif ___ $code.=".arch armv7-a\n.fpu neon\n.code 32\n" if ($flavour !~ /64/); #^^^^^^ this is done to simplify adoption by not depending diff --git a/external/boringssl/crypto/cpu-aarch64-linux.c b/external/boringssl/crypto/cpu-aarch64-linux.c index 1b0f39552e..93d122370b 100644 --- a/external/boringssl/crypto/cpu-aarch64-linux.c +++ b/external/boringssl/crypto/cpu-aarch64-linux.c @@ -25,6 +25,48 @@ extern uint32_t OPENSSL_armcap_P; +#if defined(__FreeBSD__) + +#include +#include +#include + +// Support for older version of armreg.h +#ifndef ID_AA64ISAR0_AES_VAL +#define ID_AA64ISAR0_AES_VAL ID_AA64ISAR0_AES +#endif +#ifndef ID_AA64ISAR0_SHA1_VAL +#define ID_AA64ISAR0_SHA1_VAL ID_AA64ISAR0_SHA1 +#endif +#ifndef ID_AA64ISAR0_SHA2_VAL +#define ID_AA64ISAR0_SHA2_VAL ID_AA64ISAR0_SHA2 +#endif + +void OPENSSL_cpuid_setup(void) { + if (getenv("QEMU_EMULATING") != NULL) { + return; + } + + uint64_t isar0_val = READ_SPECIALREG(id_aa64isar0_el1); + + OPENSSL_armcap_P |= ARMV7_NEON; + + if (ID_AA64ISAR0_AES_VAL(isar0_val) >= ID_AA64ISAR0_AES_BASE) { + OPENSSL_armcap_P |= ARMV8_PMULL; + } + if (ID_AA64ISAR0_AES_VAL(isar0_val) >= ID_AA64ISAR0_AES_PMULL) { + OPENSSL_armcap_P |= ARMV8_PMULL; + } + if (ID_AA64ISAR0_SHA1_VAL(isar0_val) >= ID_AA64ISAR0_SHA1_BASE) { + OPENSSL_armcap_P |= ARMV8_SHA1; + } + if (ID_AA64ISAR0_SHA2_VAL(isar0_val) >= ID_AA64ISAR0_SHA2_BASE) { + OPENSSL_armcap_P |= ARMV8_SHA256; + } +} + +#else // linux + void OPENSSL_cpuid_setup(void) { unsigned long hwcap = getauxval(AT_HWCAP); @@ -58,4 +100,6 @@ void OPENSSL_cpuid_setup(void) { } } +#endif + #endif /* OPENSSL_AARCH64 && !OPENSSL_STATIC_ARMCAP */ diff --git a/external/boringssl/crypto/modes/asm/ghashv8-armx.pl b/external/boringssl/crypto/modes/asm/ghashv8-armx.pl index 7342140561..eabef0cb35 100644 --- a/external/boringssl/crypto/modes/asm/ghashv8-armx.pl +++ b/external/boringssl/crypto/modes/asm/ghashv8-armx.pl @@ -59,15 +59,7 @@ $code=<<___; .text ___ $code.=<<___ if ($flavour =~ /64/); -#if !defined(__clang__) .arch armv8-a+crypto -#elif defined(ANDROID) && defined(__clang__) -#if __clang_major__ > 3 -.arch armv8-a+crypto -#else -.arch armv8-a+crypto,+neon -#endif -#endif ___ $code.=".fpu neon\n.code 32\n" if ($flavour !~ /64/); diff --git a/external/cecil/.github/FUNDING.yml b/external/cecil/.github/FUNDING.yml new file mode 100644 index 0000000000..2490d79393 --- /dev/null +++ b/external/cecil/.github/FUNDING.yml @@ -0,0 +1 @@ +github: jbevain diff --git a/external/cecil/Directory.Build.props b/external/cecil/Directory.Build.props index fd9bb8ab08..8c391994ca 100644 --- a/external/cecil/Directory.Build.props +++ b/external/cecil/Directory.Build.props @@ -12,10 +12,10 @@ true - $(net40FrameworkPathOverride) - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.0-api/ - /usr/lib/mono/4.0-api/ + + + diff --git a/external/cecil/Mono.Cecil.Cil/ILProcessor.cs b/external/cecil/Mono.Cecil.Cil/ILProcessor.cs index 039d2fc3a0..a3fb8f10a9 100644 --- a/external/cecil/Mono.Cecil.Cil/ILProcessor.cs +++ b/external/cecil/Mono.Cecil.Cil/ILProcessor.cs @@ -229,6 +229,16 @@ namespace Mono.Cecil.Cil { instructions.Insert (index + 1, instruction); } + public void InsertAfter (int index, Instruction instruction) + { + if (index < 0 || index >= instructions.Count) + throw new ArgumentOutOfRangeException ("index"); + if (instruction == null) + throw new ArgumentNullException ("instruction"); + + instructions.Insert (index + 1, instruction); + } + public void Append (Instruction instruction) { if (instruction == null) @@ -248,6 +258,15 @@ namespace Mono.Cecil.Cil { Remove (target); } + public void Replace (int index, Instruction instruction) + { + if (instruction == null) + throw new ArgumentNullException ("instruction"); + + InsertAfter (index, instruction); + RemoveAt (index); + } + public void Remove (Instruction instruction) { if (instruction == null) @@ -256,5 +275,13 @@ namespace Mono.Cecil.Cil { if (!instructions.Remove (instruction)) throw new ArgumentOutOfRangeException ("instruction"); } + + public void RemoveAt (int index) + { + if (index < 0 || index >= instructions.Count) + throw new ArgumentOutOfRangeException ("index"); + + instructions.RemoveAt (index); + } } } diff --git a/external/cecil/Mono.Cecil.Cil/MethodBody.cs b/external/cecil/Mono.Cecil.Cil/MethodBody.cs index eb8baf5b93..579f7f9fda 100644 --- a/external/cecil/Mono.Cecil.Cil/MethodBody.cs +++ b/external/cecil/Mono.Cecil.Cil/MethodBody.cs @@ -92,7 +92,7 @@ namespace Mono.Cecil.Cil { var parameter_type = method.DeclaringType as TypeReference; if (parameter_type.HasGenericParameters) { - var instance = new GenericInstanceType (parameter_type); + var instance = new GenericInstanceType (parameter_type, parameter_type.GenericParameters.Count); for (int i = 0; i < parameter_type.GenericParameters.Count; i++) instance.GenericArguments.Add (parameter_type.GenericParameters [i]); diff --git a/external/cecil/Mono.Cecil.nuspec b/external/cecil/Mono.Cecil.nuspec index bd37488c37..4da731c0f1 100644 --- a/external/cecil/Mono.Cecil.nuspec +++ b/external/cecil/Mono.Cecil.nuspec @@ -2,7 +2,7 @@ Mono.Cecil - 0.11.0.0 + 0.11.1.0 Mono.Cecil Jb Evain Jb Evain diff --git a/external/cecil/Mono.Cecil/AssemblyReader.cs.REMOVED.git-id b/external/cecil/Mono.Cecil/AssemblyReader.cs.REMOVED.git-id index f85674d750..a539f5dd3b 100644 --- a/external/cecil/Mono.Cecil/AssemblyReader.cs.REMOVED.git-id +++ b/external/cecil/Mono.Cecil/AssemblyReader.cs.REMOVED.git-id @@ -1 +1 @@ -1728338c6228125c82803b552e530972592837b2 \ No newline at end of file +b64846368fef5b8e0e61dc51c6e0b8226ec59ad4 \ No newline at end of file diff --git a/external/cecil/Mono.Cecil/GenericInstanceMethod.cs b/external/cecil/Mono.Cecil/GenericInstanceMethod.cs index 00de03a3bd..e86a263d84 100644 --- a/external/cecil/Mono.Cecil/GenericInstanceMethod.cs +++ b/external/cecil/Mono.Cecil/GenericInstanceMethod.cs @@ -63,5 +63,11 @@ namespace Mono.Cecil { : base (method) { } + + internal GenericInstanceMethod (MethodReference method, int arity) + : this (method) + { + this.arguments = new Collection (arity); + } } } diff --git a/external/cecil/Mono.Cecil/GenericInstanceType.cs b/external/cecil/Mono.Cecil/GenericInstanceType.cs index 0e683e7134..8885850850 100644 --- a/external/cecil/Mono.Cecil/GenericInstanceType.cs +++ b/external/cecil/Mono.Cecil/GenericInstanceType.cs @@ -61,5 +61,11 @@ namespace Mono.Cecil { base.IsValueType = type.IsValueType; this.etype = MD.ElementType.GenericInst; } + + internal GenericInstanceType (TypeReference type, int arity) + : this (type) + { + this.arguments = new Collection (arity); + } } } diff --git a/external/cecil/Mono.Cecil/Import.cs b/external/cecil/Mono.Cecil/Import.cs index 4a6c3e0623..37cf932ae0 100644 --- a/external/cecil/Mono.Cecil/Import.cs +++ b/external/cecil/Mono.Cecil/Import.cs @@ -259,8 +259,8 @@ namespace Mono.Cecil { TypeReference ImportGenericInstance (Type type, ImportGenericContext context) { var element_type = ImportType (type.GetGenericTypeDefinition (), context, ImportGenericKind.Definition); - var instance = new GenericInstanceType (element_type); var arguments = type.GetGenericArguments (); + var instance = new GenericInstanceType (element_type, arguments.Length); var instance_arguments = instance.GenericArguments; context.Push (element_type); @@ -633,9 +633,8 @@ namespace Mono.Cecil { case ElementType.GenericInst: var instance = (GenericInstanceType) type; var element_type = ImportType (instance.ElementType, context); - var imported_instance = new GenericInstanceType (element_type); - var arguments = instance.GenericArguments; + var imported_instance = new GenericInstanceType (element_type, arguments.Count); var imported_arguments = imported_instance.GenericArguments; for (int i = 0; i < arguments.Count; i++) diff --git a/external/cecil/Mono.Cecil/TypeParser.cs b/external/cecil/Mono.Cecil/TypeParser.cs index 07854cd6ed..a4ebd6954c 100644 --- a/external/cecil/Mono.Cecil/TypeParser.cs +++ b/external/cecil/Mono.Cecil/TypeParser.cs @@ -296,7 +296,7 @@ namespace Mono.Cecil { if (generic_arguments.IsNullOrEmpty ()) return type; - var instance = new GenericInstanceType (type); + var instance = new GenericInstanceType (type, generic_arguments.Length); var instance_arguments = instance.GenericArguments; for (int i = 0; i < generic_arguments.Length; i++) diff --git a/external/cecil/Mono.Collections.Generic/Collection.cs b/external/cecil/Mono.Collections.Generic/Collection.cs index 015d271b47..86c14298de 100644 --- a/external/cecil/Mono.Collections.Generic/Collection.cs +++ b/external/cecil/Mono.Collections.Generic/Collection.cs @@ -104,7 +104,9 @@ namespace Mono.Collections.Generic { if (capacity < 0) throw new ArgumentOutOfRangeException (); - items = new T [capacity]; + items = capacity == 0 + ? Empty.Array + : new T [capacity]; } public Collection (ICollection items) diff --git a/external/cecil/ProjectInfo.cs b/external/cecil/ProjectInfo.cs index 0e24c67a68..5081544960 100644 --- a/external/cecil/ProjectInfo.cs +++ b/external/cecil/ProjectInfo.cs @@ -15,6 +15,6 @@ using System.Runtime.InteropServices; [assembly: ComVisible (false)] -[assembly: AssemblyVersion ("0.11.0.0")] -[assembly: AssemblyFileVersion ("0.11.0.0")] -[assembly: AssemblyInformationalVersion ("0.11.0.0")] +[assembly: AssemblyVersion ("0.11.1.0")] +[assembly: AssemblyFileVersion ("0.11.1.0")] +[assembly: AssemblyInformationalVersion ("0.11.1.0")] diff --git a/external/cecil/README.md b/external/cecil/README.md index 7c8707230c..3b95784aad 100644 --- a/external/cecil/README.md +++ b/external/cecil/README.md @@ -2,3 +2,4 @@ Cecil ===== This is a fork of [Cecil](https://github.com/jbevain/cecil) library. Please do any pull requests in the original repository before they are merged into Mono fork. + diff --git a/external/cecil/Test/Mono.Cecil.Tests/Extensions.cs b/external/cecil/Test/Mono.Cecil.Tests/Extensions.cs index ab27e9b028..b51e545aeb 100644 --- a/external/cecil/Test/Mono.Cecil.Tests/Extensions.cs +++ b/external/cecil/Test/Mono.Cecil.Tests/Extensions.cs @@ -42,7 +42,7 @@ namespace Mono.Cecil.Tests { if (self.GenericParameters.Count != arguments.Length) throw new ArgumentException (); - var instance = new GenericInstanceType (self); + var instance = new GenericInstanceType (self, arguments.Length); foreach (var argument in arguments) instance.GenericArguments.Add (argument); diff --git a/external/cecil/Test/Mono.Cecil.Tests/ILProcessorTests.cs b/external/cecil/Test/Mono.Cecil.Tests/ILProcessorTests.cs index 3d9d1751b2..f66d78c7f3 100644 --- a/external/cecil/Test/Mono.Cecil.Tests/ILProcessorTests.cs +++ b/external/cecil/Test/Mono.Cecil.Tests/ILProcessorTests.cs @@ -53,6 +53,30 @@ namespace Mono.Cecil.Tests { AssertOpCodeSequence (new [] { OpCodes.Ldloc_0, OpCodes.Ldloc_1, OpCodes.Ldloc_2, OpCodes.Ldloc_3 }, method); } + [Test] + public void InsertAfterUsingIndex () + { + var method = CreateTestMethod (OpCodes.Ldloc_0, OpCodes.Ldloc_2, OpCodes.Ldloc_3); + var il = method.GetILProcessor (); + + il.InsertAfter ( + 0, + il.Create (OpCodes.Ldloc_1)); + + AssertOpCodeSequence (new [] { OpCodes.Ldloc_0, OpCodes.Ldloc_1, OpCodes.Ldloc_2, OpCodes.Ldloc_3 }, method); + } + + [Test] + public void ReplaceUsingIndex () + { + var method = CreateTestMethod (OpCodes.Ldloc_0, OpCodes.Ldloc_2, OpCodes.Ldloc_3); + var il = method.GetILProcessor (); + + il.Replace (1, il.Create (OpCodes.Nop)); + + AssertOpCodeSequence (new [] { OpCodes.Ldloc_0, OpCodes.Nop, OpCodes.Ldloc_3 }, method); + } + static void AssertOpCodeSequence (OpCode [] expected, MethodBody body) { var opcodes = body.Instructions.Select (i => i.OpCode).ToArray (); diff --git a/external/cecil/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs b/external/cecil/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs index c39523641c..1e60951dd9 100644 --- a/external/cecil/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs +++ b/external/cecil/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs @@ -68,7 +68,7 @@ namespace Mono.Cecil.Rocks { if (self.GenericParameters.Count != arguments.Length) throw new ArgumentException (); - var instance = new GenericInstanceType (self); + var instance = new GenericInstanceType (self, arguments.Length); foreach (var argument in arguments) instance.GenericArguments.Add (argument); diff --git a/external/corefx/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs b/external/corefx/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs index 0cd8429bbc..52972816a0 100644 --- a/external/corefx/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs +++ b/external/corefx/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs @@ -1,34 +1,32 @@ +#if !__MonoCS__ + // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -//////////////////////////////////////////////////////////////////////////// -// -// -// Purpose: This class implements a set of methods for retrieving -// character type information. Character type information is -// independent of culture and region. -// -// -//////////////////////////////////////////////////////////////////////////// - +using System.Buffers.Binary; using System.Diagnostics; +using System.Text; +#if MONO +using System.Runtime.CompilerServices; +#else +using Internal.Runtime.CompilerServices; +#endif namespace System.Globalization { + /// + /// This class implements a set of methods for retrieving character type + /// information. Character type information is independent of culture + /// and region. + /// public static partial class CharUnicodeInfo { - //--------------------------------------------------------------------// - // Internal Information // - //--------------------------------------------------------------------// - - // - // Native methods to access the Unicode category data tables in charinfo.nlp. - // internal const char HIGH_SURROGATE_START = '\ud800'; internal const char HIGH_SURROGATE_END = '\udbff'; internal const char LOW_SURROGATE_START = '\udc00'; internal const char LOW_SURROGATE_END = '\udfff'; + internal const int HIGH_SURROGATE_RANGE = 0x3FF; internal const int UNICODE_CATEGORY_OFFSET = 0; internal const int BIDI_CATEGORY_OFFSET = 1; @@ -36,61 +34,63 @@ namespace System.Globalization // The starting codepoint for Unicode plane 1. Plane 1 contains 0x010000 ~ 0x01ffff. internal const int UNICODE_PLANE01_START = 0x10000; - - //////////////////////////////////////////////////////////////////////// - // - // Actions: - // Convert the BMP character or surrogate pointed by index to a UTF32 value. - // This is similar to Char.ConvertToUTF32, but the difference is that - // it does not throw exceptions when invalid surrogate characters are passed in. - // - // WARNING: since it doesn't throw an exception it CAN return a value - // in the surrogate range D800-DFFF, which are not legal unicode values. - // - //////////////////////////////////////////////////////////////////////// - - internal static int InternalConvertToUtf32(String s, int index) + /// + /// Convert the BMP character or surrogate pointed by index to a UTF32 value. + /// This is similar to char.ConvertToUTF32, but the difference is that + /// it does not throw exceptions when invalid surrogate characters are passed in. + /// + /// WARNING: since it doesn't throw an exception it CAN return a value + /// in the surrogate range D800-DFFF, which are not legal unicode values. + /// + internal static int InternalConvertToUtf32(string s, int index) { Debug.Assert(s != null, "s != null"); Debug.Assert(index >= 0 && index < s.Length, "index < s.Length"); if (index < s.Length - 1) { int temp1 = (int)s[index] - HIGH_SURROGATE_START; - if (temp1 >= 0 && temp1 <= 0x3ff) + if ((uint)temp1 <= HIGH_SURROGATE_RANGE) { int temp2 = (int)s[index + 1] - LOW_SURROGATE_START; - if (temp2 >= 0 && temp2 <= 0x3ff) + if ((uint)temp2 <= HIGH_SURROGATE_RANGE) { // Convert the surrogate to UTF32 and get the result. - return ((temp1 * 0x400) + temp2 + UNICODE_PLANE01_START); + return (temp1 * 0x400) + temp2 + UNICODE_PLANE01_START; } } } - return ((int)s[index]); + return (int)s[index]; } - //////////////////////////////////////////////////////////////////////// - // - // Convert a character or a surrogate pair starting at index of string s - // to UTF32 value. - // - // Parameters: - // s The string - // index The starting index. It can point to a BMP character or - // a surrogate pair. - // len The length of the string. - // charLength [out] If the index points to a BMP char, charLength - // will be 1. If the index points to a surrogate pair, - // charLength will be 2. - // - // WARNING: since it doesn't throw an exception it CAN return a value - // in the surrogate range D800-DFFF, which are not legal unicode values. - // - // Returns: - // The UTF32 value - // - //////////////////////////////////////////////////////////////////////// - internal static int InternalConvertToUtf32(String s, int index, out int charLength) + internal static int InternalConvertToUtf32(StringBuilder s, int index) + { + Debug.Assert(s != null, "s != null"); + Debug.Assert(index >= 0 && index < s.Length, "index < s.Length"); + + int c = (int)s[index]; + if (index < s.Length - 1) + { + int temp1 = c - HIGH_SURROGATE_START; + if ((uint)temp1 <= HIGH_SURROGATE_RANGE) + { + int temp2 = (int)s[index + 1] - LOW_SURROGATE_START; + if ((uint)temp2 <= HIGH_SURROGATE_RANGE) + { + // Convert the surrogate to UTF32 and get the result. + return (temp1 * 0x400) + temp2 + UNICODE_PLANE01_START; + } + } + } + return c; + } + + /// + /// Convert a character or a surrogate pair starting at index of string s + /// to UTF32 value. + /// WARNING: since it doesn't throw an exception it CAN return a value + /// in the surrogate range D800-DFFF, which are not legal unicode values. + /// + internal static int InternalConvertToUtf32(string s, int index, out int charLength) { Debug.Assert(s != null, "s != null"); Debug.Assert(s.Length > 0, "s.Length > 0"); @@ -99,28 +99,232 @@ namespace System.Globalization if (index < s.Length - 1) { int temp1 = (int)s[index] - HIGH_SURROGATE_START; - if (temp1 >= 0 && temp1 <= 0x3ff) + if ((uint)temp1 <= HIGH_SURROGATE_RANGE) { int temp2 = (int)s[index + 1] - LOW_SURROGATE_START; - if (temp2 >= 0 && temp2 <= 0x3ff) + if ((uint)temp2 <= HIGH_SURROGATE_RANGE) { // Convert the surrogate to UTF32 and get the result. charLength++; - return ((temp1 * 0x400) + temp2 + UNICODE_PLANE01_START); + return (temp1 * 0x400) + temp2 + UNICODE_PLANE01_START; } } } - return ((int)s[index]); + return (int)s[index]; } - //////////////////////////////////////////////////////////////////////// - // - // IsWhiteSpace - // - // Determines if the given character is a white space character. - // - //////////////////////////////////////////////////////////////////////// + /// + /// This is called by the public char and string, index versions + /// Note that for ch in the range D800-DFFF we just treat it as any + /// other non-numeric character + /// + internal static double InternalGetNumericValue(int ch) + { + Debug.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid Unicode range."); + // Get the level 2 item from the highest 12 bit (8 - 19) of ch. + int index = ch >> 8; + if ((uint)index < (uint)NumericLevel1Index.Length) + { + index = NumericLevel1Index[index]; + // Get the level 2 offset from the 4 - 7 bit of ch. This provides the base offset of the level 3 table. + // Note that & has the lower precedence than addition, so don't forget the parathesis. + index = NumericLevel2Index[(index << 4) + ((ch >> 4) & 0x000f)]; + index = NumericLevel3Index[(index << 4) + (ch & 0x000f)]; + ref byte value = ref Unsafe.AsRef(in NumericValues[index * 8]); + if (BitConverter.IsLittleEndian) + { + return Unsafe.ReadUnaligned(ref value); + } + + return BitConverter.Int64BitsToDouble(BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned(ref value))); + } + return -1; + } + + internal static byte InternalGetDigitValues(int ch, int offset) + { + Debug.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid Unicode range."); + // Get the level 2 item from the highest 12 bit (8 - 19) of ch. + int index = ch >> 8; + if ((uint)index < (uint)NumericLevel1Index.Length) + { + index = NumericLevel1Index[index]; + // Get the level 2 offset from the 4 - 7 bit of ch. This provides the base offset of the level 3 table. + // Note that & has the lower precedence than addition, so don't forget the parathesis. + index = NumericLevel2Index[(index << 4) + ((ch >> 4) & 0x000f)]; + index = NumericLevel3Index[(index << 4) + (ch & 0x000f)]; + return DigitValues[index * 2 + offset]; + } + return 0xff; + } + + /// + /// Returns the numeric value associated with the character c. + /// If the character is a fraction, the return value will not be an + /// integer. If the character does not have a numeric value, the return + /// value is -1. + /// + public static double GetNumericValue(char ch) + { + return InternalGetNumericValue(ch); + } + + public static double GetNumericValue(string s, int index) + { + if (s == null) + { + throw new ArgumentNullException(nameof(s)); + } + if (index < 0 || index >= s.Length) + { + throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index); + } + + return InternalGetNumericValue(InternalConvertToUtf32(s, index)); + } + + public static int GetDecimalDigitValue(char ch) + { + return (sbyte)InternalGetDigitValues(ch, 0); + } + + public static int GetDecimalDigitValue(string s, int index) + { + if (s == null) + { + throw new ArgumentNullException(nameof(s)); + } + if (index < 0 || index >= s.Length) + { + throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index); + } + + return (sbyte)InternalGetDigitValues(InternalConvertToUtf32(s, index), 0); + } + + public static int GetDigitValue(char ch) + { + return (sbyte)InternalGetDigitValues(ch, 1); + } + + public static int GetDigitValue(string s, int index) + { + if (s == null) + { + throw new ArgumentNullException(nameof(s)); + } + if (index < 0 || index >= s.Length) + { + throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index); + } + + return (sbyte)InternalGetDigitValues(InternalConvertToUtf32(s, index), 1); + } + + public static UnicodeCategory GetUnicodeCategory(char ch) + { + return GetUnicodeCategory((int)ch); + } + + public static UnicodeCategory GetUnicodeCategory(string s, int index) + { + if (s == null) + { + throw new ArgumentNullException(nameof(s)); + } + if (((uint)index) >= ((uint)s.Length)) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + + return InternalGetUnicodeCategory(s, index); + } + + public static UnicodeCategory GetUnicodeCategory(int codePoint) + { + return (UnicodeCategory)InternalGetCategoryValue(codePoint, UNICODE_CATEGORY_OFFSET); + } + + /// + /// Returns the Unicode Category property for the character c. + /// Note that this API will return values for D800-DF00 surrogate halves. + /// + internal static byte InternalGetCategoryValue(int ch, int offset) + { + Debug.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid Unicode range."); + // Get the level 2 item from the highest 11 bits of ch. + int index = CategoryLevel1Index[ch >> 9]; + // Get the level 2 WORD offset from the next 5 bits of ch. This provides the base offset of the level 3 table. + // Note that & has the lower precedence than addition, so don't forget the parathesis. + index = Unsafe.ReadUnaligned(ref Unsafe.AsRef(in CategoryLevel2Index[(index << 6) + ((ch >> 3) & 0b111110)])); + if (!BitConverter.IsLittleEndian) + { + index = BinaryPrimitives.ReverseEndianness((ushort)index); + } + + // Get the result from the 0 -3 bit of ch. + index = CategoryLevel3Index[(index << 4) + (ch & 0x000f)]; + return CategoriesValue[index * 2 + offset]; + } + + /// + /// Returns the Unicode Category property for the character c. + /// + internal static UnicodeCategory InternalGetUnicodeCategory(string value, int index) + { + Debug.Assert(value != null, "value can not be null"); + Debug.Assert(index < value.Length, "index < value.Length"); + + return GetUnicodeCategory(InternalConvertToUtf32(value, index)); + } + + internal static BidiCategory GetBidiCategory(string s, int index) + { + if (s == null) + { + throw new ArgumentNullException(nameof(s)); + } + if (((uint)index) >= ((uint)s.Length)) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + + return (BidiCategory)InternalGetCategoryValue(InternalConvertToUtf32(s, index), BIDI_CATEGORY_OFFSET); + } + + internal static BidiCategory GetBidiCategory(StringBuilder s, int index) + { + Debug.Assert(s != null, "s can not be null"); + Debug.Assert(index >= 0 && index < s.Length, "invalid index"); + + return (BidiCategory)InternalGetCategoryValue(InternalConvertToUtf32(s, index), BIDI_CATEGORY_OFFSET); + } + + /// + /// Get the Unicode category of the character starting at index. If the character is in BMP, charLength will return 1. + /// If the character is a valid surrogate pair, charLength will return 2. + /// + internal static UnicodeCategory InternalGetUnicodeCategory(string str, int index, out int charLength) + { + Debug.Assert(str != null, "str can not be null"); + Debug.Assert(str.Length > 0, "str.Length > 0"); + Debug.Assert(index >= 0 && index < str.Length, "index >= 0 && index < str.Length"); + + return GetUnicodeCategory(InternalConvertToUtf32(str, index, out charLength)); + } + + internal static bool IsCombiningCategory(UnicodeCategory uc) + { + Debug.Assert(uc >= 0, "uc >= 0"); + return + uc == UnicodeCategory.NonSpacingMark || + uc == UnicodeCategory.SpacingCombiningMark || + uc == UnicodeCategory.EnclosingMark + ; + } + +#if MONO internal static bool IsWhiteSpace(String s, int index) { Debug.Assert(s != null, "s!=null"); @@ -155,243 +359,7 @@ namespace System.Globalization return (false); } - - - // - // This is called by the public char and string, index versions - // - // Note that for ch in the range D800-DFFF we just treat it as any other non-numeric character - // - internal static unsafe double InternalGetNumericValue(int ch) - { - Debug.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid Unicode range."); - // Get the level 2 item from the highest 12 bit (8 - 19) of ch. - ushort index = s_pNumericLevel1Index[ch >> 8]; - // Get the level 2 WORD offset from the 4 - 7 bit of ch. This provides the base offset of the level 3 table. - // The offset is referred to an float item in m_pNumericFloatData. - // Note that & has the lower precedence than addition, so don't forget the parathesis. - index = s_pNumericLevel1Index[index + ((ch >> 4) & 0x000f)]; - - fixed (ushort* pUshortPtr = &(s_pNumericLevel1Index[index])) - { - byte* pBytePtr = (byte*)pUshortPtr; - fixed (byte* pByteNum = s_pNumericValues) - { - double* pDouble = (double*)pByteNum; - return pDouble[pBytePtr[(ch & 0x000f)]]; - } - } - } - - internal static unsafe ushort InternalGetDigitValues(int ch) - { - Debug.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid Unicode range."); - // Get the level 2 item from the highest 12 bit (8 - 19) of ch. - ushort index = s_pNumericLevel1Index[ch >> 8]; - // Get the level 2 WORD offset from the 4 - 7 bit of ch. This provides the base offset of the level 3 table. - // Note that & has the lower precedence than addition, so don't forget the parathesis. - index = s_pNumericLevel1Index[index + ((ch >> 4) & 0x000f)]; - - fixed (ushort* pUshortPtr = &(s_pNumericLevel1Index[index])) - { - byte* pBytePtr = (byte*)pUshortPtr; - return s_pDigitValues[pBytePtr[(ch & 0x000f)]]; - } - } - - //////////////////////////////////////////////////////////////////////// - // - //Returns the numeric value associated with the character c. If the character is a fraction, - // the return value will not be an integer. If the character does not have a numeric value, the return value is -1. - // - //Returns: - // the numeric value for the specified Unicode character. If the character does not have a numeric value, the return value is -1. - //Arguments: - // ch a Unicode character - //Exceptions: - // ArgumentNullException - // ArgumentOutOfRangeException - // - //////////////////////////////////////////////////////////////////////// - - - public static double GetNumericValue(char ch) - { - return (InternalGetNumericValue(ch)); - } - - - public static double GetNumericValue(String s, int index) - { - if (s == null) - { - throw new ArgumentNullException(nameof(s)); - } - if (index < 0 || index >= s.Length) - { - throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index); - } - return (InternalGetNumericValue(InternalConvertToUtf32(s, index))); - } - - public static int GetDecimalDigitValue(char ch) - { - return (sbyte)(InternalGetDigitValues(ch) >> 8); - } - - public static int GetDecimalDigitValue(String s, int index) - { - if (s == null) - { - throw new ArgumentNullException(nameof(s)); - } - - if (index < 0 || index >= s.Length) - { - throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index); - } - - return (sbyte)(InternalGetDigitValues(InternalConvertToUtf32(s, index)) >> 8); - } - - public static int GetDigitValue(char ch) - { - return (sbyte)(InternalGetDigitValues(ch) & 0x00FF); - } - - public static int GetDigitValue(String s, int index) - { - if (s == null) - { - throw new ArgumentNullException(nameof(s)); - } - - if (index < 0 || index >= s.Length) - { - throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index); - } - - return (sbyte)(InternalGetDigitValues(InternalConvertToUtf32(s, index)) & 0x00FF); - } - - public static UnicodeCategory GetUnicodeCategory(char ch) - { - return (GetUnicodeCategory((int)ch)); - } - - public static UnicodeCategory GetUnicodeCategory(String s, int index) - { - if (s == null) - throw new ArgumentNullException(nameof(s)); - if (((uint)index) >= ((uint)s.Length)) - { - throw new ArgumentOutOfRangeException(nameof(index)); - } - return InternalGetUnicodeCategory(s, index); - } - - public static UnicodeCategory GetUnicodeCategory(int codePoint) - { - return ((UnicodeCategory)InternalGetCategoryValue(codePoint, UNICODE_CATEGORY_OFFSET)); - } - - - //////////////////////////////////////////////////////////////////////// - // - //Action: Returns the Unicode Category property for the character c. - //Returns: - // an value in UnicodeCategory enum - //Arguments: - // ch a Unicode character - //Exceptions: - // None - // - //Note that this API will return values for D800-DF00 surrogate halves. - // - //////////////////////////////////////////////////////////////////////// - - internal static unsafe byte InternalGetCategoryValue(int ch, int offset) - { - Debug.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid Unicode range."); - // Get the level 2 item from the highest 12 bit (8 - 19) of ch. - ushort index = s_pCategoryLevel1Index[ch >> 8]; - // Get the level 2 WORD offset from the 4 - 7 bit of ch. This provides the base offset of the level 3 table. - // Note that & has the lower precedence than addition, so don't forget the parathesis. - index = s_pCategoryLevel1Index[index + ((ch >> 4) & 0x000f)]; - - fixed (ushort* pUshortPtr = &(s_pCategoryLevel1Index[index])) - { - byte* pBytePtr = (byte*)pUshortPtr; - // Get the result from the 0 -3 bit of ch. - byte valueIndex = pBytePtr[(ch & 0x000f)]; - byte uc = s_pCategoriesValue[valueIndex * 2 + offset]; - // - // Make sure that OtherNotAssigned is the last category in UnicodeCategory. - // If that changes, change the following assertion as well. - // - //Debug.Assert(uc >= 0 && uc <= UnicodeCategory.OtherNotAssigned, "Table returns incorrect Unicode category"); - return (uc); - } - } - - //////////////////////////////////////////////////////////////////////// - // - //Action: Returns the Unicode Category property for the character c. - //Returns: - // an value in UnicodeCategory enum - //Arguments: - // value a Unicode String - // index Index for the specified string. - //Exceptions: - // None - // - //////////////////////////////////////////////////////////////////////// - - internal static UnicodeCategory InternalGetUnicodeCategory(String value, int index) - { - Debug.Assert(value != null, "value can not be null"); - Debug.Assert(index < value.Length, "index < value.Length"); - - return (GetUnicodeCategory(InternalConvertToUtf32(value, index))); - } - - internal static BidiCategory GetBidiCategory(String s, int index) - { - if (s == null) - throw new ArgumentNullException(nameof(s)); - - if (((uint)index) >= ((uint)s.Length)) - { - throw new ArgumentOutOfRangeException(nameof(index)); - } - - return ((BidiCategory) InternalGetCategoryValue(InternalConvertToUtf32(s, index), BIDI_CATEGORY_OFFSET)); - } - - //////////////////////////////////////////////////////////////////////// - // - // Get the Unicode category of the character starting at index. If the character is in BMP, charLength will return 1. - // If the character is a valid surrogate pair, charLength will return 2. - // - //////////////////////////////////////////////////////////////////////// - - internal static UnicodeCategory InternalGetUnicodeCategory(String str, int index, out int charLength) - { - Debug.Assert(str != null, "str can not be null"); - Debug.Assert(str.Length > 0, "str.Length > 0"); ; - Debug.Assert(index >= 0 && index < str.Length, "index >= 0 && index < str.Length"); - - return (GetUnicodeCategory(InternalConvertToUtf32(str, index, out charLength))); - } - - internal static bool IsCombiningCategory(UnicodeCategory uc) - { - Debug.Assert(uc >= 0, "uc >= 0"); - return ( - uc == UnicodeCategory.NonSpacingMark || - uc == UnicodeCategory.SpacingCombiningMark || - uc == UnicodeCategory.EnclosingMark - ); - } +#endif } } +#endif \ No newline at end of file diff --git a/external/corefx/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs.REMOVED.git-id b/external/corefx/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs.REMOVED.git-id new file mode 100644 index 0000000000..e3a4258ee4 --- /dev/null +++ b/external/corefx/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs.REMOVED.git-id @@ -0,0 +1 @@ +4c73d086958f94da084c33cd2530c0a2a819e361 \ No newline at end of file diff --git a/external/corefx/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs b/external/corefx/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs index e43abcee3a..02af604f39 100644 --- a/external/corefx/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs +++ b/external/corefx/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs @@ -78,10 +78,6 @@ namespace System.Globalization [OptionalField(VersionAdded = 3)] private SortVersion m_SortVersion; // Do not rename (binary serialization) - // _invariantMode is defined for the perf reason as accessing the instance field is faster than access the static property GlobalizationMode.Invariant - [NonSerialized] - private readonly bool _invariantMode = GlobalizationMode.Invariant; - private int culture; // Do not rename (binary serialization). The fields sole purpose is to support Desktop serialization. internal CompareInfo(CultureInfo culture) @@ -340,7 +336,7 @@ namespace System.Globalization return (1); // non-null > null } - if (_invariantMode) + if (GlobalizationMode.Invariant) { if ((options & CompareOptions.IgnoreCase) != 0) return CompareOrdinalIgnoreCase(string1, string2); @@ -387,7 +383,7 @@ namespace System.Globalization return 1; } - if (_invariantMode) + if (GlobalizationMode.Invariant) { return (options & CompareOptions.IgnoreCase) != 0 ? CompareOrdinalIgnoreCase(string1, string2.AsSpan()) : @@ -403,7 +399,7 @@ namespace System.Globalization if (string1.Length == 0 || string2.Length == 0) return string1.Length - string2.Length; - return _invariantMode ? + return GlobalizationMode.Invariant ? string.CompareOrdinal(string1, string2) : CompareString(string1, string2, CompareOptions.None); } @@ -414,7 +410,7 @@ namespace System.Globalization if (string1.Length == 0 || string2.Length == 0) return string1.Length - string2.Length; - return _invariantMode ? + return GlobalizationMode.Invariant ? CompareOrdinalIgnoreCase(string1, string2) : CompareString(string1, string2, CompareOptions.IgnoreCase); } @@ -515,7 +511,7 @@ namespace System.Globalization return string.CompareOrdinal(span1, span2); } - if (_invariantMode) + if (GlobalizationMode.Invariant) { if ((options & CompareOptions.IgnoreCase) != 0) return CompareOrdinalIgnoreCase(span1, span2); @@ -633,7 +629,7 @@ namespace System.Globalization throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options)); } - if (_invariantMode) + if (GlobalizationMode.Invariant) { return source.StartsWith(prefix, (options & CompareOptions.IgnoreCase) != 0 ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal); } @@ -646,7 +642,7 @@ namespace System.Globalization Debug.Assert(prefix.Length != 0); Debug.Assert(source.Length != 0); Debug.Assert((options & ValidIndexMaskOffFlags) == 0); - Debug.Assert(!_invariantMode); + Debug.Assert(!GlobalizationMode.Invariant); Debug.Assert((options & (CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) == 0); return StartsWith(source, prefix, options); @@ -698,7 +694,7 @@ namespace System.Globalization throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options)); } - if (_invariantMode) + if (GlobalizationMode.Invariant) { return source.EndsWith(suffix, (options & CompareOptions.IgnoreCase) != 0 ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal); } @@ -711,7 +707,7 @@ namespace System.Globalization Debug.Assert(suffix.Length != 0); Debug.Assert(source.Length != 0); Debug.Assert((options & ValidIndexMaskOffFlags) == 0); - Debug.Assert(!_invariantMode); + Debug.Assert(!GlobalizationMode.Invariant); Debug.Assert((options & (CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) == 0); return EndsWith(source, suffix, options); @@ -844,7 +840,7 @@ namespace System.Globalization if ((options & ValidIndexMaskOffFlags) != 0 && (options != CompareOptions.Ordinal)) throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options)); - if (_invariantMode) + if (GlobalizationMode.Invariant) return IndexOfOrdinal(source, new string(value, 1), startIndex, count, ignoreCase: (options & (CompareOptions.IgnoreCase | CompareOptions.OrdinalIgnoreCase)) != 0); return IndexOfCore(source, new string(value, 1), startIndex, count, options, null); @@ -892,7 +888,7 @@ namespace System.Globalization if ((options & ValidIndexMaskOffFlags) != 0 && (options != CompareOptions.Ordinal)) throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options)); - if (_invariantMode) + if (GlobalizationMode.Invariant) return IndexOfOrdinal(source, value, startIndex, count, ignoreCase: (options & (CompareOptions.IgnoreCase | CompareOptions.OrdinalIgnoreCase)) != 0); return IndexOfCore(source, value, startIndex, count, options, null); @@ -900,7 +896,7 @@ namespace System.Globalization internal int IndexOfOrdinal(ReadOnlySpan source, ReadOnlySpan value, bool ignoreCase) { - Debug.Assert(!_invariantMode); + Debug.Assert(!GlobalizationMode.Invariant); Debug.Assert(!source.IsEmpty); Debug.Assert(!value.IsEmpty); return IndexOfOrdinalCore(source, value, ignoreCase); @@ -908,7 +904,7 @@ namespace System.Globalization internal unsafe int IndexOf(ReadOnlySpan source, ReadOnlySpan value, CompareOptions options) { - Debug.Assert(!_invariantMode); + Debug.Assert(!GlobalizationMode.Invariant); Debug.Assert(!source.IsEmpty); Debug.Assert(!value.IsEmpty); return IndexOfCore(source, value, options, null); @@ -948,7 +944,7 @@ namespace System.Globalization return res; } - if (_invariantMode) + if (GlobalizationMode.Invariant) { int res = IndexOfOrdinal(source, value, startIndex, count, ignoreCase: (options & (CompareOptions.IgnoreCase | CompareOptions.OrdinalIgnoreCase)) != 0); if (res >= 0) @@ -963,7 +959,7 @@ namespace System.Globalization internal int IndexOfOrdinal(string source, string value, int startIndex, int count, bool ignoreCase) { - if (_invariantMode) + if (GlobalizationMode.Invariant) { return InvariantIndexOf(source, value, startIndex, count, ignoreCase); } @@ -1098,7 +1094,7 @@ namespace System.Globalization return source.LastIndexOf(value.ToString(), startIndex, count, StringComparison.OrdinalIgnoreCase); } - if (_invariantMode) + if (GlobalizationMode.Invariant) return InvariantLastIndexOf(source, new string(value, 1), startIndex, count, (options & (CompareOptions.IgnoreCase | CompareOptions.OrdinalIgnoreCase)) != 0); return LastIndexOfCore(source, value.ToString(), startIndex, count, options); @@ -1149,7 +1145,7 @@ namespace System.Globalization return LastIndexOfOrdinal(source, value, startIndex, count, ignoreCase: true); } - if (_invariantMode) + if (GlobalizationMode.Invariant) return InvariantLastIndexOf(source, value, startIndex, count, (options & (CompareOptions.IgnoreCase | CompareOptions.OrdinalIgnoreCase)) != 0); return LastIndexOfCore(source, value, startIndex, count, options); @@ -1157,7 +1153,7 @@ namespace System.Globalization internal int LastIndexOfOrdinal(string source, string value, int startIndex, int count, bool ignoreCase) { - if (_invariantMode) + if (GlobalizationMode.Invariant) { return InvariantLastIndexOf(source, value, startIndex, count, ignoreCase); } @@ -1174,7 +1170,7 @@ namespace System.Globalization //////////////////////////////////////////////////////////////////////// public virtual SortKey GetSortKey(string source, CompareOptions options) { - if (_invariantMode) + if (GlobalizationMode.Invariant) return InvariantCreateSortKey(source, options); return CreateSortKey(source, options); @@ -1183,7 +1179,7 @@ namespace System.Globalization public virtual SortKey GetSortKey(string source) { - if (_invariantMode) + if (GlobalizationMode.Invariant) return InvariantCreateSortKey(source, CompareOptions.None); return CreateSortKey(source, CompareOptions.None); @@ -1297,7 +1293,7 @@ namespace System.Globalization throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options)); } - if (_invariantMode) + if (GlobalizationMode.Invariant) { return ((options & CompareOptions.IgnoreCase) != 0) ? GetIgnoreCaseHash(source) : source.GetHashCode(); } @@ -1349,7 +1345,7 @@ namespace System.Globalization { if (m_SortVersion == null) { - if (_invariantMode) + if (GlobalizationMode.Invariant) { m_SortVersion = new SortVersion(0, CultureInfo.LOCALE_INVARIANT, new Guid(0, 0, 0, 0, 0, 0, 0, (byte) (CultureInfo.LOCALE_INVARIANT >> 24), diff --git a/external/corefx/src/Common/src/System/Globalization/FormatProvider.Number.cs b/external/corefx/src/Common/src/System/Globalization/FormatProvider.Number.cs index cda92cfcdd..bdf79c6366 100644 --- a/external/corefx/src/Common/src/System/Globalization/FormatProvider.Number.cs +++ b/external/corefx/src/Common/src/System/Globalization/FormatProvider.Number.cs @@ -297,17 +297,17 @@ namespace System.Globalization return (((ch) == 0x20) || ((ch) >= 0x09 && (ch) <= 0x0D)); } - private static unsafe char* MatchChars(char* p, string str) + private static unsafe char* MatchChars(char* p, char* pEnd, string str) { fixed (char* stringPointer = str) { - return MatchChars(p, stringPointer); + return MatchChars(p, pEnd, stringPointer); } } - private static unsafe char* MatchChars(char* p, char* str) + private static unsafe char* MatchChars(char* p, char* pEnd, char* str) { - Debug.Assert(p != null && str != null); + Debug.Assert(p != null && pEnd != null && p <= pEnd && str != null); if (*str == '\0') { @@ -317,8 +317,13 @@ namespace System.Globalization // We only hurt the failure case // This fix is for French or Kazakh cultures. Since a user cannot type 0xA0 as a // space character we use 0x20 space character instead to mean the same. - while (*p == *str || (*str == '\u00a0' && *p == '\u0020')) + while (true) { + char cp = p < pEnd ? *p : '\0'; + if (cp != *str && !(*str == '\u00a0' && cp == '\u0020')) + { + break; + } p++; str++; if (*str == '\0') return p; @@ -326,8 +331,12 @@ namespace System.Globalization return null; } - private static unsafe bool ParseNumber(ref char* str, NumberStyles options, ref NumberBuffer number, StringBuilder sb, NumberFormatInfo numfmt, bool parseDecimal) + private static unsafe bool ParseNumber(ref char* str, char* strEnd, NumberStyles options, ref NumberBuffer number, StringBuilder sb, NumberFormatInfo numfmt, bool parseDecimal) { + Debug.Assert(str != null); + Debug.Assert(strEnd != null); + Debug.Assert(str <= strEnd); + const int StateSign = 0x0001; const int StateParens = 0x0002; const int StateDigits = 0x0004; @@ -362,7 +371,7 @@ namespace System.Globalization int maxParseDigits = bigNumber ? int.MaxValue : NumberMaxDigits; char* p = str; - char ch = *p; + char ch = p < strEnd ? *p : '\0'; char* next; char* dig = number.digits; @@ -373,7 +382,7 @@ namespace System.Globalization // "-Kr 1231.47" is legal but "- 1231.47" is not. if (!IsWhite(ch) || (options & NumberStyles.AllowLeadingWhite) == 0 || ((state & StateSign) != 0 && ((state & StateCurrency) == 0 && numfmt.NumberNegativePattern != 2))) { - if ((((options & NumberStyles.AllowLeadingSign) != 0) && (state & StateSign) == 0) && ((next = MatchChars(p, numfmt.PositiveSign)) != null || ((next = MatchChars(p, numfmt.NegativeSign)) != null && (number.sign = true)))) + if ((((options & NumberStyles.AllowLeadingSign) != 0) && (state & StateSign) == 0) && ((next = MatchChars(p, strEnd, numfmt.PositiveSign)) != null || ((next = MatchChars(p, strEnd, numfmt.NegativeSign)) != null && (number.sign = true)))) { state |= StateSign; p = next - 1; @@ -383,7 +392,7 @@ namespace System.Globalization state |= StateSign | StateParens; number.sign = true; } - else if (currSymbol != null && (next = MatchChars(p, currSymbol)) != null) + else if (currSymbol != null && (next = MatchChars(p, strEnd, currSymbol)) != null) { state |= StateCurrency; currSymbol = null; @@ -397,7 +406,7 @@ namespace System.Globalization break; } } - ch = *++p; + ch = ++p < strEnd ? *p : '\0'; } int digCount = 0; @@ -437,12 +446,12 @@ namespace System.Globalization number.scale--; } } - else if (((options & NumberStyles.AllowDecimalPoint) != 0) && ((state & StateDecimal) == 0) && ((next = MatchChars(p, decSep)) != null || ((parsingCurrency) && (state & StateCurrency) == 0) && (next = MatchChars(p, numfmt.NumberDecimalSeparator)) != null)) + else if (((options & NumberStyles.AllowDecimalPoint) != 0) && ((state & StateDecimal) == 0) && ((next = MatchChars(p, strEnd, decSep)) != null || ((parsingCurrency) && (state & StateCurrency) == 0) && (next = MatchChars(p, strEnd, numfmt.NumberDecimalSeparator)) != null)) { state |= StateDecimal; p = next - 1; } - else if (((options & NumberStyles.AllowThousands) != 0) && ((state & StateDigits) != 0) && ((state & StateDecimal) == 0) && ((next = MatchChars(p, groupSep)) != null || ((parsingCurrency) && (state & StateCurrency) == 0) && (next = MatchChars(p, numfmt.NumberGroupSeparator)) != null)) + else if (((options & NumberStyles.AllowThousands) != 0) && ((state & StateDigits) != 0) && ((state & StateDecimal) == 0) && ((next = MatchChars(p, strEnd, groupSep)) != null || ((parsingCurrency) && (state & StateCurrency) == 0) && (next = MatchChars(p, strEnd, numfmt.NumberGroupSeparator)) != null)) { p = next - 1; } @@ -450,7 +459,7 @@ namespace System.Globalization { break; } - ch = *++p; + ch = ++p < strEnd ? *p : '\0'; } bool negExp = false; @@ -464,14 +473,14 @@ namespace System.Globalization if ((ch == 'E' || ch == 'e') && ((options & NumberStyles.AllowExponent) != 0)) { char* temp = p; - ch = *++p; - if ((next = MatchChars(p, numfmt.PositiveSign)) != null) + ch = ++p < strEnd ? *p : '\0'; + if ((next = MatchChars(p, strEnd, numfmt.PositiveSign)) != null) { - ch = *(p = next); + ch = (p = next) < strEnd ? *p : '\0'; } - else if ((next = MatchChars(p, numfmt.NegativeSign)) != null) + else if ((next = MatchChars(p, strEnd, numfmt.NegativeSign)) != null) { - ch = *(p = next); + ch = (p = next) < strEnd ? *p : '\0'; negExp = true; } if (ch >= '0' && ch <= '9') @@ -480,13 +489,13 @@ namespace System.Globalization do { exp = exp * 10 + (ch - '0'); - ch = *++p; + ch = ++p < strEnd ? *p : '\0'; if (exp > 1000) { exp = 9999; while (ch >= '0' && ch <= '9') { - ch = *++p; + ch = ++p < strEnd ? *p : '\0'; } } } while (ch >= '0' && ch <= '9'); @@ -499,14 +508,14 @@ namespace System.Globalization else { p = temp; - ch = *p; + ch = p < strEnd ? *p : '\0'; } } while (true) { if (!IsWhite(ch) || (options & NumberStyles.AllowTrailingWhite) == 0) { - if (((options & NumberStyles.AllowTrailingSign) != 0 && ((state & StateSign) == 0)) && ((next = MatchChars(p, numfmt.PositiveSign)) != null || (((next = MatchChars(p, numfmt.NegativeSign)) != null) && (number.sign = true)))) + if (((options & NumberStyles.AllowTrailingSign) != 0 && ((state & StateSign) == 0)) && ((next = MatchChars(p, strEnd, numfmt.PositiveSign)) != null || (((next = MatchChars(p, strEnd, numfmt.NegativeSign)) != null) && (number.sign = true)))) { state |= StateSign; p = next - 1; @@ -515,7 +524,7 @@ namespace System.Globalization { state &= ~StateParens; } - else if (currSymbol != null && (next = MatchChars(p, currSymbol)) != null) + else if (currSymbol != null && (next = MatchChars(p, strEnd, currSymbol)) != null) { currSymbol = null; p = next - 1; @@ -525,7 +534,7 @@ namespace System.Globalization break; } } - ch = *++p; + ch = ++p < strEnd ? *p : '\0'; } if ((state & StateParens) == 0) { @@ -568,7 +577,7 @@ namespace System.Globalization fixed (char* stringPointer = &MemoryMarshal.GetReference(str)) { char* p = stringPointer; - if (!ParseNumber(ref p, options, ref number, sb, numfmt, parseDecimal) + if (!ParseNumber(ref p, p + str.Length, options, ref number, sb, numfmt, parseDecimal) || (p - stringPointer < str.Length && !TrailingZeros(str, (int)(p - stringPointer)))) { return false; diff --git a/external/corefx/src/System.Collections.NonGeneric/tests/HashtableTests.cs b/external/corefx/src/System.Collections.NonGeneric/tests/HashtableTests.cs index 13dff03ba3..8c6302a367 100644 --- a/external/corefx/src/System.Collections.NonGeneric/tests/HashtableTests.cs +++ b/external/corefx/src/System.Collections.NonGeneric/tests/HashtableTests.cs @@ -234,6 +234,7 @@ namespace System.Collections.Tests } [Fact] + [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Flaky test - OOM")] public void Ctor_Int_Int_GenerateNewPrime() { // The ctor for Hashtable performs the following calculation: diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/ContentDispositionHeaderValue.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/ContentDispositionHeaderValue.cs index f6e99d800f..065b934db2 100644 --- a/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/ContentDispositionHeaderValue.cs +++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/ContentDispositionHeaderValue.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -using System.IO; using System.Text; namespace System.Net.Http.Headers @@ -425,7 +424,7 @@ namespace System.Net.Http.Headers } // Returns input for decoding failures, as the content might not be encoded. - private string EncodeAndQuoteMime(string input) + private static string EncodeAndQuoteMime(string input) { string result = input; bool needsQuotes = false; @@ -441,7 +440,7 @@ namespace System.Net.Http.Headers throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, input)); } - else if (RequiresEncoding(result)) + else if (HeaderUtilities.ContainsNonAscii(result)) { needsQuotes = true; // Encoded data must always be quoted, the equals signs are invalid in tokens. result = EncodeMime(result); // =?utf-8?B?asdfasdfaesdf?= @@ -460,7 +459,7 @@ namespace System.Net.Http.Headers } // Returns true if the value starts and ends with a quote. - private bool IsQuoted(string value) + private static bool IsQuoted(string value) { Debug.Assert(value != null); @@ -468,23 +467,8 @@ namespace System.Net.Http.Headers && value.EndsWith("\"", StringComparison.Ordinal); } - // tspecials are required to be in a quoted string. Only non-ascii needs to be encoded. - private bool RequiresEncoding(string input) - { - Debug.Assert(input != null); - - foreach (char c in input) - { - if ((int)c > 0x7f) - { - return true; - } - } - return false; - } - // Encode using MIME encoding. - private string EncodeMime(string input) + private static string EncodeMime(string input) { byte[] buffer = Encoding.UTF8.GetBytes(input); string encodedName = Convert.ToBase64String(buffer); @@ -492,7 +476,7 @@ namespace System.Net.Http.Headers } // Attempt to decode MIME encoded strings. - private bool TryDecodeMime(string input, out string output) + private static bool TryDecodeMime(string input, out string output) { Debug.Assert(input != null); @@ -535,7 +519,7 @@ namespace System.Net.Http.Headers // Attempt to decode using RFC 5987 encoding. // encoding'language'my%20string - private bool TryDecode5987(string input, out string output) + private static bool TryDecode5987(string input, out string output) { output = null; diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/HeaderUtilities.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/HeaderUtilities.cs index 75a8ef8e09..bfb3815d5f 100644 --- a/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/HeaderUtilities.cs +++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/HeaderUtilities.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Buffers; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.Contracts; @@ -66,58 +67,63 @@ namespace System.Net.Http.Headers } } + internal static bool ContainsNonAscii(string input) + { + Debug.Assert(input != null); + + foreach (char c in input) + { + if ((int)c > 0x7f) + { + return true; + } + } + return false; + } + // Encode a string using RFC 5987 encoding. // encoding'lang'PercentEncodedSpecials internal static string Encode5987(string input) - { - string output; - IsInputEncoded5987(input, out output); - - return output; - } - - internal static bool IsInputEncoded5987(string input, out string output) { // Encode a string using RFC 5987 encoding. // encoding'lang'PercentEncodedSpecials - bool wasEncoded = false; StringBuilder builder = StringBuilderCache.Acquire(); + byte[] utf8bytes = ArrayPool.Shared.Rent(Encoding.UTF8.GetMaxByteCount(input.Length)); + int utf8length = Encoding.UTF8.GetBytes(input, 0, input.Length, utf8bytes, 0); + builder.Append("utf-8\'\'"); - foreach (char c in input) + for (int i = 0; i < utf8length; i++) { + byte utf8byte = utf8bytes[i]; + // attr-char = ALPHA / DIGIT / "!" / "#" / "$" / "&" / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" // ; token except ( "*" / "'" / "%" ) - if (c > 0x7F) // Encodes as multiple utf-8 bytes + if (utf8byte > 0x7F) // Encodes as multiple utf-8 bytes { - byte[] bytes = Encoding.UTF8.GetBytes(c.ToString()); - foreach (byte b in bytes) - { - AddHexEscaped((char)b, builder); - wasEncoded = true; - } + AddHexEscaped(utf8byte, builder); } - else if (!HttpRuleParser.IsTokenChar(c) || c == '*' || c == '\'' || c == '%') + else if (!HttpRuleParser.IsTokenChar((char)utf8byte) || utf8byte == '*' || utf8byte == '\'' || utf8byte == '%') { // ASCII - Only one encoded byte. - AddHexEscaped(c, builder); - wasEncoded = true; + AddHexEscaped(utf8byte, builder); } else { - builder.Append(c); + builder.Append((char)utf8byte); } } - output = StringBuilderCache.GetStringAndRelease(builder); - return wasEncoded; + Array.Clear(utf8bytes, 0, utf8length); + ArrayPool.Shared.Return(utf8bytes); + + return StringBuilderCache.GetStringAndRelease(builder); } /// Transforms an ASCII character into its hexadecimal representation, adding the characters to a StringBuilder. - private static void AddHexEscaped(char c, StringBuilder destination) + private static void AddHexEscaped(byte c, StringBuilder destination) { Debug.Assert(destination != null); - Debug.Assert(c <= 0xFF); destination.Append('%'); destination.Append(s_hexUpperChars[(c & 0xf0) >> 4]); diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/HttpContent.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/HttpContent.cs index 740347a083..fe424798d4 100644 --- a/external/corefx/src/System.Net.Http/src/System/Net/Http/HttpContent.cs +++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/HttpContent.cs @@ -337,10 +337,21 @@ namespace System.Net.Http return CopyToAsyncCore(new ValueTask(task)); } } +#if MONOTOUCH_WATCH + catch (Exception e) + { + if (StreamCopyExceptionNeedsWrapping(e)) + { + return Task.FromException(GetStreamCopyException(e)); + } + throw; + } +#else catch (Exception e) when (StreamCopyExceptionNeedsWrapping(e)) { return Task.FromException(GetStreamCopyException(e)); } +#endif } private static async Task CopyToAsyncCore(ValueTask copyTask) @@ -349,10 +360,21 @@ namespace System.Net.Http { await copyTask.ConfigureAwait(false); } +#if MONOTOUCH_WATCH + catch (Exception e) + { + if (StreamCopyExceptionNeedsWrapping(e)) + { + throw GetStreamCopyException(e); + } + throw; + } +#else catch (Exception e) when (StreamCopyExceptionNeedsWrapping(e)) { throw GetStreamCopyException(e); } +#endif } public Task CopyToAsync(Stream stream) @@ -403,10 +425,21 @@ namespace System.Net.Http CheckTaskNotNull(task); return LoadIntoBufferAsyncCore(task, tempBuffer); } +#if MONOTOUCH_WATCH + catch (Exception e) + { + if (StreamCopyExceptionNeedsWrapping(e)) + { + return Task.FromException(GetStreamCopyException(e)); + } + throw; + } +#else catch (Exception e) when (StreamCopyExceptionNeedsWrapping(e)) { return Task.FromException(GetStreamCopyException(e)); } +#endif // other synchronous exceptions from SerializeToStreamAsync/CheckTaskNotNull will propagate } diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs index b156134285..b65b240e80 100644 --- a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs +++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs @@ -91,9 +91,9 @@ namespace System.Net.Http } else { - string usernameStar; - if (HeaderUtilities.IsInputEncoded5987(credential.UserName, out usernameStar)) + if (HeaderUtilities.ContainsNonAscii(credential.UserName)) { + string usernameStar = HeaderUtilities.Encode5987(credential.UserName); sb.AppendKeyValue(UsernameStar, usernameStar, includeQuotes: false); } else @@ -408,6 +408,9 @@ namespace System.Net.Http internal static class StringBuilderExtensions { + // Characters that require escaping in quoted string + private static readonly char[] SpecialCharacters = new[] { '"', '\\' }; + public static void AppendKeyValue(this StringBuilder sb, string key, string value, bool includeQuotes = true, bool includeComma = true) { sb.Append(key); @@ -415,13 +418,30 @@ namespace System.Net.Http if (includeQuotes) { sb.Append('"'); - } - - sb.Append(value); - if (includeQuotes) - { + int lastSpecialIndex = 0; + int specialIndex; + while (true) + { + specialIndex = value.IndexOfAny(SpecialCharacters, lastSpecialIndex); + if (specialIndex >= 0) + { + sb.Append(value, lastSpecialIndex, specialIndex - lastSpecialIndex); + sb.Append('\\'); + sb.Append(value[specialIndex]); + lastSpecialIndex = specialIndex + 1; + } + else + { + sb.Append(value, lastSpecialIndex, value.Length - lastSpecialIndex); + break; + } + } sb.Append('"'); } + else + { + sb.Append(value); + } if (includeComma) { diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs index fdf7d48e56..d10a2233dc 100644 --- a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs +++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs @@ -115,10 +115,21 @@ namespace System.Net.Http } } } +#if MONOTOUCH_WATCH + catch (Exception exc) + { + if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) + { + throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); + } + throw; + } +#else catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) { throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); } +#endif finally { ctr.Dispose(); @@ -161,10 +172,21 @@ namespace System.Net.Http await _connection.FillAsync().ConfigureAwait(false); } } +#if MONOTOUCH_WATCH + catch (Exception exc) + { + if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) + { + throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); + } + throw; + } +#else catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) { throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); } +#endif finally { ctr.Dispose(); diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionCloseReadStream.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionCloseReadStream.cs index 1506cdf2b8..7471a07ce4 100644 --- a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionCloseReadStream.cs +++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionCloseReadStream.cs @@ -39,10 +39,21 @@ namespace System.Net.Http { bytesRead = await readTask.ConfigureAwait(false); } +#if MONOTOUCH_WATCH + catch (Exception exc) + { + if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) + { + throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); + } + throw; + } +#else catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) { throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); } +#endif finally { ctr.Dispose(); @@ -100,10 +111,21 @@ namespace System.Net.Http { await copyTask.ConfigureAwait(false); } +#if MONOTOUCH_WATCH + catch (Exception exc) + { + if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) + { + throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); + } + throw; + } +#else catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) { throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); } +#endif finally { ctr.Dispose(); diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs index cbf51b0424..9c90a419f4 100644 --- a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs +++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs @@ -51,10 +51,21 @@ namespace System.Net.Http { bytesRead = await readTask.ConfigureAwait(false); } +#if MONOTOUCH_WATCH + catch (Exception exc) + { + if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) + { + throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); + } + throw; + } +#else catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) { throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); } +#endif finally { ctr.Dispose(); @@ -115,10 +126,21 @@ namespace System.Net.Http { await copyTask.ConfigureAwait(false); } +#if MONOTOUCH_WATCH + catch (Exception exc) + { + if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) + { + throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); + } + throw; + } +#else catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) { throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); } +#endif finally { ctr.Dispose(); diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs index e7ffaef7bc..6374d98241 100644 --- a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs +++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs @@ -158,11 +158,23 @@ namespace System.Net.Http { return _socket.Poll(0, SelectMode.SelectRead); } +#if MONOTOUCH_WATCH + catch (Exception exc) + { + if (e is SocketException || e is ObjectDisposedException) + { + // Poll can throw when used on a closed socket. + return true; + } + throw; + } +#else catch (Exception e) when (e is SocketException || e is ObjectDisposedException) { // Poll can throw when used on a closed socket. return true; } +#endif } else { diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs index 13bcd87f19..c2df0a38e4 100644 --- a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs +++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs @@ -295,10 +295,24 @@ namespace System.Net.Http { return await SendWithNtConnectionAuthAsync((HttpConnection)connection, request, doRequestAuth, cancellationToken).ConfigureAwait(false); } +#if MONOTOUCH_WATCH + catch (HttpRequestException e) + { + if (!isNewConnection && e.InnerException is IOException && connection.CanRetry) + { + // Eat exception and try again. + } + else + { + throw; + } + } +#else catch (HttpRequestException e) when (!isNewConnection && e.InnerException is IOException && connection.CanRetry) { // Eat exception and try again. } +#endif finally { connection.Release(); diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs index 6eba9babd3..b32ae62834 100644 --- a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs +++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs @@ -39,10 +39,21 @@ namespace System.Net.Http { bytesRead = await readTask.ConfigureAwait(false); } +#if MONOTOUCH_WATCH + catch (Exception exc) + { + if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) + { + throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); + } + throw; + } +#else catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) { throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); } +#endif finally { ctr.Dispose(); @@ -95,10 +106,21 @@ namespace System.Net.Http { await copyTask.ConfigureAwait(false); } +#if MONOTOUCH_WATCH + catch (Exception exc) + { + if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) + { + throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); + } + throw; + } +#else catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) { throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); } +#endif finally { ctr.Dispose(); @@ -168,10 +190,21 @@ namespace System.Net.Http { await task.ConfigureAwait(false); } +#if MONOTOUCH_WATCH + catch (Exception exc) + { + if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) + { + throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); + } + throw; + } +#else catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken)) { throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken); } +#endif finally { ctr.Dispose(); diff --git a/external/corefx/src/System.Net.Http/tests/UnitTests/DigestAuthenticationTests.cs b/external/corefx/src/System.Net.Http/tests/UnitTests/DigestAuthenticationTests.cs index f339ba78e4..45d03712a7 100644 --- a/external/corefx/src/System.Net.Http/tests/UnitTests/DigestAuthenticationTests.cs +++ b/external/corefx/src/System.Net.Http/tests/UnitTests/DigestAuthenticationTests.cs @@ -56,5 +56,20 @@ namespace System.Net.Http.Tests Assert.Equal(expectedResult, parameter != null); } + + [Theory] + [InlineData("test", "username=\"test\"")] + [InlineData("test@example.org", "username=\"test@example.org\"")] + [InlineData("test\"example.org", "username=\"test\\\"example.org\"")] + [InlineData("t\u00E6st", "username*=utf-8''t%C3%A6st")] + [InlineData("\uD834\uDD1E", "username*=utf-8''%F0%9D%84%9E")] + public async void DigestResponse_UserName_Encoding(string username, string encodedUserName) + { + NetworkCredential credential = new NetworkCredential(username, "bar"); + AuthenticationHelper.DigestResponse digestResponse = new AuthenticationHelper.DigestResponse("realm=\"NetCore\", nonce=\"qMRqWgAAAAAQMjIABgAAAFwEiEwAAAAA\""); + HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, "http://microsoft.com/"); + string parameter = await AuthenticationHelper.GetDigestTokenForCredential(credential, request, digestResponse).ConfigureAwait(false); + Assert.StartsWith(encodedUserName, parameter); + } } } diff --git a/external/corefx/src/System.Net.Http/tests/UnitTests/HttpContentTest.cs b/external/corefx/src/System.Net.Http/tests/UnitTests/HttpContentTest.cs index 59e8bdbada..364864292f 100644 --- a/external/corefx/src/System.Net.Http/tests/UnitTests/HttpContentTest.cs +++ b/external/corefx/src/System.Net.Http/tests/UnitTests/HttpContentTest.cs @@ -12,10 +12,10 @@ namespace System.Net.Http.Tests public class HttpContentTest { [Fact] - public void Dispose_BufferContentThenDisposeContent_BufferedStreamGetsDisposed() + public async Task Dispose_BufferContentThenDisposeContent_BufferedStreamGetsDisposed() { MockContent content = new MockContent(); - content.LoadIntoBufferAsync().Wait(); + await content.LoadIntoBufferAsync(); Type type = typeof(HttpContent); TypeInfo typeInfo = type.GetTypeInfo(); diff --git a/external/corefx/src/System.Runtime.Extensions/tests/System/BitConverter.cs b/external/corefx/src/System.Runtime.Extensions/tests/System/BitConverter.cs index 55d20da4d1..eb453ad8b1 100644 --- a/external/corefx/src/System.Runtime.Extensions/tests/System/BitConverter.cs +++ b/external/corefx/src/System.Runtime.Extensions/tests/System/BitConverter.cs @@ -226,6 +226,7 @@ namespace System.Tests } [Fact] + [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Flaky test - OOM")] public static void ToString_ByteArrayTooLong_Throws() { byte[] arr; diff --git a/external/corefx/src/System.Runtime.Numerics/tests/BigInteger/parse.netcoreapp.cs b/external/corefx/src/System.Runtime.Numerics/tests/BigInteger/parse.netcoreapp.cs index 593fc5f8b7..e41f895025 100644 --- a/external/corefx/src/System.Runtime.Numerics/tests/BigInteger/parse.netcoreapp.cs +++ b/external/corefx/src/System.Runtime.Numerics/tests/BigInteger/parse.netcoreapp.cs @@ -9,6 +9,24 @@ namespace System.Numerics.Tests { public partial class parseTest { + [Theory] + [InlineData("123456789", 0, 9, "123456789")] + [InlineData("123456789", 0, 1, "1")] + [InlineData("123456789", 1, 3, "234")] + public void Parse_Subspan_Success(string input, int offset, int length, string expected) + { + Eval(BigInteger.Parse(input.AsSpan(offset, length)), expected); + Assert.True(BigInteger.TryParse(input.AsSpan(offset, length), out BigInteger test)); + Eval(test, expected); + } + + [Fact] + public void Parse_EmptySubspan_Fails() + { + Assert.False(BigInteger.TryParse("12345".AsSpan(0, 0), out BigInteger result)); + Assert.Equal(0, result); + } + static partial void VerifyParseSpanToString(string num1, NumberStyles ns, bool failureNotExpected, string expected) { if (failureNotExpected) diff --git a/external/linker/.editorconfig b/external/linker/.editorconfig index 6bb3c64fa3..848c05f899 100644 --- a/external/linker/.editorconfig +++ b/external/linker/.editorconfig @@ -1,5 +1,6 @@ # top-most EditorConfig file root = true +end_of_line = "lf" [*.cs] indent_style = tab diff --git a/external/linker/.gitignore b/external/linker/.gitignore index 37cb12598c..5ad05fe739 100644 --- a/external/linker/.gitignore +++ b/external/linker/.gitignore @@ -32,4 +32,4 @@ bin/ .packages artifacts -monobuild/TestResults.xml +test/Mono.Linker.Tests/TestResults.xml diff --git a/external/linker/Directory.Build.props b/external/linker/Directory.Build.props index 419c6cb508..86a068481d 100644 --- a/external/linker/Directory.Build.props +++ b/external/linker/Directory.Build.props @@ -1,5 +1,5 @@ - + false diff --git a/external/linker/Directory.Build.targets b/external/linker/Directory.Build.targets index d11d6a1179..e149bf1384 100644 --- a/external/linker/Directory.Build.targets +++ b/external/linker/Directory.Build.targets @@ -1,11 +1,5 @@ - - - - - - + diff --git a/external/linker/build.cmd b/external/linker/build.cmd new file mode 100644 index 0000000000..e21182c8ad --- /dev/null +++ b/external/linker/build.cmd @@ -0,0 +1,2 @@ +@echo off +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -projects """%~dp0illink.sln""" -restore -build %*" diff --git a/external/linker/build.sh b/external/linker/build.sh new file mode 100755 index 0000000000..228566129d --- /dev/null +++ b/external/linker/build.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" + +# resolve $SOURCE until the file is no longer a symlink +while [[ -h $source ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done + +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" +"$scriptroot/eng/common/build.sh" --projects "$scriptroot/illink.sln" --build --restore $@ diff --git a/external/linker/eng/Signing.props b/external/linker/eng/Signing.props index 0fdcb9e5bc..30bc3c3b7b 100644 --- a/external/linker/eng/Signing.props +++ b/external/linker/eng/Signing.props @@ -4,6 +4,5 @@ - diff --git a/external/linker/eng/Version.Details.xml b/external/linker/eng/Version.Details.xml index 8bd6f3d7de..b6627d7a0d 100644 --- a/external/linker/eng/Version.Details.xml +++ b/external/linker/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - c0b56ff3569e3c7475070486c40543ea4c6f6dc7 + b0e8d3944155f94f83deea8afe025debe369e69f diff --git a/external/linker/eng/Versions.props b/external/linker/eng/Versions.props index 9a2b324958..419ba90a2d 100644 --- a/external/linker/eng/Versions.props +++ b/external/linker/eng/Versions.props @@ -5,6 +5,7 @@ prerelease + true 5.0.0-alpha1.19413.7 diff --git a/external/linker/eng/azure-pipelines.yml b/external/linker/eng/azure-pipelines.yml index 0304d82d8e..8051d7b206 100644 --- a/external/linker/eng/azure-pipelines.yml +++ b/external/linker/eng/azure-pipelines.yml @@ -11,90 +11,122 @@ variables: - name: _BuildConfig value: Release - name: _BuildArgs - value: /p:ArcadeBuild=true + value: +- name: _DotNetArtifactsCategory + value: .NETCore - ${{ if eq(variables.officialBuild, 'true') }}: - name: _BuildArgs - value: ${{ format('{0} /p:OfficialBuildId=$(Build.BuildNumber)', variables['_BuildArgs']) }} + value: ${{ format('{0} /p:OfficialBuildId=$(Build.BuildNumber) /p:Test=false /p:IntegrationTest=false', variables['_BuildArgs']) }} # Provide HelixApiAccessToken for telemetry - group: DotNet-HelixApi-Access -jobs: -- template: /eng/common/templates/jobs/jobs.yml - parameters: +stages: +- stage: build + displayName: Build + jobs: + - template: /eng/common/templates/jobs/jobs.yml + parameters: - enableTelemetry: true # send helix telemetry - helixRepo: mono/linker - enablePublishBuildArtifacts: true # publish build logs to pipeline storage - # enablePublishTestResults - enablePublishBuildAssets: true # generate build manifests and publish to BAR in internal builds - enableMicrobuild: true # only affects internal builds + enableTelemetry: true # send helix telemetry + helixRepo: mono/linker + enablePublishUsingPipelines: true + enablePublishBuildArtifacts: true # publish build logs to pipeline storage + enablePublishTestResults: true + enablePublishBuildAssets: true # generate build manifests and publish to BAR in internal builds + enableMicrobuild: true # only affects internal builds - jobs: + jobs: - - job: Windows_NT - pool: - ${{ if eq(variables.officialBuild, 'false') }}: - name: Hosted VS2017 - ${{ if eq(variables.officialBuild, 'true') }}: - name: NetCoreInternal-Pool - queue: BuildPool.Windows.10.Amd64.VS2017 - variables: - - ${{ if eq(variables.officialBuild, 'false') }}: - - _SignType: test - - _PublishArgs: '' - - ${{ if eq(variables.officialBuild, 'true') }}: - - group: DotNet-Blob-Feed - - _TeamName: .NET # required by microbuild install step - - _SignType: real # used in the arcade templates that install microbuild. - - _DotNetPublishToBlobFeed: true # used by arcade templates that gather build asset manifests - - _PublishArgs: /p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed) - /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json - /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) - - DotNetSignType: ${{ format('{0}', variables._SignType) }} # DotNetSignType defaults to real if not specified - steps: - - checkout: self - submodules: true - - script: eng\common\cibuild.cmd -projects $(Build.SourcesDirectory)\illink.sln - -configuration $(_BuildConfig) $(_BuildArgs) $(_PublishArgs) - -warnAsError "$false" - -nodeReuse "$false" # https://github.com/Microsoft/vstest/issues/1503 - env: - # https://github.com/Microsoft/vstest/issues/1503#issuecomment-410732193 - MSBUILDENSURESTDOUTFORTASKPROCESSES: 1 - ${{ if eq(variables.officialBuild, 'false') }}: - displayName: Build illink.sln $(_BuildConfig) - ${{ if eq(variables.officialBuild, 'true') }}: - displayName: Build and publish illink.sln $(_BuildConfig) + - job: Windows_NT + pool: + ${{ if eq(variables.officialBuild, 'false') }}: + name: Hosted VS2017 + ${{ if eq(variables.officialBuild, 'true') }}: + name: NetCoreInternal-Pool + queue: BuildPool.Windows.10.Amd64.VS2017 + variables: + - ${{ if eq(variables.officialBuild, 'false') }}: + - _SignType: test + - _PublishArgs: '' + - ${{ if eq(variables.officialBuild, 'true') }}: + - group: DotNet-Blob-Feed + - _TeamName: .NET # required by microbuild install step + - _SignType: real # used in the arcade templates that install microbuild. + - _DotNetPublishToBlobFeed: true # used by arcade templates that gather build asset manifests + - _PublishArgs: /p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed) + /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json + /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) + /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) + /p:DotNetPublishUsingPipelines=true + - DotNetSignType: ${{ format('{0}', variables._SignType) }} # DotNetSignType defaults to real if not specified + steps: + - checkout: self + submodules: true + - script: eng\common\cibuild.cmd -projects $(Build.SourcesDirectory)\illink.sln + -configuration $(_BuildConfig) $(_BuildArgs) $(_PublishArgs) + -integrationTest + -warnAsError "$false" + -nodeReuse "$false" # https://github.com/Microsoft/vstest/issues/1503 + env: + # https://github.com/Microsoft/vstest/issues/1503#issuecomment-410732193 + MSBUILDENSURESTDOUTFORTASKPROCESSES: 1 + ${{ if eq(variables.officialBuild, 'false') }}: + displayName: Build illink.sln $(_BuildConfig) + ${{ if eq(variables.officialBuild, 'true') }}: + displayName: Build and publish illink.sln $(_BuildConfig) - - job: Linux + - ${{ if eq(variables.officialBuild, 'false') }}: + - job: Linux + condition: eq(variables.officialBuild, 'false') + pool: + name: Hosted Ubuntu 1604 + steps: + - checkout: self + submodules: true + - script: eng/common/cibuild.sh --projects $(Build.SourcesDirectory)/illink.sln + --configuration $(_BuildConfig) $(_BuildArgs) + --integrationTest + --warnAsError false + --nodeReuse false # https://github.com/Microsoft/vstest/issues/1503 + env: + # https://github.com/Microsoft/vstest/issues/1503#issuecomment-410732193 + MSBUILDENSURESTDOUTFORTASKPROCESSES: 1 + displayName: Build illink.sln $(_BuildConfig) + + - ${{ if eq(variables.officialBuild, 'false') }}: + - job: macOS + pool: + name: Hosted MacOS + steps: + - checkout: self + submodules: true + - script: eng/common/cibuild.sh --projects $(Build.SourcesDirectory)/illink.sln + --configuration $(_BuildConfig) $(_BuildArgs) + --integrationTest + --warnAsError false + --nodeReuse false # https://github.com/Microsoft/vstest/issues/1503 + env: + # https://github.com/Microsoft/vstest/issues/1503#issuecomment-410732193 + MSBUILDENSURESTDOUTFORTASKPROCESSES: 1 + displayName: Build illink.sln $(_BuildConfig) + + - ${{ if eq(variables.officialBuild, 'false') }}: + - job: Linux_Mono pool: name: Hosted Ubuntu 1604 steps: - checkout: self submodules: true - - script: eng/common/cibuild.sh --projects $(Build.SourcesDirectory)/illink.sln - --configuration $(_BuildConfig) $(_BuildArgs) - --warnAsError false - --nodeReuse false # https://github.com/Microsoft/vstest/issues/1503 - env: - # https://github.com/Microsoft/vstest/issues/1503#issuecomment-410732193 - MSBUILDENSURESTDOUTFORTASKPROCESSES: 1 - displayName: Build illink.sln $(_BuildConfig) + - script: | + mono --version + make -C monobuild CONFIGURATION=$(_BuildConfig) + displayName: Build and test + - task: PublishTestResults@2 + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: 'test/Mono.Linker.Tests/TestResults.xml' + +# Post-Build Arcade logic +- ${{ if eq(variables.officialBuild, 'true') }}: + - template: /eng/common/templates/post-build/post-build.yml - - job: macOS - pool: - ${{ if eq(variables.officialBuild, 'false') }}: - name: Hosted MacOS - ${{ if eq(variables.officialBuild, 'true') }}: - name: Hosted Mac Internal - steps: - - checkout: self - submodules: true - - script: eng/common/cibuild.sh --projects $(Build.SourcesDirectory)/illink.sln - --configuration $(_BuildConfig) $(_BuildArgs) - --warnAsError false - --nodeReuse false # https://github.com/Microsoft/vstest/issues/1503 - env: - # https://github.com/Microsoft/vstest/issues/1503#issuecomment-410732193 - MSBUILDENSURESTDOUTFORTASKPROCESSES: 1 - displayName: Build illink.sln $(_BuildConfig) diff --git a/external/linker/eng/common/SetupNugetSources.ps1 b/external/linker/eng/common/SetupNugetSources.ps1 index 6662e4bc1e..a5a1e711d7 100644 --- a/external/linker/eng/common/SetupNugetSources.ps1 +++ b/external/linker/eng/common/SetupNugetSources.ps1 @@ -16,7 +16,7 @@ # condition: eq(variables['Agent.OS'], 'Windows_NT') # inputs: # filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 -# arguments: -ConfigFile ${Env:BUILD_SOURCESDIRECTORY}/NuGet.config -Password $Env:Token +# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token # env: # Token: $(dn-bot-dnceng-artifact-feeds-rw) @@ -94,41 +94,48 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) { } } -try { - if (!(Test-Path $ConfigFile -PathType Leaf)) { - Write-PipelineTelemetryError -Category 'Build' -Message "Couldn't find the file NuGet config file: $ConfigFile" +if (!(Test-Path $ConfigFile -PathType Leaf)) { + Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile" + ExitWithExitCode 1 +} + +if (!$Password) { + Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT' ExitWithExitCode 1 - } +} - # Load NuGet.config - $doc = New-Object System.Xml.XmlDocument - $filename = (Get-Item $ConfigFile).FullName - $doc.Load($filename) +# Load NuGet.config +$doc = New-Object System.Xml.XmlDocument +$filename = (Get-Item $ConfigFile).FullName +$doc.Load($filename) - # Get reference to or create one if none exist already - $sources = $doc.DocumentElement.SelectSingleNode("packageSources") - if ($sources -eq $null) { - $sources = $doc.CreateElement("packageSources") - $doc.DocumentElement.AppendChild($sources) | Out-Null - } +# Get reference to or create one if none exist already +$sources = $doc.DocumentElement.SelectSingleNode("packageSources") +if ($sources -eq $null) { + $sources = $doc.CreateElement("packageSources") + $doc.DocumentElement.AppendChild($sources) | Out-Null +} - # Looks for a node. Create it if none is found. - $creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") - if ($creds -eq $null) { - $creds = $doc.CreateElement("packageSourceCredentials") - $doc.DocumentElement.AppendChild($creds) | Out-Null - } +# Looks for a node. Create it if none is found. +$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") +if ($creds -eq $null) { + $creds = $doc.CreateElement("packageSourceCredentials") + $doc.DocumentElement.AppendChild($creds) | Out-Null +} - # Insert credential nodes for Maestro's private feeds - InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password +# Insert credential nodes for Maestro's private feeds +InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password +$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']") +if ($dotnet3Source -ne $null) { AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password +} - $doc.Save($filename) -} -catch { - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_ - ExitWithExitCode 1 +$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']") +if ($dotnet31Source -ne $null) { + AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password + AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password } + +$doc.Save($filename) diff --git a/external/linker/eng/common/SetupNugetSources.sh b/external/linker/eng/common/SetupNugetSources.sh index 55ad70e366..7d6fef27fe 100644 --- a/external/linker/eng/common/SetupNugetSources.sh +++ b/external/linker/eng/common/SetupNugetSources.sh @@ -17,7 +17,7 @@ # displayName: Setup Private Feeds Credentials # inputs: # filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh -# arguments: $BUILD_SOURCESDIRECTORY/NuGet.config $Token +# arguments: $(Build.SourcesDirectory)/NuGet.config $Token # condition: ne(variables['Agent.OS'], 'Windows_NT') # env: # Token: $(dn-bot-dnceng-artifact-feeds-rw) @@ -42,7 +42,12 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" . "$scriptroot/tools.sh" if [ ! -f "$ConfigFile" ]; then - Write-PipelineTelemetryError -Category 'Build' -Message "Couldn't find the file NuGet config file: $ConfigFile" + Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile" + ExitWithExitCode 1 +fi + +if [ -z "$CredToken" ]; then + Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT" ExitWithExitCode 1 fi @@ -52,7 +57,7 @@ if [[ `uname -s` == "Darwin" ]]; then fi # Ensure there is a ... section. -grep -i "" $ConfigFile +grep -i "" $ConfigFile if [ "$?" != "0" ]; then echo "Adding ... section." ConfigNodeHeader="" @@ -62,7 +67,7 @@ if [ "$?" != "0" ]; then fi # Ensure there is a ... section. -grep -i "" $ConfigFile +grep -i "" $ConfigFile if [ "$?" != "0" ]; then echo "Adding ... section." @@ -72,37 +77,64 @@ if [ "$?" != "0" ]; then sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config fi -# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources -grep -i "" $ConfigFile -if [ "$?" != "0" ]; then - echo "Adding dotnet3-internal to the packageSources." +PackageSources=() - PackageSourcesNodeFooter="" - PackageSourceTemplate="${TB}" +# Ensure dotnet3-internal and dotnet3-internal-transport are in the packageSources if the public dotnet3 feeds are present +grep -i "" $ConfigFile + if [ "$?" != "0" ]; then + echo "Adding dotnet3-internal to the packageSources." + PackageSourcesNodeFooter="" + PackageSourceTemplate="${TB}" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=('dotnet3-internal') + + grep -i "" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=('dotnet3-internal-transport') fi -# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources -grep -i "" $ConfigFile -if [ "$?" != "0" ]; then - echo "Adding dotnet3-internal-transport to the packageSources." +# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present +grep -i "" - PackageSourcesNodeFooter="" - PackageSourceTemplate="${TB}" + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=('dotnet3.1-internal') - sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config + grep -i "" $ConfigFile + if [ "$?" != "0" ]; then + echo "Adding dotnet3.1-internal-transport to the packageSources." + PackageSourcesNodeFooter="" + PackageSourceTemplate="${TB}" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=('dotnet3.1-internal-transport') fi # I want things split line by line PrevIFS=$IFS IFS=$'\n' -PackageSources=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"') +PackageSources+="$IFS" +PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"') IFS=$PrevIFS -PackageSources+=('dotnet3-internal') -PackageSources+=('dotnet3-internal-transport') - for FeedName in ${PackageSources[@]} ; do # Check if there is no existing credential for this FeedName grep -i "<$FeedName>" $ConfigFile @@ -112,6 +144,6 @@ for FeedName in ${PackageSources[@]} ; do PackageSourceCredentialsNodeFooter="" NewCredential="${TB}${TB}<$FeedName>${NL}${NL}${NL}" - sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" NuGet.config + sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile fi done diff --git a/external/linker/eng/common/build.ps1 b/external/linker/eng/common/build.ps1 index 0fd4d9c7f2..88814514d8 100644 --- a/external/linker/eng/common/build.ps1 +++ b/external/linker/eng/common/build.ps1 @@ -62,6 +62,8 @@ function Print-Usage() { Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)." } +. $PSScriptRoot\tools.ps1 + function InitializeCustomToolset { if (-not $restore) { return @@ -113,8 +115,6 @@ function Build { } try { - . $PSScriptRoot\tools.ps1 - if ($clean) { if (Test-Path $ArtifactsDir) { Remove-Item -Recurse -Force $ArtifactsDir @@ -122,12 +122,7 @@ try { } exit 0 } - - if ((Test-Path variable:LastExitCode) -And ($LastExitCode -ne 0)) { - Write-PipelineTelemetryError -Category 'InitializeToolset' -Message 'Eng/common/tools.ps1 returned a non-zero exit code.' - ExitWithExitCode $LastExitCode - } - + if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) { Print-Usage exit 0 diff --git a/external/linker/eng/common/cross/build-rootfs.sh b/external/linker/eng/common/cross/build-rootfs.sh index 8d61377a87..a23f895ba1 100755 --- a/external/linker/eng/common/cross/build-rootfs.sh +++ b/external/linker/eng/common/cross/build-rootfs.sh @@ -25,8 +25,9 @@ __UbuntuPackages="build-essential" __AlpinePackages="alpine-base" __AlpinePackages+=" build-base" __AlpinePackages+=" linux-headers" -__AlpinePackages+=" lldb-dev" -__AlpinePackages+=" llvm-dev" +__AlpinePackagesEdgeTesting=" lldb-dev" +__AlpinePackagesEdgeMain=" llvm9-libs" +__AlpinePackagesEdgeMain+=" python3" # symlinks fixer __UbuntuPackages+=" symlinks" @@ -199,13 +200,23 @@ if [[ "$__LinuxCodeName" == "alpine" ]]; then tar -xf $__ApkToolsDir/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -C $__ApkToolsDir mkdir -p $__RootfsDir/usr/bin cp -v /usr/bin/qemu-$__QEMUArch-static $__RootfsDir/usr/bin + $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \ -X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/main \ -X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/community \ - -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \ - -X http://dl-cdn.alpinelinux.org/alpine/edge/main \ -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \ add $__AlpinePackages + + $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \ + -X http://dl-cdn.alpinelinux.org/alpine/edge/main \ + -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \ + add $__AlpinePackagesEdgeMain + + $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \ + -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \ + add $__AlpinePackagesEdgeTesting + rm -r $__ApkToolsDir elif [[ -n $__LinuxCodeName ]]; then qemu-debootstrap --arch $__UbuntuArch $__LinuxCodeName $__RootfsDir $__UbuntuRepo diff --git a/external/linker/eng/common/darc-init.ps1 b/external/linker/eng/common/darc-init.ps1 index fc2190365f..2a30ccfd74 100644 --- a/external/linker/eng/common/darc-init.ps1 +++ b/external/linker/eng/common/darc-init.ps1 @@ -24,13 +24,15 @@ function InstallDarcCli ($darcVersion) { $darcVersion = $(Invoke-WebRequest -Uri $versionEndpoint -UseBasicParsing).Content } - $arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + $arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' Write-Host "Installing Darc CLI version $darcVersion..." Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.' if (-not $toolpath) { + Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g" & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g }else { + Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g --tool-path '$toolpath'" & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath" } } diff --git a/external/linker/eng/common/enable-cross-org-publishing.ps1 b/external/linker/eng/common/enable-cross-org-publishing.ps1 index efa26621db..da09da4f1f 100644 --- a/external/linker/eng/common/enable-cross-org-publishing.ps1 +++ b/external/linker/eng/common/enable-cross-org-publishing.ps1 @@ -2,7 +2,12 @@ param( [string] $token ) + . $PSScriptRoot\pipeline-logging-functions.ps1 -Write-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token -Write-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/' +# Write-PipelineSetVariable will no-op if a variable named $ci is not defined +# Since this script is only ever called in AzDO builds, just universally set it +$ci = $true + +Write-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/' -IsMultiJobVariable $false diff --git a/external/linker/eng/common/generate-graph-files.ps1 b/external/linker/eng/common/generate-graph-files.ps1 index 7ad26afa69..0728b1a8b5 100644 --- a/external/linker/eng/common/generate-graph-files.ps1 +++ b/external/linker/eng/common/generate-graph-files.ps1 @@ -3,7 +3,7 @@ Param( [Parameter(Mandatory=$true)][string] $gitHubPat, # GitHub personal access token from https://github.com/settings/tokens (no auth scopes needed) [Parameter(Mandatory=$true)][string] $azdoPat, # Azure Dev Ops tokens from https://dev.azure.com/dnceng/_details/security/tokens (code read scope needed) [Parameter(Mandatory=$true)][string] $outputFolder, # Where the graphviz.txt file will be created - [string] $darcVersion = '1.1.0-beta.19175.6', # darc's version + [string] $darcVersion, # darc's version [string] $graphvizVersion = '2.38', # GraphViz version [switch] $includeToolset # Whether the graph should include toolset dependencies or not. i.e. arcade, optimization. For more about # toolset dependencies see https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#toolset-vs-product-dependencies diff --git a/external/linker/eng/common/init-tools-native.ps1 b/external/linker/eng/common/init-tools-native.ps1 index f4409f0835..db830c00a6 100644 --- a/external/linker/eng/common/init-tools-native.ps1 +++ b/external/linker/eng/common/init-tools-native.ps1 @@ -113,14 +113,16 @@ try { } $toolInstallationFailure = $true } else { - Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $errMsg + # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482 + Write-Host $errMsg exit 1 } } } if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) { - Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools bootstrap failed' + # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482 + Write-Host 'Native tools bootstrap failed' exit 1 } } diff --git a/external/linker/eng/common/native/install-tool.ps1 b/external/linker/eng/common/native/install-tool.ps1 index ca180d03ba..f397e1c75d 100644 --- a/external/linker/eng/common/native/install-tool.ps1 +++ b/external/linker/eng/common/native/install-tool.ps1 @@ -105,7 +105,7 @@ try { Write-Error "There are multiple copies of $ToolName in $($ToolInstallDirectory): `n$(@($ToolFilePath | out-string))" exit 1 } elseif (@($ToolFilePath).Length -Lt 1) { - Write-Error "$ToolName was not found in $ToolFilePath." + Write-Host "$ToolName was not found in $ToolFilePath." exit 1 } diff --git a/external/linker/eng/common/performance/performance-setup.ps1 b/external/linker/eng/common/performance/performance-setup.ps1 index ec41965fc8..e337669929 100644 --- a/external/linker/eng/common/performance/performance-setup.ps1 +++ b/external/linker/eng/common/performance/performance-setup.ps1 @@ -9,12 +9,12 @@ Param( [string] $Branch=$env:BUILD_SOURCEBRANCH, [string] $CommitSha=$env:BUILD_SOURCEVERSION, [string] $BuildNumber=$env:BUILD_BUILDNUMBER, - [string] $RunCategories="coreclr corefx", + [string] $RunCategories="Libraries Runtime", [string] $Csproj="src\benchmarks\micro\MicroBenchmarks.csproj", [string] $Kind="micro", [switch] $Internal, [switch] $Compare, - [string] $Configurations="CompilationMode=$CompilationMode" + [string] $Configurations="CompilationMode=$CompilationMode RunKind=$Kind" ) $RunFromPerformanceRepo = ($Repository -eq "dotnet/performance") -or ($Repository -eq "dotnet-performance") @@ -49,7 +49,8 @@ if ($Internal) { $HelixSourcePrefix = "official" } -$CommonSetupArguments="--frameworks $Framework --queue $Queue --build-number $BuildNumber --build-configs $Configurations" +# FIX ME: This is a workaround until we get this from the actual pipeline +$CommonSetupArguments="--channel master --queue $Queue --build-number $BuildNumber --build-configs $Configurations --architecture $Architecture" $SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments" if ($RunFromPerformanceRepo) { diff --git a/external/linker/eng/common/performance/performance-setup.sh b/external/linker/eng/common/performance/performance-setup.sh index 2f2092166e..94a04e0fe5 100755 --- a/external/linker/eng/common/performance/performance-setup.sh +++ b/external/linker/eng/common/performance/performance-setup.sh @@ -13,9 +13,9 @@ build_number=$BUILD_BUILDNUMBER internal=false compare=false kind="micro" -run_categories="coreclr corefx" +run_categories="Libraries Runtime" csproj="src\benchmarks\micro\MicroBenchmarks.csproj" -configurations= +configurations="CompliationMode=$compilation_mode RunKind=$kind" run_from_perf_repo=false use_core_run=true use_baseline_core_run=true @@ -164,7 +164,7 @@ if [[ "$internal" == true ]]; then fi fi -common_setup_arguments="--frameworks $framework --queue $queue --build-number $build_number --build-configs $configurations" +common_setup_arguments="--channel master --queue $queue --build-number $build_number --build-configs $configurations --architecture $architecture" setup_arguments="--repository https://github.com/$repository --branch $branch --get-perf-hash --commit-sha $commit_sha $common_setup_arguments" if [[ "$run_from_perf_repo" = true ]]; then diff --git a/external/linker/eng/common/pipeline-logging-functions.ps1 b/external/linker/eng/common/pipeline-logging-functions.ps1 index e065618588..a3e1317ad4 100644 --- a/external/linker/eng/common/pipeline-logging-functions.ps1 +++ b/external/linker/eng/common/pipeline-logging-functions.ps1 @@ -85,7 +85,7 @@ function Write-PipelineTaskError { [switch]$AsOutput, [bool]$IsMultiJobVariable=$true) - if(-Not (Test-Path variable:ci) -Or !$ci) { + if((Test-Path variable:ci) -And $ci) { Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{ 'variable' = $Name 'isSecret' = $Secret @@ -101,7 +101,7 @@ function Write-PipelineTaskError { [string]$Path, [switch]$AsOutput) - if(-Not (Test-Path variable:ci) -Or !$ci) { + if((Test-Path variable:ci) -And $ci) { Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput } } @@ -237,4 +237,4 @@ function Write-LogIssue { } Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor -} \ No newline at end of file +} diff --git a/external/linker/eng/common/post-build/promote-build.ps1 b/external/linker/eng/common/post-build/add-build-to-channel.ps1 similarity index 95% rename from external/linker/eng/common/post-build/promote-build.ps1 rename to external/linker/eng/common/post-build/add-build-to-channel.ps1 index ce45635fbd..de2d957922 100644 --- a/external/linker/eng/common/post-build/promote-build.ps1 +++ b/external/linker/eng/common/post-build/add-build-to-channel.ps1 @@ -17,7 +17,7 @@ try { ExitWithExitCode 1 } - # Get info about which channels the build has already been promoted to + # Get info about which channel(s) the build has already been promoted to $buildInfo = Get-MaestroBuild -BuildId $BuildId if (!$buildInfo) { diff --git a/external/linker/eng/common/templates/job/execute-sdl.yml b/external/linker/eng/common/templates/job/execute-sdl.yml index 2973bcaf3a..640f2b04e2 100644 --- a/external/linker/eng/common/templates/job/execute-sdl.yml +++ b/external/linker/eng/common/templates/job/execute-sdl.yml @@ -1,4 +1,5 @@ parameters: + enable: 'false' # Whether the SDL validation job should execute or not overrideParameters: '' # Optional: to override values for parameters. additionalParameters: '' # Optional: parameters that need user specific values eg: '-SourceToolsList @("abc","def") -ArtifactToolsList @("ghi","jkl")' # There is some sort of bug (has been reported) in Azure DevOps where if this parameter is named @@ -16,8 +17,15 @@ jobs: - job: Run_SDL dependsOn: ${{ parameters.dependsOn }} displayName: Run SDL tool + condition: eq( ${{ parameters.enable }}, 'true') variables: - group: DotNet-VSTS-Bot + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] pool: name: Hosted VS2017 steps: @@ -28,14 +36,22 @@ jobs: - task: DownloadBuildArtifacts@0 displayName: Download Build Artifacts inputs: - buildType: current + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) artifactName: ${{ artifactName }} downloadPath: $(Build.ArtifactStagingDirectory)\artifacts - ${{ if eq(parameters.artifactNames, '') }}: - task: DownloadBuildArtifacts@0 displayName: Download Build Artifacts inputs: - buildType: current + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) downloadType: specific files itemPattern: "**" downloadPath: $(Build.ArtifactStagingDirectory)\artifacts diff --git a/external/linker/eng/common/templates/post-build/channels/generic-internal-channel.yml b/external/linker/eng/common/templates/post-build/channels/generic-internal-channel.yml index 3a8755fbbb..380122901d 100644 --- a/external/linker/eng/common/templates/post-build/channels/generic-internal-channel.yml +++ b/external/linker/eng/common/templates/post-build/channels/generic-internal-channel.yml @@ -23,23 +23,32 @@ stages: - job: publish_symbols displayName: Symbol Publishing dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )) + condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }})) variables: - group: DotNet-Symbol-Server-Pats + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] pool: vmImage: 'windows-2019' steps: - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - artifactName: 'BlobArtifacts' + displayName: Download Build Assets continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download PDB Artifacts inputs: - artifactName: 'PDBArtifacts' - continueOnError: true + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + downloadType: 'specific' + itemPattern: | + PdbArtifacts/** + BlobArtifacts/** + downloadPath: '$(Build.ArtifactStagingDirectory)' # This is necessary whenever we want to publish/restore to an AzDO private feed # Since sdk-task.ps1 tries to restore packages we need to do this authentication here @@ -80,28 +89,31 @@ stages: value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - name: IsStableBuild value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }})) + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }})) pool: vmImage: 'windows-2019' steps: - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts + displayName: Download Build Assets continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts inputs: - buildType: current - artifactName: BlobArtifacts - continueOnError: true - - task: DownloadBuildArtifacts@0 - displayName: Download Asset Manifests - inputs: - buildType: current - artifactName: AssetManifests + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + downloadType: 'specific' + itemPattern: | + PackageArtifacts/** + BlobArtifacts/** + AssetManifests/** + downloadPath: '$(Build.ArtifactStagingDirectory)' - task: NuGetToolInstaller@1 displayName: 'Install NuGet.exe' @@ -154,6 +166,6 @@ stages: StageLabel: '${{ parameters.stageName }}' JobLabel: 'AssetsPublishing' - - template: ../../steps/promote-build.yml + - template: ../../steps/add-build-to-channel.yml parameters: ChannelId: ${{ parameters.channelId }} diff --git a/external/linker/eng/common/templates/post-build/channels/generic-public-channel.yml b/external/linker/eng/common/templates/post-build/channels/generic-public-channel.yml index 3f572f8b12..ae8c6349d4 100644 --- a/external/linker/eng/common/templates/post-build/channels/generic-public-channel.yml +++ b/external/linker/eng/common/templates/post-build/channels/generic-public-channel.yml @@ -23,23 +23,32 @@ stages: - job: publish_symbols displayName: Symbol Publishing dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )) + condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }})) variables: - group: DotNet-Symbol-Server-Pats + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] pool: vmImage: 'windows-2019' steps: - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - artifactName: 'BlobArtifacts' + displayName: Download Build Assets continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download PDB Artifacts inputs: - artifactName: 'PDBArtifacts' - continueOnError: true + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + downloadType: 'specific' + itemPattern: | + PdbArtifacts/** + BlobArtifacts/** + downloadPath: '$(Build.ArtifactStagingDirectory)' # This is necessary whenever we want to publish/restore to an AzDO private feed # Since sdk-task.ps1 tries to restore packages we need to do this authentication here @@ -79,29 +88,31 @@ stages: value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - name: IsStableBuild value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }})) + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }})) pool: vmImage: 'windows-2019' steps: - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts + displayName: Download Build Assets continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts inputs: - buildType: current - artifactName: BlobArtifacts - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download Asset Manifests - inputs: - buildType: current - artifactName: AssetManifests + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + downloadType: 'specific' + itemPattern: | + PackageArtifacts/** + BlobArtifacts/** + AssetManifests/** + downloadPath: '$(Build.ArtifactStagingDirectory)' - task: NuGetToolInstaller@1 displayName: 'Install NuGet.exe' @@ -154,6 +165,6 @@ stages: StageLabel: '${{ parameters.stageName }}' JobLabel: 'AssetsPublishing' - - template: ../../steps/promote-build.yml + - template: ../../steps/add-build-to-channel.yml parameters: ChannelId: ${{ parameters.channelId }} diff --git a/external/linker/eng/common/templates/post-build/post-build.yml b/external/linker/eng/common/templates/post-build/post-build.yml index 8a8d84f202..70cb65f50b 100644 --- a/external/linker/eng/common/templates/post-build/post-build.yml +++ b/external/linker/eng/common/templates/post-build/post-build.yml @@ -26,97 +26,136 @@ stages: - stage: Validate dependsOn: ${{ parameters.validateDependsOn }} displayName: Validate + variables: + - template: common-variables.yml jobs: - - ${{ if eq(parameters.enableNugetValidation, 'true') }}: - - job: - displayName: NuGet Validation - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts + - template: setup-maestro-vars.yml - - task: PowerShell@2 - displayName: Validate - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1 - arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ - -ToolDestinationPath $(Agent.BuildDirectory)/Extract/ + - job: + displayName: NuGet Validation + dependsOn: setupMaestroVars + condition: eq( ${{ parameters.enableNugetValidation }}, 'true') + pool: + vmImage: 'windows-2019' + variables: + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + steps: + - task: DownloadBuildArtifacts@0 + displayName: Download Package Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: PackageArtifacts - - ${{ if eq(parameters.enableSigningValidation, 'true') }}: - - job: - displayName: Signing Validation - variables: - - template: common-variables.yml - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts + - task: PowerShell@2 + displayName: Validate + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1 + arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ + -ToolDestinationPath $(Agent.BuildDirectory)/Extract/ - # This is necessary whenever we want to publish/restore to an AzDO private feed - # Since sdk-task.ps1 tries to restore packages we need to do this authentication here - # otherwise it'll complain about accessing a private feed. - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' + - job: + displayName: Signing Validation + dependsOn: setupMaestroVars + condition: eq( ${{ parameters.enableSigningValidation }}, 'true') + variables: + - template: common-variables.yml + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + pool: + vmImage: 'windows-2019' + steps: + - task: DownloadBuildArtifacts@0 + displayName: Download Package Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: PackageArtifacts - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + # This is necessary whenever we want to publish/restore to an AzDO private feed + # Since sdk-task.ps1 tries to restore packages we need to do this authentication here + # otherwise it'll complain about accessing a private feed. + - task: NuGetAuthenticate@0 + displayName: 'Authenticate to AzDO Feeds' - - task: PowerShell@2 - displayName: Validate - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task SigningValidation -restore -msbuildEngine dotnet - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' - /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt' - ${{ parameters.signingValidationAdditionalParameters }} + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - template: ../steps/publish-logs.yml - parameters: - StageLabel: 'Validation' - JobLabel: 'Signing' + - task: PowerShell@2 + displayName: Validate + inputs: + filePath: eng\common\sdk-task.ps1 + arguments: -task SigningValidation -restore -msbuildEngine dotnet + /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' + /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt' + ${{ parameters.signingValidationAdditionalParameters }} - - ${{ if eq(parameters.enableSourceLinkValidation, 'true') }}: - - job: - displayName: SourceLink Validation - variables: - - template: common-variables.yml - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: current - artifactName: BlobArtifacts + - template: ../steps/publish-logs.yml + parameters: + StageLabel: 'Validation' + JobLabel: 'Signing' - - task: PowerShell@2 - displayName: Validate - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1 - arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ - -ExtractPath $(Agent.BuildDirectory)/Extract/ - -GHRepoName $(Build.Repository.Name) - -GHCommit $(Build.SourceVersion) - -SourcelinkCliVersion $(SourceLinkCLIVersion) - continueOnError: true + - job: + displayName: SourceLink Validation + dependsOn: setupMaestroVars + condition: eq( ${{ parameters.enableSourceLinkValidation }}, 'true') + variables: + - template: common-variables.yml + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + pool: + vmImage: 'windows-2019' + steps: + - task: DownloadBuildArtifacts@0 + displayName: Download Blob Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: BlobArtifacts - - ${{ if eq(parameters.SDLValidationParameters.enable, 'true') }}: - - template: /eng/common/templates/job/execute-sdl.yml - parameters: - additionalParameters: ${{ parameters.SDLValidationParameters.params }} - continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }} - artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }} + - task: PowerShell@2 + displayName: Validate + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1 + arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ + -ExtractPath $(Agent.BuildDirectory)/Extract/ + -GHRepoName $(Build.Repository.Name) + -GHCommit $(Build.SourceVersion) + -SourcelinkCliVersion $(SourceLinkCLIVersion) + continueOnError: true + + - template: /eng/common/templates/job/execute-sdl.yml + parameters: + enable: ${{ parameters.SDLValidationParameters.enable }} + dependsOn: setupMaestroVars + additionalParameters: ${{ parameters.SDLValidationParameters.params }} + continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }} + artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }} - template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: @@ -221,3 +260,29 @@ stages: transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'Net_Eng_Services_Int_Publish' + channelName: '.NET Eng Services - Int' + channelId: 678 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'Net_Eng_Services_Prod_Publish' + channelName: '.NET Eng Services - Prod' + channelId: 679 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' diff --git a/external/linker/eng/common/templates/post-build/promote-build.yml b/external/linker/eng/common/templates/post-build/promote-build.yml deleted file mode 100644 index 6b479c3b82..0000000000 --- a/external/linker/eng/common/templates/post-build/promote-build.yml +++ /dev/null @@ -1,25 +0,0 @@ -parameters: - ChannelId: 0 - -jobs: -- job: - displayName: Promote Build - dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.ChannelId }})) - variables: - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - - name: ChannelId - value: ${{ parameters.ChannelId }} - pool: - vmImage: 'windows-2019' - steps: - - task: PowerShell@2 - displayName: Add Build to Channel - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1 - arguments: -BuildId $(BARBuildId) - -ChannelId $(ChannelId) - -MaestroApiAccessToken $(MaestroApiAccessToken) - -MaestroApiEndPoint $(MaestroApiEndPoint) - -MaestroApiVersion $(MaestroApiVersion) diff --git a/external/linker/eng/common/templates/post-build/setup-maestro-vars.yml b/external/linker/eng/common/templates/post-build/setup-maestro-vars.yml index 716b53f740..05e611edb6 100644 --- a/external/linker/eng/common/templates/post-build/setup-maestro-vars.yml +++ b/external/linker/eng/common/templates/post-build/setup-maestro-vars.yml @@ -1,6 +1,12 @@ jobs: - job: setupMaestroVars displayName: Setup Maestro Vars + variables: + - template: common-variables.yml + - name: BuildId + value: $[ coalesce(variables.BARBuildId, 0) ] + - name: PromoteToChannelId + value: $[ coalesce(variables.PromoteToMaestroChannelId, 0) ] pool: vmImage: 'windows-2019' steps: @@ -8,6 +14,7 @@ jobs: - task: DownloadBuildArtifacts@0 displayName: Download Release Configs + condition: eq(variables.PromoteToChannelId, 0) inputs: buildType: current artifactName: ReleaseConfigs @@ -19,18 +26,50 @@ jobs: targetType: inline script: | try { - $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt + if ($Env:PromoteToChannelId -eq 0) { + $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt - $BarId = $Content | Select -Index 0 + $BarId = $Content | Select -Index 0 - $Channels = "" - $Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," } + $Channels = "" + $Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," } + + $IsStableBuild = $Content | Select -Index 2 - $IsStableBuild = $Content | Select -Index 2 + $AzureDevOpsProject = $Env:System_TeamProject + $AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId + $AzureDevOpsBuildId = $Env:Build_BuildId + $PromoteToMaestroChannelId = 0 + } + else { + $buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}" + + $apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]' + $apiHeaders.Add('Accept', 'application/json') + $apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}") + + $buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" } + + $BarId = $Env:BARBuildId + $Channels = 'None' + + #TODO: Fix this once this issue is done: https://github.com/dotnet/arcade/issues/3834 + $IsStableBuild = 'False' + + $AzureDevOpsProject = $buildInfo.azureDevOpsProject + $AzureDevOpsBuildDefinitionId = $buildInfo.azureDevOpsBuildDefinitionId + $AzureDevOpsBuildId = $buildInfo.azureDevOpsBuildId + $PromoteToMaestroChannelId = $Env:PromoteToMaestroChannelId + } Write-Host "##vso[task.setvariable variable=BARBuildId;isOutput=true]$BarId" Write-Host "##vso[task.setvariable variable=InitialChannels;isOutput=true]$Channels" Write-Host "##vso[task.setvariable variable=IsStableBuild;isOutput=true]$IsStableBuild" + + Write-Host "##vso[task.setvariable variable=AzDOProjectName;isOutput=true]$AzureDevOpsProject" + Write-Host "##vso[task.setvariable variable=AzDOPipelineId;isOutput=true]$AzureDevOpsBuildDefinitionId" + Write-Host "##vso[task.setvariable variable=AzDOBuildId;isOutput=true]$AzureDevOpsBuildId" + Write-Host "##vso[task.setvariable variable=PromoteToMaestroChannelId;isOutput=true]$PromoteToMaestroChannelId" } catch { Write-Host $_ @@ -38,3 +77,5 @@ jobs: Write-Host $_.ScriptStackTrace exit 1 } + env: + MAESTRO_API_TOKEN: $(MaestroApiAccessToken) diff --git a/external/linker/eng/common/templates/steps/promote-build.yml b/external/linker/eng/common/templates/steps/add-build-to-channel.yml similarity index 68% rename from external/linker/eng/common/templates/steps/promote-build.yml rename to external/linker/eng/common/templates/steps/add-build-to-channel.yml index b90404435d..f67a210d62 100644 --- a/external/linker/eng/common/templates/steps/promote-build.yml +++ b/external/linker/eng/common/templates/steps/add-build-to-channel.yml @@ -5,9 +5,9 @@ steps: - task: PowerShell@2 displayName: Add Build to Channel inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1 + filePath: $(Build.SourcesDirectory)/eng/common/post-build/add-build-to-channel.ps1 arguments: -BuildId $(BARBuildId) -ChannelId ${{ parameters.ChannelId }} -MaestroApiAccessToken $(MaestroApiAccessToken) -MaestroApiEndPoint $(MaestroApiEndPoint) - -MaestroApiVersion $(MaestroApiVersion) + -MaestroApiVersion $(MaestroApiVersion) diff --git a/external/linker/eng/common/templates/steps/publish-logs.yml b/external/linker/eng/common/templates/steps/publish-logs.yml index 8903ba57c0..f91751fe78 100644 --- a/external/linker/eng/common/templates/steps/publish-logs.yml +++ b/external/linker/eng/common/templates/steps/publish-logs.yml @@ -18,6 +18,6 @@ steps: inputs: PathtoPublish: '$(Build.SourcesDirectory)/PostBuildLogs' PublishLocation: Container - ArtifactName: PostBuilLogs + ArtifactName: PostBuildLogs continueOnError: true condition: always() diff --git a/external/linker/eng/common/tools.ps1 b/external/linker/eng/common/tools.ps1 index d762c9f044..fef7e5a3fd 100644 --- a/external/linker/eng/common/tools.ps1 +++ b/external/linker/eng/common/tools.ps1 @@ -98,7 +98,10 @@ function Exec-Process([string]$command, [string]$commandArgs) { } } -function InitializeDotNetCli([bool]$install) { +# createSdkLocationFile parameter enables a file being generated under the toolset directory +# which writes the sdk's location into. This is only necessary for cmd --> powershell invocations +# as dot sourcing isn't possible. +function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) { if (Test-Path variable:global:_DotNetInstallDir) { return $global:_DotNetInstallDir } @@ -148,6 +151,24 @@ function InitializeDotNetCli([bool]$install) { $env:DOTNET_INSTALL_DIR = $dotnetRoot } + # Creates a temporary file under the toolset dir. + # The following code block is protecting against concurrent access so that this function can + # be called in parallel. + if ($createSdkLocationFile) { + do { + $sdkCacheFileTemp = Join-Path $ToolsetDir $([System.IO.Path]::GetRandomFileName()) + } + until (!(Test-Path $sdkCacheFileTemp)) + Set-Content -Path $sdkCacheFileTemp -Value $dotnetRoot + + try { + Rename-Item -Force -Path $sdkCacheFileTemp 'sdk.txt' + } catch { + # Somebody beat us + Remove-Item -Path $sdkCacheFileTemp + } + } + # Add dotnet to PATH. This prevents any bare invocation of dotnet in custom # build steps from using anything other than what we've downloaded. # It also ensures that VS msbuild will use the downloaded sdk targets. @@ -167,7 +188,33 @@ function GetDotNetInstallScript([string] $dotnetRoot) { if (!(Test-Path $installScript)) { Create-Directory $dotnetRoot $ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit - Invoke-WebRequest "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1" -OutFile $installScript + + $maxRetries = 5 + $retries = 1 + + $uri = "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1" + + while($true) { + try { + Write-Host "GET $uri" + Invoke-WebRequest $uri -OutFile $installScript + break + } + catch { + Write-Host "Failed to download '$uri'" + Write-Error $_.Exception.Message -ErrorAction Continue + } + + if (++$retries -le $maxRetries) { + $delayInSeconds = [math]::Pow(2, $retries) - 1 # Exponential backoff + Write-Host "Retrying. Waiting for $delayInSeconds seconds before next attempt ($retries of $maxRetries)." + Start-Sleep -Seconds $delayInSeconds + } + else { + throw "Unable to download file in $maxRetries attempts." + } + + } } return $installScript @@ -177,12 +224,12 @@ function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $arc InstallDotNet $dotnetRoot $version $architecture } -function InstallDotNet([string] $dotnetRoot, - [string] $version, - [string] $architecture = '', - [string] $runtime = '', - [bool] $skipNonVersionedFiles = $false, - [string] $runtimeSourceFeed = '', +function InstallDotNet([string] $dotnetRoot, + [string] $version, + [string] $architecture = '', + [string] $runtime = '', + [bool] $skipNonVersionedFiles = $false, + [string] $runtimeSourceFeed = '', [string] $runtimeSourceFeedKey = '') { $installScript = GetDotNetInstallScript $dotnetRoot @@ -216,7 +263,10 @@ function InstallDotNet([string] $dotnetRoot, } catch { Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'." + ExitWithExitCode 1 } + } else { + ExitWithExitCode 1 } } } @@ -275,7 +325,10 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = $xcopyMSBuildVersion = "$vsMajorVersion.$($vsMinVersion.Minor).0-alpha" } - $vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install + $vsInstallDir = $null + if ($xcopyMSBuildVersion.Trim() -ine "none") { + $vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install + } if ($vsInstallDir -eq $null) { throw 'Unable to find Visual Studio that has required version and components installed' } diff --git a/external/linker/eng/common/tools.sh b/external/linker/eng/common/tools.sh index f58db5e25d..c26525e52b 100755 --- a/external/linker/eng/common/tools.sh +++ b/external/linker/eng/common/tools.sh @@ -41,7 +41,7 @@ fi # Configures warning treatment in msbuild. warn_as_error=${warn_as_error:-true} -# True to attempt using .NET Core already that meets requirements specified in global.json +# True to attempt using .NET Core already that meets requirements specified in global.json # installed on the machine instead of downloading one. use_installed_dotnet_cli=${use_installed_dotnet_cli:-true} @@ -172,7 +172,7 @@ function InstallDotNetSdk { function InstallDotNet { local root=$1 local version=$2 - + GetDotNetInstallScript "$root" local install_script=$_GetDotNetInstallScript @@ -211,11 +211,35 @@ function InstallDotNet { Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from custom location '$runtimeSourceFeed' (exit code '$exit_code')." ExitWithExitCode $exit_code } + else + ExitWithExitCode $exit_code fi fi } } +function with_retries { + local maxRetries=5 + local retries=1 + echo "Trying to run '$@' for maximum of $maxRetries attempts." + while [[ $((retries++)) -le $maxRetries ]]; do + "$@" + + if [[ $? == 0 ]]; then + echo "Ran '$@' successfully." + return 0 + fi + + timeout=$((2**$retries-1)) + echo "Failed to execute '$@'. Waiting $timeout seconds before next attempt ($retries out of $maxRetries)." 1>&2 + sleep $timeout + done + + echo "Failed to execute '$@' for $maxRetries times." 1>&2 + + return 1 +} + function GetDotNetInstallScript { local root=$1 local install_script="$root/dotnet-install.sh" @@ -228,13 +252,13 @@ function GetDotNetInstallScript { # Use curl if available, otherwise use wget if command -v curl > /dev/null; then - curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || { + with_retries curl "$install_script_url" -isSLv --retry 10 --create-dirs -o "$install_script" || { local exit_code=$? Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')." ExitWithExitCode $exit_code } - else - wget -q -O "$install_script" "$install_script_url" || { + else + with_retries wget -v -O "$install_script" "$install_script_url" || { local exit_code=$? Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')." ExitWithExitCode $exit_code @@ -249,11 +273,11 @@ function InitializeBuildTool { if [[ -n "${_InitializeBuildTool:-}" ]]; then return fi - + InitializeDotNetCli $restore # return values - _InitializeBuildTool="$_InitializeDotNetCli/dotnet" + _InitializeBuildTool="$_InitializeDotNetCli/dotnet" _InitializeBuildToolCommand="msbuild" _InitializeBuildToolFramework="netcoreapp2.1" } @@ -317,7 +341,7 @@ function InitializeToolset { if [[ "$binary_log" == true ]]; then bl="/bl:$log_dir/ToolsetRestore.binlog" fi - + echo '' > "$proj" MSBuild-Core "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file" diff --git a/external/linker/eng/ilasm.ilproj b/external/linker/eng/ilasm.ilproj index 0e2dc08169..97db3594b4 100644 --- a/external/linker/eng/ilasm.ilproj +++ b/external/linker/eng/ilasm.ilproj @@ -3,9 +3,6 @@ - - - netcoreapp3.0 diff --git a/external/linker/external/Mono.Cecil.overrides b/external/linker/external/Mono.Cecil.overrides index d49a1bef83..e4819f27ca 100644 --- a/external/linker/external/Mono.Cecil.overrides +++ b/external/linker/external/Mono.Cecil.overrides @@ -10,7 +10,7 @@ true - + false + + $(NoWarn);NU5128 - - - + + + + diff --git a/external/linker/src/ILLink.Tasks/ILLink.Tasks.targets b/external/linker/src/ILLink.Tasks/ILLink.Tasks.targets index 3a38f07f10..f5024eded8 100644 --- a/external/linker/src/ILLink.Tasks/ILLink.Tasks.targets +++ b/external/linker/src/ILLink.Tasks/ILLink.Tasks.targets @@ -2,7 +2,7 @@ <_LinkTaskDirectoryRoot>$(MSBuildThisFileDirectory)../tools/ - <_LinkTaskTFM Condition=" '$(MSBuildRuntimeType)' == 'Core' ">netcoreapp2.0 + <_LinkTaskTFM Condition=" '$(MSBuildRuntimeType)' == 'Core' ">netcoreapp3.0 <_LinkTaskTFM Condition=" '$(_LinkTaskTFM)' == '' ">net46 <_LinkTaskDirectory>$(_LinkTaskDirectoryRoot)$(_LinkTaskTFM)/ $(_LinkTaskDirectory)ILLink.Tasks.dll diff --git a/external/linker/src/ILLink.Tasks/LinkTask.cs b/external/linker/src/ILLink.Tasks/LinkTask.cs index 6c9b15a65a..f176f32d4b 100644 --- a/external/linker/src/ILLink.Tasks/LinkTask.cs +++ b/external/linker/src/ILLink.Tasks/LinkTask.cs @@ -111,7 +111,7 @@ namespace ILLink.Tasks var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location); // The linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks. - _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "netcoreapp2.0", "illink.dll"); + _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "netcoreapp3.0", "illink.dll"); return _illinkPath; } set => _illinkPath = value; diff --git a/external/linker/src/ILLink.Tasks/Sdk/Sdk.props b/external/linker/src/ILLink.Tasks/Sdk/Sdk.props index 8c9c2cacde..89633629c5 100644 --- a/external/linker/src/ILLink.Tasks/Sdk/Sdk.props +++ b/external/linker/src/ILLink.Tasks/Sdk/Sdk.props @@ -13,7 +13,7 @@ Copyright (c) .NET Foundation. All rights reserved. <_ILLinkTasksDirectoryRoot Condition=" '$(_ILLinkTasksDirectoryRoot)' == '' ">$(MSBuildThisFileDirectory)../tools/ - <_ILLinkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core' ">netcoreapp2.0 + <_ILLinkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core' ">netcoreapp3.0 <_ILLinkTasksTFM Condition=" '$(_ILLinkTasksTFM)' == '' ">net472 <_ILLinkTasksDirectory>$(_ILLinkTasksDirectoryRoot)$(_ILLinkTasksTFM)/ $(_ILLinkTasksDirectory)ILLink.Tasks.dll diff --git a/external/linker/src/analyzer/analyzer.csproj b/external/linker/src/analyzer/analyzer.csproj index 7fd89910fe..1d4852b685 100644 --- a/external/linker/src/analyzer/analyzer.csproj +++ b/external/linker/src/analyzer/analyzer.csproj @@ -1,49 +1,37 @@ - - + + - Debug - x86 - {4F328B3E-39C1-4E48-8093-F24390C58A5E} Exe LinkerAnalyzer illinkanalyzer - v4.7 + Debug;Release - - true - full - false - bin\Debug - DEBUG; - prompt - 4 - true - x86 + + + $(DefineConstants);FEATURE_ILLINK + netcoreapp3.0;net471 - - true - bin\Release - prompt - 4 - true - x86 + + + net471 + + + true + false + + + + true + + - - - {D68133BD-1E63-496E-9EDE-4FBDBF77B486} - Mono.Cecil - - - - - - - Options.cs - + + + - + \ No newline at end of file diff --git a/external/linker/src/linker/Linker.Steps/BlacklistStep.cs b/external/linker/src/linker/Linker.Steps/BlacklistStep.cs index 89b7429dea..f0d2db1667 100644 --- a/external/linker/src/linker/Linker.Steps/BlacklistStep.cs +++ b/external/linker/src/linker/Linker.Steps/BlacklistStep.cs @@ -46,11 +46,11 @@ namespace Mono.Linker.Steps { continue; try { - Context.LogMessage ("Processing resource linker descriptor: {0}", name); + Context.LogMessage ($"Processing resource linker descriptor: {name}"); AddToPipeline (GetResolveStep (name)); } catch (XmlException ex) { /* This could happen if some broken XML file is included. */ - Context.LogMessage ("Error processing {0}: {1}", name, ex); + Context.LogMessage ($"Error processing {name}: {ex}"); } } @@ -62,12 +62,12 @@ namespace Mono.Linker.Steps { .Where (res => ShouldProcessAssemblyResource (GetAssemblyName (res.Name))) .Cast ()) { try { - Context.LogMessage ("Processing embedded resource linker descriptor: {0}", rsc.Name); + Context.LogMessage ($"Processing embedded resource linker descriptor: {rsc.Name}"); AddToPipeline (GetExternalResolveStep (rsc, asm)); } catch (XmlException ex) { /* This could happen if some broken XML file is embedded. */ - Context.LogMessage ("Error processing {0}: {1}", rsc.Name, ex); + Context.LogMessage ($"Error processing {rsc.Name}: {ex}"); } } } @@ -127,14 +127,14 @@ namespace Mono.Linker.Steps { protected static XPathDocument GetExternalDescriptor (EmbeddedResource resource) { using (var sr = new StreamReader (resource.GetResourceStream ())) { - return new XPathDocument (new StringReader (sr.ReadToEnd ())); + return new XPathDocument (sr); } } static XPathDocument GetDescriptor (string descriptor) { using (StreamReader sr = new StreamReader (GetResource (descriptor))) { - return new XPathDocument (new StringReader (sr.ReadToEnd ())); + return new XPathDocument (sr); } } diff --git a/external/linker/src/linker/Linker.Steps/BodySubstituterStep.cs b/external/linker/src/linker/Linker.Steps/BodySubstituterStep.cs new file mode 100644 index 0000000000..f594999863 --- /dev/null +++ b/external/linker/src/linker/Linker.Steps/BodySubstituterStep.cs @@ -0,0 +1,310 @@ +using System; +using System.IO; +using System.Linq; +using System.Globalization; +using System.Xml.XPath; +using Mono.Cecil; + +namespace Mono.Linker.Steps +{ + public class BodySubstituterStep : BaseStep + { + protected override void Process () + { + var files = Context.Substitutions; + if (files == null) + return; + + foreach (var file in files) { + try { + ReadSubstitutionFile (GetSubstitutions (file)); + } catch (Exception ex) when (!(ex is XmlResolutionException)) { + throw new XmlResolutionException ($"Failed to process XML substitution '{file}'", ex); + } + + } + } + + static XPathDocument GetSubstitutions (string substitutionsFile) + { + using (FileStream fs = File.OpenRead (substitutionsFile)) { + return GetSubstitutions (fs); + } + } + + static XPathDocument GetSubstitutions (Stream substitutions) + { + using (StreamReader sr = new StreamReader (substitutions)) { + return new XPathDocument (sr); + } + } + + void ReadSubstitutionFile (XPathDocument document) + { + XPathNavigator nav = document.CreateNavigator (); + + // Initial structure check + if (!nav.MoveToChild ("linker", "")) + return; + + // TODO: Add handling for feature + + ProcessAssemblies (nav.SelectChildren ("assembly", "")); + } + + void ProcessAssemblies (XPathNodeIterator iterator) + { + while (iterator.MoveNext ()) { + var name = GetAssemblyName (iterator.Current); + + var cache = Context.Resolver.AssemblyCache; + + if (!cache.TryGetValue (name.Name, out AssemblyDefinition assembly)) { + Context.LogMessage (MessageImportance.Low, $"Could not match assembly '{name.FullName}' for substitution"); + continue; + } + + ProcessAssembly (assembly, iterator); + } + } + + void ProcessAssembly (AssemblyDefinition assembly, XPathNodeIterator iterator) + { + ProcessTypes (assembly, iterator.Current.SelectChildren ("type", "")); + } + + void ProcessTypes (AssemblyDefinition assembly, XPathNodeIterator iterator) + { + while (iterator.MoveNext ()) { + XPathNavigator nav = iterator.Current; + + string fullname = GetAttribute (nav, "fullname"); + + TypeDefinition type = assembly.MainModule.GetType (fullname); + + if (type == null) { + Context.LogMessage (MessageImportance.Low, $"Could not resolve type '{fullname}' for substitution"); + continue; + } + + ProcessType (type, nav); + } + } + + void ProcessType (TypeDefinition type, XPathNavigator nav) + { + if (!nav.HasChildren) + return; + + XPathNodeIterator methods = nav.SelectChildren ("method", ""); + if (methods.Count > 0) + ProcessMethods (type, methods); + + var fields = nav.SelectChildren ("field", ""); + if (fields.Count > 0) { + while (fields.MoveNext ()) + ProcessField (type, fields); + } + } + + void ProcessMethods (TypeDefinition type, XPathNodeIterator iterator) + { + while (iterator.MoveNext ()) + ProcessMethod (type, iterator); + } + + void ProcessMethod (TypeDefinition type, XPathNodeIterator iterator) + { + string signature = GetAttribute (iterator.Current, "signature"); + if (string.IsNullOrEmpty (signature)) + return; + + MethodDefinition method = FindMethod (type, signature); + if (method == null) { + Context.LogMessage (MessageImportance.Normal, $"Could not find method '{signature}' for substitution"); + return; + } + + string action = GetAttribute (iterator.Current, "body"); + switch (action) { + case "remove": + Annotations.SetAction (method, MethodAction.ConvertToThrow); + return; + case "stub": + string value = GetAttribute (iterator.Current, "value"); + if (value != "") { + if (!TryConvertValue (value, method.ReturnType, out object res)) { + Context.LogMessage (MessageImportance.High, $"Invalid value for '{signature}' stub"); + return; + } + + Annotations.SetMethodStubValue (method, res); + } + + Annotations.SetAction (method, MethodAction.ConvertToStub); + return; + default: + Context.LogMessage (MessageImportance.High, $"Unknown body modification '{action}' for '{signature}'"); + return; + } + } + + void ProcessField (TypeDefinition type, XPathNodeIterator iterator) + { + string name = GetAttribute (iterator.Current, "name"); + if (string.IsNullOrEmpty (name)) + return; + + var field = type.Fields.FirstOrDefault (f => f.Name == name); + if (field == null) { + Context.LogMessage (MessageImportance.Normal, $"Could not find field '{name}' for substitution."); + return; + } + + if (!field.IsStatic || field.IsLiteral) { + Context.LogMessage (MessageImportance.Normal, $"Substituted field '{name}' needs to be static field."); + return; + } + + string value = GetAttribute (iterator.Current, "value"); + if (string.IsNullOrEmpty (value)) { + Context.LogMessage (MessageImportance.High, $"Missing 'value' attribute for field '{field}'."); + return; + } + if (!TryConvertValue (value, field.FieldType, out object res)) { + Context.LogMessage (MessageImportance.High, $"Invalid value for '{field}': '{value}'."); + return; + } + + Annotations.SetFieldValue (field, res); + + string init = GetAttribute (iterator.Current, "initialize"); + if (init?.ToLowerInvariant () == "true") { + Annotations.SetSubstitutedInit (field); + } + } + + static bool TryConvertValue (string value, TypeReference target, out object result) + { + switch (target.MetadataType) { + case MetadataType.Boolean: + if (bool.TryParse (value, out bool bvalue)) { + result = bvalue ? 1 : 0; + return true; + } + + goto case MetadataType.Int32; + + case MetadataType.Byte: + if (!byte.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out byte byteresult)) + break; + + result = (int) byteresult; + return true; + + case MetadataType.SByte: + if (!sbyte.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out sbyte sbyteresult)) + break; + + result = (int) sbyteresult; + return true; + + case MetadataType.Int16: + if (!short.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out short shortresult)) + break; + + result = (int) shortresult; + return true; + + case MetadataType.UInt16: + if (!ushort.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out ushort ushortresult)) + break; + + result = (int) ushortresult; + return true; + + case MetadataType.Int32: + if (!int.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out int iresult)) + break; + + result = iresult; + return true; + + case MetadataType.UInt32: + if (!uint.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out uint uresult)) + break; + + result = (int)uresult; + return true; + + case MetadataType.Double: + if (!double.TryParse (value, NumberStyles.Float, CultureInfo.InvariantCulture, out double dresult)) + break; + + result = dresult; + return true; + + case MetadataType.Single: + if (!float.TryParse (value, NumberStyles.Float, CultureInfo.InvariantCulture, out float fresult)) + break; + + result = fresult; + return true; + + case MetadataType.Int64: + if (!long.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out long lresult)) + break; + + result = lresult; + return true; + + case MetadataType.UInt64: + if (!ulong.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out ulong ulresult)) + break; + + result = (long)ulresult; + return true; + + case MetadataType.Char: + if (!char.TryParse (value, out char chresult)) + break; + + result = (int) chresult; + return true; + + case MetadataType.String: + if (value is string || value == null) { + result = value; + return true; + } + + break; + } + + result = null; + return false; + } + + static MethodDefinition FindMethod (TypeDefinition type, string signature) + { + if (!type.HasMethods) + return null; + + foreach (MethodDefinition meth in type.Methods) + if (signature == ResolveFromXmlStep.GetMethodSignature (meth, includeGenericParameters: true)) + return meth; + + return null; + } + + static AssemblyNameReference GetAssemblyName (XPathNavigator nav) + { + return AssemblyNameReference.Parse (GetAttribute (nav, "fullname")); + } + + static string GetAttribute (XPathNavigator nav, string attribute) + { + return nav.GetAttribute (attribute, ""); + } + } +} diff --git a/external/linker/src/linker/Linker.Steps/CodeRewriterStep.cs b/external/linker/src/linker/Linker.Steps/CodeRewriterStep.cs index 5a94f7f13a..422edf460c 100644 --- a/external/linker/src/linker/Linker.Steps/CodeRewriterStep.cs +++ b/external/linker/src/linker/Linker.Steps/CodeRewriterStep.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using System.Linq; using Mono.Cecil; using Mono.Cecil.Cil; @@ -26,10 +27,65 @@ namespace Mono.Linker.Steps { ProcessMethod (method); } + if (type.HasFields && Annotations.HasSubstitutedInit (type)) { + AddFieldsInitializations (type); + } + foreach (var nested in type.NestedTypes) ProcessType (nested); } + void AddFieldsInitializations (TypeDefinition type) + { + Instruction ret; + ILProcessor processor; + + var cctor = type.Methods.FirstOrDefault (MethodDefinitionExtensions.IsStaticConstructor); + if (cctor == null) { + type.Attributes |= TypeAttributes.BeforeFieldInit; + + var method = new MethodDefinition (".cctor", + MethodAttributes.Static | MethodAttributes.Private | MethodAttributes.SpecialName | MethodAttributes.RTSpecialName | MethodAttributes.HideBySig, + assembly.MainModule.TypeSystem.Void); + + type.Methods.Add (method); + + processor = method.Body.GetILProcessor (); + ret = Instruction.Create (OpCodes.Ret); + processor.Append (ret); + } else { + ret = cctor.Body.Instructions.Last (l => l.OpCode.Code == Code.Ret); + var body = cctor.Body; + processor = cctor.Body.GetILProcessor (); + + for (int i = 0; i < body.Instructions.Count; ++i) { + var instr = body.Instructions [i]; + if (instr.OpCode.Code != Code.Stsfld) + continue; + + var field = (FieldReference)instr.Operand; + if (!Annotations.HasSubstitutedInit (field.Resolve ())) + continue; + + processor.Replace (instr, Instruction.Create (OpCodes.Pop)); + } + } + + foreach (var field in type.Fields) { + if (!Annotations.HasSubstitutedInit (field)) + continue; + + Context.Annotations.TryGetFieldUserValue (field, out object value); + + var valueInstr = CreateConstantResultInstruction (field.FieldType, value); + if (valueInstr == null) + throw new NotImplementedException (field.FieldType.ToString ()); + + processor.InsertBefore (ret, valueInstr); + processor.InsertBefore (ret, Instruction.Create (OpCodes.Stsfld, field)); + } + } + void ProcessMethod (MethodDefinition method) { switch (Annotations.GetAction (method)) { @@ -39,9 +95,6 @@ namespace Mono.Linker.Steps { case MethodAction.ConvertToThrow: RewriteBodyToLinkedAway (method); break; - case MethodAction.ConvertToFalse: - RewriteBodyToFalse (method); - break; } } @@ -65,28 +118,28 @@ namespace Mono.Linker.Steps { method.ClearDebugInformation(); } - protected virtual void RewriteBodyToFalse (MethodDefinition method) - { - if (!method.IsIL) - throw new NotImplementedException (); - - method.Body = CreateReturnFalseBody (method); - - method.ClearDebugInformation(); - } - MethodBody CreateThrowLinkedAwayBody (MethodDefinition method) { var body = new MethodBody (method); var il = body.GetILProcessor (); + MethodReference ctor; + + // Makes the body verifiable + if (method.IsConstructor && !method.DeclaringType.IsValueType) { + ctor = assembly.MainModule.ImportReference (Context.MarkedKnownMembers.ObjectCtor); + + il.Emit (OpCodes.Ldarg_0); + il.Emit (OpCodes.Call, ctor); + } // import the method into the current assembly - MethodReference ctor = Context.MarkedKnownMembers.NotSupportedExceptionCtorString; + ctor = Context.MarkedKnownMembers.NotSupportedExceptionCtorString; ctor = assembly.MainModule.ImportReference (ctor); il.Emit (OpCodes.Ldstr, "Linked away"); il.Emit (OpCodes.Newobj, ctor); il.Emit (OpCodes.Throw); + return body; } @@ -98,8 +151,11 @@ namespace Mono.Linker.Steps { throw new NotImplementedException (); var il = body.GetILProcessor (); - if (method.IsInstanceConstructor ()) { + if (method.IsInstanceConstructor () && !method.DeclaringType.IsValueType) { var base_ctor = method.DeclaringType.BaseType.GetDefaultInstanceConstructor(); + if (base_ctor == null) + throw new NotSupportedException ($"Cannot replace constructor for '{method.DeclaringType}' when no base default constructor exists"); + base_ctor = assembly.MainModule.ImportReference (base_ctor); il.Emit (OpCodes.Ldarg_0); @@ -109,27 +165,114 @@ namespace Mono.Linker.Steps { switch (method.ReturnType.MetadataType) { case MetadataType.Void: break; - case MetadataType.Boolean: - il.Emit (OpCodes.Ldc_I4_0); - break; default: - throw new NotImplementedException (method.ReturnType.FullName); + var instruction = CreateConstantResultInstruction (Context, method); + if (instruction != null) { + il.Append (instruction); + } else { + StubComplexBody (method, body, il); + } + break; } il.Emit (OpCodes.Ret); return body; } - MethodBody CreateReturnFalseBody (MethodDefinition method) + static void StubComplexBody (MethodDefinition method, MethodBody body, ILProcessor il) { - if (method.ReturnType.MetadataType != MetadataType.Boolean) - throw new NotImplementedException (); + switch (method.ReturnType.MetadataType) { + case MetadataType.MVar: + case MetadataType.ValueType: + var vd = new VariableDefinition (method.ReturnType); + body.Variables.Add (vd); + body.InitLocals = true; - var body = new MethodBody (method); - var il = body.GetILProcessor (); - il.Emit (OpCodes.Ldc_I4_0); - il.Emit (OpCodes.Ret); - return body; + il.Emit (OpCodes.Ldloca_S, vd); + il.Emit (OpCodes.Initobj, method.ReturnType); + il.Emit (OpCodes.Ldloc_0); + return; + case MetadataType.Pointer: + case MetadataType.IntPtr: + case MetadataType.UIntPtr: + il.Emit (OpCodes.Ldc_I4_0); + il.Emit (OpCodes.Conv_I); + return; + } + + throw new NotImplementedException (method.FullName); + } + + public static Instruction CreateConstantResultInstruction (LinkContext context, MethodDefinition method) + { + context.Annotations.TryGetMethodStubValue (method, out object value); + return CreateConstantResultInstruction (method.ReturnType, value); + } + + public static Instruction CreateConstantResultInstruction (TypeReference rtype, object value = null) + { + switch (rtype.MetadataType) { + case MetadataType.ValueType: + var definition = rtype.Resolve (); + if (definition?.IsEnum == true) { + rtype = definition.GetEnumUnderlyingType (); + } + + break; + case MetadataType.GenericInstance: + rtype = rtype.Resolve (); + break; + } + + switch (rtype.MetadataType) { + case MetadataType.Boolean: + if (value is int bintValue && bintValue == 1) + return Instruction.Create (OpCodes.Ldc_I4_1); + + return Instruction.Create (OpCodes.Ldc_I4_0); + + case MetadataType.String: + if (value is string svalue) + return Instruction.Create (OpCodes.Ldstr, svalue); + + return Instruction.Create (OpCodes.Ldnull); + + case MetadataType.Object: + case MetadataType.Array: + case MetadataType.Class: + Debug.Assert (value == null); + return Instruction.Create (OpCodes.Ldnull); + + case MetadataType.Double: + if (value is double dvalue) + return Instruction.Create (OpCodes.Ldc_R8, dvalue); + + return Instruction.Create (OpCodes.Ldc_R8, 0.0); + + case MetadataType.Single: + if (value is float fvalue) + return Instruction.Create (OpCodes.Ldc_R4, fvalue); + + return Instruction.Create (OpCodes.Ldc_R4, 0.0f); + + case MetadataType.Char: + case MetadataType.Byte: + case MetadataType.SByte: + case MetadataType.Int16: + case MetadataType.UInt16: + case MetadataType.Int32: + case MetadataType.UInt32: + if (value is int intValue) + return Instruction.Create (OpCodes.Ldc_I4, intValue); + + return Instruction.Create (OpCodes.Ldc_I4_0); + + case MetadataType.UInt64: + case MetadataType.Int64: + return Instruction.Create (OpCodes.Ldc_I8, 0L); + } + + return null; } } } diff --git a/external/linker/src/linker/Linker.Steps/MarkStep.cs b/external/linker/src/linker/Linker.Steps/MarkStep.cs deleted file mode 100644 index 67418a0949..0000000000 --- a/external/linker/src/linker/Linker.Steps/MarkStep.cs +++ /dev/null @@ -1,3229 +0,0 @@ -// -// MarkStep.cs -// -// Author: -// Jb Evain (jbevain@gmail.com) -// -// (C) 2006 Jb Evain -// (C) 2007 Novell, Inc. -// -// 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.Collections.Generic; -using System.Linq; -using System.Text.RegularExpressions; - -using Mono.Cecil; -using Mono.Cecil.Cil; -using Mono.Collections.Generic; - -namespace Mono.Linker.Steps { - - public partial class MarkStep : IStep { - - protected LinkContext _context; - protected Queue _methods; - protected List _virtual_methods; - protected Queue _assemblyLevelAttributes; - protected Queue _lateMarkedAttributes; - protected List _typesWithInterfaces; - protected List _unreachableBodies; - - public AnnotationStore Annotations { - get { return _context.Annotations; } - } - - public Tracer Tracer { - get { return _context.Tracer; } - } - - private MarkingHelpers MarkingHelpers => _context.MarkingHelpers; - - public MarkStep () - { - _methods = new Queue (); - _virtual_methods = new List (); - _assemblyLevelAttributes = new Queue (); - _lateMarkedAttributes = new Queue (); - _typesWithInterfaces = new List (); - _unreachableBodies = new List (); - } - - public virtual void Process (LinkContext context) - { - _context = context; - - Initialize (); - Process (); - Complete (); - } - - void Initialize () - { - foreach (AssemblyDefinition assembly in _context.GetAssemblies ()) - InitializeAssembly (assembly); - } - - protected virtual void InitializeAssembly (AssemblyDefinition assembly) - { - Tracer.Push (assembly); - try { - MarkAssembly (assembly); - - foreach (TypeDefinition type in assembly.MainModule.Types) - InitializeType (type); - } finally { - Tracer.Pop (); - } - } - - void Complete () - { - foreach (var body in _unreachableBodies) { - Annotations.SetAction (body.Method, MethodAction.ConvertToThrow); - } - } - - void InitializeType (TypeDefinition type) - { - if (type.HasNestedTypes) { - foreach (var nested in type.NestedTypes) - InitializeType (nested); - } - - if (!Annotations.IsMarked (type)) - return; - - MarkType (type); - - if (type.HasFields) - InitializeFields (type); - if (type.HasMethods) - InitializeMethods (type.Methods); - } - - protected bool IsFullyPreserved (TypeDefinition type) - { - if (Annotations.TryGetPreserve (type, out TypePreserve preserve) && preserve == TypePreserve.All) - return true; - - switch (Annotations.GetAction (type.Module.Assembly)) { - case AssemblyAction.Save: - case AssemblyAction.Copy: - case AssemblyAction.CopyUsed: - case AssemblyAction.AddBypassNGen: - case AssemblyAction.AddBypassNGenUsed: - return true; - } - - return false; - } - - void InitializeFields (TypeDefinition type) - { - foreach (FieldDefinition field in type.Fields) - if (Annotations.IsMarked (field)) - MarkField (field); - } - - void InitializeMethods (Collection methods) - { - foreach (MethodDefinition method in methods) - if (Annotations.IsMarked (method)) - EnqueueMethod (method); - } - - void Process () - { - if (QueueIsEmpty ()) - throw new InvalidOperationException ("No entry methods"); - - while (ProcessPrimaryQueue () || ProcessLazyAttributes () || ProcessLateMarkedAttributes ()) - - // deal with [TypeForwardedTo] pseudo-attributes - foreach (AssemblyDefinition assembly in _context.GetAssemblies ()) { - if (!assembly.MainModule.HasExportedTypes) - continue; - - foreach (var exported in assembly.MainModule.ExportedTypes) { - bool isForwarder = exported.IsForwarder; - var declaringType = exported.DeclaringType; - while (!isForwarder && (declaringType != null)) { - isForwarder = declaringType.IsForwarder; - declaringType = declaringType.DeclaringType; - } - - if (!isForwarder) - continue; - TypeDefinition type = exported.Resolve (); - if (type == null) - continue; - if (!Annotations.IsMarked (type)) - continue; - Tracer.Push (type); - try { - MarkingHelpers.MarkExportedType (exported, assembly.MainModule); - } finally { - Tracer.Pop (); - } - } - } - } - - bool ProcessPrimaryQueue () - { - if (QueueIsEmpty ()) - return false; - - while (!QueueIsEmpty ()) { - ProcessQueue (); - ProcessVirtualMethods (); - ProcessMarkedTypesWithInterfaces (); - ProcessPendingBodies (); - DoAdditionalProcessing (); - } - - return true; - } - - void ProcessQueue () - { - while (!QueueIsEmpty ()) { - MethodDefinition method = _methods.Dequeue (); - Tracer.Push (method); - try { - ProcessMethod (method); - } catch (Exception e) { - throw new MarkException (string.Format ("Error processing method: '{0}' in assembly: '{1}'", method.FullName, method.Module.Name), e, method); - } finally { - Tracer.Pop (); - } - } - } - - bool QueueIsEmpty () - { - return _methods.Count == 0; - } - - protected virtual void EnqueueMethod (MethodDefinition method) - { - _methods.Enqueue (method); - } - - void ProcessVirtualMethods () - { - foreach (MethodDefinition method in _virtual_methods) { - Tracer.Push (method); - ProcessVirtualMethod (method); - Tracer.Pop (); - } - } - - void ProcessMarkedTypesWithInterfaces () - { - // We may mark an interface type later on. Which means we need to reprocess any time with one or more interface implementations that have not been marked - // and if an interface type is found to be marked and implementation is not marked, then we need to mark that implementation - - // copy the data to avoid modified while enumerating error potential, which can happen under certain conditions. - var typesWithInterfaces = _typesWithInterfaces.ToArray (); - - foreach (var type in typesWithInterfaces) { - // Exception, types that have not been flagged as instantiated yet. These types may not need their interfaces even if the - // interface type is marked - if (!Annotations.IsInstantiated (type)) - continue; - - MarkInterfaceImplementations (type); - } - } - - void ProcessPendingBodies () - { - for (int i = 0; i < _unreachableBodies.Count; i++) { - var body = _unreachableBodies [i]; - if (Annotations.IsInstantiated (body.Method.DeclaringType)) { - MarkMethodBody (body); - _unreachableBodies.RemoveAt (i--); - } - } - } - - void ProcessVirtualMethod (MethodDefinition method) - { - var overrides = Annotations.GetOverrides (method); - if (overrides == null) - return; - - foreach (OverrideInformation @override in overrides) - ProcessOverride (@override); - } - - void ProcessOverride (OverrideInformation overrideInformation) - { - var method = overrideInformation.Override; - var @base = overrideInformation.Base; - if (!Annotations.IsMarked (method.DeclaringType)) - return; - - if (Annotations.IsProcessed (method)) - return; - - if (Annotations.IsMarked (method)) - return; - - var isInstantiated = Annotations.IsInstantiated (method.DeclaringType); - - // We don't need to mark overrides until it is possible that the type could be instantiated - // Note : The base type is interface check should be removed once we have base type sweeping - if (IsInterfaceOverrideThatDoesNotNeedMarked (overrideInformation, isInstantiated)) - return; - - if (!isInstantiated && !@base.IsAbstract && _context.IsOptimizationEnabled (CodeOptimizations.OverrideRemoval)) - return; - - MarkMethod (method); - ProcessVirtualMethod (method); - } - - bool IsInterfaceOverrideThatDoesNotNeedMarked (OverrideInformation overrideInformation, bool isInstantiated) - { - if (!overrideInformation.IsOverrideOfInterfaceMember || isInstantiated) - return false; - - if (overrideInformation.MatchingInterfaceImplementation != null) - return !Annotations.IsMarked (overrideInformation.MatchingInterfaceImplementation); - - var interfaceType = overrideInformation.InterfaceType; - var overrideDeclaringType = overrideInformation.Override.DeclaringType; - - if (!IsInterfaceImplementationMarked (overrideDeclaringType, interfaceType)) { - var derivedInterfaceTypes = Annotations.GetDerivedInterfacesForInterface (interfaceType); - - // There are no derived interface types that could be marked, it's safe to skip marking this override - if (derivedInterfaceTypes == null) - return true; - - // If none of the other interfaces on the type that implement the interface from the @base type are marked, then it's safe to skip - // marking this override - if (!derivedInterfaceTypes.Any (d => IsInterfaceImplementationMarked (overrideDeclaringType, d))) - return true; - } - - return false; - } - - bool IsInterfaceImplementationMarked (TypeDefinition type, TypeDefinition interfaceType) - { - return type.HasInterface (@interfaceType, out InterfaceImplementation implementation) && Annotations.IsMarked (implementation); - } - - void MarkMarshalSpec (IMarshalInfoProvider spec) - { - if (!spec.HasMarshalInfo) - return; - - var marshaler = spec.MarshalInfo as CustomMarshalInfo; - if (marshaler == null) - return; - - MarkType (marshaler.ManagedType); - } - - void MarkCustomAttributes (ICustomAttributeProvider provider) - { - if (!provider.HasCustomAttributes) - return; - - Tracer.Push (provider); - try { - foreach (CustomAttribute ca in provider.CustomAttributes) { - if (IsUserDependencyMarker (ca.AttributeType) && provider is MemberReference mr) { - MarkUserDependency (mr, ca); - - if (_context.KeepDependencyAttributes) { - MarkCustomAttribute (ca); - continue; - } - - if (Annotations.GetAction (mr.DeclaringType.Module.Assembly) == AssemblyAction.Link) - continue; - } - - if (_context.KeepUsedAttributeTypesOnly) { - _lateMarkedAttributes.Enqueue (new AttributeProviderPair (ca, provider)); - continue; - } - - if (!ShouldMarkCustomAttribute (ca, provider)) - continue; - - MarkCustomAttribute (ca); - MarkSpecialCustomAttributeDependencies (ca); - } - } finally { - Tracer.Pop (); - } - } - - protected virtual bool IsUserDependencyMarker (TypeReference type) - { - return PreserveDependencyLookupStep.IsPreserveDependencyAttribute (type); - } - - protected virtual void MarkUserDependency (MemberReference context, CustomAttribute ca) - { - if (ca.HasProperties && ca.Properties [0].Name == "Condition") { - var condition = ca.Properties [0].Argument.Value as string; - switch (condition) { - case "": - case null: - break; - case "DEBUG": - if (!_context.KeepMembersForDebugger) - return; - - break; - default: - // Don't have yet a way to match the general condition so everything is excluded - return; - } - } - - AssemblyDefinition assembly; - var args = ca.ConstructorArguments; - if (args.Count >= 3 && args [2].Value is string assemblyName) { - if (!_context.Resolver.AssemblyCache.TryGetValue (assemblyName, out assembly)) { - _context.Logger.LogMessage (MessageImportance.Low, $"Could not resolve '{assemblyName}' assembly dependency"); - return; - } - } else { - assembly = null; - } - - TypeDefinition td = null; - if (args.Count >= 2 && args [1].Value is string typeName) { - td = FindType (assembly ?? context.Module.Assembly, typeName); - - if (td == null) { - _context.Logger.LogMessage (MessageImportance.Low, $"Could not resolve '{typeName}' type dependency"); - return; - } - } else { - td = context.DeclaringType.Resolve (); - } - - string member = null; - string[] signature = null; - if (args.Count >= 1 && args [0].Value is string memberSignature) { - memberSignature = memberSignature.Replace (" ", ""); - var sign_start = memberSignature.IndexOf ('('); - var sign_end = memberSignature.LastIndexOf (')'); - if (sign_start > 0 && sign_end > sign_start) { - var parameters = memberSignature.Substring (sign_start + 1, sign_end - sign_start - 1); - signature = string.IsNullOrEmpty (parameters) ? Array.Empty () : parameters.Split (','); - member = memberSignature.Substring (0, sign_start); - } else { - member = memberSignature; - } - } - - if (MarkDependencyMethod (td, member, signature)) - return; - - if (MarkDependencyField (td, member)) - return; - - _context.Logger.LogMessage (MessageImportance.High, $"Could not resolve dependency member '{member}' declared in type '{td.FullName}'"); - } - - static TypeDefinition FindType (AssemblyDefinition assembly, string fullName) - { - fullName = fullName.ToCecilName (); - - var type = assembly.MainModule.GetType (fullName); - return type?.Resolve (); - } - - bool MarkDependencyMethod (TypeDefinition type, string name, string[] signature) - { - bool marked = false; - int arity; - - int arity_marker = name.IndexOf ('`'); - if (arity_marker < 1 || !int.TryParse (name.Substring (arity_marker + 1), out arity)) { - arity = 0; - } else { - name = name.Substring (0, arity_marker); - } - - foreach (var m in type.Methods) { - if (m.Name != name) - continue; - - if (m.GenericParameters.Count != arity) - continue; - - if (signature == null) { - MarkIndirectlyCalledMethod (m); - marked = true; - continue; - } - - var mp = m.Parameters; - if (mp.Count != signature.Length) - continue; - - int i = 0; - for (; i < signature.Length; ++i) { - if (mp [i].ParameterType.FullName != signature [i].Trim ().ToCecilName ()) { - i = -1; - break; - } - } - - if (i < 0) - continue; - - MarkIndirectlyCalledMethod (m); - marked = true; - } - - return marked; - } - - bool MarkDependencyField (TypeDefinition type, string name) - { - foreach (var f in type.Fields) { - if (f.Name == name) { - MarkField (f); - return true; - } - } - - return false; - } - - void LazyMarkCustomAttributes (ICustomAttributeProvider provider, AssemblyDefinition assembly) - { - if (!provider.HasCustomAttributes) - return; - - foreach (CustomAttribute ca in provider.CustomAttributes) - _assemblyLevelAttributes.Enqueue (new AttributeProviderPair (ca, assembly)); - } - - protected virtual void MarkCustomAttribute (CustomAttribute ca) - { - Tracer.Push ((object)ca.AttributeType ?? (object)ca); - try { - Annotations.Mark (ca); - MarkMethod (ca.Constructor); - - MarkCustomAttributeArguments (ca); - - TypeReference constructor_type = ca.Constructor.DeclaringType; - TypeDefinition type = constructor_type.Resolve (); - - if (type == null) { - HandleUnresolvedType (constructor_type); - return; - } - - MarkCustomAttributeProperties (ca, type); - MarkCustomAttributeFields (ca, type); - } finally { - Tracer.Pop (); - } - } - - protected virtual bool ShouldMarkCustomAttribute (CustomAttribute ca, ICustomAttributeProvider provider) - { - var attr_type = ca.AttributeType; - - if (_context.KeepUsedAttributeTypesOnly) { - switch (attr_type.FullName) { - // [ThreadStatic] and [ContextStatic] are required by the runtime - case "System.ThreadStaticAttribute": - case "System.ContextStaticAttribute": - return true; - // Attributes related to `fixed` keyword used to declare fixed length arrays - case "System.Runtime.CompilerServices.FixedBufferAttribute": - return true; - case "System.Runtime.InteropServices.InterfaceTypeAttribute": - case "System.Runtime.InteropServices.GuidAttribute": - return true; - } - - if (!Annotations.IsMarked (attr_type.Resolve ())) - return false; - } - - return true; - } - - protected virtual bool ShouldMarkTypeStaticConstructor (TypeDefinition type) - { - if (Annotations.HasPreservedStaticCtor (type)) - return false; - - if (type.IsBeforeFieldInit && _context.IsOptimizationEnabled (CodeOptimizations.BeforeFieldInit)) - return false; - - return true; - } - - protected void MarkStaticConstructor (TypeDefinition type) - { - if (MarkMethodIf (type.Methods, IsNonEmptyStaticConstructor) != null) - Annotations.SetPreservedStaticCtor (type); - } - - protected virtual bool ShouldMarkTopLevelCustomAttribute (AttributeProviderPair app, MethodDefinition resolvedConstructor) - { - var ca = app.Attribute; - - if (!ShouldMarkCustomAttribute (app.Attribute, app.Provider)) - return false; - - // If an attribute's module has not been marked after processing all types in all assemblies and the attribute itself has not been marked, - // then surely nothing is using this attribute and there is no need to mark it - if (!Annotations.IsMarked (resolvedConstructor.Module) && !Annotations.IsMarked (ca.AttributeType)) - return false; - - if (ca.Constructor.DeclaringType.Namespace == "System.Diagnostics") { - string attributeName = ca.Constructor.DeclaringType.Name; - if (attributeName == "DebuggerDisplayAttribute" || attributeName == "DebuggerTypeProxyAttribute") { - var displayTargetType = GetDebuggerAttributeTargetType (app.Attribute, (AssemblyDefinition) app.Provider); - if (displayTargetType == null || !Annotations.IsMarked (displayTargetType)) - return false; - } - } - - return true; - } - - protected void MarkSecurityDeclarations (ISecurityDeclarationProvider provider) - { - // most security declarations are removed (if linked) but user code might still have some - // and if the attributes references types then they need to be marked too - if ((provider == null) || !provider.HasSecurityDeclarations) - return; - - foreach (var sd in provider.SecurityDeclarations) - MarkSecurityDeclaration (sd); - } - - protected virtual void MarkSecurityDeclaration (SecurityDeclaration sd) - { - if (!sd.HasSecurityAttributes) - return; - - foreach (var sa in sd.SecurityAttributes) - MarkSecurityAttribute (sa); - } - - protected virtual void MarkSecurityAttribute (SecurityAttribute sa) - { - TypeReference security_type = sa.AttributeType; - TypeDefinition type = security_type.Resolve (); - if (type == null) { - HandleUnresolvedType (security_type); - return; - } - - MarkType (security_type); - MarkSecurityAttributeProperties (sa, type); - MarkSecurityAttributeFields (sa, type); - } - - protected void MarkSecurityAttributeProperties (SecurityAttribute sa, TypeDefinition attribute) - { - if (!sa.HasProperties) - return; - - foreach (var named_argument in sa.Properties) - MarkCustomAttributeProperty (named_argument, attribute); - } - - protected void MarkSecurityAttributeFields (SecurityAttribute sa, TypeDefinition attribute) - { - if (!sa.HasFields) - return; - - foreach (var named_argument in sa.Fields) - MarkCustomAttributeField (named_argument, attribute); - } - - protected void MarkCustomAttributeProperties (CustomAttribute ca, TypeDefinition attribute) - { - if (!ca.HasProperties) - return; - - foreach (var named_argument in ca.Properties) - MarkCustomAttributeProperty (named_argument, attribute); - } - - protected void MarkCustomAttributeProperty (CustomAttributeNamedArgument namedArgument, TypeDefinition attribute) - { - PropertyDefinition property = GetProperty (attribute, namedArgument.Name); - Tracer.Push (property); - if (property != null) - MarkMethod (property.SetMethod); - - MarkCustomAttributeArgument (namedArgument.Argument); - Tracer.Pop (); - } - - PropertyDefinition GetProperty (TypeDefinition type, string propertyname) - { - while (type != null) { - PropertyDefinition property = type.Properties.FirstOrDefault (p => p.Name == propertyname); - if (property != null) - return property; - - type = type.BaseType != null ? ResolveTypeDefinition (type.BaseType) : null; - } - - return null; - } - - protected void MarkCustomAttributeFields (CustomAttribute ca, TypeDefinition attribute) - { - if (!ca.HasFields) - return; - - foreach (var named_argument in ca.Fields) - MarkCustomAttributeField (named_argument, attribute); - } - - protected void MarkCustomAttributeField (CustomAttributeNamedArgument namedArgument, TypeDefinition attribute) - { - FieldDefinition field = GetField (attribute, namedArgument.Name); - if (field != null) - MarkField (field); - - MarkCustomAttributeArgument (namedArgument.Argument); - } - - FieldDefinition GetField (TypeDefinition type, string fieldname) - { - while (type != null) { - FieldDefinition field = type.Fields.FirstOrDefault (f => f.Name == fieldname); - if (field != null) - return field; - - type = type.BaseType != null ? ResolveTypeDefinition (type.BaseType) : null; - } - - return null; - } - - MethodDefinition GetMethodWithNoParameters (TypeDefinition type, string methodname) - { - while (type != null) { - MethodDefinition method = type.Methods.FirstOrDefault (m => m.Name == methodname && !m.HasParameters); - if (method != null) - return method; - - type = type.BaseType != null ? ResolveTypeDefinition (type.BaseType) : null; - } - - return null; - } - - void MarkCustomAttributeArguments (CustomAttribute ca) - { - if (!ca.HasConstructorArguments) - return; - - foreach (var argument in ca.ConstructorArguments) - MarkCustomAttributeArgument (argument); - } - - void MarkCustomAttributeArgument (CustomAttributeArgument argument) - { - var at = argument.Type; - - if (at.IsArray) { - var et = at.GetElementType (); - - MarkType (et); - if (argument.Value == null) - return; - - foreach (var caa in (CustomAttributeArgument [])argument.Value) - MarkCustomAttributeArgument (caa); - - return; - } - - if (at.Namespace == "System") { - switch (at.Name) { - case "Type": - MarkType (argument.Type); - MarkType ((TypeReference)argument.Value); - return; - - case "Object": - var boxed_value = (CustomAttributeArgument)argument.Value; - MarkType (boxed_value.Type); - MarkCustomAttributeArgument (boxed_value); - return; - } - } - } - - protected bool CheckProcessed (IMetadataTokenProvider provider) - { - if (Annotations.IsProcessed (provider)) - return true; - - Annotations.Processed (provider); - return false; - } - - protected void MarkAssembly (AssemblyDefinition assembly) - { - if (CheckProcessed (assembly)) - return; - - ProcessModule (assembly); - - MarkAssemblyCustomAttributes (assembly); - - MarkSecurityDeclarations (assembly); - - foreach (ModuleDefinition module in assembly.Modules) - LazyMarkCustomAttributes (module, assembly); - } - - void ProcessModule (AssemblyDefinition assembly) - { - // Pre-mark if there is any methods as they need to be executed - // at assembly load time - foreach (TypeDefinition type in assembly.MainModule.Types) - { - if (type.Name == "" && type.HasMethods) - { - MarkType (type); - break; - } - } - } - - bool ProcessLazyAttributes () - { - if (Annotations.HasMarkedAnyIndirectlyCalledMethods () && MarkDisablePrivateReflectionAttribute ()) - return true; - - var startingQueueCount = _assemblyLevelAttributes.Count; - if (startingQueueCount == 0) - return false; - - var skippedItems = new List (); - var markOccurred = false; - - while (_assemblyLevelAttributes.Count != 0) { - var assemblyLevelAttribute = _assemblyLevelAttributes.Dequeue (); - var customAttribute = assemblyLevelAttribute.Attribute; - - var resolved = customAttribute.Constructor.Resolve (); - if (resolved == null) { - HandleUnresolvedMethod (customAttribute.Constructor); - continue; - } - - if (!ShouldMarkTopLevelCustomAttribute (assemblyLevelAttribute, resolved)) { - skippedItems.Add (assemblyLevelAttribute); - continue; - } - - string attributeFullName = customAttribute.Constructor.DeclaringType.FullName; - switch (attributeFullName) { - case "System.Diagnostics.DebuggerDisplayAttribute": - MarkTypeWithDebuggerDisplayAttribute (GetDebuggerAttributeTargetType (assemblyLevelAttribute.Attribute, (AssemblyDefinition) assemblyLevelAttribute.Provider), customAttribute); - break; - case "System.Diagnostics.DebuggerTypeProxyAttribute": - MarkTypeWithDebuggerTypeProxyAttribute (GetDebuggerAttributeTargetType (assemblyLevelAttribute.Attribute, (AssemblyDefinition) assemblyLevelAttribute.Provider), customAttribute); - break; - } - - markOccurred = true; - MarkCustomAttribute (customAttribute); - } - - // requeue the items we skipped in case we need to make another pass - foreach (var item in skippedItems) - _assemblyLevelAttributes.Enqueue (item); - - return markOccurred; - } - - bool ProcessLateMarkedAttributes () - { - var startingQueueCount = _lateMarkedAttributes.Count; - if (startingQueueCount == 0) - return false; - - var skippedItems = new List (); - var markOccurred = false; - - while (_lateMarkedAttributes.Count != 0) { - var attributeProviderPair = _lateMarkedAttributes.Dequeue (); - var customAttribute = attributeProviderPair.Attribute; - - var resolved = customAttribute.Constructor.Resolve (); - if (resolved == null) { - HandleUnresolvedMethod (customAttribute.Constructor); - continue; - } - - if (!ShouldMarkCustomAttribute (customAttribute, attributeProviderPair.Provider)) { - skippedItems.Add (attributeProviderPair); - continue; - } - - markOccurred = true; - MarkCustomAttribute (customAttribute); - MarkSpecialCustomAttributeDependencies (customAttribute); - } - - // requeue the items we skipped in case we need to make another pass - foreach (var item in skippedItems) - _lateMarkedAttributes.Enqueue (item); - - return markOccurred; - } - - protected void MarkField (FieldReference reference) - { - if (reference.DeclaringType is GenericInstanceType) - MarkType (reference.DeclaringType); - - FieldDefinition field = ResolveFieldDefinition (reference); - - if (field == null) { - HandleUnresolvedField (reference); - return; - } - - MarkField (field); - } - - void MarkField (FieldDefinition field) - { - if (CheckProcessed (field)) - return; - - MarkType (field.DeclaringType); - MarkType (field.FieldType); - MarkCustomAttributes (field); - MarkMarshalSpec (field); - DoAdditionalFieldProcessing (field); - - var parent = field.DeclaringType; - if (!Annotations.HasPreservedStaticCtor (parent)) - MarkStaticConstructor (parent); - - Annotations.Mark (field); - } - - protected virtual bool IgnoreScope (IMetadataScope scope) - { - AssemblyDefinition assembly = ResolveAssembly (scope); - return Annotations.GetAction (assembly) != AssemblyAction.Link; - } - - static FieldDefinition ResolveFieldDefinition (FieldReference field) - { - if (field is FieldDefinition fd) - return fd; - - return field.Resolve (); - } - - void MarkScope (IMetadataScope scope) - { - var provider = scope as IMetadataTokenProvider; - if (provider == null) - return; - - Annotations.Mark (provider); - } - - protected virtual void MarkSerializable (TypeDefinition type) - { - MarkDefaultConstructor (type); - MarkMethodsIf (type.Methods, IsSpecialSerializationConstructor); - } - - protected virtual TypeDefinition MarkType (TypeReference reference) - { - if (reference == null) - return null; - - reference = GetOriginalType (reference); - - if (reference is FunctionPointerType) - return null; - - if (reference is GenericParameter) - return null; - -// if (IgnoreScope (reference.Scope)) -// return null; - - TypeDefinition type = ResolveTypeDefinition (reference); - - if (type == null) { - HandleUnresolvedType (reference); - return null; - } - - if (CheckProcessed (type)) - return null; - - Tracer.Push (type); - - MarkScope (type.Scope); - MarkType (type.BaseType); - MarkType (type.DeclaringType); - MarkCustomAttributes (type); - MarkSecurityDeclarations (type); - - if (IsMulticastDelegate (type)) { - MarkMulticastDelegate (type); - } - - if (IsSerializable (type)) - MarkSerializable (type); - - if (!_context.IsFeatureExcluded ("etw") && BCL.EventTracingForWindows.IsEventSourceImplementation (type, _context)) { - MarkEventSourceProviders (type); - } - - MarkTypeSpecialCustomAttributes (type); - - MarkGenericParameterProvider (type); - - // keep fields for value-types and for classes with LayoutKind.Sequential or Explicit - if (type.IsValueType || !type.IsAutoLayout) - MarkFields (type, type.IsEnum); - - // There are a number of markings we can defer until later when we know it's possible a reference type could be instantiated - // For example, if no instance of a type exist, then we don't need to mark the interfaces on that type - // However, for some other types there is no benefit to deferring - if (type.IsInterface) { - // There's no benefit to deferring processing of an interface type until we know a type implementing that interface is marked - MarkRequirementsForInstantiatedTypes (type); - } else if (type.IsValueType) { - // Note : Technically interfaces could be removed from value types in some of the same cases as reference types, however, it's harder to know when - // a value type instance could exist. You'd have to track initobj and maybe locals types. Going to punt for now. - MarkRequirementsForInstantiatedTypes (type); - } else if (IsFullyPreserved (type)) { - // Here for a couple reasons: - // * Edge case to cover a scenario where a type has preserve all, implements interfaces, but does not have any instance ctors. - // Normally TypePreserve.All would cause an instance ctor to be marked and that would in turn lead to MarkInterfaceImplementations being called - // Without an instance ctor, MarkInterfaceImplementations is not called and then TypePreserve.All isn't truly respected. - // * If an assembly has the action Copy and had ResolveFromAssemblyStep ran for the assembly, then InitializeType will have led us here - // When the entire assembly is preserved, then all interfaces, base, etc will be preserved on the type, so we need to make sure - // all of these types are marked. For example, if an interface implementation is of a type in another assembly that is linked, - // and there are no other usages of that interface type, then we need to make sure the interface type is still marked because - // this type is going to retain the interface implementation - MarkRequirementsForInstantiatedTypes (type); - } else if (AlwaysMarkTypeAsInstantiated (type)) { - MarkRequirementsForInstantiatedTypes (type); - } - - if (type.HasInterfaces) - _typesWithInterfaces.Add (type); - - if (type.HasMethods) { - MarkMethodsIf (type.Methods, IsVirtualNeededByTypeDueToPreservedScope); - if (ShouldMarkTypeStaticConstructor (type)) - MarkStaticConstructor (type); - - MarkMethodsIf (type.Methods, HasSerializationAttribute); - } - - DoAdditionalTypeProcessing (type); - - Tracer.Pop (); - - Annotations.Mark (type); - - ApplyPreserveInfo (type); - - return type; - } - - // Allow subclassers to mark additional things in the main processing loop - protected virtual void DoAdditionalProcessing () - { - } - - // Allow subclassers to mark additional things - protected virtual void DoAdditionalTypeProcessing (TypeDefinition type) - { - } - - // Allow subclassers to mark additional things - protected virtual void DoAdditionalFieldProcessing (FieldDefinition field) - { - } - - // Allow subclassers to mark additional things - protected virtual void DoAdditionalPropertyProcessing (PropertyDefinition property) - { - } - - // Allow subclassers to mark additional things - protected virtual void DoAdditionalEventProcessing (EventDefinition evt) - { - } - - // Allow subclassers to mark additional things - protected virtual void DoAdditionalInstantiatedTypeProcessing (TypeDefinition type) - { - } - - void MarkAssemblyCustomAttributes (AssemblyDefinition assembly) - { - if (!assembly.HasCustomAttributes) - return; - - foreach (CustomAttribute attribute in assembly.CustomAttributes) - _assemblyLevelAttributes.Enqueue (new AttributeProviderPair (attribute, assembly)); - } - - TypeDefinition GetDebuggerAttributeTargetType (CustomAttribute ca, AssemblyDefinition asm) - { - TypeReference targetTypeReference = null; - foreach (var property in ca.Properties) { - if (property.Name == "Target") { - targetTypeReference = (TypeReference) property.Argument.Value; - break; - } - - if (property.Name == "TargetTypeName") { - if (TypeNameParser.TryParseTypeAssemblyQualifiedName ((string) property.Argument.Value, out string typeName, out string assemblyName)) { - if (string.IsNullOrEmpty (assemblyName)) - targetTypeReference = asm.MainModule.GetType (typeName); - else - targetTypeReference = _context.GetAssemblies ().FirstOrDefault (a => a.Name.Name == assemblyName)?.MainModule.GetType (typeName); - } - break; - } - } - - if (targetTypeReference != null) - return ResolveTypeDefinition (targetTypeReference); - - return null; - } - - void MarkTypeSpecialCustomAttributes (TypeDefinition type) - { - if (!type.HasCustomAttributes) - return; - - foreach (CustomAttribute attribute in type.CustomAttributes) { - var attrType = attribute.Constructor.DeclaringType; - switch (attrType.Name) { - case "XmlSchemaProviderAttribute" when attrType.Namespace == "System.Xml.Serialization": - MarkXmlSchemaProvider (type, attribute); - break; - case "DebuggerDisplayAttribute" when attrType.Namespace == "System.Diagnostics": - MarkTypeWithDebuggerDisplayAttribute (type, attribute); - break; - case "DebuggerTypeProxyAttribute" when attrType.Namespace == "System.Diagnostics": - MarkTypeWithDebuggerTypeProxyAttribute (type, attribute); - break; - case "EventDataAttribute" when attrType.Namespace == "System.Diagnostics.Tracing": - MarkMethodsIf (type.Methods, IsPublicInstancePropertyMethod); - break; - case "TypeDescriptionProviderAttribute" when attrType.Namespace == "System.ComponentModel": - MarkTypeConverterLikeDependency (attribute, l => l.IsDefaultConstructor ()); - break; - } - } - } - - // - // Used for known framework attributes which can be applied to any element - // - bool MarkSpecialCustomAttributeDependencies (CustomAttribute ca) - { - var dt = ca.Constructor.DeclaringType; - if (dt.Name == "TypeConverterAttribute" && dt.Namespace == "System.ComponentModel") { - MarkTypeConverterLikeDependency (ca, l => - l.IsDefaultConstructor () || - l.Parameters.Count == 1 && l.Parameters [0].ParameterType.IsTypeOf ("System", "Type")); - return true; - } - - return false; - } - - void MarkMethodSpecialCustomAttributes (MethodDefinition method) - { - if (!method.HasCustomAttributes) - return; - - foreach (CustomAttribute attribute in method.CustomAttributes) { - switch (attribute.Constructor.DeclaringType.FullName) { - case "System.Web.Services.Protocols.SoapHeaderAttribute": - MarkSoapHeader (method, attribute); - break; - } - } - } - - void MarkXmlSchemaProvider (TypeDefinition type, CustomAttribute attribute) - { - string method_name; - if (!TryGetStringArgument (attribute, out method_name)) - return; - - MarkNamedMethod (type, method_name); - } - - protected virtual void MarkTypeConverterLikeDependency (CustomAttribute attribute, Func predicate) - { - var args = attribute.ConstructorArguments; - if (args.Count < 1) - return; - - TypeDefinition tdef = null; - switch (attribute.ConstructorArguments [0].Value) { - case string s: - tdef = ResolveFullyQualifiedTypeName (s); - break; - case TypeReference type: - tdef = type.Resolve (); - break; - } - - if (tdef == null) - return; - - MarkMethodsIf (tdef.Methods, predicate); - } - - void MarkTypeWithDebuggerDisplayAttribute (TypeDefinition type, CustomAttribute attribute) - { - if (_context.KeepMembersForDebugger) { - - string displayString = (string) attribute.ConstructorArguments[0].Value; - - Regex regex = new Regex ("{[^{}]+}", RegexOptions.Compiled); - - foreach (Match match in regex.Matches (displayString)) { - // Remove '{' and '}' - string realMatch = match.Value.Substring (1, match.Value.Length - 2); - - // Remove ",nq" suffix if present - // (it asks the expression evaluator to remove the quotes when displaying the final value) - if (Regex.IsMatch(realMatch, @".+,\s*nq")) { - realMatch = realMatch.Substring (0, realMatch.LastIndexOf (',')); - } - - if (realMatch.EndsWith ("()")) { - string methodName = realMatch.Substring (0, realMatch.Length - 2); - MethodDefinition method = GetMethodWithNoParameters (type, methodName); - if (method != null) { - MarkMethod (method); - continue; - } - } else { - FieldDefinition field = GetField (type, realMatch); - if (field != null) { - MarkField (field); - continue; - } - - PropertyDefinition property = GetProperty (type, realMatch); - if (property != null) { - if (property.GetMethod != null) { - MarkMethod (property.GetMethod); - } - if (property.SetMethod != null) { - MarkMethod (property.SetMethod); - } - continue; - } - } - - while (type != null) { - MarkMethods (type); - MarkFields (type, includeStatic: true); - type = type.BaseType != null ? ResolveTypeDefinition (type.BaseType) : null; - } - return; - } - } - } - - void MarkTypeWithDebuggerTypeProxyAttribute (TypeDefinition type, CustomAttribute attribute) - { - if (_context.KeepMembersForDebugger) { - object constructorArgument = attribute.ConstructorArguments[0].Value; - TypeReference proxyTypeReference = constructorArgument as TypeReference; - if (proxyTypeReference == null) { - string proxyTypeReferenceString = constructorArgument as string; - if (proxyTypeReferenceString != null) { - proxyTypeReference = type.Module.GetType (proxyTypeReferenceString, runtimeName: true); - } - } - - if (proxyTypeReference == null) { - return; - } - - MarkType (proxyTypeReference); - - TypeDefinition proxyType = ResolveTypeDefinition (proxyTypeReference); - if (proxyType != null) { - MarkMethods (proxyType); - MarkFields (proxyType, includeStatic: true); - } - } - } - - static bool TryGetStringArgument (CustomAttribute attribute, out string argument) - { - argument = null; - - if (attribute.ConstructorArguments.Count < 1) - return false; - - argument = attribute.ConstructorArguments [0].Value as string; - - return argument != null; - } - - protected int MarkNamedMethod (TypeDefinition type, string method_name) - { - if (!type.HasMethods) - return 0; - - int count = 0; - foreach (MethodDefinition method in type.Methods) { - if (method.Name != method_name) - continue; - - MarkMethod (method); - count++; - } - - return count; - } - - void MarkSoapHeader (MethodDefinition method, CustomAttribute attribute) - { - string member_name; - if (!TryGetStringArgument (attribute, out member_name)) - return; - - MarkNamedField (method.DeclaringType, member_name); - MarkNamedProperty (method.DeclaringType, member_name); - } - - void MarkNamedField (TypeDefinition type, string field_name) - { - if (!type.HasFields) - return; - - foreach (FieldDefinition field in type.Fields) { - if (field.Name != field_name) - continue; - - MarkField (field); - } - } - - void MarkNamedProperty (TypeDefinition type, string property_name) - { - if (!type.HasProperties) - return; - - foreach (PropertyDefinition property in type.Properties) { - if (property.Name != property_name) - continue; - - Tracer.Push (property); - MarkMethod (property.GetMethod); - MarkMethod (property.SetMethod); - Tracer.Pop (); - } - } - - void MarkInterfaceImplementations (TypeDefinition type) - { - if (!type.HasInterfaces) - return; - - foreach (var iface in type.Interfaces) { - // Only mark interface implementations of interface types that have been marked. - // This enables stripping of interfaces that are never used - var resolvedInterfaceType = iface.InterfaceType.Resolve (); - if (resolvedInterfaceType == null) { - HandleUnresolvedType (iface.InterfaceType); - continue; - } - - if (ShouldMarkInterfaceImplementation (type, iface, resolvedInterfaceType)) - MarkInterfaceImplementation (iface); - } - } - - void MarkGenericParameterProvider (IGenericParameterProvider provider) - { - if (!provider.HasGenericParameters) - return; - - foreach (GenericParameter parameter in provider.GenericParameters) - MarkGenericParameter (parameter); - } - - void MarkGenericParameter (GenericParameter parameter) - { - MarkCustomAttributes (parameter); - if (!parameter.HasConstraints) - return; - - foreach (var constraint in parameter.Constraints) { - MarkCustomAttributes (constraint); - MarkType (constraint.ConstraintType); - } - } - - bool IsVirtualNeededByTypeDueToPreservedScope (MethodDefinition method) - { - if (!method.IsVirtual) - return false; - - var base_list = Annotations.GetBaseMethods (method); - if (base_list == null) - return false; - - foreach (MethodDefinition @base in base_list) { - // Just because the type is marked does not mean we need interface methods. - // if the type is never instantiated, interfaces will be removed - if (@base.DeclaringType.IsInterface) - continue; - - // If the type is marked, we need to keep overrides of abstract members defined in assemblies - // that are copied. However, if the base method is virtual, then we don't need to keep the override - // until the type could be instantiated - if (!@base.IsAbstract) - continue; - - if (IgnoreScope (@base.DeclaringType.Scope)) - return true; - - if (IsVirtualNeededByTypeDueToPreservedScope (@base)) - return true; - } - - return false; - } - - bool IsVirtualNeededByInstantiatedTypeDueToPreservedScope (MethodDefinition method) - { - if (!method.IsVirtual) - return false; - - var base_list = Annotations.GetBaseMethods (method); - if (base_list == null) - return false; - - foreach (MethodDefinition @base in base_list) { - if (IgnoreScope (@base.DeclaringType.Scope)) - return true; - - if (IsVirtualNeededByTypeDueToPreservedScope (@base)) - return true; - } - - return false; - } - - static bool IsSpecialSerializationConstructor (MethodDefinition method) - { - if (!method.IsInstanceConstructor ()) - return false; - - var parameters = method.Parameters; - if (parameters.Count != 2) - return false; - - return parameters [0].ParameterType.Name == "SerializationInfo" && - parameters [1].ParameterType.Name == "StreamingContext"; - } - - protected void MarkMethodsIf (Collection methods, Func predicate) - { - foreach (MethodDefinition method in methods) - if (predicate (method)) - MarkMethod (method); - } - - protected MethodDefinition MarkMethodIf (Collection methods, Func predicate) - { - foreach (MethodDefinition method in methods) { - if (predicate (method)) { - return MarkMethod (method); - } - } - - return null; - } - - protected bool MarkDefaultConstructor (TypeDefinition type) - { - if (type?.HasMethods != true) - return false; - - return MarkMethodIf (type.Methods, MethodDefinitionExtensions.IsDefaultConstructor) != null; - } - - static bool IsNonEmptyStaticConstructor (MethodDefinition method) - { - if (!method.IsStaticConstructor ()) - return false; - - if (!method.HasBody || !method.IsIL) - return true; - - if (method.Body.CodeSize != 1) - return true; - - return method.Body.Instructions [0].OpCode.Code != Code.Ret; - } - - static bool HasSerializationAttribute (MethodDefinition method) - { - if (!method.HasCustomAttributes) - return false; - foreach (var ca in method.CustomAttributes) { - var cat = ca.AttributeType; - if (cat.Namespace != "System.Runtime.Serialization") - continue; - switch (cat.Name) { - case "OnDeserializedAttribute": - case "OnDeserializingAttribute": - case "OnSerializedAttribute": - case "OnSerializingAttribute": - return true; - } - } - return false; - } - - static bool IsSerializable (TypeDefinition td) - { - return (td.Attributes & TypeAttributes.Serializable) != 0; - } - - static bool IsMulticastDelegate (TypeDefinition td) - { - return td.BaseType != null && td.BaseType.FullName == "System.MulticastDelegate"; - } - - protected virtual bool AlwaysMarkTypeAsInstantiated (TypeDefinition td) - { - switch (td.Name) { - // These types are created from native code which means we are unable to track when they are instantiated - // Since these are such foundational types, let's take the easy route and just always assume an instance of one of these - // could exist - case "Delegate": - case "MulticastDelegate": - case "ValueType": - case "Enum": - return td.Namespace == "System"; - } - - return false; - } - - void MarkEventSourceProviders (TypeDefinition td) - { - foreach (var nestedType in td.NestedTypes) { - if (BCL.EventTracingForWindows.IsProviderName (nestedType.Name)) - MarkStaticFields (nestedType); - } - } - - protected virtual void MarkMulticastDelegate (TypeDefinition type) - { - MarkMethodCollection (type.Methods); - } - - protected static TypeDefinition ResolveTypeDefinition (TypeReference type) - { - TypeDefinition td = type as TypeDefinition; - if (td == null) - td = type.Resolve (); - - return td; - } - - TypeDefinition ResolveFullyQualifiedTypeName (string name) - { - if (!TypeNameParser.TryParseTypeAssemblyQualifiedName (name, out string typeName, out string assemblyName)) - return null; - - foreach (var assemblyDefinition in _context.GetAssemblies ()) { - if (assemblyName != null && assemblyDefinition.Name.Name != assemblyName) - continue; - - var foundType = assemblyDefinition.MainModule.GetType (typeName); - if (foundType == null) - continue; - - return foundType; - } - - return null; - } - - protected TypeReference GetOriginalType (TypeReference type) - { - while (type is TypeSpecification) { - GenericInstanceType git = type as GenericInstanceType; - if (git != null) - MarkGenericArguments (git); - - var mod = type as IModifierType; - if (mod != null) - MarkModifierType (mod); - - var fnptr = type as FunctionPointerType; - if (fnptr != null) { - MarkParameters (fnptr); - MarkType (fnptr.ReturnType); - break; // FunctionPointerType is the original type - } - else { - type = ((TypeSpecification) type).ElementType; - } - } - - return type; - } - - void MarkParameters (FunctionPointerType fnptr) - { - if (!fnptr.HasParameters) - return; - - for (int i = 0; i < fnptr.Parameters.Count; i++) - { - MarkType (fnptr.Parameters[i].ParameterType); - } - } - - void MarkModifierType (IModifierType mod) - { - MarkType (mod.ModifierType); - } - - void MarkGenericArguments (IGenericInstance instance) - { - foreach (TypeReference argument in instance.GenericArguments) - MarkType (argument); - - MarkGenericArgumentConstructors (instance); - } - - void MarkGenericArgumentConstructors (IGenericInstance instance) - { - var arguments = instance.GenericArguments; - - var generic_element = GetGenericProviderFromInstance (instance); - if (generic_element == null) - return; - - var parameters = generic_element.GenericParameters; - - if (arguments.Count != parameters.Count) - return; - - for (int i = 0; i < arguments.Count; i++) { - var argument = arguments [i]; - var parameter = parameters [i]; - - if (!parameter.HasDefaultConstructorConstraint) - continue; - - var argument_definition = ResolveTypeDefinition (argument); - MarkDefaultConstructor (argument_definition); - } - } - - IGenericParameterProvider GetGenericProviderFromInstance (IGenericInstance instance) - { - var method = instance as GenericInstanceMethod; - if (method != null) - return ResolveMethodDefinition (method.ElementMethod); - - var type = instance as GenericInstanceType; - if (type != null) - return ResolveTypeDefinition (type.ElementType); - - return null; - } - - void ApplyPreserveInfo (TypeDefinition type) - { - ApplyPreserveMethods (type); - - if (!Annotations.TryGetPreserve (type, out TypePreserve preserve)) - return; - - switch (preserve) { - case TypePreserve.All: - MarkFields (type, true); - MarkMethods (type); - break; - case TypePreserve.Fields: - if (!MarkFields (type, true, true)) - _context.LogMessage ($"Type {type.FullName} has no fields to preserve"); - break; - case TypePreserve.Methods: - if (!MarkMethods (type)) - _context.LogMessage ($"Type {type.FullName} has no methods to preserve"); - break; - } - } - - void ApplyPreserveMethods (TypeDefinition type) - { - var list = Annotations.GetPreservedMethods (type); - if (list == null) - return; - - MarkMethodCollection (list); - } - - void ApplyPreserveMethods (MethodDefinition method) - { - var list = Annotations.GetPreservedMethods (method); - if (list == null) - return; - - MarkMethodCollection (list); - } - - protected bool MarkFields (TypeDefinition type, bool includeStatic, bool markBackingFieldsOnlyIfPropertyMarked = false) - { - if (!type.HasFields) - return false; - - foreach (FieldDefinition field in type.Fields) { - if (!includeStatic && field.IsStatic) - continue; - - if (markBackingFieldsOnlyIfPropertyMarked && field.Name.EndsWith (">k__BackingField", StringComparison.Ordinal)) { - // We can't reliably construct the expected property name from the backing field name for all compilers - // because csc shortens the name of the backing field in some cases - // For example: - // Field Name = .Bar>k__BackingField - // Property Name = IFoo.Bar - // - // instead we will search the properties and find the one that makes use of the current backing field - var propertyDefinition = SearchPropertiesForMatchingFieldDefinition (field); - if (propertyDefinition != null && !Annotations.IsMarked (propertyDefinition)) - continue; - } - MarkField (field); - } - - return true; - } - - static PropertyDefinition SearchPropertiesForMatchingFieldDefinition (FieldDefinition field) - { - foreach (var property in field.DeclaringType.Properties) { - var instr = property.GetMethod?.Body?.Instructions; - if (instr == null) - continue; - - foreach (var ins in instr) { - if (ins?.Operand == field) - return property; - } - } - - return null; - } - - protected void MarkStaticFields (TypeDefinition type) - { - if (!type.HasFields) - return; - - foreach (FieldDefinition field in type.Fields) { - if (field.IsStatic) - MarkField (field); - } - } - - protected virtual bool MarkMethods (TypeDefinition type) - { - if (!type.HasMethods) - return false; - - MarkMethodCollection (type.Methods); - return true; - } - - void MarkMethodCollection (IList methods) - { - foreach (MethodDefinition method in methods) - MarkMethod (method); - } - - protected void MarkIndirectlyCalledMethod (MethodDefinition method) - { - MarkMethod (method); - Annotations.MarkIndirectlyCalledMethod (method); - } - - protected virtual MethodDefinition MarkMethod (MethodReference reference) - { - reference = GetOriginalMethod (reference); - - if (reference.DeclaringType is ArrayType) - return null; - - Tracer.Push (reference); - if (reference.DeclaringType is GenericInstanceType) - MarkType (reference.DeclaringType); - -// if (IgnoreScope (reference.DeclaringType.Scope)) -// return; - - MethodDefinition method = ResolveMethodDefinition (reference); - - try { - if (method == null) { - HandleUnresolvedMethod (reference); - return null; - } - - if (Annotations.GetAction (method) == MethodAction.Nothing) - Annotations.SetAction (method, MethodAction.Parse); - - EnqueueMethod (method); - } finally { - Tracer.Pop (); - } - Tracer.AddDependency (method); - - return method; - } - - AssemblyDefinition ResolveAssembly (IMetadataScope scope) - { - AssemblyDefinition assembly = _context.Resolve (scope); - MarkAssembly (assembly); - return assembly; - } - - protected MethodReference GetOriginalMethod (MethodReference method) - { - while (method is MethodSpecification) { - GenericInstanceMethod gim = method as GenericInstanceMethod; - if (gim != null) - MarkGenericArguments (gim); - - method = ((MethodSpecification) method).ElementMethod; - } - - return method; - } - - static MethodDefinition ResolveMethodDefinition (MethodReference method) - { - if (method is MethodDefinition md) - return md; - - return method.Resolve (); - } - - protected virtual void ProcessMethod (MethodDefinition method) - { - if (CheckProcessed (method)) - return; - - Tracer.Push (method); - MarkType (method.DeclaringType); - MarkCustomAttributes (method); - MarkSecurityDeclarations (method); - - MarkGenericParameterProvider (method); - - if (ShouldMarkAsInstancePossible (method)) - MarkRequirementsForInstantiatedTypes (method.DeclaringType); - - if (method.IsConstructor) { - if (!Annotations.ProcessSatelliteAssemblies && KnownMembers.IsSatelliteAssemblyMarker (method)) - Annotations.ProcessSatelliteAssemblies = true; - } else if (IsPropertyMethod (method)) - MarkProperty (GetProperty (method)); - else if (IsEventMethod (method)) - MarkEvent (GetEvent (method)); - - if (method.HasParameters) { - foreach (ParameterDefinition pd in method.Parameters) { - MarkType (pd.ParameterType); - MarkCustomAttributes (pd); - MarkMarshalSpec (pd); - } - } - - if (method.HasOverrides) { - foreach (MethodReference ov in method.Overrides) { - MarkMethod (ov); - MarkExplicitInterfaceImplementation (method, ov); - } - } - - MarkMethodSpecialCustomAttributes (method); - - if (method.IsVirtual) - _virtual_methods.Add (method); - - MarkNewCodeDependencies (method); - - MarkBaseMethods (method); - - MarkType (method.ReturnType); - MarkCustomAttributes (method.MethodReturnType); - MarkMarshalSpec (method.MethodReturnType); - - if (method.IsPInvokeImpl || method.IsInternalCall) { - ProcessInteropMethod (method); - } - - if (ShouldParseMethodBody (method)) - MarkMethodBody (method.Body); - - DoAdditionalMethodProcessing (method); - - Annotations.Mark (method); - - ApplyPreserveMethods (method); - Tracer.Pop (); - } - - // Allow subclassers to mark additional things when marking a method - protected virtual void DoAdditionalMethodProcessing (MethodDefinition method) - { - } - - protected virtual bool ShouldMarkAsInstancePossible (MethodDefinition method) - { - // We don't need to mark it multiple times - if (Annotations.IsInstantiated (method.DeclaringType)) - return false; - - if (method.IsInstanceConstructor ()) - return true; - - if (method.DeclaringType.IsInterface) - return true; - - return false; - } - - protected virtual void MarkRequirementsForInstantiatedTypes (TypeDefinition type) - { - if (Annotations.IsInstantiated (type)) - return; - - Annotations.MarkInstantiated (type); - - MarkInterfaceImplementations (type); - - foreach (var method in GetRequiredMethodsForInstantiatedType (type)) - MarkMethod (method); - - DoAdditionalInstantiatedTypeProcessing (type); - } - - /// - /// Collect methods that must be marked once a type is determined to be instantiated. - /// - /// This method is virtual in order to give derived mark steps an opportunity to modify the collection of methods that are needed - /// - /// - /// - protected virtual IEnumerable GetRequiredMethodsForInstantiatedType (TypeDefinition type) - { - foreach (var method in type.Methods) { - if (method.IsFinalizer () || IsVirtualNeededByInstantiatedTypeDueToPreservedScope (method)) - yield return method; - } - } - - void MarkExplicitInterfaceImplementation (MethodDefinition method, MethodReference ov) - { - var resolvedOverride = ov.Resolve (); - - if (resolvedOverride == null) { - HandleUnresolvedMethod (ov); - return; - } - - if (resolvedOverride.DeclaringType.IsInterface) { - foreach (var ifaceImpl in method.DeclaringType.Interfaces) { - var resolvedInterfaceType = ifaceImpl.InterfaceType.Resolve (); - if (resolvedInterfaceType == null) { - HandleUnresolvedType (ifaceImpl.InterfaceType); - continue; - } - - if (resolvedInterfaceType == resolvedOverride.DeclaringType) { - MarkInterfaceImplementation (ifaceImpl); - return; - } - } - } - } - - void MarkNewCodeDependencies (MethodDefinition method) - { - switch (Annotations.GetAction (method)) { - case MethodAction.ConvertToStub: - if (!method.IsInstanceConstructor ()) - return; - - var baseType = ResolveTypeDefinition (method.DeclaringType.BaseType); - if (!MarkDefaultConstructor (baseType)) - throw new NotSupportedException ($"Cannot stub constructor on '{method.DeclaringType}' when base type does not have default constructor"); - - break; - - case MethodAction.ConvertToThrow: - MarkAndCacheConvertToThrowExceptionCtor (); - break; - } - } - - protected virtual void MarkAndCacheConvertToThrowExceptionCtor () - { - if (_context.MarkedKnownMembers.NotSupportedExceptionCtorString != null) - return; - - var nse = BCL.FindPredefinedType ("System", "NotSupportedException", _context); - if (nse == null) - throw new NotSupportedException ("Missing predefined 'System.NotSupportedException' type"); - - MarkType (nse); - - var nseCtor = MarkMethodIf (nse.Methods, KnownMembers.IsNotSupportedExceptionCtorString); - if (nseCtor == null) - throw new MarkException ($"Could not find constructor on '{nse.FullName}'"); - - _context.MarkedKnownMembers.NotSupportedExceptionCtorString = nseCtor; - } - - bool MarkDisablePrivateReflectionAttribute () - { - if (_context.MarkedKnownMembers.DisablePrivateReflectionAttributeCtor != null) - return false; - - var nse = BCL.FindPredefinedType ("System.Runtime.CompilerServices", "DisablePrivateReflectionAttribute", _context); - if (nse == null) - throw new NotSupportedException ("Missing predefined 'System.Runtime.CompilerServices.DisablePrivateReflectionAttribute' type"); - - MarkType (nse); - - var ctor = MarkMethodIf (nse.Methods, MethodDefinitionExtensions.IsDefaultConstructor); - if (ctor == null) - throw new MarkException ($"Could not find constructor on '{nse.FullName}'"); - - _context.MarkedKnownMembers.DisablePrivateReflectionAttributeCtor = ctor; - return true; - } - - void MarkBaseMethods (MethodDefinition method) - { - var base_methods = Annotations.GetBaseMethods (method); - if (base_methods == null) - return; - - foreach (MethodDefinition base_method in base_methods) { - if (base_method.DeclaringType.IsInterface && !method.DeclaringType.IsInterface) - continue; - - MarkMethod (base_method); - MarkBaseMethods (base_method); - } - } - - void ProcessInteropMethod(MethodDefinition method) - { - TypeDefinition returnTypeDefinition = ResolveTypeDefinition (method.ReturnType); - const bool includeStaticFields = false; - if (returnTypeDefinition != null && !returnTypeDefinition.IsImport) { - MarkDefaultConstructor (returnTypeDefinition); - MarkFields (returnTypeDefinition, includeStaticFields); - } - - if (method.HasThis && !method.DeclaringType.IsImport) { - MarkFields (method.DeclaringType, includeStaticFields); - } - - foreach (ParameterDefinition pd in method.Parameters) { - TypeReference paramTypeReference = pd.ParameterType; - if (paramTypeReference is TypeSpecification) { - paramTypeReference = (paramTypeReference as TypeSpecification).ElementType; - } - TypeDefinition paramTypeDefinition = ResolveTypeDefinition (paramTypeReference); - if (paramTypeDefinition != null && !paramTypeDefinition.IsImport) { - MarkFields (paramTypeDefinition, includeStaticFields); - if (pd.ParameterType.IsByReference) { - MarkDefaultConstructor (paramTypeDefinition); - } - } - } - } - - protected virtual bool ShouldParseMethodBody (MethodDefinition method) - { - if (!method.HasBody) - return false; - - switch (Annotations.GetAction (method)) { - case MethodAction.ForceParse: - return true; - case MethodAction.Parse: - AssemblyDefinition assembly = ResolveAssembly (method.DeclaringType.Scope); - switch (Annotations.GetAction (assembly)) { - case AssemblyAction.Link: - case AssemblyAction.Copy: - case AssemblyAction.CopyUsed: - case AssemblyAction.AddBypassNGen: - case AssemblyAction.AddBypassNGenUsed: - return true; - default: - return false; - } - default: - return false; - } - } - - static internal bool IsPropertyMethod (MethodDefinition md) - { - return (md.SemanticsAttributes & MethodSemanticsAttributes.Getter) != 0 || - (md.SemanticsAttributes & MethodSemanticsAttributes.Setter) != 0; - } - - static internal bool IsPublicInstancePropertyMethod (MethodDefinition md) - { - return md.IsPublic && !md.IsStatic && IsPropertyMethod (md); - } - - static bool IsEventMethod (MethodDefinition md) - { - return (md.SemanticsAttributes & MethodSemanticsAttributes.AddOn) != 0 || - (md.SemanticsAttributes & MethodSemanticsAttributes.Fire) != 0 || - (md.SemanticsAttributes & MethodSemanticsAttributes.RemoveOn) != 0; - } - - static internal PropertyDefinition GetProperty (MethodDefinition md) - { - TypeDefinition declaringType = md.DeclaringType; - foreach (PropertyDefinition prop in declaringType.Properties) - if (prop.GetMethod == md || prop.SetMethod == md) - return prop; - - return null; - } - - static EventDefinition GetEvent (MethodDefinition md) - { - TypeDefinition declaringType = md.DeclaringType; - foreach (EventDefinition evt in declaringType.Events) - if (evt.AddMethod == md || evt.InvokeMethod == md || evt.RemoveMethod == md) - return evt; - - return null; - } - - protected void MarkProperty (PropertyDefinition prop) - { - MarkCustomAttributes (prop); - DoAdditionalPropertyProcessing (prop); - } - - protected virtual void MarkEvent (EventDefinition evt) - { - MarkCustomAttributes (evt); - MarkMethodIfNotNull (evt.AddMethod); - MarkMethodIfNotNull (evt.InvokeMethod); - MarkMethodIfNotNull (evt.RemoveMethod); - DoAdditionalEventProcessing (evt); - } - - void MarkMethodIfNotNull (MethodReference method) - { - if (method == null) - return; - - MarkMethod (method); - } - - protected virtual void MarkMethodBody (MethodBody body) - { - if (_context.IsOptimizationEnabled (CodeOptimizations.UnreachableBodies) && IsUnreachableBody (body)) { - MarkAndCacheConvertToThrowExceptionCtor (); - _unreachableBodies.Add (body); - return; - } - - foreach (VariableDefinition var in body.Variables) - MarkType (var.VariableType); - - foreach (ExceptionHandler eh in body.ExceptionHandlers) - if (eh.HandlerType == ExceptionHandlerType.Catch) - MarkType (eh.CatchType); - - foreach (Instruction instruction in body.Instructions) - MarkInstruction (instruction); - - MarkInterfacesNeededByBodyStack (body); - - MarkReflectionLikeDependencies (body); - - PostMarkMethodBody (body); - } - - bool IsUnreachableBody (MethodBody body) - { - return !body.Method.IsStatic - && !Annotations.IsInstantiated (body.Method.DeclaringType) - && MethodBodyScanner.IsWorthConvertingToThrow (body); - } - - - partial void PostMarkMethodBody (MethodBody body); - - void MarkInterfacesNeededByBodyStack (MethodBody body) - { - // If a type could be on the stack in the body and an interface it implements could be on the stack on the body - // then we need to mark that interface implementation. When this occurs it is not safe to remove the interface implementation from the type - // even if the type is never instantiated - var implementations = MethodBodyScanner.GetReferencedInterfaces (_context.Annotations, body); - if (implementations == null) - return; - - foreach (var implementation in implementations) - MarkInterfaceImplementation (implementation); - } - - protected virtual void MarkInstruction (Instruction instruction) - { - switch (instruction.OpCode.OperandType) { - case OperandType.InlineField: - MarkField ((FieldReference) instruction.Operand); - break; - case OperandType.InlineMethod: - MarkMethod ((MethodReference) instruction.Operand); - break; - case OperandType.InlineTok: - object token = instruction.Operand; - if (token is TypeReference) - MarkType ((TypeReference) token); - else if (token is MethodReference) - MarkMethod ((MethodReference) token); - else - MarkField ((FieldReference) token); - break; - case OperandType.InlineType: - MarkType ((TypeReference) instruction.Operand); - break; - default: - break; - } - } - - protected virtual void HandleUnresolvedType (TypeReference reference) - { - if (!_context.IgnoreUnresolved) { - throw new ResolutionException (reference); - } - } - - protected virtual void HandleUnresolvedMethod (MethodReference reference) - { - if (!_context.IgnoreUnresolved) { - throw new ResolutionException (reference); - } - } - - protected virtual void HandleUnresolvedField (FieldReference reference) - { - if (!_context.IgnoreUnresolved) { - throw new ResolutionException (reference); - } - } - - protected virtual bool ShouldMarkInterfaceImplementation (TypeDefinition type, InterfaceImplementation iface, TypeDefinition resolvedInterfaceType) - { - if (Annotations.IsMarked (iface)) - return false; - - if (Annotations.IsMarked (resolvedInterfaceType)) - return true; - - if (!_context.IsOptimizationEnabled (CodeOptimizations.UnusedInterfaces)) - return true; - - // It's hard to know if a com or windows runtime interface will be needed from managed code alone, - // so as a precaution we will mark these interfaces once the type is instantiated - if (resolvedInterfaceType.IsImport || resolvedInterfaceType.IsWindowsRuntime) - return true; - - return IsFullyPreserved (type); - } - - protected virtual void MarkInterfaceImplementation (InterfaceImplementation iface) - { - MarkCustomAttributes (iface); - MarkType (iface.InterfaceType); - Annotations.Mark (iface); - } - - bool HasManuallyTrackedDependency (MethodBody methodBody) - { - return PreserveDependencyLookupStep.HasPreserveDependencyAttribute (methodBody.Method); - } - - // - // Extension point for reflection logic handling customization - // - protected virtual bool ProcessReflectionDependency (MethodBody body, Instruction instruction) - { - return false; - } - - // - // Tries to mark additional dependencies used in reflection like calls (e.g. typeof (MyClass).GetField ("fname")) - // - protected virtual void MarkReflectionLikeDependencies (MethodBody body) - { - if (HasManuallyTrackedDependency (body)) - return; - - var methodCalling = body.Method; - var instructions = body.Instructions; - - // - // Starting at 1 because all patterns require at least 1 instruction backward lookup - // - for (var i = 1; i < instructions.Count; i++) { - var instruction = instructions [i]; - - if (instruction.OpCode != OpCodes.Call && instruction.OpCode != OpCodes.Callvirt) - continue; - - if (ProcessReflectionDependency (body, instruction)) - continue; - - var methodCalled = instruction.Operand as MethodReference; - if (methodCalled == null) - continue; - - var methodCalledDefinition = methodCalled.Resolve (); - if (methodCalledDefinition == null) - continue; - - var methodCalledType = methodCalled.DeclaringType; - - int first_arg_instr, second_arg_instr; - Instruction first_arg; - - switch (methodCalledType.Name) { - // - // System.Type - // - case "Type" when methodCalledType.Namespace == "System": - - // Some of the overloads are implemented by calling another overload of the same name. - // These "internal" calls are not interesting to analyze, the outermost call is the one - // which needs to be analyzed. The assumption is that all overloads have the same semantics. - // (for example that all overload of GetConstructor if used require the specified type to have a .ctor). - if (methodCalling.DeclaringType == methodCalling.DeclaringType && methodCalling.Name == methodCalled.Name) - break; - - switch (methodCalled.Name) { - // - // GetConstructor (Type []) - // GetConstructor (BindingFlags, Binder, Type [], ParameterModifier []) - // GetConstructor (BindingFlags, Binder, CallingConventions, Type [], ParameterModifier []) - // - case "GetConstructor": - if (!methodCalledDefinition.IsStatic) - ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Constructor, methodCalledDefinition, i - 1); - - break; - - // - // GetMethod (string) - // GetMethod (string, BindingFlags) - // GetMethod (string, Type[]) - // GetMethod (string, Type[], ParameterModifier[]) - // GetMethod (string, BindingFlags, Binder, Type[], ParameterModifier[]) - // GetMethod (string, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) - // - // TODO: .NET Core extensions - // GetMethod (string, int, Type[]) - // GetMethod (string, int, Type[], ParameterModifier[]?) - // GetMethod (string, int, BindingFlags, Binder?, Type[], ParameterModifier[]?) - // GetMethod (string, int, BindingFlags, Binder?, CallingConventions, Type[], ParameterModifier[]?) - // - case "GetMethod": - if (!methodCalledDefinition.IsStatic) - ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Method, methodCalledDefinition, i - 1); - - break; - - // - // GetField (string) - // GetField (string, BindingFlags) - // - case "GetField": - if (!methodCalledDefinition.IsStatic) - ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Field, methodCalledDefinition, i - 1); - - break; - - // - // GetEvent (string) - // GetEvent (string, BindingFlags) - // - case "GetEvent": - if (!methodCalledDefinition.IsStatic) - ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Event, methodCalledDefinition, i - 1); - - break; - - // - // GetProperty (string) - // GetProperty (string, BindingFlags) - // GetProperty (string, Type) - // GetProperty (string, Type[]) - // GetProperty (string, Type, Type[]) - // GetProperty (string, Type, Type[], ParameterModifier[]) - // GetProperty (string, BindingFlags, Binder, Type, Type[], ParameterModifier[]) - // - case "GetProperty": - if (!methodCalledDefinition.IsStatic) - ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Property, methodCalledDefinition, i - 1); - - break; - - // - // GetType (string) - // GetType (string, Boolean) - // GetType (string, Boolean, Boolean) - // GetType (string, Func, Func) - // GetType (string, Func, Func, Boolean) - // GetType (string, Func, Func, Boolean, Boolean) - // - case "GetType": - if (!methodCalledDefinition.IsStatic) - continue; - - first_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, methodCalledDefinition.Parameters.Count); - if (first_arg_instr < 0) { - _context.LogMessage (MessageImportance.Low, $"Reflection call '{methodCalled.FullName}' inside '{body.Method.FullName}' couldn't be decomposed"); - continue; - } - - // - // The next value must be string constant (we don't handle anything else) - // - first_arg = instructions [first_arg_instr]; - if (first_arg.OpCode != OpCodes.Ldstr) { - _context.LogMessage (MessageImportance.Low, $"Reflection call '{methodCalled.FullName}' inside '{body.Method.FullName}' was detected with argument which cannot be analyzed"); - continue; - } - - TypeDefinition foundType = ResolveFullyQualifiedTypeName ((string)first_arg.Operand); - if (foundType == null) - continue; - - _context.Tracer.Push ($"Reflection-{foundType}"); - try { - MarkType (foundType); - } finally { - _context.Tracer.Pop (); - } - - break; - } - - break; - - // - // System.Linq.Expressions.Expression - // - case "Expression" when methodCalledType.Namespace == "System.Linq.Expressions": - Instruction second_argument; - TypeDefinition declaringType; - - if (!methodCalledDefinition.IsStatic) - break; - - switch (methodCalled.Name) { - - // - // static Call (Type, String, Type[], Expression[]) - // - case "Call": - first_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, 4); - if (first_arg_instr < 0) { - _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' couldn't be decomposed"); - continue; - } - - first_arg = instructions [first_arg_instr]; - if (first_arg.OpCode == OpCodes.Ldtoken) - first_arg_instr++; - - declaringType = FindReflectionTypeForLookup (instructions, first_arg_instr); - if (declaringType == null) { - _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' was detected with 1st argument which cannot be analyzed"); - continue; - } - - second_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, 3); - second_argument = instructions [second_arg_instr]; - if (second_argument.OpCode != OpCodes.Ldstr) { - _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' was detected with 2nd argument which cannot be analyzed"); - continue; - } - - var name = (string)second_argument.Operand; - - MarkMethodsFromReflectionCall (declaringType, name, null, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); - - break; - - // - // static Field (Expression, Type, String) - // static Property(Expression, Type, String) - // - case "Property": - case "Field": - - second_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, 2); - if (second_arg_instr < 0) { - _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' couldn't be decomposed"); - continue; - } - - var second_arg = instructions [second_arg_instr]; - if (second_arg.OpCode == OpCodes.Ldtoken) - second_arg_instr++; - - declaringType = FindReflectionTypeForLookup (instructions, second_arg_instr); - if (declaringType == null) { - _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' was detected with 2nd argument which cannot be analyzed"); - continue; - } - - var third_arg_inst = GetInstructionAtStackDepth (instructions, i - 1, 1); - var third_argument = instructions [third_arg_inst]; - if (third_argument.OpCode != OpCodes.Ldstr) { - _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' was detected with the 3rd argument which cannot be analyzed"); - continue; - } - - name = (string)third_argument.Operand; - - // - // The first argument can be any expression but we are looking only for simple null - // which we can convert to static only field lookup - // - first_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, 3); - bool staticOnly = false; - - if (first_arg_instr >= 0) { - first_arg = instructions [first_arg_instr]; - if (first_arg.OpCode == OpCodes.Ldnull) - staticOnly = true; - } - - if (methodCalled.Name [0] == 'P') - MarkPropertiesFromReflectionCall (declaringType, name, staticOnly); - else - MarkFieldsFromReflectionCall (declaringType, name, staticOnly); - - break; - - // - // static New (Type) - // - case "New": - first_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, 1); - if (first_arg_instr < 0) { - _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' couldn't be decomposed"); - continue; - } - - first_arg = instructions [first_arg_instr]; - if (first_arg.OpCode == OpCodes.Ldtoken) - first_arg_instr++; - - declaringType = FindReflectionTypeForLookup (instructions, first_arg_instr); - if (declaringType == null) { - _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' was detected with 1st argument which cannot be analyzed"); - continue; - } - - MarkMethodsFromReflectionCall (declaringType, ".ctor", 0, BindingFlags.Instance, parametersCount: 0); - break; - } - - break; - - // - // System.Reflection.RuntimeReflectionExtensions - // - case "RuntimeReflectionExtensions" when methodCalledType.Namespace == "System.Reflection": - switch (methodCalled.Name) { - // - // static GetRuntimeField (this Type type, string name) - // - case "GetRuntimeField": - ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Field, methodCalledDefinition, i - 1, thisExtension: true); - break; - - // - // static GetRuntimeMethod (this Type type, string name, Type[] parameters) - // - case "GetRuntimeMethod": - ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Method, methodCalledDefinition, i - 1, thisExtension: true); - break; - - // - // static GetRuntimeProperty (this Type type, string name) - // - case "GetRuntimeProperty": - ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Property, methodCalledDefinition, i - 1, thisExtension: true); - break; - - // - // static GetRuntimeEvent (this Type type, string name) - // - case "GetRuntimeEvent": - ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Event, methodCalledDefinition, i - 1, thisExtension: true); - break; - } - - break; - - // - // System.AppDomain - // - case "AppDomain" when methodCalledType.Namespace == "System": - // - // CreateInstance (string assemblyName, string typeName) - // CreateInstance (string assemblyName, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object? []? args, System.Globalization.CultureInfo? culture, object? []? activationAttributes) - // CreateInstance (string assemblyName, string typeName, object? []? activationAttributes) - // - // CreateInstanceAndUnwrap (string assemblyName, string typeName) - // CreateInstanceAndUnwrap (string assemblyName, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object? []? args, System.Globalization.CultureInfo? culture, object? []? activationAttributes) - // CreateInstanceAndUnwrap (string assemblyName, string typeName, object? []? activationAttributes) - // - // CreateInstanceFrom (string assemblyFile, string typeName) - // CreateInstanceFrom (string assemblyFile, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object? []? args, System.Globalization.CultureInfo? culture, object? []? activationAttributes) - // CreateInstanceFrom (string assemblyFile, string typeName, object? []? activationAttributes) - // - // CreateInstanceFromAndUnwrap (string assemblyFile, string typeName) - // CreateInstanceFromAndUnwrap (string assemblyFile, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object? []? args, System.Globalization.CultureInfo? culture, object? []? activationAttributes) - // CreateInstanceFromAndUnwrap (string assemblyFile, string typeName, object? []? activationAttributes) - // - switch (methodCalled.Name) { - case "CreateInstance": - case "CreateInstanceAndUnwrap": - case "CreateInstanceFrom": - case "CreateInstanceFromAndUnwrap": - ProcessActivatorCallWithStrings (methodCalledDefinition, i - 1, methodCalled.Parameters.Count < 4); - break; - } - - break; - - // - // System.Reflection.Assembly - // - case "Assembly" when methodCalledType.Namespace == "System.Reflection": - // - // CreateInstance (string typeName) - // CreateInstance (string typeName, bool ignoreCase) - // CreateInstance (string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder? binder, object []? args, CultureInfo? culture, object []? activationAttributes) - // - if (methodCalled.Name == "CreateInstance") { - // - // TODO: This could be supported for `this` only calls - // - _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalled.FullName}' inside '{body.Method.FullName}' is not yet supported"); - break; - } - - break; - - // - // System.Activator - // - case "Activator" when methodCalledType.Namespace == "System": - if (!methodCalledDefinition.IsStatic) - break; - - switch (methodCalled.Name) { - // - // static CreateInstance (string assemblyName, string typeName) - // static CreateInstance (string assemblyName, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object?[]? args, System.Globalization.CultureInfo? culture, object?[]? activationAttributes) - // static CreateInstance (string assemblyName, string typeName, object?[]? activationAttributes) - // - // static CreateInstance (System.Type type) - // static CreateInstance (System.Type type, bool nonPublic) - // static CreateInstance (System.Type type, params object?[]? args) - // static CreateInstance (System.Type type, object?[]? args, object?[]? activationAttributes) - // static CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object?[]? args, System.Globalization.CultureInfo? culture) - // static CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object?[]? args, System.Globalization.CultureInfo? culture, object?[]? activationAttributes) { throw null; } - // - case "CreateInstance": - var parameters = methodCalled.Parameters; - if (parameters.Count < 1) - continue; - - if (parameters [0].ParameterType.MetadataType == MetadataType.String) { - ProcessActivatorCallWithStrings (methodCalledDefinition, i - 1, parameters.Count < 4); - continue; - } - - first_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, methodCalledDefinition.Parameters.Count); - if (first_arg_instr < 0) { - _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalled.FullName}' inside '{body.Method.FullName}' couldn't be decomposed"); - continue; - } - - if (parameters [0].ParameterType.IsTypeOf ("System", "Type")) { - declaringType = FindReflectionTypeForLookup (instructions, first_arg_instr + 1); - if (declaringType == null) { - _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalled.FullName}' inside '{body.Method.FullName}' was detected with 1st argument expression which cannot be analyzed"); - continue; - } - - BindingFlags bindingFlags = BindingFlags.Instance; - int? parametersCount = null; - - if (methodCalledDefinition.Parameters.Count == 1) { - parametersCount = 0; - } else { - second_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, methodCalledDefinition.Parameters.Count - 1); - second_argument = instructions [second_arg_instr]; - switch (second_argument.OpCode.Code) { - case Code.Ldc_I4_0 when parameters [1].ParameterType.MetadataType == MetadataType.Boolean: - parametersCount = 0; - bindingFlags |= BindingFlags.Public; - break; - case Code.Ldc_I4_1 when parameters [1].ParameterType.MetadataType == MetadataType.Boolean: - parametersCount = 0; - break; - case Code.Ldc_I4_S when parameters [1].ParameterType.IsTypeOf ("System.Reflection", "BindingFlags"): - bindingFlags = (BindingFlags)(sbyte)second_argument.Operand; - break; - } - } - - MarkMethodsFromReflectionCall (declaringType, ".ctor", 0, bindingFlags, parametersCount); - continue; - } - - break; - // - // static T CreateInstance () - // - case "CreateInstance`1": - // Not sure it's worth implementing as we cannot expant T and simple cases can be rewritten - _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalled.FullName}' inside '{body.Method.FullName}' is not supported"); - break; - - // - // static CreateInstanceFrom (string assemblyFile, string typeName) - // static CreateInstanceFrom (string assemblyFile, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object? []? args, System.Globalization.CultureInfo? culture, object? []? activationAttributes) - // static CreateInstanceFrom (string assemblyFile, string typeName, object? []? activationAttributes) - // - case "CreateInstanceFrom": - ProcessActivatorCallWithStrings (methodCalledDefinition, i - 1, methodCalled.Parameters.Count < 4); - break; - } - - break; - } - } - - // - // Handles static method calls in form of Create (string assemblyFile, string typeName, ......) - // - void ProcessActivatorCallWithStrings (MethodDefinition methodCalledDefinition, int startIndex, bool defaultCtorOnly) - { - var parameters = methodCalledDefinition.Parameters; - if (parameters.Count < 2) - return; - - if (parameters [0].ParameterType.MetadataType != MetadataType.String && parameters [1].ParameterType.MetadataType != MetadataType.String) { - _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' is not supported"); - return; - } - - var first_arg_instr = GetInstructionAtStackDepth (instructions, startIndex, methodCalledDefinition.Parameters.Count); - if (first_arg_instr < 0) { - _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' couldn't be decomposed"); - return; - } - - var first_arg = instructions [first_arg_instr]; - if (first_arg.OpCode != OpCodes.Ldstr) { - _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' was detected with the 1st argument which cannot be analyzed"); - return; - } - - var second_arg_instr = GetInstructionAtStackDepth (instructions, startIndex, methodCalledDefinition.Parameters.Count - 1); - if (second_arg_instr < 0) { - _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' couldn't be decomposed"); - return; - } - - var second_arg = instructions [second_arg_instr]; - if (second_arg.OpCode != OpCodes.Ldstr) { - _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' was detected with the 2nd argument which cannot be analyzed"); - return; - } - - string assembly_name = (string)first_arg.Operand; - if (!_context.Resolver.AssemblyCache.TryGetValue (assembly_name, out var assembly)) { - _context.Logger.LogMessage (MessageImportance.Low, $"Activator call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' references assembly '{assembly_name}' which could not be found"); - return; - } - - string type_name = (string)second_arg.Operand; - var declaringType = FindType (assembly, type_name); - - if (declaringType == null) { - _context.Logger.LogMessage (MessageImportance.Low, $"Activator call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' references type '{type_name}' which could not be found"); - return; - } - - MarkMethodsFromReflectionCall (declaringType, ".ctor", 0, null, defaultCtorOnly ? 0 : (int?) null); - } - - // - // Handles instance methods called over typeof (Foo) with string name as the first argument - // - void ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes memberTypes, MethodDefinition methodCalledDefinition, int startIndex, bool thisExtension = false) - { - int first_instance_arg = methodCalledDefinition.Parameters.Count; - if (thisExtension) - --first_instance_arg; - - var first_arg_instr = GetInstructionAtStackDepth (instructions, startIndex, first_instance_arg); - if (first_arg_instr < 0) { - _context.LogMessage (MessageImportance.Low, $"Reflection call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' couldn't be decomposed"); - return; - } - - var first_arg = instructions [first_arg_instr]; - BindingFlags? bindingFlags = default; - string name = default; - - if (memberTypes == System.Reflection.MemberTypes.Constructor) { - if (first_arg.OpCode == OpCodes.Ldc_I4_S && methodCalledDefinition.Parameters.Count > 0 && methodCalledDefinition.Parameters [0].ParameterType.IsTypeOf ("System.Reflection", "BindingFlags")) { - bindingFlags = (BindingFlags)(sbyte)first_arg.Operand; - } - } else { - // - // The next value must be string constant (we don't handle anything else) - // - if (first_arg.OpCode != OpCodes.Ldstr) { - _context.LogMessage (MessageImportance.Low, $"Reflection call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' was detected with argument which cannot be analyzed"); - return; - } - - name = (string)first_arg.Operand; - - var pos_arg = instructions [first_arg_instr + 1]; - if (pos_arg.OpCode == OpCodes.Ldc_I4_S && methodCalledDefinition.Parameters.Count > 1 && methodCalledDefinition.Parameters [1].ParameterType.IsTypeOf ("System.Reflection", "BindingFlags")) { - bindingFlags = (BindingFlags)(sbyte)pos_arg.Operand; - } - } - - var declaringType = FindReflectionTypeForLookup (instructions, first_arg_instr - 1); - if (declaringType == null) { - _context.LogMessage (MessageImportance.Low, $"Reflection call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' does not use detectable instance type extraction"); - return; - } - - switch (memberTypes) { - case System.Reflection.MemberTypes.Constructor: - MarkMethodsFromReflectionCall (declaringType, ".ctor", 0, bindingFlags); - break; - case System.Reflection.MemberTypes.Method: - MarkMethodsFromReflectionCall (declaringType, name, 0, bindingFlags); - break; - case System.Reflection.MemberTypes.Field: - MarkFieldsFromReflectionCall (declaringType, name); - break; - case System.Reflection.MemberTypes.Property: - MarkPropertiesFromReflectionCall (declaringType, name); - break; - case System.Reflection.MemberTypes.Event: - MarkEventsFromReflectionCall (declaringType, name); - break; - } - } - } - - static int GetInstructionAtStackDepth (Collection instructions, int startIndex, int stackSizeToBacktrace) - { - for (int i = startIndex; i >= 0; --i) { - var instruction = instructions [i]; - - switch (instruction.OpCode.StackBehaviourPop) { - case StackBehaviour.Pop0: - break; - case StackBehaviour.Pop1: - case StackBehaviour.Popi: - case StackBehaviour.Popref: - stackSizeToBacktrace++; - break; - case StackBehaviour.Pop1_pop1: - case StackBehaviour.Popi_pop1: - case StackBehaviour.Popi_popi: - case StackBehaviour.Popi_popi8: - case StackBehaviour.Popi_popr4: - case StackBehaviour.Popi_popr8: - case StackBehaviour.Popref_pop1: - case StackBehaviour.Popref_popi: - stackSizeToBacktrace += 2; - break; - case StackBehaviour.Popref_popi_popi: - case StackBehaviour.Popref_popi_popi8: - case StackBehaviour.Popref_popi_popr4: - case StackBehaviour.Popref_popi_popr8: - case StackBehaviour.Popref_popi_popref: - stackSizeToBacktrace += 3; - break; - case StackBehaviour.Varpop: - switch (instruction.OpCode.Code) { - case Code.Call: - case Code.Calli: - case Code.Callvirt: - if (instruction.Operand is MethodReference mr) { - stackSizeToBacktrace += mr.Parameters.Count; - if (mr.Resolve ()?.IsStatic == false) - stackSizeToBacktrace++; - } - - break; - case Code.Newobj: - if (instruction.Operand is MethodReference ctor) { - stackSizeToBacktrace += ctor.Parameters.Count; - } - break; - case Code.Ret: - // TODO: Need method return type for correct stack size but this path should not be hit yet - break; - default: - return -3; - } - break; - } - - switch (instruction.OpCode.StackBehaviourPush) { - case StackBehaviour.Push0: - break; - case StackBehaviour.Push1: - case StackBehaviour.Pushi: - case StackBehaviour.Pushi8: - case StackBehaviour.Pushr4: - case StackBehaviour.Pushr8: - case StackBehaviour.Pushref: - stackSizeToBacktrace--; - break; - case StackBehaviour.Push1_push1: - stackSizeToBacktrace -= 2; - break; - case StackBehaviour.Varpush: - // - // Only call, calli, callvirt will hit this - // - if (instruction.Operand is MethodReference mr && mr.ReturnType.MetadataType != MetadataType.Void) { - stackSizeToBacktrace--; - } - break; - } - - if (stackSizeToBacktrace == 0) - return i; - - if (stackSizeToBacktrace < 0) - return -1; - } - - return -2; - } - - static TypeDefinition FindReflectionTypeForLookup (Collection instructions, int startIndex) - { - while (startIndex >= 1) { - int storeIndex = -1; - var instruction = instructions [startIndex]; - switch (instruction.OpCode.Code) { - // - // Pattern #1 - // - // typeof (Foo).ReflectionCall () - // - case Code.Call: - var mr = instruction.Operand as MethodReference; - if (mr == null || mr.Name != "GetTypeFromHandle") - return null; - - var ldtoken = instructions [startIndex - 1]; - - if (ldtoken.OpCode != OpCodes.Ldtoken) - return null; - - return (ldtoken.Operand as TypeReference).Resolve (); - - // - // Patern #2 - // - // var temp = typeof (Foo); - // temp.ReflectionCall () - // - case Code.Ldloc_0: - storeIndex = GetIndexOfInstruction (instructions, OpCodes.Stloc_0, startIndex - 1); - startIndex = storeIndex - 1; - break; - case Code.Ldloc_1: - storeIndex = GetIndexOfInstruction (instructions, OpCodes.Stloc_1, startIndex - 1); - startIndex = storeIndex - 1; - break; - case Code.Ldloc_2: - storeIndex = GetIndexOfInstruction (instructions, OpCodes.Stloc_2, startIndex - 1); - startIndex = storeIndex - 1; - break; - case Code.Ldloc_3: - storeIndex = GetIndexOfInstruction (instructions, OpCodes.Stloc_3, startIndex - 1); - startIndex = storeIndex - 1; - break; - case Code.Ldloc_S: - storeIndex = GetIndexOfInstruction (instructions, OpCodes.Stloc_S, startIndex - 1, l => (VariableReference)l.Operand == (VariableReference)instruction.Operand); - startIndex = storeIndex - 1; - break; - case Code.Ldloc: - storeIndex = GetIndexOfInstruction (instructions, OpCodes.Stloc, startIndex - 1, l => (VariableReference)l.Operand == (VariableReference)instruction.Operand); - startIndex = storeIndex - 1; - break; - - case Code.Nop: - startIndex--; - break; - - default: - return null; - } - } - - return null; - } - - static int GetIndexOfInstruction (Collection instructions, OpCode opcode, int startIndex, Predicate comparer = null) - { - while (startIndex >= 0) { - var instr = instructions [startIndex]; - if (instr.OpCode == opcode && (comparer == null || comparer (instr))) - return startIndex; - - startIndex--; - } - - return -1; - } - - // - // arity == null for name match regardless of arity - // - void MarkMethodsFromReflectionCall (TypeDefinition declaringType, string name, int? arity, BindingFlags? bindingFlags, int? parametersCount = null) - { - foreach (var method in declaringType.Methods) { - var mname = method.Name; - - // Either exact match or generic method with any arity when unspecified - if (mname != name && !(arity == null && mname.StartsWith (name, StringComparison.Ordinal) && mname.Length > name.Length + 2 && mname [name.Length + 1] == '`')) { - continue; - } - - if ((bindingFlags & (BindingFlags.Instance | BindingFlags.Static)) == BindingFlags.Static && !method.IsStatic) - continue; - - if ((bindingFlags & (BindingFlags.Instance | BindingFlags.Static)) == BindingFlags.Instance && method.IsStatic) - continue; - - if ((bindingFlags & (BindingFlags.Public | BindingFlags.NonPublic)) == BindingFlags.Public && !method.IsPublic) - continue; - - if ((bindingFlags & (BindingFlags.Public | BindingFlags.NonPublic)) == BindingFlags.NonPublic && method.IsPublic) - continue; - - if (parametersCount != null && parametersCount != method.Parameters.Count) - continue; - - Tracer.Push ($"Reflection-{method}"); - try { - MarkIndirectlyCalledMethod (method); - } finally { - Tracer.Pop (); - } - } - } - - void MarkPropertiesFromReflectionCall (TypeDefinition declaringType, string name, bool staticOnly = false) - { - foreach (var property in declaringType.Properties) { - if (property.Name != name) - continue; - - Tracer.Push ($"Reflection-{property}"); - try { - bool markedAny = false; - - // It is not easy to reliably detect in the IL code whether the getter or setter (or both) are used. - // Be conservative and mark everything for the property. - var getter = property.GetMethod; - if (getter != null && (!staticOnly || staticOnly && getter.IsStatic)) { - MarkIndirectlyCalledMethod (getter); - markedAny = true; - } - - var setter = property.SetMethod; - if (setter != null && (!staticOnly || staticOnly && setter.IsStatic)) { - MarkIndirectlyCalledMethod (setter); - markedAny = true; - } - - if (markedAny) - MarkProperty (property); - - } finally { - Tracer.Pop (); - } - } - } - - void MarkFieldsFromReflectionCall (TypeDefinition declaringType, string name, bool staticOnly = false) - { - foreach (var field in declaringType.Fields) { - if (field.Name != name) - continue; - - if (staticOnly && !field.IsStatic) - continue; - - Tracer.Push ($"Reflection-{field}"); - try { - MarkField (field); - } finally { - Tracer.Pop (); - } - - break; - } - } - - void MarkEventsFromReflectionCall (TypeDefinition declaringType, string name) - { - foreach (var eventInfo in declaringType.Events) { - if (eventInfo.Name != name) - continue; - - Tracer.Push ($"Reflection-{eventInfo}"); - try { - MarkEvent (eventInfo); - } finally { - Tracer.Pop (); - } - } - } - - protected class AttributeProviderPair { - public AttributeProviderPair (CustomAttribute attribute, ICustomAttributeProvider provider) - { - Attribute = attribute; - Provider = provider; - } - - public CustomAttribute Attribute { get; private set; } - public ICustomAttributeProvider Provider { get; private set; } - } - } - - // Make our own copy of the BindingFlags enum, so that we don't depend on System.Reflection. - [Flags] - enum BindingFlags - { - Default = 0, - IgnoreCase = 1, - DeclaredOnly = 2, - Instance = 4, - Static = 8, - Public = 16, - NonPublic = 32, - FlattenHierarchy = 64, - InvokeMethod = 256, - CreateInstance = 512, - GetField = 1024, - SetField = 2048, - GetProperty = 4096, - SetProperty = 8192, - PutDispProperty = 16384, - PutRefDispProperty = 32768, - ExactBinding = 65536, - SuppressChangeType = 131072, - OptionalParamBinding = 262144, - IgnoreReturn = 16777216 - } -} diff --git a/external/linker/src/linker/Linker.Steps/MarkStep.cs.REMOVED.git-id b/external/linker/src/linker/Linker.Steps/MarkStep.cs.REMOVED.git-id new file mode 100644 index 0000000000..71537e9077 --- /dev/null +++ b/external/linker/src/linker/Linker.Steps/MarkStep.cs.REMOVED.git-id @@ -0,0 +1 @@ +55bd31187c808a0374d8d10665a723aa621c5bab \ No newline at end of file diff --git a/external/linker/src/linker/Linker.Steps/RemoveFeaturesStep.cs b/external/linker/src/linker/Linker.Steps/RemoveFeaturesStep.cs index 1962f38bc7..d5967a9d56 100644 --- a/external/linker/src/linker/Linker.Steps/RemoveFeaturesStep.cs +++ b/external/linker/src/linker/Linker.Steps/RemoveFeaturesStep.cs @@ -259,7 +259,7 @@ namespace Mono.Linker.Steps { if (method.Name == "get_UseManagedCollation") { - annotations.SetAction(method, MethodAction.ConvertToFalse); + annotations.SetAction(method, MethodAction.ConvertToStub); break; } } diff --git a/external/linker/src/linker/Linker.Steps/RemoveUnreachableBlocksStep.cs b/external/linker/src/linker/Linker.Steps/RemoveUnreachableBlocksStep.cs new file mode 100644 index 0000000000..23eaec6a96 --- /dev/null +++ b/external/linker/src/linker/Linker.Steps/RemoveUnreachableBlocksStep.cs @@ -0,0 +1,1295 @@ +using System; +using System.Diagnostics; +using System.Linq; +using System.Collections; +using Mono.Cecil; +using Mono.Cecil.Cil; +using Mono.Collections.Generic; +using System.Collections.Generic; + +namespace Mono.Linker.Steps +{ + // + // This steps evaluates simple properties or methods for constant expressions and + // then uses this information to remove unreachable conditional blocks. It does + // not do any inlining-like code changes. + // + public class RemoveUnreachableBlocksStep : BaseStep + { + Dictionary constExprMethods; + MethodDefinition IntPtrSize, UIntPtrSize; + + protected override void Process () + { + var assemblies = Context.Annotations.GetAssemblies ().ToArray (); + + constExprMethods = new Dictionary (); + foreach (var assembly in assemblies) { + FindConstantExpressionsMethods (assembly.MainModule.Types); + } + + if (constExprMethods.Count == 0) + return; + + int constExprMethodsCount; + do { + // + // Body rewriting can produce more methods with constant expression + // + constExprMethodsCount = constExprMethods.Count; + + foreach (var assembly in assemblies) { + if (Annotations.GetAction (assembly) != AssemblyAction.Link) + continue; + + RewriteBodies (assembly.MainModule.Types); + } + } while (constExprMethodsCount < constExprMethods.Count); + } + + void FindConstantExpressionsMethods (Collection types) + { + foreach (var type in types) { + if (type.IsInterface) + continue; + + if (!type.HasMethods) + continue; + + foreach (var method in type.Methods) { + if (!method.HasBody) + continue; + + if (method.ReturnType.MetadataType == MetadataType.Void) + continue; + + switch (Annotations.GetAction (method)) { + case MethodAction.ConvertToThrow: + continue; + case MethodAction.ConvertToStub: + var instruction = CodeRewriterStep.CreateConstantResultInstruction (Context, method); + if (instruction != null) + constExprMethods [method] = instruction; + + continue; + } + + if (method.IsIntrinsic ()) + continue; + + if (constExprMethods.ContainsKey (method)) + continue; + + if (!Context.IsOptimizationEnabled (CodeOptimizations.IPConstantPropagation)) + continue; + + var analyzer = new ConstantExpressionMethodAnalyzer (method); + if (analyzer.Analyze ()) { + constExprMethods [method] = analyzer.Result; + } + } + + if (type.HasNestedTypes) + FindConstantExpressionsMethods (type.NestedTypes); + } + } + + void RewriteBodies (Collection types) + { + foreach (var type in types) { + if (type.IsInterface) + continue; + + if (!type.HasMethods) + continue; + + foreach (var method in type.Methods) { + if (!method.HasBody) + continue; + + // + // Block methods which rewrite does not support + // + switch (method.ReturnType.MetadataType) { + case MetadataType.ByReference: + case MetadataType.FunctionPointer: + continue; + } + + RewriteBody (method); + } + + if (type.HasNestedTypes) + RewriteBodies (type.NestedTypes); + } + } + + void RewriteBody (MethodDefinition method) + { + var reducer = new BodyReducer (method.Body, Context); + + // + // Temporary inlines any calls which return contant expression + // + if (!TryInlineBodyDependencies (ref reducer)) + return; + + // + // This is the main step which evaluates if inlined calls can + // produce folded branches. When it finds them the unreachable + // branch is replaced with nops. + // + if (!reducer.RewriteBody ()) + return; + + Context.LogMessage (MessageImportance.Low, $"Reduced '{reducer.InstructionsReplaced}' instructions in conditional branches for [{method.DeclaringType.Module.Assembly.Name}] method {method.FullName}"); + + if (method.ReturnType.MetadataType == MetadataType.Void) + return; + + // + // Re-run the analyzer in case body change rewrote it to constant expression + // + var analyzer = new ConstantExpressionMethodAnalyzer (method, reducer.FoldedInstructions); + if (analyzer.Analyze ()) { + constExprMethods [method] = analyzer.Result; + } + } + + bool TryInlineBodyDependencies (ref BodyReducer reducer) + { + bool changed = false; + var instructions = reducer.Body.Instructions; + Instruction targetResult; + + for (int i = 0; i < instructions.Count; ++i) { + var instr = instructions [i]; + switch (instr.OpCode.Code) { + + case Code.Call: + var target = (MethodReference)instr.Operand; + var md = target.Resolve (); + if (md == null) + break; + + if (!md.IsStatic) + break; + + if (!constExprMethods.TryGetValue (md, out targetResult)) + break; + + if (md.HasParameters) + break; + + reducer.Rewrite (i, targetResult); + changed = true; + break; + + case Code.Ldsfld: + var ftarget = (FieldReference)instr.Operand; + var field = ftarget.Resolve (); + if (field == null) + break; + + if (Context.Annotations.TryGetFieldUserValue (field, out object value)) { + targetResult = CodeRewriterStep.CreateConstantResultInstruction (field.FieldType, value); + if (targetResult == null) + break; + reducer.Rewrite (i, targetResult); + changed = true; + } + break; + + case Code.Sizeof: + // + // sizeof (IntPtr) and sizeof (UIntPtr) are just aliases for IntPtr.Size and UIntPtr.Size + // which are simple static properties commonly overwritten. Instead of forcing C# code style + // we handle both via static Size property + // + MethodDefinition sizeOfImpl = null; + + var operand = (TypeReference) instr.Operand; + if (operand.MetadataType == MetadataType.UIntPtr) { + sizeOfImpl = UIntPtrSize ?? (UIntPtrSize = FindSizeMethod (operand.Resolve ())); + } + + if (operand.MetadataType == MetadataType.IntPtr) { + sizeOfImpl = IntPtrSize ?? (IntPtrSize = FindSizeMethod (operand.Resolve ())); + } + + if (sizeOfImpl != null && constExprMethods.TryGetValue (sizeOfImpl, out targetResult)) { + reducer.Rewrite (i, targetResult); + changed = true; + } + + break; + } + } + + return changed; + } + + static MethodDefinition FindSizeMethod (TypeDefinition type) + { + if (type == null) + return null; + + return type.Methods.First (l => !l.HasParameters && l.IsStatic && l.Name == "get_Size"); + } + + struct BodyReducer + { + readonly LinkContext context; + Dictionary mapping; + + // + // Sorted list of body instruction indexes which were + // replaced pass-through nop + // + List conditionInstrsToRemove; + + public BodyReducer (MethodBody body, LinkContext context) + { + Body = body; + this.context = context; + + FoldedInstructions = null; + mapping = null; + conditionInstrsToRemove = null; + InstructionsReplaced = 0; + } + + public MethodBody Body { get; } + + public int InstructionsReplaced { get; set; } + + public Collection FoldedInstructions { get; private set; } + + public void Rewrite (int index, Instruction newInstruction) + { + if (FoldedInstructions == null) { + FoldedInstructions = new Collection (Body.Instructions); + mapping = new Dictionary (); + } + + // Tracks mapping for replaced instructions for easier + // branch targets resolution later + mapping [Body.Instructions [index]] = index; + + FoldedInstructions [index] = newInstruction; + } + + void RewriteConditionToNop (int index) + { + if (conditionInstrsToRemove == null) + conditionInstrsToRemove = new List (); + + conditionInstrsToRemove.Add (index); + RewriteToNop (index); + } + + void RewriteToNop (int index) + { + Rewrite (index, Instruction.Create (OpCodes.Nop)); + } + + public bool RewriteBody () + { + if (FoldedInstructions == null) + return false; + + if (!RemoveConditions ()) + return false; + + var reachableInstrs = GetReachableInstructionsMap (out var unreachableEH); + if (reachableInstrs == null) + return false; + + var bodySweeper = new BodySweeper (Body, reachableInstrs, unreachableEH, context); + if (!bodySweeper.Initialize ()) { + context.LogMessage (MessageImportance.Low, $"Unreachable IL reduction is not supported for method '{Body.Method.FullName}'"); + return false; + } + + bodySweeper.Process (conditionInstrsToRemove); + InstructionsReplaced = bodySweeper.InstructionsReplaced; + + return InstructionsReplaced > 0; + } + + bool RemoveConditions () + { + bool changed = false; + object left, right; + + // + // Finds any branchable instruction and checks if the operand or operands + // can be evaluated as constant result. + // + // The logic does not remove any instructions but replaces them with nops for + // easier processing later (makes the mapping straigh-forward). + // + for (int i = 0; i < FoldedInstructions.Count; ++i) { + var instr = FoldedInstructions [i]; + var opcode = instr.OpCode; + + if (opcode.FlowControl == FlowControl.Cond_Branch) { + if (opcode.StackBehaviourPop == StackBehaviour.Pop1_pop1) { + if (!GetOperandsConstantValues (i, out left, out right)) + continue; + + if (left is int lint && right is int rint) { + RewriteToNop (i - 2); + RewriteToNop (i - 1); + + if (IsComparisonAlwaysTrue (opcode, lint, rint)) { + Rewrite (i, Instruction.Create (OpCodes.Br, (Instruction)instr.Operand)); + } else { + RewriteConditionToNop (i); + } + + changed = true; + continue; + } + + continue; + } + + if (opcode.StackBehaviourPop == StackBehaviour.Popi) { + if (i > 0 && GetConstantValue (FoldedInstructions [i - 1], out var operand)) { + if (operand is int opint) { + RewriteToNop (i - 1); + + if (IsConstantBranch (opcode, opint)) { + Rewrite (i, Instruction.Create (OpCodes.Br, (Instruction)instr.Operand)); + } else { + RewriteConditionToNop (i); + } + + changed = true; + continue; + } + + if (operand is null && (opcode.Code == Code.Brfalse || opcode.Code == Code.Brfalse_S)) { + RewriteToNop (i - 1); + Rewrite (i, Instruction.Create (OpCodes.Br, (Instruction)instr.Operand)); + changed = true; + continue; + } + } + + // Common pattern generated by C# compiler in debug mode + if (i > 3 && GetConstantValue (FoldedInstructions [i - 3], out operand) && operand is int opint2 && IsPairedStlocLdloc (FoldedInstructions [i - 2], FoldedInstructions [i - 1])) { + RewriteToNop (i - 3); + RewriteToNop (i - 2); + RewriteToNop (i - 1); + + if (IsConstantBranch (opcode, opint2)) { + Rewrite (i, Instruction.Create (OpCodes.Br, (Instruction)instr.Operand)); + } else { + RewriteConditionToNop (i); + } + + changed = true; + continue; + } + + continue; + } + + throw new NotImplementedException (); + } + + // Mode special for csc in debug mode + switch (instr.OpCode.Code) { + case Code.Ceq: + case Code.Clt: + case Code.Cgt: + if (!GetOperandsConstantValues (i, out left, out right)) + continue; + + if (left is int lint && right is int rint) { + RewriteToNop (i - 2); + RewriteToNop (i - 1); + + if (IsComparisonAlwaysTrue (instr.OpCode, lint, rint)) { + Rewrite (i, Instruction.Create (OpCodes.Ldc_I4_1)); + } else { + Rewrite (i, Instruction.Create (OpCodes.Ldc_I4_0)); + } + + changed = true; + } + + break; + + case Code.Cgt_Un: + if (!GetOperandsConstantValues (i, out left, out right)) + continue; + + if (left == null && right == null) { + Rewrite (i, Instruction.Create (OpCodes.Ldc_I4_0)); + } + + changed = true; + break; + } + } + + return changed; + } + + BitArray GetReachableInstructionsMap (out List unreachableHandlers) + { + unreachableHandlers = null; + var reachable = new BitArray (FoldedInstructions.Count); + + Stack condBranches = null; + bool exceptionHandlersChecked = !Body.HasExceptionHandlers; + Instruction target; + int i = 0; + while (true) { + while (i < FoldedInstructions.Count) { + if (reachable [i]) + break; + + reachable [i] = true; + var instr = FoldedInstructions [i++]; + + switch (instr.OpCode.FlowControl) { + case FlowControl.Branch: + target = (Instruction)instr.Operand; + i = GetInstructionIndex (target); + continue; + + case FlowControl.Cond_Branch: + if (condBranches == null) + condBranches = new Stack (); + + switch (instr.Operand) { + case Instruction starget: + condBranches.Push (GetInstructionIndex (starget)); + continue; + case Instruction[] mtargets: + foreach (var t in mtargets) + condBranches.Push (GetInstructionIndex (t)); + continue; + default: + throw new NotImplementedException (); + } + + case FlowControl.Next: + case FlowControl.Call: + case FlowControl.Meta: + continue; + + case FlowControl.Return: + case FlowControl.Throw: + break; + + default: + throw new NotImplementedException (); + } + + break; + } + + if (condBranches?.Count > 0) { + i = condBranches.Pop (); + continue; + } + + if (!exceptionHandlersChecked) { + exceptionHandlersChecked = true; + + var instrs = Body.Instructions; + foreach (var handler in Body.ExceptionHandlers) { + int start = instrs.IndexOf (handler.TryStart); + int end = instrs.IndexOf (handler.TryEnd) - 1; + + if (!HasAnyBitSet (reachable, start, end)) { + if (unreachableHandlers == null) + unreachableHandlers = new List (); + + unreachableHandlers.Add (handler); + continue; + } + + if (condBranches == null) + condBranches = new Stack (); + + condBranches.Push (GetInstructionIndex (handler.HandlerStart)); + } + + if (condBranches?.Count > 0) { + i = condBranches.Pop (); + continue; + } + } + + return reachable; + } + } + + static bool HasAnyBitSet (BitArray bitArray, int startIndex, int endIndex) + { + for (int i = startIndex; i <= endIndex; ++i) { + if (bitArray [i]) + return true; + } + + return false; + } + + // + // Returns index of instruction in folded instruction body + // + int GetInstructionIndex (Instruction instruction) + { + int idx; + if (mapping.TryGetValue (instruction, out idx)) + return idx; + + idx = FoldedInstructions.IndexOf (instruction); + Debug.Assert (idx >= 0); + return idx; + } + + bool GetOperandsConstantValues (int index, out object left, out object right) + { + left = default; + right = default; + + if (index < 2) + return false; + + return GetConstantValue (FoldedInstructions [index - 2], out left) && + GetConstantValue (FoldedInstructions [index - 1], out right); + } + + static bool GetConstantValue (Instruction instruction, out object value) + { + switch (instruction.OpCode.Code) { + case Code.Ldc_I4_0: + value = 0; + return true; + case Code.Ldc_I4_1: + value = 1; + return true; + case Code.Ldc_I4_2: + value = 2; + return true; + case Code.Ldc_I4_3: + value = 3; + return true; + case Code.Ldc_I4_4: + value = 4; + return true; + case Code.Ldc_I4_5: + value = 5; + return true; + case Code.Ldc_I4_6: + value = 6; + return true; + case Code.Ldc_I4_7: + value = 7; + return true; + case Code.Ldc_I4_8: + value = 8; + return true; + case Code.Ldc_I4_M1: + value = -1; + return true; + case Code.Ldc_I4: + value = (int)instruction.Operand; + return true; + case Code.Ldc_I4_S: + value = (int)(sbyte)instruction.Operand; + return true; + case Code.Ldc_I8: + value = (long)instruction.Operand; + return true; + case Code.Ldnull: + value = null; + return true; + default: + value = null; + return false; + } + } + + static bool IsPairedStlocLdloc (Instruction first, Instruction second) + { + switch (first.OpCode.Code) { + case Code.Stloc_0: + return second.OpCode.Code == Code.Ldloc_0; + case Code.Stloc_1: + return second.OpCode.Code == Code.Ldloc_1; + case Code.Stloc_2: + return second.OpCode.Code == Code.Ldloc_2; + case Code.Stloc_3: + return second.OpCode.Code == Code.Ldloc_3; + case Code.Stloc_S: + case Code.Stloc: + if (second.OpCode.Code == Code.Ldloc_S || second.OpCode.Code == Code.Ldloc) + return ((VariableDefinition)first.Operand).Index == ((VariableDefinition)second.Operand).Index; + + break; + } + + return false; + } + + static bool IsComparisonAlwaysTrue (OpCode opCode, int left, int right) + { + switch (opCode.Code) { + case Code.Beq: + case Code.Beq_S: + case Code.Ceq: + return left == right; + case Code.Bne_Un: + case Code.Bne_Un_S: + return left != right; + case Code.Bge: + case Code.Bge_S: + case Code.Bge_Un: + case Code.Bge_Un_S: + return left >= right; + case Code.Bgt: + case Code.Bgt_S: + case Code.Bgt_Un: + case Code.Bgt_Un_S: + case Code.Cgt: + return left > right; + case Code.Ble: + case Code.Ble_S: + case Code.Ble_Un: + case Code.Ble_Un_S: + return left <= right; + case Code.Blt: + case Code.Blt_S: + case Code.Blt_Un: + case Code.Blt_Un_S: + case Code.Clt: + return left < right; + } + + throw new NotImplementedException (opCode.ToString ()); + } + + static bool IsConstantBranch (OpCode opCode, int operand) + { + switch (opCode.Code) { + case Code.Brfalse: + case Code.Brfalse_S: + return operand == 0; + case Code.Brtrue: + case Code.Brtrue_S: + return operand != 0; + } + + throw new NotImplementedException (opCode.ToString ()); + } + } + + struct BodySweeper + { + readonly MethodBody body; + readonly BitArray reachable; + readonly List unreachableExceptionHandlers; + readonly LinkContext context; + ILProcessor ilprocessor; + List returnInits; + + public BodySweeper (MethodBody body, BitArray reachable, List unreachableEH, LinkContext context) + { + this.body = body; + this.reachable = reachable; + this.unreachableExceptionHandlers = unreachableEH; + this.context = context; + + InstructionsReplaced = 0; + ilprocessor = null; + returnInits = null; + } + + public int InstructionsReplaced { get; set; } + + public bool Initialize () + { + var instrs = body.Instructions; + + if (body.HasExceptionHandlers) { + foreach (var handler in body.ExceptionHandlers) { + if (unreachableExceptionHandlers?.Contains (handler) == true) + continue; + + // Cecil TryEnd is off by 1 instruction + var handlerEnd = handler.TryEnd.Previous; + + switch (handlerEnd.OpCode.Code) { + case Code.Leave: + case Code.Leave_S: + // + // Keep original leave to correctly mark handler exit + // + int index = instrs.IndexOf (handlerEnd); + reachable [index] = true; + break; + default: + Debug.Fail ("Exception handler without leave instruction"); + return false; + } + } + } + + // + // Makes the unreachable code at the end of method valid/verifiable + // + if (body.Method.ReturnType.MetadataType != MetadataType.Void && instrs.Count > 1) { + var retExprIndex = instrs.Count - 2; + + if (!reachable [retExprIndex]) { + if (returnInits == null) + returnInits = new List (); + + returnInits.Add (retExprIndex); + } + } + + // + // Reusing same reachable map to force skipping processing for instructions + // which will remain same + // + for (int i = 0; i < instrs.Count; ++i) { + if (reachable [i]) + continue; + + var instr = instrs [i]; + switch (instr.OpCode.Code) { + case Code.Nop: + reachable [i] = true; + continue; + + case Code.Ret: + if (i == instrs.Count - 1) + reachable [i] = true; + + break; + } + } + + ilprocessor = body.GetILProcessor (); + return true; + } + + public void Process (List conditionInstrsToRemove) + { + List removedVariablesReferences = null; + Dictionary injectingInstructions = null; + + // + // Initial pass which replaces unreachable instructions with nops or + // ret/leave to keep the body verifiable + // + var instrs = body.Instructions; + for (int i = 0; i < instrs.Count; ++i) { + if (reachable [i]) + continue; + + var instr = instrs [i]; + + Instruction newInstr; + if (returnInits?.Contains (i) == true) { + newInstr = GetReturnInitialization (out var initInstructions); + + // + // Any new instruction injection needs to be postponed until reachableMap + // is fully processed to simplify the logic and avoid any re-indexing + // + if (initInstructions != null) { + if (injectingInstructions == null) + injectingInstructions = new Dictionary (); + injectingInstructions.Add (newInstr, initInstructions); + } + } else if (i == instrs.Count - 1) { + newInstr = Instruction.Create (OpCodes.Ret); + } else { + newInstr = Instruction.Create (OpCodes.Nop); + } + + ilprocessor.Replace (i, newInstr); + InstructionsReplaced++; + + VariableDefinition variable = GetVariableReference (instr); + if (variable != null) { + if (removedVariablesReferences == null) + removedVariablesReferences = new List (); + if (!removedVariablesReferences.Contains (variable)) + removedVariablesReferences.Add (variable); + } + } + + CleanExceptionHandlers (); + + // + // Process list of conditional jump which should be removed. They cannot be + // replaced with nops as they alter the stack + // + if (conditionInstrsToRemove != null) { + int bodyExpansion = 0; + + foreach (int instrIndex in conditionInstrsToRemove) { + var index = instrIndex + bodyExpansion; + var instr = instrs [index]; + + switch (instr.OpCode.StackBehaviourPop) { + case StackBehaviour.Pop1_pop1: + + InstructionsReplaced += 2; + + // + // One of the operands is most likely constant and could just be removed instead of additional pop + // + if (index > 0 && IsSideEffectFreeLoad (instrs [index - 1])) { + ilprocessor.Replace (index - 1, Instruction.Create (OpCodes.Pop)); + ilprocessor.Replace (index, Instruction.Create (OpCodes.Nop)); + } else { + var pop = Instruction.Create (OpCodes.Pop); + ilprocessor.Replace (index, pop); + ilprocessor.InsertAfter (pop, Instruction.Create (OpCodes.Pop)); + + // + // conditionInstrsToRemove is always sorted and instead of + // increasing remaining indexes we introduce index delta value + // + bodyExpansion++; + } + break; + case StackBehaviour.Popi: + ilprocessor.Replace (index, Instruction.Create (OpCodes.Pop)); + InstructionsReplaced++; + break; + } + } + } + + // + // To this point the original and modified bodies had exactly same number of + // instructions + // + if (injectingInstructions != null) { + foreach (var key in injectingInstructions) { + int index = instrs.IndexOf (key.Key); + Debug.Assert (index >= 0); + + var newInstrs = key.Value; + index--; + + // TODO: Simplify when Cecil has better API + if (IsNopRange (instrs, index, newInstrs.Length)) { + int counter = 0; + for (int i = index - newInstrs.Length + 1; i <= index; i++) { + ilprocessor.Replace (i, newInstrs [counter++]); + } + } else { + // FIXME: This could break short range jumps. We could fix + // that during final il optimization step once we have it + for (int i = newInstrs.Length; i != 0; i--) { + ilprocessor.InsertAfter (index, newInstrs [i - 1]); + } + } + } + } + + // + // Replacing instructions with nops can make local variables unused. Process them + // as the last step to reduce more type dependencies + // + if (removedVariablesReferences != null) { + CleanRemovedVariables (removedVariablesReferences); + } + } + + Instruction GetReturnInitialization (out Instruction[] initInstructions) + { + var cinstr = CodeRewriterStep.CreateConstantResultInstruction (body.Method.ReturnType); + if (cinstr != null) { + initInstructions = null; + return cinstr; + } + + var rtype = body.Method.ReturnType; + + switch (rtype.MetadataType) { + case MetadataType.MVar: + case MetadataType.ValueType: + var vd = new VariableDefinition (rtype); + body.Variables.Add (vd); + body.InitLocals = true; + + initInstructions = new [] { + Instruction.Create (OpCodes.Ldloca_S, vd), + Instruction.Create (OpCodes.Initobj, rtype) + }; + + return CreateVariableLoadingInstruction (vd); + case MetadataType.Pointer: + case MetadataType.IntPtr: + case MetadataType.UIntPtr: + initInstructions = new [] { + Instruction.Create (OpCodes.Ldc_I4_0) + }; + + return Instruction.Create (OpCodes.Conv_I); + } + + throw new NotImplementedException ($"Initialization of return value in method '{body.Method.FullName}'"); + } + + void CleanRemovedVariables (List variables) + { + foreach (var instr in body.Instructions) { + VariableDefinition variable = GetVariableReference (instr); + if (variable == null) + continue; + + if (!variables.Remove (variable)) + continue; + + if (variables.Count == 0) + return; + } + + variables.Sort ((a, b) => b.Index.CompareTo (a.Index)); + var body_variables = body.Variables; + + foreach (var variable in variables) { + var index = body_variables.IndexOf (variable); + + // + // Remove variable only if it's the last one. Instead of + // re-indexing all variables we mark change it to object, + // which is enough to drop the dependency + // + if (index == body_variables.Count - 1) { + body_variables.RemoveAt (index); + } else { + var objectType = BCL.FindPredefinedType ("System", "Object", context); + if (objectType == null) + throw new NotSupportedException ("Missing predefined 'System.Object' type"); + + body_variables [index].VariableType = objectType; + } + } + } + + void CleanExceptionHandlers () + { + if (unreachableExceptionHandlers == null) + return; + + foreach (var eh in unreachableExceptionHandlers) + body.ExceptionHandlers.Remove (eh); + } + + static Instruction CreateVariableLoadingInstruction (VariableDefinition variable) + { + switch (variable.Index) { + case 0: + return Instruction.Create (OpCodes.Ldloc_0); + case 1: + return Instruction.Create (OpCodes.Ldloc_1); + case 2: + return Instruction.Create (OpCodes.Ldloc_2); + case 3: + return Instruction.Create (OpCodes.Ldloc_3); + default: + return variable.Index < 256 ? + Instruction.Create (OpCodes.Ldloc_S, variable) : + Instruction.Create (OpCodes.Ldloc, variable); + } + } + + VariableDefinition GetVariableReference (Instruction instruction) + { + switch (instruction.OpCode.Code) { + case Code.Stloc_0: + case Code.Ldloc_0: + return body.Variables [0]; + case Code.Stloc_1: + case Code.Ldloc_1: + return body.Variables [1]; + case Code.Stloc_2: + case Code.Ldloc_2: + return body.Variables [2]; + case Code.Stloc_3: + case Code.Ldloc_3: + return body.Variables [3]; + } + + if (instruction.Operand is VariableReference vr) + return vr.Resolve (); + + return null; + } + + static bool IsNopRange (Collection collection, int startIndex, int count) + { + if (startIndex - count < 0) + return false; + + while (count-- > 0) { + if (collection [startIndex--].OpCode != OpCodes.Nop) + return false; + } + + return true; + } + + static bool IsSideEffectFreeLoad (Instruction instr) + { + switch (instr.OpCode.Code) { + case Code.Ldarg: + case Code.Ldloc: + case Code.Ldloc_0: + case Code.Ldloc_1: + case Code.Ldloc_2: + case Code.Ldloc_3: + case Code.Ldloc_S: + case Code.Ldc_I4_0: + case Code.Ldc_I4_1: + case Code.Ldc_I4_2: + case Code.Ldc_I4_3: + case Code.Ldc_I4_4: + case Code.Ldc_I4_5: + case Code.Ldc_I4_6: + case Code.Ldc_I4_7: + case Code.Ldc_I4_8: + case Code.Ldc_I4: + case Code.Ldc_I4_S: + case Code.Ldc_I4_M1: + case Code.Ldc_I8: + case Code.Ldc_R4: + case Code.Ldc_R8: + case Code.Ldnull: + case Code.Ldstr: + return true; + } + + return false; + } + } + + struct ConstantExpressionMethodAnalyzer + { + readonly MethodDefinition method; + readonly Collection instructions; + + Stack stack_instr; + Dictionary locals; + + public ConstantExpressionMethodAnalyzer (MethodDefinition method) + { + this.method = method; + instructions = method.Body.Instructions; + stack_instr = null; + locals = null; + Result = null; + } + + public ConstantExpressionMethodAnalyzer (MethodDefinition method, Collection instructions) + { + this.method = method; + this.instructions = instructions; + stack_instr = null; + locals = null; + Result = null; + } + + public Instruction Result { get; private set; } + + public bool Analyze () + { + var body = method.Body; + if (body.HasExceptionHandlers) + return false; + + VariableReference vr; + Instruction jmpTarget = null; + Instruction linstr; + + foreach (var instr in instructions) { + if (jmpTarget != null) { + if (instr != jmpTarget) + continue; + + jmpTarget = null; + } + + switch (instr.OpCode.Code) { + case Code.Nop: + continue; + case Code.Pop: + stack_instr.Pop (); + continue; + + case Code.Br_S: + case Code.Br: + jmpTarget = (Instruction)instr.Operand; + continue; + + case Code.Ldc_I4: + case Code.Ldc_I4_S: + case Code.Ldc_I4_0: + case Code.Ldc_I4_1: + case Code.Ldc_I4_2: + case Code.Ldc_I4_3: + case Code.Ldc_I4_4: + case Code.Ldc_I4_5: + case Code.Ldc_I4_6: + case Code.Ldc_I4_7: + case Code.Ldc_I4_8: + case Code.Ldc_I4_M1: + case Code.Ldc_I8: + case Code.Ldnull: + case Code.Ldstr: + case Code.Ldtoken: + PushOnStack (instr); + continue; + + case Code.Ldloc_0: + linstr = GetLocalsValue (0, body); + if (linstr == null) + return false; + + PushOnStack (linstr); + continue; + case Code.Ldloc_1: + linstr = GetLocalsValue (1, body); + if (linstr == null) + return false; + + PushOnStack (linstr); + continue; + case Code.Ldloc_2: + linstr = GetLocalsValue (2, body); + if (linstr == null) + return false; + + PushOnStack (linstr); + continue; + case Code.Ldloc_3: + linstr = GetLocalsValue (3, body); + if (linstr == null) + return false; + + PushOnStack (linstr); + continue; + case Code.Ldloc: + case Code.Ldloc_S: + vr = (VariableReference)instr.Operand; + linstr = GetLocalsValue (vr.Index, body); + if (linstr == null) + return false; + + PushOnStack (linstr); + continue; + case Code.Stloc_0: + StoreToLocals (0); + continue; + case Code.Stloc_1: + StoreToLocals (1); + continue; + case Code.Stloc_2: + StoreToLocals (2); + continue; + case Code.Stloc_3: + StoreToLocals (3); + continue; + case Code.Stloc_S: + case Code.Stloc: + vr = (VariableReference)instr.Operand; + StoreToLocals (vr.Index); + continue; + + // TODO: handle simple conversions + //case Code.Conv_I: + + case Code.Ret: + if (ConvertStackToResult ()) + return true; + + break; + } + + return false; + } + + return false; + } + + bool ConvertStackToResult () + { + if (stack_instr == null) + return false; + + if (stack_instr.Count != 1) + return false; + + var instr = stack_instr.Pop (); + + switch (instr.OpCode.Code) { + case Code.Ldc_I4_0: + case Code.Ldc_I4_1: + case Code.Ldc_I4_2: + case Code.Ldc_I4_3: + case Code.Ldc_I4_4: + case Code.Ldc_I4_5: + case Code.Ldc_I4_6: + case Code.Ldc_I4_7: + case Code.Ldc_I4_8: + case Code.Ldc_I4: + case Code.Ldc_I4_S: + case Code.Ldc_I4_M1: + case Code.Ldc_I8: + case Code.Ldnull: + case Code.Ldstr: + Result = instr; + return true; + } + + return false; + } + + Instruction GetLocalsValue (int index, MethodBody body) + { + var instr = locals? [index]; + if (instr != null) + return instr; + + if (!body.InitLocals) + return null; + + // local variables don't need to be explicitly initialized + return CodeRewriterStep.CreateConstantResultInstruction (body.Variables [index].VariableType); + } + + void PushOnStack (Instruction instruction) + { + if (stack_instr == null) + stack_instr = new Stack (); + + stack_instr.Push (instruction); + } + + void StoreToLocals (int index) + { + if (locals == null) + locals = new Dictionary (); + + locals [index] = stack_instr.Pop (); + } + } + } +} diff --git a/external/linker/src/linker/Linker.Steps/ResolveFromAssemblyStep.cs b/external/linker/src/linker/Linker.Steps/ResolveFromAssemblyStep.cs index a6db52b127..f8a350a08e 100644 --- a/external/linker/src/linker/Linker.Steps/ResolveFromAssemblyStep.cs +++ b/external/linker/src/linker/Linker.Steps/ResolveFromAssemblyStep.cs @@ -63,8 +63,13 @@ namespace Mono.Linker.Steps if (_assembly != null) Context.Resolver.CacheAssembly (_assembly); - AssemblyDefinition assembly = _assembly ?? Context.Resolve (_file); + var ignoreUnresolved = Context.Resolver.IgnoreUnresolved; + if (_rootVisibility == RootVisibility.PublicAndFamily) { + Context.Resolver.IgnoreUnresolved = false; + } + AssemblyDefinition assembly = _assembly ?? Context.Resolve (_file); + Context.Resolver.IgnoreUnresolved = ignoreUnresolved; if (_rootVisibility != RootVisibility.Any && HasInternalsVisibleTo (assembly)) { _rootVisibility = RootVisibility.PublicAndFamilyAndAssembly; } diff --git a/external/linker/src/linker/Linker.Steps/ResolveFromXmlStep.cs b/external/linker/src/linker/Linker.Steps/ResolveFromXmlStep.cs index 83c72205d4..bb4febed88 100644 --- a/external/linker/src/linker/Linker.Steps/ResolveFromXmlStep.cs +++ b/external/linker/src/linker/Linker.Steps/ResolveFromXmlStep.cs @@ -462,18 +462,23 @@ namespace Mono.Linker.Steps { { if (type.HasMethods) foreach (MethodDefinition meth in type.Methods) - if (signature == GetMethodSignature (meth)) + if (signature == GetMethodSignature (meth, false)) return meth; return null; } - static string GetMethodSignature (MethodDefinition meth) + public static string GetMethodSignature (MethodDefinition meth, bool includeGenericParameters) { StringBuilder sb = new StringBuilder (); sb.Append (meth.ReturnType.FullName); sb.Append (" "); sb.Append (meth.Name); + if (includeGenericParameters && meth.HasGenericParameters) { + sb.Append ("`"); + sb.Append (meth.GenericParameters.Count); + } + sb.Append ("("); if (meth.HasParameters) { for (int i = 0; i < meth.Parameters.Count; i++) { diff --git a/external/linker/src/linker/Linker/Annotations.cs b/external/linker/src/linker/Linker/Annotations.cs index 8530ab04f8..627d8121ea 100644 --- a/external/linker/src/linker/Linker/Annotations.cs +++ b/external/linker/src/linker/Linker/Annotations.cs @@ -39,6 +39,10 @@ namespace Mono.Linker { protected readonly Dictionary assembly_actions = new Dictionary (); protected readonly Dictionary method_actions = new Dictionary (); + protected readonly Dictionary method_stub_values = new Dictionary (); + protected readonly Dictionary field_values = new Dictionary (); + protected readonly HashSet field_init = new HashSet (); + protected readonly HashSet fieldType_init = new HashSet (); protected readonly HashSet marked = new HashSet (); protected readonly HashSet processed = new HashSet (); protected readonly Dictionary preserved_types = new Dictionary (); @@ -71,14 +75,13 @@ namespace Mono.Linker { [Obsolete ("Use Tracer in LinkContext directly")] public void PrepareDependenciesDump () { - Tracer.Start (); + Tracer.AddRecorder (new XmlDependencyRecorder (context)); } [Obsolete ("Use Tracer in LinkContext directly")] public void PrepareDependenciesDump (string filename) { - Tracer.DependenciesFileName = filename; - Tracer.Start (); + Tracer.AddRecorder (new XmlDependencyRecorder (context, filename)); } public ICollection GetAssemblies () @@ -119,6 +122,36 @@ namespace Mono.Linker { method_actions [method] = action; } + public void SetMethodStubValue (MethodDefinition method, object value) + { + method_stub_values [method] = value; + } + + public void SetFieldValue (FieldDefinition field, object value) + { + field_values [field] = value; + } + + public void SetSubstitutedInit (FieldDefinition field) + { + field_init.Add (field); + } + + public bool HasSubstitutedInit (FieldDefinition field) + { + return field_init.Contains (field); + } + + public void SetSubstitutedInit (TypeDefinition type) + { + fieldType_init.Add (type); + } + + public bool HasSubstitutedInit (TypeDefinition type) + { + return fieldType_init.Contains (type); + } + public void Mark (IMetadataTokenProvider provider) { marked.Add (provider); @@ -233,6 +266,16 @@ namespace Mono.Linker { return preserved_types.TryGetValue (type, out preserve); } + public bool TryGetMethodStubValue (MethodDefinition method, out object value) + { + return method_stub_values.TryGetValue (method, out value); + } + + public bool TryGetFieldUserValue (FieldDefinition field, out object value) + { + return field_values.TryGetValue (field, out value); + } + public HashSet GetResourcesToRemove (AssemblyDefinition assembly) { HashSet resources; diff --git a/external/linker/src/linker/Linker/BCL.cs b/external/linker/src/linker/Linker/BCL.cs index 1bc1683da6..b4f62ce88b 100644 --- a/external/linker/src/linker/Linker/BCL.cs +++ b/external/linker/src/linker/Linker/BCL.cs @@ -60,22 +60,27 @@ namespace Mono.Linker return true; } + static readonly string[] corlibNames = new [] { + "mscorlib", + "System.Runtime", + "System.Private.CoreLib", + "netstandard" + }; + public static TypeDefinition FindPredefinedType (string ns, string name, LinkContext context) { var cache = context.Resolver.AssemblyCache; - AssemblyDefinition corlib; - TypeDefinition type = null; - if (cache.TryGetValue ("mscorlib", out corlib)) { - type = corlib.MainModule.GetType (ns, name); + foreach (var corlibName in corlibNames) { + if (!cache.TryGetValue (corlibName, out AssemblyDefinition corlib)) + continue; + + TypeDefinition type = corlib.MainModule.GetType (ns, name); // The assembly could be a facade with type forwarders, in which case we don't find the type in this assembly. if (type != null) return type; } - if (cache.TryGetValue ("System.Private.CoreLib", out corlib)) - return corlib.MainModule.GetType (ns, name); - return null; } } diff --git a/external/linker/src/linker/Linker/Driver.cs b/external/linker/src/linker/Linker/Driver.cs index 8990ee5831..abfd2665f7 100644 --- a/external/linker/src/linker/Linker/Driver.cs +++ b/external/linker/src/linker/Linker/Driver.cs @@ -29,7 +29,6 @@ using System; using System.IO; using System.Collections.Generic; -using System.Linq; using System.Text; using System.Xml.XPath; @@ -40,9 +39,11 @@ namespace Mono.Linker { public partial class Driver { #if FEATURE_ILLINK + const string resolvers = "-a|-r|-x"; static readonly string _linker = "IL Linker"; #else - static readonly string _linker = "Mono CIL Linker"; + const string resolvers = "-a|-i|-r|-x"; + static readonly string _linker = "Mono IL Linker"; #endif public static int Main (string [] args) @@ -52,13 +53,19 @@ namespace Mono.Linker { public static int Execute (string[] args, ILogger customLogger = null) { - if (args.Length == 0) - Usage ("No parameters specified"); + if (args.Length == 0) { + Console.Error.WriteLine ("No parameters specified"); + return 1; + } + + if (!ProcessResponseFile (args, out var arguments)) + return 1; try { - Driver driver = new Driver (args); - driver.Run (customLogger); + Driver driver = new Driver (arguments); + if (!driver.Run (customLogger)) + return 1; } catch { Console.Error.WriteLine ("Fatal error in {0}", _linker); @@ -68,17 +75,17 @@ namespace Mono.Linker { return 0; } - Queue _queue; + readonly Queue arguments; bool _needAddBypassNGenStep; - public Driver (string [] args) + public Driver (Queue arguments) { - _queue = ProcessResponseFile (args); + this.arguments = arguments; } - Queue ProcessResponseFile (string [] args) + public static bool ProcessResponseFile (string[] args, out Queue result) { - var result = new Queue (); + result = new Queue (); foreach (string arg in args) { if (arg.StartsWith ("@")) { try { @@ -86,13 +93,15 @@ namespace Mono.Linker { IEnumerable responseFileLines = File.ReadLines (responseFileName); ParseResponseFileLines (responseFileLines, result); } catch (Exception e) { - Usage ("Cannot read response file with exception " + e.Message); + Console.Error.WriteLine ("Cannot read response file due to '{0}'", e.Message); + return false; } } else { result.Enqueue (arg); } } - return result; + + return true; } public static void ParseResponseFileLines (IEnumerable responseFileLines, Queue result) @@ -141,54 +150,64 @@ namespace Mono.Linker { } } - bool HaveMoreTokens () + static void ErrorUnrecognizedOption (string optionName) { - return _queue.Count > 0; + Console.WriteLine ($"Unrecognized command-line option: '{optionName}'"); } - public void Run (ILogger customLogger = null) + static void ErrorMissingArgument (string optionName) + { + Console.WriteLine ($"Missing argument for '{optionName}' option"); + } + + public bool Run (ILogger customLogger = null) { Pipeline p = GetStandardPipeline (); using (LinkContext context = GetDefaultContext (p)) { if (customLogger != null) context.Logger = customLogger; +#if !FEATURE_ILLINK I18nAssemblies assemblies = I18nAssemblies.All; +#endif var custom_steps = new List (); var excluded_features = new HashSet (StringComparer.Ordinal); var disabled_optimizations = new HashSet (StringComparer.Ordinal); var enabled_optimizations = new HashSet (StringComparer.Ordinal); bool dumpDependencies = false; + string dependenciesFileName = null; bool ignoreDescriptors = false; bool removeCAS = true; + bool new_mvid_used = false; + bool deterministic_used = false; bool resolver = false; - while (HaveMoreTokens ()) { - string token = GetParam (); - if (token.Length < 2) - Usage ("Option is too short"); - - if (!(token [0] == '-' || token [1] == '/')) - Usage ("Expecting an option, got instead: " + token); + while (arguments.Count > 0) { + string token = arguments.Dequeue (); + if (token.Length < 2) { + ErrorUnrecognizedOption (token); + return false; + } + // + // Handling of --value like options + // if (token [0] == '-' && token [1] == '-') { - - if (token.Length < 3) - Usage ("Option is too short"); - switch (token) { case "--skip-unresolved": - bool ignoreUnresolved = bool.Parse (GetParam ()); - context.IgnoreUnresolved = ignoreUnresolved; - context.Resolver.IgnoreUnresolved = ignoreUnresolved; + if (!GetBoolParam (token, l => context.IgnoreUnresolved = context.Resolver.IgnoreUnresolved = l)) + return false; + continue; - + case "--verbose": context.LogMessages = true; continue; case "--dependencies-file": - context.Tracer.DependenciesFileName = GetParam (); + if (!GetStringParam (token, l => dependenciesFileName = l)) + return false; + continue; case "--dump-dependencies": @@ -196,203 +215,280 @@ namespace Mono.Linker { continue; case "--reduced-tracing": - context.EnableReducedTracing = bool.Parse (GetParam ()); + if (!GetBoolParam (token, l => context.EnableReducedTracing = l)) + return false; + continue; case "--used-attrs-only": - context.KeepUsedAttributeTypesOnly = bool.Parse (GetParam ()); + if (!GetBoolParam (token, l => context.KeepUsedAttributeTypesOnly = l)) + return false; + continue; case "--strip-security": - removeCAS = bool.Parse (GetParam ()); + if (!GetBoolParam (token, l => removeCAS = l)) + return false; + continue; case "--strip-resources": - context.StripResources = bool.Parse (GetParam ()); + if (!GetBoolParam (token, l => context.StripResources = l)) + return false; + + continue; + + case "--substitutions": + if (arguments.Count < 1) { + ErrorMissingArgument (token); + return false; + } + + if (!GetStringParam (token, l => context.AddSubstitutionFile (l))) + return false; + continue; case "--exclude-feature": - var name = GetParam (); - foreach (var feature in name.Split (',')) { - if (!excluded_features.Contains (feature)) - excluded_features.Add (feature); + if (arguments.Count < 1) { + ErrorMissingArgument (token); + return false; } + + if (!GetStringParam (token, l => { + foreach (var feature in l.Split (',')) { + if (!excluded_features.Contains (feature)) + excluded_features.Add (feature); + } + })) + return false; + continue; case "--explicit-reflection": - context.AddReflectionAnnotations = true; + if (!GetBoolParam (token, l => context.AddReflectionAnnotations = l)) + return false; + continue; case "--custom-step": - custom_steps.Add (GetParam ()); + if (!GetStringParam (token, l => custom_steps.Add (l))) + return false; + continue; case "--keep-facades": - context.KeepTypeForwarderOnlyAssemblies = bool.Parse (GetParam ()); + if (!GetBoolParam (token, l => context.KeepTypeForwarderOnlyAssemblies = l)) + return false; + continue; case "--keep-dep-attributes": - context.KeepDependencyAttributes = bool.Parse (GetParam ()); + if (!GetBoolParam (token, l => context.KeepDependencyAttributes = l)) + return false; + continue; case "--ignore-descriptors": - ignoreDescriptors = bool.Parse (GetParam ()); + if (!GetBoolParam (token, l => ignoreDescriptors = l)) + return false; + continue; case "--disable-opt": - var opt = GetParam ().ToLower (); - if (!disabled_optimizations.Contains (opt)) - disabled_optimizations.Add (opt); + if (!GetStringParam (token, l => { + var opt = l.ToLowerInvariant (); + if (!disabled_optimizations.Contains (opt)) + disabled_optimizations.Add (opt); + })) + return false; continue; case "--enable-opt": - opt = GetParam ().ToLower (); - if (!enabled_optimizations.Contains (opt)) - enabled_optimizations.Add (opt); + if (!GetStringParam (token, l => { + var opt = l.ToLowerInvariant (); + if (!enabled_optimizations.Contains (opt)) + enabled_optimizations.Add (opt); + })) + return false; continue; case "--new-mvid": - if (!bool.Parse (GetParam())) - p.RemoveStep (typeof (RegenerateGuidStep)); + // + // This is not same as --deterministic which calculates MVID + // from stable assembly content. This option creates a new random + // mvid or uses mvid of the source assembly. + // + if (!GetBoolParam (token, l => { + if (!l) + p.RemoveStep (typeof (RegenerateGuidStep)); + })) + return false; + + new_mvid_used = true; continue; case "--deterministic": - context.DeterministicOutput = true; - p.RemoveStep (typeof (RegenerateGuidStep)); + if (!GetBoolParam (token, l => context.DeterministicOutput = l)) + return false; + + deterministic_used = true; continue; case "--output-assemblylist": - context.AssemblyListFile = GetParam (); + if (!GetStringParam (token, l => context.AssemblyListFile = l)) + return false; + + continue; + + case "--version": + Version (); + return true; + + case "--about": + About (); + return true; + } + } + + if (token [0] == '-' || token [1] == '/') { + + switch (token.Substring (1)) { + case "d": + if (!GetStringParam (token, l => { + DirectoryInfo info = new DirectoryInfo (l); + context.Resolver.AddSearchDirectory (info.FullName); + })) + return false; + + continue; + case "o": + case "out": + if (!GetStringParam (token, l => context.OutputDirectory = l)) + return false; + + continue; + case "c": + if (!GetStringParam (token, l => context.CoreAction = ParseAssemblyAction (l))) + return false; + + continue; + case "u": + if (!GetStringParam (token, l => context.UserAction = ParseAssemblyAction (l))) + return false; + + continue; + case "p": + if (arguments.Count < 2) { + ErrorMissingArgument (token); + return false; + } + + AssemblyAction action = ParseAssemblyAction (arguments.Dequeue ()); + context.Actions [arguments.Dequeue ()] = action; + continue; + case "t": + context.KeepTypeForwarderOnlyAssemblies = true; + continue; + case "x": + if (!GetStringParam (token, l => { + foreach (string file in GetFiles (l)) + p.PrependStep (new ResolveFromXmlStep (new XPathDocument (file))); + + })) + return false; + + resolver = true; + continue; + case "r": + case "a": + if (!GetStringParam (token, l => { + + var rootVisibility = (token [1] == 'r') + ? ResolveFromAssemblyStep.RootVisibility.PublicAndFamily + : ResolveFromAssemblyStep.RootVisibility.Any; + foreach (string file in GetFiles (l)) + p.PrependStep (new ResolveFromAssemblyStep (file, rootVisibility)); + })) + return false; + + resolver = true; + continue; +#if !FEATURE_ILLINK + case "i": + if (!GetStringParam (token, l => { + foreach (string file in GetFiles (l)) + p.PrependStep (new ResolveFromXApiStep (new XPathDocument (file))); + })) + return false; + + resolver = true; + continue; + case "l": + if (!GetStringParam (token, l => assemblies = ParseI18n (l))) + return false; + + continue; +#endif + case "m": + if (arguments.Count < 2) { + ErrorMissingArgument (token); + return false; + } + + context.SetParameter (arguments.Dequeue (), arguments.Dequeue ()); + continue; + case "b": + if (!GetBoolParam (token, l => context.LinkSymbols = l)) + return false; + + continue; + case "g": + if (!GetBoolParam (token, l => context.DeterministicOutput = !l)) + return false; + + continue; + case "z": + if (!GetBoolParam (token, l => ignoreDescriptors = !l)) + return false; + + continue; + case "v": + if (!GetBoolParam (token, l => context.KeepMembersForDebugger = l)) + return false; + + continue; + case "?": + case "help": + Usage (); + return true; + + case "reference": + if (!GetStringParam (token, l => context.Resolver.AddReferenceAssembly (l))) + return false; + continue; } - - switch (token [2]) { - case 'v': - Version (); - break; - case 'a': - About (); - break; - default: - Usage (null); - break; - } } - // Ensure this does not conflict with '-r' below. - if (token == "-reference") { - context.Resolver.AddReferenceAssembly (GetParam ()); - continue; - } - - switch (token [1]) { - case 'd': - DirectoryInfo info = new DirectoryInfo (GetParam ()); - context.Resolver.AddSearchDirectory (info.FullName); - break; - case 'o': - context.OutputDirectory = GetParam (); - break; - case 'c': - context.CoreAction = ParseAssemblyAction (GetParam ()); - break; - case 'u': - context.UserAction = ParseAssemblyAction (GetParam ()); - break; - case 'p': - AssemblyAction action = ParseAssemblyAction (GetParam ()); - context.Actions [GetParam ()] = action; - break; - case 't': - context.KeepTypeForwarderOnlyAssemblies = true; - break; - case 'x': - foreach (string file in GetFiles (GetParam ())) - p.PrependStep (new ResolveFromXmlStep (new XPathDocument (file))); - resolver = true; - break; - case 'r': - case 'a': - var rootVisibility = (token [1] == 'r') - ? ResolveFromAssemblyStep.RootVisibility.PublicAndFamily - : ResolveFromAssemblyStep.RootVisibility.Any; - foreach (string file in GetFiles (GetParam ())) - p.PrependStep (new ResolveFromAssemblyStep (file, rootVisibility)); - resolver = true; - break; - case 'i': - foreach (string file in GetFiles (GetParam ())) - p.PrependStep (new ResolveFromXApiStep (new XPathDocument (file))); - resolver = true; - break; - case 'l': - assemblies = ParseI18n (GetParam ()); - break; - case 'm': - context.SetParameter (GetParam (), GetParam ()); - break; - case 'b': - context.LinkSymbols = bool.Parse (GetParam ()); - break; - case 'g': - if (!bool.Parse (GetParam ())) - p.RemoveStep (typeof (RegenerateGuidStep)); - break; - case 'z': - ignoreDescriptors = !bool.Parse (GetParam ()); - break; - case 'v': - context.KeepMembersForDebugger = bool.Parse (GetParam ()); - break; - default: - Usage ("Unknown option: `" + token [1] + "'"); - break; - } + ErrorUnrecognizedOption (token); + return false; } - if (!resolver) - Usage ("No resolver was created (use -x, -a or -i)"); + if (!resolver) { + Console.WriteLine ($"No files to link were specified. Use one of '{resolvers}' options"); + return false; + } + + if (new_mvid_used && deterministic_used) { + Console.WriteLine ($"Options '--new-mvid' and '--deterministic' cannot be used at the same time"); + return false; + } - if (ignoreDescriptors) - p.RemoveStep (typeof (BlacklistStep)); - if (dumpDependencies) - context.Tracer.Start (); - - foreach (string custom_step in custom_steps) - AddCustomStep (p, custom_step); - - if (context.AddReflectionAnnotations) - p.AddStepAfter (typeof (MarkStep), new ReflectionBlockedStep ()); - - p.AddStepAfter (typeof (LoadReferencesStep), new LoadI18nAssemblies (assemblies)); - - if (_needAddBypassNGenStep) { - p.AddStepAfter (typeof (SweepStep), new AddBypassNGenStep ()); - } - - if (assemblies != I18nAssemblies.None) { - p.AddStepAfter (typeof (PreserveDependencyLookupStep), new PreserveCalendarsStep (assemblies)); - } - - if (removeCAS) - p.AddStepBefore (typeof (MarkStep), new RemoveSecurityStep ()); - - if (excluded_features.Count > 0) { - - p.AddStepBefore (typeof (MarkStep), new RemoveFeaturesStep () { - FeatureCOM = excluded_features.Contains ("com"), - FeatureETW = excluded_features.Contains ("etw"), - FeatureSRE = excluded_features.Contains ("sre"), - FeatureGlobalization = excluded_features.Contains ("globalization") - }); - - var excluded = new string [excluded_features.Count]; - excluded_features.CopyTo (excluded); - context.ExcludedFeatures = excluded; - } + context.Tracer.AddRecorder (new XmlDependencyRecorder (context, dependenciesFileName)); if (disabled_optimizations.Count > 0) { foreach (var item in disabled_optimizations) { @@ -409,6 +505,9 @@ namespace Mono.Linker { case "unusedinterfaces": context.DisabledOptimizations |= CodeOptimizations.UnusedInterfaces; break; + case "ipconstprop": + context.DisabledOptimizations |= CodeOptimizations.IPConstantPropagation; + break; } } } @@ -422,53 +521,152 @@ namespace Mono.Linker { case "clearinitlocals": context.DisabledOptimizations &= ~CodeOptimizations.ClearInitLocals; break; + case "ipconstprop": + context.DisabledOptimizations &= ~CodeOptimizations.IPConstantPropagation; + break; } } } + // + // Modify the default pipeline + // + if (ignoreDescriptors) + p.RemoveStep (typeof (BlacklistStep)); + + if (context.DeterministicOutput) + p.RemoveStep (typeof (RegenerateGuidStep)); + + if (context.AddReflectionAnnotations) + p.AddStepAfter (typeof (MarkStep), new ReflectionBlockedStep ()); + +#if !FEATURE_ILLINK + p.AddStepAfter (typeof (LoadReferencesStep), new LoadI18nAssemblies (assemblies)); + + if (assemblies != I18nAssemblies.None) { + p.AddStepAfter (typeof (PreserveDependencyLookupStep), new PreserveCalendarsStep (assemblies)); + } +#endif + + if (_needAddBypassNGenStep) { + p.AddStepAfter (typeof (SweepStep), new AddBypassNGenStep ()); + } + + p.AddStepBefore (typeof (MarkStep), new BodySubstituterStep ()); + + if (removeCAS) + p.AddStepBefore (typeof (MarkStep), new RemoveSecurityStep ()); + + if (excluded_features.Count > 0) { + p.AddStepBefore (typeof (MarkStep), new RemoveFeaturesStep () { + FeatureCOM = excluded_features.Contains ("com"), + FeatureETW = excluded_features.Contains ("etw"), + FeatureSRE = excluded_features.Contains ("sre"), + FeatureGlobalization = excluded_features.Contains ("globalization") + }); + + var excluded = new string [excluded_features.Count]; + excluded_features.CopyTo (excluded); + context.ExcludedFeatures = excluded; + } + + p.AddStepBefore (typeof (MarkStep), new RemoveUnreachableBlocksStep ()); + if (context.IsOptimizationEnabled (CodeOptimizations.ClearInitLocals)) p.AddStepBefore (typeof (OutputStep), new ClearInitLocalsStep ()); + + // + // Pipeline setup with all steps enabled + // + // LoadReferencesStep + // BlacklistStep [optional] + // PreserveDependencyLookupStep + // TypeMapStep + // BodySubstituterStep [optional] + // RemoveSecurityStep [optional] + // RemoveFeaturesStep [optional] + // RemoveUnreachableBlocksStep [optional] + // MarkStep + // ReflectionBlockedStep [optional] + // SweepStep + // AddBypassNGenStep [optional] + // CodeRewriterStep + // CleanStep + // RegenerateGuidStep [optional] + // ClearInitLocalsStep [optional] + // OutputStep + // + + foreach (string custom_step in custom_steps) { + if (!AddCustomStep (p, custom_step)) + return false; + } + PreProcessPipeline (p); try { p.Process (context); + } finally { + context.Tracer.Finish (); } - finally { - if (dumpDependencies) - context.Tracer.Finish (); - } + + return true; } } partial void PreProcessPipeline (Pipeline pipeline); - protected static void AddCustomStep (Pipeline pipeline, string arg) + protected static bool AddCustomStep (Pipeline pipeline, string arg) { int pos = arg.IndexOf (":"); if (pos == -1) { - pipeline.AppendStep (ResolveStep (arg)); - return; + var step = ResolveStep (arg); + if (step == null) + return false; + + pipeline.AppendStep (step); + return true; } - string [] parts = arg.Split (':'); - if (parts.Length != 2) - Usage ("Step is specified as TYPE:STEP"); + string[] parts = arg.Split (':'); + if (parts.Length != 2) { + Console.WriteLine ($"Invalid value '{arg}' specified for '--custom-step' option"); + return false; + } - if (parts [0].IndexOf (",") > -1) - pipeline.AddStepBefore (FindStep (pipeline, parts [1]), ResolveStep (parts [0])); - else if (parts [1].IndexOf (",") > -1) - pipeline.AddStepAfter (FindStep (pipeline, parts [0]), ResolveStep (parts [1])); + if (!parts[0].StartsWith ("-") && !parts [0].StartsWith ("+")) { + Console.WriteLine ($"Expected '+' or '-' to control new step insertion"); + return false; + } + + bool before = parts [0][0] == '-'; + string name = parts [0].Substring (1); + + IStep target = FindStep (pipeline, name); + if (target == null) { + Console.WriteLine ($"Pipeline step '{name}' could not be found"); + return false; + } + + IStep newStep = ResolveStep (parts [1]); + if (newStep == null) + return false; + + if (before) + pipeline.AddStepBefore (target, newStep); else - Usage ("No comma separator in TYPE or STEP"); + pipeline.AddStepAfter (target, newStep); + + return true; } - static Type FindStep (Pipeline pipeline, string name) + static IStep FindStep (Pipeline pipeline, string name) { foreach (IStep step in pipeline.GetSteps ()) { Type t = step.GetType (); if (t.Name == name) - return t; + return step; } return null; @@ -477,10 +675,16 @@ namespace Mono.Linker { static IStep ResolveStep (string type) { Type step = Type.GetType (type, false); - if (step == null) - Usage (String.Format ("Step type '{0}' not found.", type)); - if (!typeof (IStep).IsAssignableFrom (step)) - Usage (String.Format ("Step type '{0}' does not implement IStep interface.", type)); + if (step == null) { + Console.WriteLine ($"Custom step '{type}' could not be found"); + return null; + } + + if (!typeof (IStep).IsAssignableFrom (step)) { + Console.WriteLine ($"Custom step '{type}' is incompatible with this linker version"); + return null; + } + return (IStep) Activator.CreateInstance (step); } @@ -504,6 +708,7 @@ namespace Mono.Linker { return lines.ToArray (); } +#if !FEATURE_ILLINK protected static I18nAssemblies ParseI18n (string str) { I18nAssemblies assemblies = I18nAssemblies.None; @@ -513,7 +718,7 @@ namespace Mono.Linker { return assemblies; } - +#endif AssemblyAction ParseAssemblyAction (string s) { @@ -527,49 +732,87 @@ namespace Mono.Linker { return assemblyAction; } - string GetParam () + bool GetBoolParam (string token, Action action) { - if (_queue.Count == 0) - Usage ("Expecting a parameter"); + if (arguments.Count == 0) { + action (true); + return true; + } - return _queue.Dequeue (); + var arg = arguments.Peek (); + if (bool.TryParse (arg.ToLowerInvariant (), out bool value)) { + arguments.Dequeue (); + action (value); + return true; + } + + if (arg.StartsWith ("-") || arg.StartsWith ("/")) { + action (true); + return true; + } + + Console.WriteLine ($"Invalid argument for '{token}' option"); + return false; } - static LinkContext GetDefaultContext (Pipeline pipeline) + bool GetStringParam (string token, Action action) { - LinkContext context = new LinkContext (pipeline); - context.CoreAction = AssemblyAction.Skip; - context.UserAction = AssemblyAction.Link; - context.OutputDirectory = "output"; - context.StripResources = true; + if (arguments.Count < 1) { + ErrorMissingArgument (token); + return false; + } + + var arg = arguments.Dequeue (); + if (!string.IsNullOrEmpty (arg)) { + action (arg); + return true; + } + + ErrorMissingArgument (token); + return false; + } + + + protected virtual LinkContext GetDefaultContext (Pipeline pipeline) + { + LinkContext context = new LinkContext (pipeline) { + CoreAction = AssemblyAction.Skip, + UserAction = AssemblyAction.Link, + OutputDirectory = "output", + StripResources = true + }; return context; } - static void Usage (string msg) + static void Usage () { Console.WriteLine (_linker); - if (msg != null) - Console.WriteLine ("Error: " + msg); + #if FEATURE_ILLINK - Console.WriteLine ("illink [options] -a|-i|-r|-x file"); + Console.WriteLine ($"illink [options] {resolvers} file"); #else - Console.WriteLine ("monolinker [options] -a|-i|-r|-x file"); + Console.WriteLine ($"monolinker [options] {resolvers} file"); #endif Console.WriteLine (" -a Link from a list of assemblies"); +#if !FEATURE_ILLINK Console.WriteLine (" -i Link from an mono-api-info descriptor"); +#endif Console.WriteLine (" -r Link from a list of assemblies using roots visible outside of the assembly"); Console.WriteLine (" -x Link from XML descriptor"); Console.WriteLine (" -d Specify additional directories to search in for references"); Console.WriteLine (" -reference Specify additional assemblies to use as references"); Console.WriteLine (" -b Update debug symbols for each linked module. Defaults to false"); Console.WriteLine (" -v Keep members and types used by debugger. Defaults to false"); +#if !FEATURE_ILLINK Console.WriteLine (" -l , List of i18n assemblies to copy to the output directory. Defaults to 'all'"); Console.WriteLine (" Valid names are 'none', 'all', 'cjk', 'mideast', 'other', 'rare', 'west'"); +#endif Console.WriteLine (" -out Specify the output directory. Defaults to 'output'"); Console.WriteLine (" --about About the {0}", _linker); Console.WriteLine (" --verbose Log messages indicating progress and warnings"); Console.WriteLine (" --version Print the version number of the {0}", _linker); + Console.WriteLine (" -help Lists all linker options"); Console.WriteLine (" @ Read response file for more options"); Console.WriteLine (); @@ -586,10 +829,21 @@ namespace Mono.Linker { Console.WriteLine (); Console.WriteLine ("Advanced"); - Console.WriteLine (" --custom-step Add a custom step to the pipeline"); + Console.WriteLine (" --custom-step Add a custom step to the existing pipeline"); + Console.WriteLine (" Step can use one of following configurations"); + Console.WriteLine (" : Add user defined type as last step to the pipeline"); + Console.WriteLine (" +: Inserts step before existing "); + Console.WriteLine (" -: Add step after existing step"); + Console.WriteLine (" --ignore-descriptors Skips reading embedded descriptors (short -z). Defaults to false"); + Console.WriteLine (" --keep-facades Keep assemblies with type-forwarders (short -t). Defaults to false"); + Console.WriteLine (" --skip-unresolved Ignore unresolved types, methods, and assemblies. Defaults to false"); + + Console.WriteLine (); + Console.WriteLine ("Linking"); Console.WriteLine (" --deterministic Produce a deterministic output for linked assemblies"); Console.WriteLine (" --disable-opt Disable one of the default optimizations"); Console.WriteLine (" beforefieldinit: Unused static fields are removed if there is no static ctor"); + Console.WriteLine (" ipconstprop: Interprocedural constant propagation on return values"); Console.WriteLine (" overrideremoval: Overrides of virtual methods on types that are never instantiated are removed"); Console.WriteLine (" unreachablebodies: Instance methods that are marked but not executed are converted to throws"); Console.WriteLine (" unusedinterfaces: Removes interface types from declaration when not used"); @@ -598,18 +852,18 @@ namespace Mono.Linker { Console.WriteLine (" --exclude-feature Any code which has a feature in linked assemblies will be removed"); Console.WriteLine (" com: Support for COM Interop"); Console.WriteLine (" etw: Event Tracing for Windows"); +#if !FEATURE_ILLINK Console.WriteLine (" remoting: .NET Remoting dependencies"); +#endif Console.WriteLine (" sre: System.Reflection.Emit namespace"); Console.WriteLine (" globalization: Globalization data and globalization behavior"); - Console.WriteLine (" --ignore-descriptors Skips reading embedded descriptors (short -z). Defaults to false"); - Console.WriteLine (" --keep-facades Keep assemblies with type-forwarders (short -t). Defaults to false"); + Console.WriteLine (" --explicit-reflection Adds to members never used through reflection DisablePrivateReflection attribute. Defaults to false"); Console.WriteLine (" --keep-dep-attributes Keep attributes used for manual dependency tracking. Defaults to false"); Console.WriteLine (" --new-mvid Generate a new guid for each linked assembly (short -g). Defaults to true"); - Console.WriteLine (" --skip-unresolved Ignore unresolved types, methods, and assemblies. Defaults to false"); Console.WriteLine (" --strip-resources Remove XML descriptor resources for linked assemblies. Defaults to true"); Console.WriteLine (" --strip-security Remove metadata and code related to Code Access Security. Defaults to true"); - Console.WriteLine (" --used-attrs-only Any attribute is removed if the attribute type is not used. Defaults to false"); - Console.WriteLine (" --explicit-reflection Adds to members never used through reflection DisablePrivateReflection attribute. Defaults to false"); + Console.WriteLine (" --substitutions Configuration file with field or methods substitution rules"); + Console.WriteLine (" --used-attrs-only Attribute usage is removed if the attribute type is not used. Defaults to false"); Console.WriteLine (); Console.WriteLine ("Analyzer"); @@ -617,8 +871,6 @@ namespace Mono.Linker { Console.WriteLine (" --dump-dependencies Dump dependencies for the linker analyzer tool"); Console.WriteLine (" --reduced-tracing Reduces dependency output related to assemblies that will not be modified"); Console.WriteLine (""); - - Environment.Exit (1); } static void Version () @@ -626,16 +878,12 @@ namespace Mono.Linker { Console.WriteLine ("{0} Version {1}", _linker, System.Reflection.Assembly.GetExecutingAssembly ().GetName ().Version); - - Environment.Exit(1); } static void About () { Console.WriteLine ("For more information, visit the project Web site"); Console.WriteLine (" http://www.mono-project.com/"); - - Environment.Exit(1); } static Pipeline GetStandardPipeline () diff --git a/external/linker/src/linker/Linker/IDependencyRecorder.cs b/external/linker/src/linker/Linker/IDependencyRecorder.cs new file mode 100644 index 0000000000..de4e4616e9 --- /dev/null +++ b/external/linker/src/linker/Linker/IDependencyRecorder.cs @@ -0,0 +1,44 @@ +// +// IDependencyRecorder.cs +// +// Copyright (C) 2017 Microsoft Corporation (http://www.microsoft.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 Mono.Linker +{ + /// + /// Abstraction exposed by the linker (mostly MarkStep, but not only) - it will call this interface + /// every time it finds a dependency between two parts of the dependency graph. + /// + public interface IDependencyRecorder + { + /// + /// Reports a dependency detected by the linker. + /// + /// The source of the dependency (for example the caller method). + /// The target of the dependency (for example the callee method). + /// true if the target is also marked by the MarkStep. + /// The source and target are typically Cecil metadata objects (MethodDefinition, TypeDefinition, ...) + /// but they can also be the linker steps or really any other object. + void RecordDependency (object source, object target, bool marked); + } +} diff --git a/external/linker/src/linker/Linker/IReflectionPatternRecorder.cs b/external/linker/src/linker/Linker/IReflectionPatternRecorder.cs new file mode 100644 index 0000000000..b3aae2b2ea --- /dev/null +++ b/external/linker/src/linker/Linker/IReflectionPatternRecorder.cs @@ -0,0 +1,62 @@ +// +// IReflectionPatternRecorder.cs +// +// Copyright (C) 2017 Microsoft Corporation (http://www.microsoft.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 Mono.Cecil; + +namespace Mono.Linker +{ + /// + /// Interface which is called every time the linker inspects a pattern of code involving reflection to determine a more complex + /// dependency. + /// + /// + /// The rules are such that if a given callsite of a "reflectionMethod" gets examined + /// linker will always report it one way or another: + /// - it will either call RecognizedReflectionAccessPattern method when it can figure out exactly the dependency. + /// - or it will call UnrecognizedReflectionAccessPattern with an optional message describing why it could not recognize + /// the pattern. + /// + public interface IReflectionPatternRecorder + { + /// + /// Called when the linker recognized a reflection access pattern (and thus was able to correctly apply marking to the accessed item). + /// + /// The method which contains the reflection access pattern. + /// The reflection method which is at the heart of the access pattern. + /// The item accessed through reflection. This can be one of: + /// TypeDefinition, MethodDefinition, PropertyDefinition, FieldDefinition, EventDefinition. + void RecognizedReflectionAccessPattern (MethodDefinition sourceMethod, MethodDefinition reflectionMethod, IMemberDefinition accessedItem); + + /// + /// Called when the linker detected a reflection access but was not able to recognize the entire pattern. + /// + /// The method which contains the reflection access code. + /// The reflection method which is at the heart of the access code. + /// Humanly readable message describing what failed during the pattern recognition. + /// This effectively means that there's a potential hole in the linker marking - some items which are accessed only through + /// reflection may not be marked correctly and thus may fail at runtime. + void UnrecognizedReflectionAccessPattern (MethodDefinition sourceMethod, MethodDefinition reflectionMethod, string message); + } +} diff --git a/external/linker/src/linker/Linker/KnownMembers.cs b/external/linker/src/linker/Linker/KnownMembers.cs index f1e204bb05..02dcf6469a 100644 --- a/external/linker/src/linker/Linker/KnownMembers.cs +++ b/external/linker/src/linker/Linker/KnownMembers.cs @@ -6,6 +6,7 @@ namespace Mono.Linker { public MethodDefinition NotSupportedExceptionCtorString { get; set; } public MethodDefinition DisablePrivateReflectionAttributeCtor { get; set; } + public MethodDefinition ObjectCtor { get; set; } public static bool IsNotSupportedExceptionCtorString (MethodDefinition method) { diff --git a/external/linker/src/linker/Linker/LinkContext.cs b/external/linker/src/linker/Linker/LinkContext.cs index 2801c96573..8d596844f7 100644 --- a/external/linker/src/linker/Linker/LinkContext.cs +++ b/external/linker/src/linker/Linker/LinkContext.cs @@ -117,6 +117,8 @@ namespace Mono.Linker { public bool StripResources { get; set; } + public List Substitutions { get; private set; } + public System.Collections.IDictionary Actions { get { return _actions; } } @@ -141,7 +143,7 @@ namespace Mono.Linker { public bool LogMessages { get; set; } - public ILogger Logger { get; set; } = new ConsoleLogger (); + public ILogger Logger { private get; set; } = new ConsoleLogger (); public MarkingHelpers MarkingHelpers { get; private set; } @@ -149,7 +151,9 @@ namespace Mono.Linker { public Tracer Tracer { get; private set; } - public string[] ExcludedFeatures { get; set; } + public IReflectionPatternRecorder ReflectionPatternRecorder { get; set; } + + public string [] ExcludedFeatures { get; set; } public CodeOptimizations DisabledOptimizations { get; set; } @@ -187,12 +191,28 @@ namespace Mono.Linker { _annotations = factory.CreateAnnotationStore (this); MarkingHelpers = factory.CreateMarkingHelpers (this); Tracer = factory.CreateTracer (this); + ReflectionPatternRecorder = new LoggingReflectionPatternRecorder (this); MarkedKnownMembers = new KnownMembers (); StripResources = true; // See https://github.com/mono/linker/issues/612 DisabledOptimizations |= CodeOptimizations.UnreachableBodies; DisabledOptimizations |= CodeOptimizations.ClearInitLocals; + DisabledOptimizations |= CodeOptimizations.IPConstantPropagation; + } + + public void AddSubstitutionFile (string file) + { + if (Substitutions == null) { + Substitutions = new List (); + Substitutions.Add (file); + return; + } + + if (Substitutions.Contains (file)) + return; + + Substitutions.Add (file); } public TypeDefinition GetType (string fullName) @@ -399,15 +419,15 @@ namespace Mono.Linker { return (DisabledOptimizations & optimization) == 0; } - public void LogMessage (string message, params object[] values) + public void LogMessage (string message) { - LogMessage (MessageImportance.Normal, message, values); + LogMessage (MessageImportance.Normal, message); } - public void LogMessage (MessageImportance importance, string message, params object [] values) + public void LogMessage (MessageImportance importance, string message) { if (LogMessages && Logger != null) - Logger.LogMessage (importance, message, values); + Logger.LogMessage (importance, "{0}", message); } } @@ -438,5 +458,10 @@ namespace Mono.Linker { /// Option to remove .interfaceimpl for interface types that are not used /// UnusedInterfaces = 1 << 4, + + /// + /// Option to do interprocedural constant propagation on return values + /// + IPConstantPropagation = 1 << 5 } } diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetFlags.cs b/external/linker/src/linker/Linker/LoggingReflectionPatternRecorder.cs similarity index 57% rename from mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetFlags.cs rename to external/linker/src/linker/Linker/LoggingReflectionPatternRecorder.cs index 7cfcb8c653..f9c0d89e93 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetFlags.cs +++ b/external/linker/src/linker/Linker/LoggingReflectionPatternRecorder.cs @@ -1,3 +1,8 @@ +// +// LoggingReflectionPatternRecorder.cs +// +// Copyright (C) 2017 Microsoft Corporation (http://www.microsoft.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 @@ -5,10 +10,10 @@ // 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 @@ -17,25 +22,28 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -// Copyright (c) 2005 Novell, Inc. (http://www.novell.com) -// -// Authors: -// Peter Bartok (pbartok@novell.com) -// -// -// COMPLETE +using Mono.Cecil; -namespace System.Windows.Forms.RTF { - [Flags] -#if RTF_LIB - public -#else - internal -#endif - enum CharsetFlags { - None = 0x00, - Read = 0x01, - Switch = 0x02 +namespace Mono.Linker +{ + class LoggingReflectionPatternRecorder : IReflectionPatternRecorder + { + private readonly LinkContext _context; + + public LoggingReflectionPatternRecorder (LinkContext context) + { + _context = context; + } + + public void RecognizedReflectionAccessPattern (MethodDefinition sourceMethod, MethodDefinition reflectionMethod, IMemberDefinition accessedItem) + { + // Do nothing - there's no logging for successfully recognized patterns + } + + public void UnrecognizedReflectionAccessPattern (MethodDefinition sourceMethod, MethodDefinition reflectionMethod, string message) + { + _context.LogMessage (MessageImportance.Low, message); + } } } diff --git a/external/linker/src/linker/Linker/MethodAction.cs b/external/linker/src/linker/Linker/MethodAction.cs index babe6d2c8a..a3550e7839 100644 --- a/external/linker/src/linker/Linker/MethodAction.cs +++ b/external/linker/src/linker/Linker/MethodAction.cs @@ -34,6 +34,5 @@ namespace Mono.Linker { ForceParse, ConvertToStub, ConvertToThrow, - ConvertToFalse } } diff --git a/external/linker/src/linker/Linker/MethodDefinitionExtensions.cs b/external/linker/src/linker/Linker/MethodDefinitionExtensions.cs index 078ce01366..b2b0667278 100644 --- a/external/linker/src/linker/Linker/MethodDefinitionExtensions.cs +++ b/external/linker/src/linker/Linker/MethodDefinitionExtensions.cs @@ -14,6 +14,58 @@ namespace Mono.Linker return method.IsConstructor && !method.IsStatic; } + public static bool IsIntrinsic (this MethodDefinition method) + { + if (!method.HasCustomAttributes) + return false; + + foreach (var ca in method.CustomAttributes) { + var caType = ca.AttributeType; + if (caType.Name == "IntrinsicAttribute" && caType.Namespace == "System.Runtime.CompilerServices") + return true; + } + + return false; + } + + public static bool IsPropertyMethod (this MethodDefinition md) + { + return (md.SemanticsAttributes & MethodSemanticsAttributes.Getter) != 0 || + (md.SemanticsAttributes & MethodSemanticsAttributes.Setter) != 0; + } + + public static bool IsPublicInstancePropertyMethod (this MethodDefinition md) + { + return md.IsPublic && !md.IsStatic && IsPropertyMethod (md); + } + + public static bool IsEventMethod (this MethodDefinition md) + { + return (md.SemanticsAttributes & MethodSemanticsAttributes.AddOn) != 0 || + (md.SemanticsAttributes & MethodSemanticsAttributes.Fire) != 0 || + (md.SemanticsAttributes & MethodSemanticsAttributes.RemoveOn) != 0; + } + + public static PropertyDefinition GetProperty (this MethodDefinition md) + { + TypeDefinition declaringType = md.DeclaringType; + foreach (PropertyDefinition prop in declaringType.Properties) + if (prop.GetMethod == md || prop.SetMethod == md) + return prop; + + return null; + } + + public static EventDefinition GetEvent (this MethodDefinition md) + { + TypeDefinition declaringType = md.DeclaringType; + foreach (EventDefinition evt in declaringType.Events) + if (evt.AddMethod == md || evt.InvokeMethod == md || evt.RemoveMethod == md) + return evt; + + return null; + } + public static bool IsStaticConstructor (this MethodDefinition method) { return method.IsConstructor && method.IsStatic; diff --git a/external/linker/src/linker/Linker/Tracer.cs b/external/linker/src/linker/Linker/Tracer.cs index 35f43b8ea9..1a6b7109fe 100644 --- a/external/linker/src/linker/Linker/Tracer.cs +++ b/external/linker/src/linker/Linker/Tracer.cs @@ -26,74 +26,49 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System; using System.Collections.Generic; -using System.IO; -using System.IO.Compression; -using System.Xml; -using Mono.Cecil; -using Mono.Linker.Steps; namespace Mono.Linker { - public class Tracer { - public const string DefaultDependenciesFileName = "linker-dependencies.xml.gz"; - - public string DependenciesFileName { get; set; } = DefaultDependenciesFileName; - + public class Tracer + { protected readonly LinkContext context; Stack dependency_stack; - System.Xml.XmlWriter writer; - Stream stream; + List recorders; - public Tracer (LinkContext context) => this.context = context; - - public void Start () + public Tracer (LinkContext context) { + this.context = context; dependency_stack = new Stack (); - System.Xml.XmlWriterSettings settings = new System.Xml.XmlWriterSettings { - Indent = true, - IndentChars = "\t" - }; - - if (string.IsNullOrEmpty (Path.GetDirectoryName (DependenciesFileName)) && !string.IsNullOrEmpty (context.OutputDirectory)) { - DependenciesFileName = Path.Combine (context.OutputDirectory, DependenciesFileName); - Directory.CreateDirectory (context.OutputDirectory); - } - - var depsFile = File.OpenWrite (DependenciesFileName); - - if (Path.GetExtension (DependenciesFileName) == ".xml") - stream = depsFile; - else - stream = new GZipStream (depsFile, CompressionMode.Compress); - - writer = System.Xml.XmlWriter.Create (stream, settings); - writer.WriteStartDocument (); - writer.WriteStartElement ("dependencies"); - writer.WriteStartAttribute ("version"); - writer.WriteString ("1.2"); - writer.WriteEndAttribute (); } public void Finish () { - if (writer == null) - return; - - writer.WriteEndElement (); - writer.WriteEndDocument (); - writer.Flush (); - writer.Dispose (); - stream.Dispose (); - writer = null; - stream = null; dependency_stack = null; + if (recorders != null) { + foreach (var recorder in recorders) { + if (recorder is IDisposable disposableRecorder) + disposableRecorder.Dispose (); + } + } + + recorders = null; + } + + public void AddRecorder (IDependencyRecorder recorder) + { + if (recorders == null) { + recorders = new List (); + } + + recorders.Add (recorder); } public void Push (object o, bool addDependency = true) { - if (writer == null) + if (!IsRecordingEnabled ()) return; if (addDependency && dependency_stack.Count > 0) @@ -104,149 +79,37 @@ namespace Mono.Linker public void Pop () { - if (writer == null) + if (!IsRecordingEnabled ()) return; dependency_stack.Pop (); } - static bool IsAssemblyBound (TypeDefinition td) + bool IsRecordingEnabled () { - do { - if (td.IsNestedPrivate || td.IsNestedAssembly || td.IsNestedFamilyAndAssembly) - return true; - - td = td.DeclaringType; - } while (td != null); - - return false; - } - - string TokenString (object o) - { - if (o == null) - return "N:null"; - - if (o is TypeReference t) { - bool addAssembly = true; - var td = t as TypeDefinition ?? t.Resolve (); - - if (td != null) { - addAssembly = td.IsNotPublic || IsAssemblyBound (td); - t = td; - } - - var addition = addAssembly ? $":{t.Module}" : ""; - - return $"{(o as IMetadataTokenProvider).MetadataToken.TokenType}:{o}{addition}"; - } - - if (o is IMetadataTokenProvider) - return (o as IMetadataTokenProvider).MetadataToken.TokenType + ":" + o; - - return "Other:" + o; + return recorders != null; } public void AddDirectDependency (object b, object e) { - if (writer == null) - return; - - writer.WriteStartElement ("edge"); - writer.WriteAttributeString ("b", TokenString (b)); - writer.WriteAttributeString ("e", TokenString (e)); - writer.WriteEndElement (); + ReportDependency (b, e, false); } public void AddDependency (object o, bool marked = false) { - if (writer == null) + if (!IsRecordingEnabled ()) return; - KeyValuePair pair = new KeyValuePair (dependency_stack.Count > 0 ? dependency_stack.Peek () : null, o); - - if (!ShouldRecord (pair.Key) && !ShouldRecord (pair.Value)) - return; - - // This is a hack to work around a quirk of MarkStep that results in outputting ~6k edges even with the above ShouldRecord checks. - // What happens is that due to the method queueing in MarkStep, the dependency chain is broken in many cases. And in these cases - // we end up adding an edge for MarkStep -> - // This isn't particularly useful information since it's incomplete, but it's especially not useful in ReducedTracing mode when there is one of these for - // every class library method that was queued. - if (context.EnableReducedTracing && pair.Key is MarkStep && !ShouldRecord (pair.Value)) - return; - - // This is another hack to prevent useless information from being logged. With the introduction of interface sweeping there are a lot of edges such as - // `e="InterfaceImpl:Mono.Cecil.InterfaceImplementation"` which are useless information. Ideally we would format the interface implementation into a meaningful format - // however I don't think that is worth the effort at the moment. - if (pair.Value is InterfaceImplementation) - return; - - if (pair.Key != pair.Value) { - writer.WriteStartElement ("edge"); - if (marked) - writer.WriteAttributeString ("mark", "1"); - writer.WriteAttributeString ("b", TokenString (pair.Key)); - writer.WriteAttributeString ("e", TokenString (pair.Value)); - writer.WriteEndElement (); - } + ReportDependency (dependency_stack.Count > 0 ? dependency_stack.Peek () : null, o, marked); } - bool WillAssemblyBeModified (AssemblyDefinition assembly) + private void ReportDependency (object source, object target, bool marked) { - switch (context.Annotations.GetAction (assembly)) { - case AssemblyAction.Link: - case AssemblyAction.AddBypassNGen: - case AssemblyAction.AddBypassNGenUsed: - return true; - default: - return false; + if (IsRecordingEnabled ()) { + foreach (IDependencyRecorder recorder in recorders) { + recorder.RecordDependency (source, target, marked); + } } } - - bool ShouldRecord (object o) - { - if (!context.EnableReducedTracing) - return true; - - if (o is TypeDefinition t) - return WillAssemblyBeModified (t.Module.Assembly); - - if (o is IMemberDefinition m) - return WillAssemblyBeModified (m.DeclaringType.Module.Assembly); - - if (o is TypeReference typeRef) { - var resolved = typeRef.Resolve (); - - // Err on the side of caution if we can't resolve - if (resolved == null) - return true; - - return WillAssemblyBeModified (resolved.Module.Assembly); - } - - if (o is MemberReference mRef) { - var resolved = mRef.Resolve (); - - // Err on the side of caution if we can't resolve - if (resolved == null) - return true; - - return WillAssemblyBeModified (resolved.DeclaringType.Module.Assembly); - } - - if (o is ModuleDefinition module) - return WillAssemblyBeModified (module.Assembly); - - if (o is AssemblyDefinition assembly) - return WillAssemblyBeModified (assembly); - - if (o is ParameterDefinition parameter) { - if (parameter.Method is MethodDefinition parameterMethodDefinition) - return WillAssemblyBeModified (parameterMethodDefinition.DeclaringType.Module.Assembly); - } - - return true; - } } } diff --git a/external/linker/src/linker/Linker/TypeDefinitionExtensions.cs b/external/linker/src/linker/Linker/TypeDefinitionExtensions.cs index f94e340c3e..1e06def6eb 100644 --- a/external/linker/src/linker/Linker/TypeDefinitionExtensions.cs +++ b/external/linker/src/linker/Linker/TypeDefinitionExtensions.cs @@ -1,3 +1,5 @@ + +using System; using Mono.Cecil; namespace Mono.Linker { @@ -17,5 +19,26 @@ namespace Mono.Linker { return false; } + + public static TypeReference GetEnumUnderlyingType (this TypeDefinition enumType) + { + foreach (var field in enumType.Fields) { + if (!field.IsStatic && field.Name == "value__") { + return field.FieldType; + } + } + + throw new MissingFieldException ($"Enum type '{enumType.FullName}' is missing 'value__' field"); + } + + public static bool IsMulticastDelegate (this TypeDefinition td) + { + return td.BaseType?.Name == "MulticastDelegate" && td.BaseType.Namespace == "System"; + } + + public static bool IsSerializable (this TypeDefinition td) + { + return (td.Attributes & TypeAttributes.Serializable) != 0; + } } } \ No newline at end of file diff --git a/external/linker/src/linker/Linker/XmlDependencyRecorder.cs b/external/linker/src/linker/Linker/XmlDependencyRecorder.cs new file mode 100644 index 0000000000..637b94c2aa --- /dev/null +++ b/external/linker/src/linker/Linker/XmlDependencyRecorder.cs @@ -0,0 +1,215 @@ +// +// Tracer.cs +// +// Copyright (C) 2017 Microsoft Corporation (http://www.microsoft.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 Mono.Cecil; +using Mono.Linker.Steps; +using System; +using System.IO; +using System.IO.Compression; +using System.Xml; + +namespace Mono.Linker +{ + /// + /// Class which implements IDependencyRecorder and writes the dependencies into an XML file. + /// + public class XmlDependencyRecorder : IDependencyRecorder, IDisposable + { + public const string DefaultDependenciesFileName = "linker-dependencies.xml.gz"; + + private readonly LinkContext context; + private XmlWriter writer; + private Stream stream; + + public XmlDependencyRecorder (LinkContext context, string fileName = null) + { + this.context = context; + + XmlWriterSettings settings = new XmlWriterSettings { + Indent = true, + IndentChars = "\t" + }; + + if (fileName == null) + fileName = DefaultDependenciesFileName; + + if (string.IsNullOrEmpty (Path.GetDirectoryName (fileName)) && !string.IsNullOrEmpty (context.OutputDirectory)) { + fileName = Path.Combine (context.OutputDirectory, fileName); + Directory.CreateDirectory (context.OutputDirectory); + } + + var depsFile = File.OpenWrite (fileName); + + if (Path.GetExtension (fileName) == ".xml") + stream = depsFile; + else + stream = new GZipStream (depsFile, CompressionMode.Compress); + + writer = XmlWriter.Create (stream, settings); + writer.WriteStartDocument (); + writer.WriteStartElement ("dependencies"); + writer.WriteStartAttribute ("version"); + writer.WriteString ("1.2"); + writer.WriteEndAttribute (); + } + + public void Dispose () + { + if (writer == null) + return; + + writer.WriteEndElement (); + writer.WriteEndDocument (); + writer.Flush (); + writer.Dispose (); + stream.Dispose (); + writer = null; + stream = null; + } + + public void RecordDependency (object source, object target, bool marked) + { + if (!ShouldRecord (source) && !ShouldRecord (target)) + return; + + // This is a hack to work around a quirk of MarkStep that results in outputting ~6k edges even with the above ShouldRecord checks. + // What happens is that due to the method queueing in MarkStep, the dependency chain is broken in many cases. And in these cases + // we end up adding an edge for MarkStep -> + // This isn't particularly useful information since it's incomplete, but it's especially not useful in ReducedTracing mode when there is one of these for + // every class library method that was queued. + if (context.EnableReducedTracing && source is MarkStep && !ShouldRecord (target)) + return; + + // This is another hack to prevent useless information from being logged. With the introduction of interface sweeping there are a lot of edges such as + // `e="InterfaceImpl:Mono.Cecil.InterfaceImplementation"` which are useless information. Ideally we would format the interface implementation into a meaningful format + // however I don't think that is worth the effort at the moment. + if (target is InterfaceImplementation) + return; + + if (source != target) { + writer.WriteStartElement ("edge"); + if (marked) + writer.WriteAttributeString ("mark", "1"); + writer.WriteAttributeString ("b", TokenString (source)); + writer.WriteAttributeString ("e", TokenString (target)); + writer.WriteEndElement (); + } + } + + static bool IsAssemblyBound (TypeDefinition td) + { + do { + if (td.IsNestedPrivate || td.IsNestedAssembly || td.IsNestedFamilyAndAssembly) + return true; + + td = td.DeclaringType; + } while (td != null); + + return false; + } + + string TokenString (object o) + { + if (o == null) + return "N:null"; + + if (o is TypeReference t) { + bool addAssembly = true; + var td = t as TypeDefinition ?? t.Resolve (); + + if (td != null) { + addAssembly = td.IsNotPublic || IsAssemblyBound (td); + t = td; + } + + var addition = addAssembly ? $":{t.Module}" : ""; + + return $"{(o as IMetadataTokenProvider).MetadataToken.TokenType}:{o}{addition}"; + } + + if (o is IMetadataTokenProvider) + return (o as IMetadataTokenProvider).MetadataToken.TokenType + ":" + o; + + return "Other:" + o; + } + + bool WillAssemblyBeModified (AssemblyDefinition assembly) + { + switch (context.Annotations.GetAction (assembly)) { + case AssemblyAction.Link: + case AssemblyAction.AddBypassNGen: + case AssemblyAction.AddBypassNGenUsed: + return true; + default: + return false; + } + } + + bool ShouldRecord (object o) + { + if (!context.EnableReducedTracing) + return true; + + if (o is TypeDefinition t) + return WillAssemblyBeModified (t.Module.Assembly); + + if (o is IMemberDefinition m) + return WillAssemblyBeModified (m.DeclaringType.Module.Assembly); + + if (o is TypeReference typeRef) { + var resolved = typeRef.Resolve (); + + // Err on the side of caution if we can't resolve + if (resolved == null) + return true; + + return WillAssemblyBeModified (resolved.Module.Assembly); + } + + if (o is MemberReference mRef) { + var resolved = mRef.Resolve (); + + // Err on the side of caution if we can't resolve + if (resolved == null) + return true; + + return WillAssemblyBeModified (resolved.DeclaringType.Module.Assembly); + } + + if (o is ModuleDefinition module) + return WillAssemblyBeModified (module.Assembly); + + if (o is AssemblyDefinition assembly) + return WillAssemblyBeModified (assembly); + + if (o is ParameterDefinition parameter) { + if (parameter.Method is MethodDefinition parameterMethodDefinition) + return WillAssemblyBeModified (parameterMethodDefinition.DeclaringType.Module.Assembly); + } + + return true; + } + } +} diff --git a/external/linker/src/linker/Mono.Linker.csproj b/external/linker/src/linker/Mono.Linker.csproj index d6db018db9..1ca9a4023d 100644 --- a/external/linker/src/linker/Mono.Linker.csproj +++ b/external/linker/src/linker/Mono.Linker.csproj @@ -3,49 +3,61 @@ Exe Mono - (C) 2006, Jb Evain 0.2.0.0 - Debug;Release;illink_Debug;illink_Release + Debug;Release + latest - + illink IL Linker $(DefineConstants);FEATURE_ILLINK - - netcoreapp2.0 - netcoreapp2.0 + netcoreapp3.0;net471 - + monolinker Mono.Linker Mono CIL Linker + (C) 2006, Jb Evain net471 - + + $(DefineConstants);DEBUG true false - + true + + + + + + + + - + + + + + + + + - + diff --git a/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/FlakyTestRetriesCommand.cs b/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/FlakyTestRetriesCommand.cs index 33eb5cc897..c2c3d33ac6 100644 --- a/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/FlakyTestRetriesCommand.cs +++ b/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/FlakyTestRetriesCommand.cs @@ -74,7 +74,8 @@ namespace NUnit.Framework.Internal.Commands if (retries == 0 || context.CurrentResult.ResultState.Status == TestStatus.Passed || - context.CurrentResult.ResultState.Status == TestStatus.Skipped) + context.CurrentResult.ResultState.Status == TestStatus.Skipped || + context.CurrentResult.ResultState.Status == TestStatus.Inconclusive) return context.CurrentResult; // skip retries after a certain number to avoid retrying mass failures diff --git a/m4/mono-output.m4 b/m4/mono-output.m4 index 6aaf8e9cf2..c328bac2c5 100644 --- a/m4/mono-output.m4 +++ b/m4/mono-output.m4 @@ -14,7 +14,6 @@ AC_DEFUN([AC_MONO_OUTPUT], [ AC_OUTPUT([ Makefile llvm/Makefile - mk/Makefile mono/Makefile mono/btls/Makefile mono/native/Makefile diff --git a/man/mono.1 b/man/mono.1 index d7dc065487..e5f879e58f 100644 --- a/man/mono.1 +++ b/man/mono.1 @@ -860,9 +860,11 @@ Instruct the runtime on the number of times that the method specified by --compile (or all the methods if --compile-all is used) to be compiled. This is used for testing the code generator performance. .TP -\fB--stats\fR +\fB--stats=[method]\fR Displays information about the work done by the runtime during the -execution of an application. +execution of an application. If a method (namespace.name:methodname) +is specified, it will display that information when the method is +first run in addition to the end of program execution. .TP \fB--wapi=hps|semdel\fR Perform maintenance of the process shared data. diff --git a/mcs/build/common/Consts.cs b/mcs/build/common/Consts.cs index 9feed5294a..fd64b926fa 100644 --- a/mcs/build/common/Consts.cs +++ b/mcs/build/common/Consts.cs @@ -30,7 +30,7 @@ static partial class Consts { - public const string MonoCorlibVersion = "97b07b51-46d8-4084-b48e-77aa5c192654"; + public const string MonoCorlibVersion = "1A5E0066-58DC-428A-B21C-0AD6CDAE2789"; } #if !NETCORE @@ -41,7 +41,7 @@ static partial class Consts // Use these assembly version constants to make code more maintainable. // - public const string MonoVersion = "6.10.0.105"; + public const string MonoVersion = "6.12.0.86"; public const string MonoCompany = "Mono development team"; public const string MonoProduct = "Mono Common Language Infrastructure"; public const string MonoCopyright = "(c) Various Mono authors"; diff --git a/mcs/build/config-default.make b/mcs/build/config-default.make index 11b1b35456..da3ede120a 100644 --- a/mcs/build/config-default.make +++ b/mcs/build/config-default.make @@ -19,8 +19,7 @@ endif TEST_HARNESS = $(topdir)/class/lib/$(PROFILE_DIRECTORY)/$(PARENT_PROFILE)nunit-lite-console.exe PLATFORM_DEBUG_FLAGS = /debug:portable -# Workaround for https://bugzilla.xamarin.com/show_bug.cgi?id=59967 -MCS_FLAGS = /features:peverify-compat /langversion:latest +MCS_FLAGS = /langversion:latest LIBRARY_FLAGS = ifndef CFLAGS CFLAGS = -g -O2 diff --git a/mcs/class/Mono.CompilerServices.SymbolWriter/SymbolWriterImpl.cs b/mcs/class/Mono.CompilerServices.SymbolWriter/SymbolWriterImpl.cs index 0b25cd7cf5..930a262187 100644 --- a/mcs/class/Mono.CompilerServices.SymbolWriter/SymbolWriterImpl.cs +++ b/mcs/class/Mono.CompilerServices.SymbolWriter/SymbolWriterImpl.cs @@ -52,8 +52,6 @@ namespace Mono.CompilerServices.SymbolWriter #if !CECIL && !MOBILE ModuleBuilder mb; - delegate Guid GetGuidFunc (ModuleBuilder mb); - GetGuidFunc get_guid_func; public SymbolWriterImpl (ModuleBuilder mb) { @@ -62,16 +60,7 @@ namespace Mono.CompilerServices.SymbolWriter public void Close () { - MethodInfo mi = typeof (ModuleBuilder).GetMethod ( - "Mono_GetGuid", - BindingFlags.Static | BindingFlags.NonPublic); - if (mi == null) - return; - - get_guid_func = (GetGuidFunc) System.Delegate.CreateDelegate ( - typeof (GetGuidFunc), mi); - - msw.WriteSymbolFile (get_guid_func (mb)); + msw.WriteSymbolFile (mb.ModuleVersionId); } #else Guid guid; diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs index 3e2cf5f33a..de8604c29c 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs @@ -409,6 +409,9 @@ namespace Mono.Debugger.Soft public ErrorCode ErrorCode { get; set; } + public string ErrorMessage { + get; set; + } } /* @@ -436,7 +439,7 @@ namespace Mono.Debugger.Soft * with newer runtimes, and vice versa. */ internal const int MAJOR_VERSION = 2; - internal const int MINOR_VERSION = 54; + internal const int MINOR_VERSION = 57; enum WPSuspendPolicy { NONE = 0, @@ -792,10 +795,12 @@ namespace Mono.Debugger.Soft // For reply packets offset = 0; - ReadInt (); // length + var len = ReadInt (); // length ReadInt (); // id ReadByte (); // flags ErrorCode = ReadShort (); + if (ErrorCode == (int)Mono.Debugger.Soft.ErrorCode.INVALID_ARGUMENT && connection.Version.AtLeast (2, 56) && len > offset) + ErrorMsg = ReadString (); } public CommandSet CommandSet { @@ -810,6 +815,10 @@ namespace Mono.Debugger.Soft get; set; } + public string ErrorMsg { + get; internal set; + } + public int Offset { get { return offset; @@ -1792,7 +1801,7 @@ namespace Mono.Debugger.Soft LogPacket (packetId, encoded_packet, reply, command_set, command, watch); if (r.ErrorCode != 0) { if (ErrorHandler != null) - ErrorHandler (this, new ErrorHandlerEventArgs () { ErrorCode = (ErrorCode)r.ErrorCode }); + ErrorHandler (this, new ErrorHandlerEventArgs () { ErrorCode = (ErrorCode)r.ErrorCode, ErrorMessage = r.ErrorMsg}); throw new NotImplementedException ("No error handler set."); } else { return r; diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs index 69f35f4c0a..4c9a536838 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs @@ -34,6 +34,11 @@ namespace Mono.Debugger.Soft } } + public int GetId() + { + return id; + } + public EventType EventType { get { return etype; diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs index 2cf9dfa418..d407b417b5 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs @@ -51,10 +51,19 @@ namespace Mono.Debugger.Soft // Since protocol version 2.46 public Value Value { get { + ValueImpl value; if (Address == 0) return null; - - return vm.DecodeValue (vm.conn.Pointer_GetValue (Address, Type)); + try { + value = vm.conn.Pointer_GetValue (Address, Type); + } + catch (CommandException ex) { + if (ex.ErrorCode == ErrorCode.INVALID_ARGUMENT) + throw new ArgumentException ("Invalid pointer address."); + else + throw; + } + return vm.DecodeValue (value); } } diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs index c9026a0268..f85e807201 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs @@ -371,7 +371,7 @@ namespace Mono.Debugger.Soft case ErrorCode.NO_SEQ_POINT_AT_IL_OFFSET: throw new ArgumentException ("Cannot set breakpoint on the specified IL offset."); default: - throw new CommandException (args.ErrorCode); + throw new CommandException (args.ErrorCode, args.ErrorMessage); } } @@ -657,7 +657,9 @@ namespace Mono.Debugger.Soft internal EventRequest GetRequest (int id) { lock (requests_lock) { - return requests [id]; + EventRequest obj; + requests.TryGetValue (id, out obj); + return obj; } } @@ -885,13 +887,18 @@ namespace Mono.Debugger.Soft public class CommandException : Exception { - internal CommandException (ErrorCode error_code) : base ("Debuggee returned error code " + error_code + ".") { + internal CommandException (ErrorCode error_code, string error_message) : base ("Debuggee returned error code " + error_code + (error_message == null || error_message.Length == 0 ? "." : " - " + error_message + ".")) { ErrorCode = error_code; + ErrorMessage = error_message; } public ErrorCode ErrorCode { get; set; } + + public string ErrorMessage { + get; internal set; + } } public class VMNotSuspendedException : InvalidOperationException diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs index 945ea48c38..2f77ac510c 100644 --- a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs +++ b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs @@ -609,6 +609,15 @@ public class Tests : TestsBase, ITest2 fixed_size_array(); test_new_exception_filter(); test_async_debug_generics(); + if (args.Length >0 && args [0] == "pointer_arguments2") { + pointers2 (); + return 0; + } + if (args.Length >0 && args [0] == "ss_multi_thread") { + ss_multi_thread (); + return 0; + } + test_invalid_argument_assembly_get_type (); return 3; } @@ -637,6 +646,10 @@ public class Tests : TestsBase, ITest2 LocalReflectClass.RunMe (); } + public static void test_invalid_argument_assembly_get_type () { + + } + public static void breakpoints () { /* Call these early so it is JITted by the time a breakpoint is placed on it */ bp3 (); @@ -857,6 +870,24 @@ public class Tests : TestsBase, ITest2 n.Buffer2 = new char4('a', 'b', 'c', 'd'); } + [MethodImplAttribute (MethodImplOptions.NoInlining)] + public static void ss_multi_thread () { + for (int i = 0; i < 5; i++) + { + var t = new Thread(mt_ss); + t.Name = "Thread_" + i; + t.Start(); + } + } + + [MethodImplAttribute (MethodImplOptions.NoInlining)] + static void mt_ss() + { + int a = 12; + int b = 13; + int c = 13; + } + [MethodImplAttribute (MethodImplOptions.NoInlining)] public static void test_new_exception_filter () { test_new_exception_filter1(); @@ -2232,6 +2263,17 @@ public class Tests : TestsBase, ITest2 rtMethod.Invoke(rtObject, new object[] { }); } + public static unsafe void pointer_arguments2 (int* a) { + *a = 0; + } + + [MethodImplAttribute (MethodImplOptions.NoInlining)] + public static unsafe void pointers2 () { + int[] a = new [] {1,2,3}; + fixed (int* pa = a) + pointer_arguments2 (pa); + } + [MethodImplAttribute (MethodImplOptions.NoInlining)] public static void new_thread_hybrid_exception() { try diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs.REMOVED.git-id b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs.REMOVED.git-id index b47ee17548..21af07b7b2 100644 --- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs.REMOVED.git-id +++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs.REMOVED.git-id @@ -1 +1 @@ -c385aeecb4b21151e7780126a63be6607f140237 \ No newline at end of file +8c953f6fe3d5737ec602dd307992ac2919c00ccc \ No newline at end of file diff --git a/mcs/class/Mono.Posix/Mono.Unix/UnixEncoding.cs b/mcs/class/Mono.Posix/Mono.Unix/UnixEncoding.cs index d869b1b90c..26529629fe 100644 --- a/mcs/class/Mono.Posix/Mono.Unix/UnixEncoding.cs +++ b/mcs/class/Mono.Posix/Mono.Unix/UnixEncoding.cs @@ -311,8 +311,8 @@ public class UnixEncoding : Encoding public unsafe override int GetBytes(char* chars, int charCount, byte* bytes, int byteCount) { - if (bytes == null || chars == null) - throw new ArgumentNullException (bytes == null ? "bytes" : "chars"); + if ((bytes == null && byteCount != 0) || (chars == null && charCount != 0)) + throw new ArgumentNullException ((bytes == null && byteCount != 0) ? "bytes" : "chars"); if (charCount < 0 || byteCount < 0) throw new ArgumentOutOfRangeException (charCount < 0 ? "charCount" : "byteCount"); diff --git a/mcs/class/Mono.Posix/Test/Mono.Unix/UnixEncodingTest.cs b/mcs/class/Mono.Posix/Test/Mono.Unix/UnixEncodingTest.cs index 2f0747294d..042c8dacf4 100644 --- a/mcs/class/Mono.Posix/Test/Mono.Unix/UnixEncodingTest.cs +++ b/mcs/class/Mono.Posix/Test/Mono.Unix/UnixEncodingTest.cs @@ -995,6 +995,23 @@ namespace MonoTests.Mono.Unix { ); } + [Test] + public void TestEmptyString () + { + byte[] data = new byte [] {}; + Encoding enc = new UnixEncoding (); + + string s = enc.GetString (data); + Assert.AreEqual (s, "", "#1"); + char[] chars = enc.GetChars (data); + Assert.AreEqual (chars.Length, 0, "#2"); + + byte[] b1 = enc.GetBytes (""); + Assert.AreEqual (b1.Length, 0, "#3"); + byte[] b2 = enc.GetBytes (new char[] {}); + Assert.AreEqual (b2.Length, 0, "#3"); + } + private void Compare (string prefix, string start, byte[] end) { byte[] bytes = unix.GetBytes (start); diff --git a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/ContractReference.xml b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/ContractReference.xml index 085775ad20..6723880da0 100644 --- a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/ContractReference.xml +++ b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/ContractReference.xml @@ -21,7 +21,7 @@ - XML Web services discovery involves discovering the available Web Services given an URL. The URL usually points to a discovery document, which typically has a.disco file name extension. Within a discovery document are references to information about the existance of XML Web services. These references can refer to service descriptions, XML Schema Definition language (XSD) schemas or other discovery documents. This class represents a reference to a Service Description. + XML Web services discovery involves discovering the available Web Services given an URL. The URL usually points to a discovery document, which typically has a.disco file name extension. Within a discovery document are references to information about the existence of XML Web services. These references can refer to service descriptions, XML Schema Definition language (XSD) schemas or other discovery documents. This class represents a reference to a Service Description. Within a discovery document, a reference to a Service Description is contained within a contractRef XML element. The contractRef XML element has two attributes: ref and docRef. The contractRef element must have an XML namespace matching the constant, whereas the ref and docRef attributes are placed in the and properties. diff --git a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocument.xml b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocument.xml index b76e04d18c..c216e91af8 100644 --- a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocument.xml +++ b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocument.xml @@ -21,7 +21,7 @@ - XML Web services discovery involves discovering the available XML Web services, given an URL. The URL typically points to a discovery document, which usually has a.disco file name extension. The discovery document, which is an XML document, contains references to information about the existance of XML Web services, such as a service description, XML Schema Definition (XSD) language schema, or another discovery document. This class represents the contents of the discovery document; where the property contains a list of the references contained within the discovery document. + XML Web services discovery involves discovering the available XML Web services, given an URL. The URL typically points to a discovery document, which usually has a.disco file name extension. The discovery document, which is an XML document, contains references to information about the existence of XML Web services, such as a service description, XML Schema Definition (XSD) language schema, or another discovery document. This class represents the contents of the discovery document; where the property contains a list of the references contained within the discovery document. diff --git a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocumentReference.xml b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocumentReference.xml index c756e7a029..425c3cc40c 100644 --- a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocumentReference.xml +++ b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocumentReference.xml @@ -21,7 +21,7 @@ - XML Web services discovery involves discovering the available XML Web services given an URL. The URL typically points to a discovery document, which usually has a.disco file name extension. The discovery document contains references to information about the existance of XML Web services, such as Service Descriptions, XML Schema Definition language (XSD) schemas, or other discovery documents. This class represents a reference to a discovery document. + XML Web services discovery involves discovering the available XML Web services given an URL. The URL typically points to a discovery document, which usually has a.disco file name extension. The discovery document contains references to information about the existence of XML Web services, such as Service Descriptions, XML Schema Definition language (XSD) schemas, or other discovery documents. This class represents a reference to a discovery document. diff --git a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/SchemaReference.xml b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/SchemaReference.xml index 2207fba340..35da42d8a2 100644 --- a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/SchemaReference.xml +++ b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/SchemaReference.xml @@ -21,7 +21,7 @@ - XML Web services discovery involves discovering the available XML Web services given, a URL. A The URL typically points to a discovery document, which usually has a.disco file name extension. The discovery document contains references to information about the existance of XML Web services. These references can refer to service descriptions, XSD schemas, or other discovery documents. This class represents a reference to an XSD schema. + XML Web services discovery involves discovering the available XML Web services given, a URL. A The URL typically points to a discovery document, which usually has a.disco file name extension. The discovery document contains references to information about the existence of XML Web services. These references can refer to service descriptions, XSD schemas, or other discovery documents. This class represents a reference to an XSD schema. Within a discovery document, a reference to an XSD schema is contained within a schemaRef XML element. The schemaRef XML element has an XML namespace and a ref attribute. The value of the XML namespace must match the constant. The value of the ref attribute is placed in the property. diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Charcode.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Charcode.cs deleted file mode 100644 index fc9ca63b12..0000000000 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Charcode.cs +++ /dev/null @@ -1,413 +0,0 @@ -// 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. -// -// Copyright (c) 2005 Novell, Inc. (http://www.novell.com) -// -// Authors: -// Peter Bartok (pbartok@novell.com) -// -// - -// COMPLETE - -using System.Collections; - -namespace System.Windows.Forms.RTF { - internal class Charcode { - #region Local Variables - private StandardCharCode[] codes; - private Hashtable reverse; - private int size; - #endregion // Local Variables - - #region Cached Values - static Charcode ansi_generic; - #endregion - - #region Public Constructors - public Charcode() : this(256) { - } - - private Charcode(int size) { - this.size = size; - this.codes = new StandardCharCode[size]; - this.reverse = new Hashtable(size); - - // No need to reinitialize array to its default value - //for (int i = 0; i < size; i++) { - // codes[i] = StandardCharCode.nothing; - //} - } - #endregion // Public Constructors - - #region Public Instance Properties - public int this[StandardCharCode c] { - get { - object obj; - - obj = reverse[c]; - if (obj != null) { - return (int)obj; - } - for (int i = 0; i < size; i++) { - if (codes[i] == c) { - return i; - } - } - - return -1; - } - } - - public StandardCharCode this[int c] { - get { - if (c < 0 || c >= size) { - return StandardCharCode.nothing; - } - - return codes[c]; - } - - private set { - if (c < 0 || c >= size) { - return; - } - - codes[c] = value; - reverse[value] = c; - } - } - #endregion // Public Instance Properties - - #region Public Instance Methods - #endregion // Public Instance Methods - - #region Public Static Methods - public static Charcode AnsiGeneric { - get { - if (ansi_generic != null) - return ansi_generic; - - ansi_generic = new Charcode(256); - - ansi_generic[0x06] = StandardCharCode.formula; - ansi_generic[0x1e] = StandardCharCode.nobrkhyphen; - ansi_generic[0x1f] = StandardCharCode.opthyphen; - ansi_generic[' '] = StandardCharCode.space; - ansi_generic['!'] = StandardCharCode.exclam; - ansi_generic['"'] = StandardCharCode.quotedbl; - ansi_generic['#'] = StandardCharCode.numbersign; - ansi_generic['$'] = StandardCharCode.dollar; - ansi_generic['%'] = StandardCharCode.percent; - ansi_generic['&'] = StandardCharCode.ampersand; - ansi_generic['\\'] = StandardCharCode.quoteright; - ansi_generic['('] = StandardCharCode.parenleft; - ansi_generic[')'] = StandardCharCode.parenright; - ansi_generic['*'] = StandardCharCode.asterisk; - ansi_generic['+'] = StandardCharCode.plus; - ansi_generic[','] = StandardCharCode.comma; - ansi_generic['-'] = StandardCharCode.hyphen; - ansi_generic['.'] = StandardCharCode.period; - ansi_generic['/'] = StandardCharCode.slash; - ansi_generic['0'] = StandardCharCode.zero; - ansi_generic['1'] = StandardCharCode.one; - ansi_generic['2'] = StandardCharCode.two; - ansi_generic['3'] = StandardCharCode.three; - ansi_generic['4'] = StandardCharCode.four; - ansi_generic['5'] = StandardCharCode.five; - ansi_generic['6'] = StandardCharCode.six; - ansi_generic['7'] = StandardCharCode.seven; - ansi_generic['8'] = StandardCharCode.eight; - ansi_generic['9'] = StandardCharCode.nine; - ansi_generic[':'] = StandardCharCode.colon; - ansi_generic[';'] = StandardCharCode.semicolon; - ansi_generic['<'] = StandardCharCode.less; - ansi_generic['='] = StandardCharCode.equal; - ansi_generic['>'] = StandardCharCode.greater; - ansi_generic['?'] = StandardCharCode.question; - ansi_generic['@'] = StandardCharCode.at; - ansi_generic['A'] = StandardCharCode.A; - ansi_generic['B'] = StandardCharCode.B; - ansi_generic['C'] = StandardCharCode.C; - ansi_generic['D'] = StandardCharCode.D; - ansi_generic['E'] = StandardCharCode.E; - ansi_generic['F'] = StandardCharCode.F; - ansi_generic['G'] = StandardCharCode.G; - ansi_generic['H'] = StandardCharCode.H; - ansi_generic['I'] = StandardCharCode.I; - ansi_generic['J'] = StandardCharCode.J; - ansi_generic['K'] = StandardCharCode.K; - ansi_generic['L'] = StandardCharCode.L; - ansi_generic['M'] = StandardCharCode.M; - ansi_generic['N'] = StandardCharCode.N; - ansi_generic['O'] = StandardCharCode.O; - ansi_generic['P'] = StandardCharCode.P; - ansi_generic['Q'] = StandardCharCode.Q; - ansi_generic['R'] = StandardCharCode.R; - ansi_generic['S'] = StandardCharCode.S; - ansi_generic['T'] = StandardCharCode.T; - ansi_generic['U'] = StandardCharCode.U; - ansi_generic['V'] = StandardCharCode.V; - ansi_generic['W'] = StandardCharCode.W; - ansi_generic['X'] = StandardCharCode.X; - ansi_generic['Y'] = StandardCharCode.Y; - ansi_generic['Z'] = StandardCharCode.Z; - ansi_generic['['] = StandardCharCode.bracketleft; - ansi_generic['\\'] = StandardCharCode.backslash; - ansi_generic[']'] = StandardCharCode.bracketright; - ansi_generic['^'] = StandardCharCode.asciicircum; - ansi_generic['_'] = StandardCharCode.underscore; - ansi_generic['`'] = StandardCharCode.quoteleft; - ansi_generic['a'] = StandardCharCode.a; - ansi_generic['b'] = StandardCharCode.b; - ansi_generic['c'] = StandardCharCode.c; - ansi_generic['d'] = StandardCharCode.d; - ansi_generic['e'] = StandardCharCode.e; - ansi_generic['f'] = StandardCharCode.f; - ansi_generic['g'] = StandardCharCode.g; - ansi_generic['h'] = StandardCharCode.h; - ansi_generic['i'] = StandardCharCode.i; - ansi_generic['j'] = StandardCharCode.j; - ansi_generic['k'] = StandardCharCode.k; - ansi_generic['l'] = StandardCharCode.l; - ansi_generic['m'] = StandardCharCode.m; - ansi_generic['n'] = StandardCharCode.n; - ansi_generic['o'] = StandardCharCode.o; - ansi_generic['p'] = StandardCharCode.p; - ansi_generic['q'] = StandardCharCode.q; - ansi_generic['r'] = StandardCharCode.r; - ansi_generic['s'] = StandardCharCode.s; - ansi_generic['t'] = StandardCharCode.t; - ansi_generic['u'] = StandardCharCode.u; - ansi_generic['v'] = StandardCharCode.v; - ansi_generic['w'] = StandardCharCode.w; - ansi_generic['x'] = StandardCharCode.x; - ansi_generic['y'] = StandardCharCode.y; - ansi_generic['z'] = StandardCharCode.z; - ansi_generic['{'] = StandardCharCode.braceleft; - ansi_generic['|'] = StandardCharCode.bar; - ansi_generic['}'] = StandardCharCode.braceright; - ansi_generic['~'] = StandardCharCode.asciitilde; - ansi_generic[0xa0] = StandardCharCode.nobrkspace; - ansi_generic[0xa1] = StandardCharCode.exclamdown; - ansi_generic[0xa2] = StandardCharCode.cent; - ansi_generic[0xa3] = StandardCharCode.sterling; - ansi_generic[0xa4] = StandardCharCode.currency; - ansi_generic[0xa5] = StandardCharCode.yen; - ansi_generic[0xa6] = StandardCharCode.brokenbar; - ansi_generic[0xa7] = StandardCharCode.section; - ansi_generic[0xa8] = StandardCharCode.dieresis; - ansi_generic[0xa9] = StandardCharCode.copyright; - ansi_generic[0xaa] = StandardCharCode.ordfeminine; - ansi_generic[0xab] = StandardCharCode.guillemotleft; - ansi_generic[0xac] = StandardCharCode.logicalnot; - ansi_generic[0xad] = StandardCharCode.opthyphen; - ansi_generic[0xae] = StandardCharCode.registered; - ansi_generic[0xaf] = StandardCharCode.macron; - ansi_generic[0xb0] = StandardCharCode.degree; - ansi_generic[0xb1] = StandardCharCode.plusminus; - ansi_generic[0xb2] = StandardCharCode.twosuperior; - ansi_generic[0xb3] = StandardCharCode.threesuperior; - ansi_generic[0xb4] = StandardCharCode.acute; - ansi_generic[0xb5] = StandardCharCode.mu; - ansi_generic[0xb6] = StandardCharCode.paragraph; - ansi_generic[0xb7] = StandardCharCode.periodcentered; - ansi_generic[0xb8] = StandardCharCode.cedilla; - ansi_generic[0xb9] = StandardCharCode.onesuperior; - ansi_generic[0xba] = StandardCharCode.ordmasculine; - ansi_generic[0xbb] = StandardCharCode.guillemotright; - ansi_generic[0xbc] = StandardCharCode.onequarter; - ansi_generic[0xbd] = StandardCharCode.onehalf; - ansi_generic[0xbe] = StandardCharCode.threequarters; - ansi_generic[0xbf] = StandardCharCode.questiondown; - ansi_generic[0xc0] = StandardCharCode.Agrave; - ansi_generic[0xc1] = StandardCharCode.Aacute; - ansi_generic[0xc2] = StandardCharCode.Acircumflex; - ansi_generic[0xc3] = StandardCharCode.Atilde; - ansi_generic[0xc4] = StandardCharCode.Adieresis; - ansi_generic[0xc5] = StandardCharCode.Aring; - ansi_generic[0xc6] = StandardCharCode.AE; - ansi_generic[0xc7] = StandardCharCode.Ccedilla; - ansi_generic[0xc8] = StandardCharCode.Egrave; - ansi_generic[0xc9] = StandardCharCode.Eacute; - ansi_generic[0xca] = StandardCharCode.Ecircumflex; - ansi_generic[0xcb] = StandardCharCode.Edieresis; - ansi_generic[0xcc] = StandardCharCode.Igrave; - ansi_generic[0xcd] = StandardCharCode.Iacute; - ansi_generic[0xce] = StandardCharCode.Icircumflex; - ansi_generic[0xcf] = StandardCharCode.Idieresis; - ansi_generic[0xd0] = StandardCharCode.Eth; - ansi_generic[0xd1] = StandardCharCode.Ntilde; - ansi_generic[0xd2] = StandardCharCode.Ograve; - ansi_generic[0xd3] = StandardCharCode.Oacute; - ansi_generic[0xd4] = StandardCharCode.Ocircumflex; - ansi_generic[0xd5] = StandardCharCode.Otilde; - ansi_generic[0xd6] = StandardCharCode.Odieresis; - ansi_generic[0xd7] = StandardCharCode.multiply; - ansi_generic[0xd8] = StandardCharCode.Oslash; - ansi_generic[0xd9] = StandardCharCode.Ugrave; - ansi_generic[0xda] = StandardCharCode.Uacute; - ansi_generic[0xdb] = StandardCharCode.Ucircumflex; - ansi_generic[0xdc] = StandardCharCode.Udieresis; - ansi_generic[0xdd] = StandardCharCode.Yacute; - ansi_generic[0xde] = StandardCharCode.Thorn; - ansi_generic[0xdf] = StandardCharCode.germandbls; - ansi_generic[0xe0] = StandardCharCode.agrave; - ansi_generic[0xe1] = StandardCharCode.aacute; - ansi_generic[0xe2] = StandardCharCode.acircumflex; - ansi_generic[0xe3] = StandardCharCode.atilde; - ansi_generic[0xe4] = StandardCharCode.adieresis; - ansi_generic[0xe5] = StandardCharCode.aring; - ansi_generic[0xe6] = StandardCharCode.ae; - ansi_generic[0xe7] = StandardCharCode.ccedilla; - ansi_generic[0xe8] = StandardCharCode.egrave; - ansi_generic[0xe9] = StandardCharCode.eacute; - ansi_generic[0xea] = StandardCharCode.ecircumflex; - ansi_generic[0xeb] = StandardCharCode.edieresis; - ansi_generic[0xec] = StandardCharCode.igrave; - ansi_generic[0xed] = StandardCharCode.iacute; - ansi_generic[0xee] = StandardCharCode.icircumflex; - ansi_generic[0xef] = StandardCharCode.idieresis; - ansi_generic[0xf0] = StandardCharCode.eth; - ansi_generic[0xf1] = StandardCharCode.ntilde; - ansi_generic[0xf2] = StandardCharCode.ograve; - ansi_generic[0xf3] = StandardCharCode.oacute; - ansi_generic[0xf4] = StandardCharCode.ocircumflex; - ansi_generic[0xf5] = StandardCharCode.otilde; - ansi_generic[0xf6] = StandardCharCode.odieresis; - ansi_generic[0xf7] = StandardCharCode.divide; - ansi_generic[0xf8] = StandardCharCode.oslash; - ansi_generic[0xf9] = StandardCharCode.ugrave; - ansi_generic[0xfa] = StandardCharCode.uacute; - ansi_generic[0xfb] = StandardCharCode.ucircumflex; - ansi_generic[0xfc] = StandardCharCode.udieresis; - ansi_generic[0xfd] = StandardCharCode.yacute; - ansi_generic[0xfe] = StandardCharCode.thorn; - ansi_generic[0xff] = StandardCharCode.ydieresis; - - return ansi_generic; - } - } - - public static Charcode AnsiSymbol { - get { - Charcode code = new Charcode(256); - - code[0x06] = StandardCharCode.formula; - code[0x1e] = StandardCharCode.nobrkhyphen; - code[0x1f] = StandardCharCode.opthyphen; - code[' '] = StandardCharCode.space; - code['!'] = StandardCharCode.exclam; - code['"'] = StandardCharCode.universal; - code['#'] = StandardCharCode.mathnumbersign; - code['$'] = StandardCharCode.existential; - code['%'] = StandardCharCode.percent; - code['&'] = StandardCharCode.ampersand; - code['\\'] = StandardCharCode.suchthat; - code['('] = StandardCharCode.parenleft; - code[')'] = StandardCharCode.parenright; - code['*'] = StandardCharCode.mathasterisk; - code['+'] = StandardCharCode.mathplus; - code[','] = StandardCharCode.comma; - code['-'] = StandardCharCode.mathminus; - code['.'] = StandardCharCode.period; - code['/'] = StandardCharCode.slash; - code['0'] = StandardCharCode.zero; - code['1'] = StandardCharCode.one; - code['2'] = StandardCharCode.two; - code['3'] = StandardCharCode.three; - code['4'] = StandardCharCode.four; - code['5'] = StandardCharCode.five; - code['6'] = StandardCharCode.six; - code['7'] = StandardCharCode.seven; - code['8'] = StandardCharCode.eight; - code['9'] = StandardCharCode.nine; - code[':'] = StandardCharCode.colon; - code[';'] = StandardCharCode.semicolon; - code['<'] = StandardCharCode.less; - code['='] = StandardCharCode.mathequal; - code['>'] = StandardCharCode.greater; - code['?'] = StandardCharCode.question; - code['@'] = StandardCharCode.congruent; - code['A'] = StandardCharCode.Alpha; - code['B'] = StandardCharCode.Beta; - code['C'] = StandardCharCode.Chi; - code['D'] = StandardCharCode.Delta; - code['E'] = StandardCharCode.Epsilon; - code['F'] = StandardCharCode.Phi; - code['G'] = StandardCharCode.Gamma; - code['H'] = StandardCharCode.Eta; - code['I'] = StandardCharCode.Iota; - code['K'] = StandardCharCode.Kappa; - code['L'] = StandardCharCode.Lambda; - code['M'] = StandardCharCode.Mu; - code['N'] = StandardCharCode.Nu; - code['O'] = StandardCharCode.Omicron; - code['P'] = StandardCharCode.Pi; - code['Q'] = StandardCharCode.Theta; - code['R'] = StandardCharCode.Rho; - code['S'] = StandardCharCode.Sigma; - code['T'] = StandardCharCode.Tau; - code['U'] = StandardCharCode.Upsilon; - code['V'] = StandardCharCode.varsigma; - code['W'] = StandardCharCode.Omega; - code['X'] = StandardCharCode.Xi; - code['Y'] = StandardCharCode.Psi; - code['Z'] = StandardCharCode.Zeta; - code['['] = StandardCharCode.bracketleft; - code['\\'] = StandardCharCode.backslash; - code[']'] = StandardCharCode.bracketright; - code['^'] = StandardCharCode.asciicircum; - code['_'] = StandardCharCode.underscore; - code['`'] = StandardCharCode.quoteleft; - code['a'] = StandardCharCode.alpha; - code['b'] = StandardCharCode.beta; - code['c'] = StandardCharCode.chi; - code['d'] = StandardCharCode.delta; - code['e'] = StandardCharCode.epsilon; - code['f'] = StandardCharCode.phi; - code['g'] = StandardCharCode.gamma; - code['h'] = StandardCharCode.eta; - code['i'] = StandardCharCode.iota; - code['k'] = StandardCharCode.kappa; - code['l'] = StandardCharCode.lambda; - code['m'] = StandardCharCode.mu; - code['n'] = StandardCharCode.nu; - code['o'] = StandardCharCode.omicron; - code['p'] = StandardCharCode.pi; - code['q'] = StandardCharCode.theta; - code['r'] = StandardCharCode.rho; - code['s'] = StandardCharCode.sigma; - code['t'] = StandardCharCode.tau; - code['u'] = StandardCharCode.upsilon; - code['w'] = StandardCharCode.omega; - code['x'] = StandardCharCode.xi; - code['y'] = StandardCharCode.psi; - code['z'] = StandardCharCode.zeta; - code['{'] = StandardCharCode.braceleft; - code['|'] = StandardCharCode.bar; - code['}'] = StandardCharCode.braceright; - code['~'] = StandardCharCode.mathtilde; - - return code; - } - } - #endregion // Public Static Methods - } -} diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Charset.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Charset.cs deleted file mode 100644 index cba5781959..0000000000 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Charset.cs +++ /dev/null @@ -1,157 +0,0 @@ -// 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. -// -// Copyright (c) 2005 Novell, Inc. (http://www.novell.com) -// -// Authors: -// Peter Bartok (pbartok@novell.com) -// -// - -using System; - -// COMPLETE - -namespace System.Windows.Forms.RTF { - -#if RTF_LIB - public -#else - internal -#endif - class Charset { - #region Local Variables - private CharsetType id; - private CharsetFlags flags; - private Charcode code; - private string file; - #endregion // Local Variables - - #region Public Constructors - public Charset() { - flags = CharsetFlags.Read | CharsetFlags.Switch; - id = CharsetType.General; - file = string.Empty; - this.ReadMap(); - } - #endregion // Public Constructors - - #region Public Instance Properties - public Charcode Code { - get { - return code; - } - - set { - code = value; - } - } - - public CharsetFlags Flags { - get { - return flags; - } - - set { - flags = value; - } - } - - public CharsetType ID { - get { - return id; - } - - set { - switch(value) { - case CharsetType.Symbol: { - id = CharsetType.Symbol; - return; - } - - default: - case CharsetType.General: { - id = CharsetType.General; - return; - } - } - } - } - - public string File { - get { - return file; - } - - set { - if (file != value) { - file = value; - } - } - } - - public StandardCharCode this[int c] { - get { - return code[c]; - } - } - - #endregion // Public Instance Properties - - #region Public Instance Methods - public bool ReadMap() { - switch (id) { - case CharsetType.General: { - if (file == string.Empty) { - code = Charcode.AnsiGeneric; - return true; - } - // FIXME - implement reading charmap from file... - return true; - } - - case CharsetType.Symbol: { - if (file == string.Empty) { - code = Charcode.AnsiSymbol; - return true; - } - - // FIXME - implement reading charmap from file... - return true; - } - - default: { - return false; - } - } - } - - public char StdCharCode(string name) { - // FIXME - finish this - return ' '; - - } - - public string StdCharName(char code) { - // FIXME - finish this - return String.Empty; - } - #endregion // Public Instance Methods - } -} diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetToCodepage.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetToCodepage.cs new file mode 100644 index 0000000000..783c635100 --- /dev/null +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetToCodepage.cs @@ -0,0 +1,79 @@ +// 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. +// +// Copyright (c) 2020 Karl Scowen +// +// Authors: +// Karl Scowen +// +// + + +namespace System.Windows.Forms.RTF { + internal static class CharsetToCodepage { + public static int Translate(CharsetType charset) + { + switch (charset) { + case CharsetType.General: + case CharsetType.Arabic_Traditional: + case CharsetType.Arabic_user: + case CharsetType.Hebrew_user: + case CharsetType.Mac: // Technically wrong, because "mac" should actually be quite a few with their own code pages... + default: + return System.Text.Encoding.Default.CodePage; + case CharsetType.ANSI: + return 1252; + case CharsetType.Symbol: + return 42; + case CharsetType.Shift_Jis: + return 932; + case CharsetType.Hangul: + return 949; + case CharsetType.Johab: + return 1361; + case CharsetType.GB2312: + return 936; + case CharsetType.Big5: + return 950; + case CharsetType.Greek: + return 1253; + case CharsetType.Turkish: + return 1254; + case CharsetType.Vietnamese: + return 1258; + case CharsetType.Hebrew: + return 1255; + case CharsetType.Arabic: + return 1256; + case CharsetType.Baltic: + return 1257; + case CharsetType.Russian: + return 1251; + case CharsetType.Thai: + return 874; + case CharsetType.Eastern_European: + return 1250; + case CharsetType.PC_437: + return 437; + case CharsetType.OEM: + return 850; + } + } + } +} \ No newline at end of file diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetType.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetType.cs index a934dc8286..4dbb3d9489 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetType.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetType.cs @@ -21,6 +21,7 @@ // // Authors: // Peter Bartok (pbartok@novell.com) +// Karl Scowen (contact@scowencomputers.co.nz) // // @@ -33,8 +34,29 @@ namespace System.Windows.Forms.RTF { #else internal #endif - enum CharsetType { - General = 0, - Symbol = 1, + enum CharsetType : byte { + ANSI = 0, + General = 1, + Symbol = 2, + Mac = 77, + Shift_Jis = 128, + Hangul = 129, + Johab = 130, + GB2312 = 134, + Big5 = 136, + Greek = 161, + Turkish = 162, + Vietnamese = 163, + Hebrew = 177, + Arabic = 178, + Arabic_Traditional = 179, + Arabic_user = 180, + Hebrew_user = 181, + Baltic = 186, + Russian = 204, + Thai = 222, + Eastern_European = 238, + PC_437 = 254, + OEM = 255 } } diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/KeysInit.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/KeysInit.cs index 72188e6daa..5ff3ff426c 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/KeysInit.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/KeysInit.cs @@ -366,10 +366,12 @@ namespace System.Windows.Forms.RTF { new KeyStruct(Major.StyleAttr, Minor.Next, "snext"), new KeyStruct(Major.PictAttr, Minor.MacQD, "macpict"), new KeyStruct(Major.PictAttr, Minor.PMMetafile, "pmmetafile"), + new KeyStruct(Major.PictAttr, Minor.EnhancedMetafile, "emfblip"), new KeyStruct(Major.PictAttr, Minor.WinMetafile, "wmetafile"), new KeyStruct(Major.PictAttr, Minor.DevIndBitmap, "dibitmap"), new KeyStruct(Major.PictAttr, Minor.WinBitmap, "wbitmap"), new KeyStruct(Major.PictAttr, Minor.PngBlip, "pngblip"), + new KeyStruct(Major.PictAttr, Minor.JpegBlip, "jpgblip"), new KeyStruct(Major.PictAttr, Minor.PixelBits, "wbmbitspixel"), new KeyStruct(Major.PictAttr, Minor.BitmapPlanes, "wbmplanes"), new KeyStruct(Major.PictAttr, Minor.BitmapWid, "wbmwidthbytes"), @@ -393,6 +395,7 @@ namespace System.Windows.Forms.RTF { new KeyStruct(Major.NeXTGrAttr, Minor.NeXTGHeight, "height"), new KeyStruct(Major.Destination, Minor.OptDest, "*"), new KeyStruct(Major.Destination, Minor.FontTbl, "fonttbl"), + new KeyStruct(Major.Destination, Minor.FontName, "fname"), new KeyStruct(Major.Destination, Minor.FontAltName, "falt"), new KeyStruct(Major.Destination, Minor.EmbeddedFont, "fonteb"), new KeyStruct(Major.Destination, Minor.FontFile, "fontfile"), diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Minor.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Minor.cs index 8b0f1bc6f8..4033f5bbf2 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Minor.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Minor.cs @@ -41,6 +41,7 @@ namespace System.Windows.Forms.RTF { // Major.Destinan FontTbl, + FontName, FontAltName, EmbeddedFont, FontFile, @@ -520,10 +521,12 @@ namespace System.Windows.Forms.RTF { // Major.PictAttr MacQD, PMMetafile, + EnhancedMetafile, WinMetafile, DevIndBitmap, WinBitmap, PngBlip, + JpegBlip, PixelBits, BitmapPlanes, BitmapWid, diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Picture.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Picture.cs index 244bcd9adf..35845b20af 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Picture.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Picture.cs @@ -66,7 +66,7 @@ namespace System.Windows.Forms.RTF { public float Width { get { float w = width; - if (w == -1) { + if (w < 0) { if (image == null) image = ToImage (); w = image.Width; @@ -79,7 +79,7 @@ namespace System.Windows.Forms.RTF { public float Height { get { float h = height; - if (h == -1) { + if (h < 0) { if (image == null) image = ToImage (); h = image.Height; @@ -113,7 +113,9 @@ namespace System.Windows.Forms.RTF { return false; switch (image_type) { case Minor.PngBlip: + case Minor.JpegBlip: case Minor.WinMetafile: + case Minor.EnhancedMetafile: break; default: return false; @@ -126,15 +128,7 @@ namespace System.Windows.Forms.RTF { { if (image == null) image = ToImage (); - - float height = this.height; - float width = this.width; - - if (height == -1) - height = image.Height; - if (width == -1) - width = image.Width; - dc.DrawImage (image, x, y, width, height); + dc.DrawImage (image, x, y, Width, Height); } public Image ToImage () diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/RTF.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/RTF.cs index 3b02df81ff..469c379ed2 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/RTF.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/RTF.cs @@ -21,6 +21,7 @@ // // Authors: // Peter Bartok (pbartok@novell.com) +// Karl Scowen // // COMPLETE @@ -60,10 +61,6 @@ namespace System.Windows.Forms.RTF { private char prev_char; private bool bump_line; - - private Font font_list; - - private Charset cur_charset; private Stack charset_stack; private Style styles; @@ -101,10 +98,7 @@ namespace System.Windows.Forms.RTF { line_pos = 0; prev_char = unchecked((char)-1); bump_line = false; - font_list = null; - charset_stack = null; - - cur_charset = new Charset(); + charset_stack = new Stack(); destination_callbacks = new DestinationCallback(); class_callbacks = new ClassCallback(); @@ -369,49 +363,52 @@ SkipCRLF: GetToken2(); if (this.rtf_class == TokenClass.Text) { - this.minor = (Minor)this.cur_charset[(int)this.major]; - if (encoding == null) { + if (encoding == null) encoding = Encoding.GetEncoding (encoding_code_page); - } encoded_text = new String (encoding.GetChars (new byte [] { (byte) this.major })); - } - - if (this.cur_charset.Flags == CharsetFlags.None) { - return this.rtf_class; - } - - if (CheckCMM (TokenClass.Control, Major.Unicode, Minor.UnicodeAnsiCodepage)) { + } else if (CheckCMM (TokenClass.Control, Major.Unicode, Minor.UnicodeAnsiCodepage)) { encoding_code_page = param; // fallback to the default one in case we have an invalid value if (encoding_code_page < 0 || encoding_code_page > 65535) encoding_code_page = DefaultEncodingCodePage; - } - if (((this.cur_charset.Flags & CharsetFlags.Read) != 0) && CheckCM(TokenClass.Control, Major.CharSet)) { - this.cur_charset.ReadMap(); - } else if (((this.cur_charset.Flags & CharsetFlags.Switch) != 0) && CheckCMM(TokenClass.Control, Major.CharAttr, Minor.FontNum)) { + encoding = null; + } else if (CheckCMM(TokenClass.Control, Major.CharAttr, Minor.FontNum)) { Font fp; - fp = Font.GetFont(this.font_list, this.param); + fp = Font.GetFont(this.fonts, this.param); if (fp != null) { - if (fp.Name.StartsWith("Symbol")) { - this.cur_charset.ID = CharsetType.Symbol; + if (fp.Codepage != 0) { + if (fp.Codepage != encoding_code_page) { + encoding_code_page = fp.Codepage; + encoding = null; + } } else { - this.cur_charset.ID = CharsetType.General; + var cp = CharsetToCodepage.Translate (fp.Charset); + if (cp != 0 && cp != encoding_code_page) { + encoding_code_page = cp; + encoding = null; + } + } + } + } else if (this.rtf_class == TokenClass.Group) { + switch(this.major) { + case Major.BeginGroup: { + charset_stack.Push(encoding_code_page); + break; } - } else if (((this.cur_charset.Flags & CharsetFlags.Switch) != 0) && (this.rtf_class == TokenClass.Group)) { - switch(this.major) { - case Major.BeginGroup: { - this.charset_stack.Push(this.cur_charset); - break; - } - case Major.EndGroup: { - this.cur_charset = (Charset)this.charset_stack.Pop(); - break; + case Major.EndGroup: { + if (charset_stack.Count > 0) { + encoding_code_page = (int)this.charset_stack.Pop(); + } else { + encoding_code_page = DefaultEncodingCodePage; } + if (encoding != null && encoding.CodePage != encoding_code_page) + encoding = null; + break; } } } @@ -677,7 +674,10 @@ SkipCRLF: font = new Font(rtf); - while ((rtf.rtf_class != TokenClass.EOF) && (!rtf.CheckCM(TokenClass.Text, (Major)';')) && (!rtf.CheckCM(TokenClass.Group, Major.EndGroup))) { + int depth = 0; + string untaggedName = null; + + while ((rtf.rtf_class != TokenClass.EOF) && (!rtf.CheckCM(TokenClass.Text, (Major)';')) && depth >= 0) { if (rtf.rtf_class == TokenClass.Control) { switch(rtf.major) { case Major.FontFamily: { @@ -734,6 +734,26 @@ SkipCRLF: break; } + case Major.Destination: { + switch (rtf.minor) { + case Minor.FontName: + untaggedName = ReadFontName (rtf); + break; + + case Minor.FontAltName: + font.AltName = ReadFontName (rtf); + break; + + default: { + #if RTF_DEBUG + Console.WriteLine ("Got unhandled Control.Destination.Minor: " + rtf.minor); + #endif + break; + } + } + break; + } + default: { #if RTF_DEBUG Console.WriteLine("ReadFontTbl: Unknown Control token " + rtf.major); @@ -742,22 +762,12 @@ SkipCRLF: } } } else if (rtf.CheckCM(TokenClass.Group, Major.BeginGroup)) { - rtf.SkipGroup(); - } else if (rtf.rtf_class == TokenClass.Text) { - StringBuilder sb; - - sb = new StringBuilder(); - - while ((rtf.rtf_class != TokenClass.EOF) && (!rtf.CheckCM(TokenClass.Text, (Major)';')) && (!rtf.CheckCM(TokenClass.Group, Major.EndGroup)) && (!rtf.CheckCM(TokenClass.Group, Major.BeginGroup))) { - sb.Append((char)rtf.major); - rtf.GetToken(); - } - - if (rtf.CheckCM(TokenClass.Group, Major.EndGroup)) { - rtf.UngetToken(); - } - - font.Name = sb.ToString(); + depth++; + } else if (rtf.CheckCM(TokenClass.Group, Major.EndGroup)) { + depth--; + } else if (rtf.rtf_class == TokenClass.Text) + { + font.Name = ReadFontName (rtf); continue; #if RTF_DEBUG } else { @@ -768,6 +778,9 @@ SkipCRLF: rtf.GetToken(); } + if (untaggedName != null) + font.Name = untaggedName; + if (old == 0) { rtf.GetToken(); @@ -788,6 +801,26 @@ SkipCRLF: rtf.RouteToken(); } + private static String ReadFontName(RTF rtf) + { + StringBuilder sb = new StringBuilder (); + + while (rtf.rtf_class != TokenClass.EOF && rtf.rtf_class != TokenClass.Text) + rtf.GetToken (); + + while ((rtf.rtf_class != TokenClass.EOF) && (!rtf.CheckCM (TokenClass.Text, (Major)';')) && (!rtf.CheckCM(TokenClass.Group, Major.EndGroup)) && + (!rtf.CheckCM (TokenClass.Group, Major.BeginGroup))) { + sb.Append ((char)rtf.major); + rtf.GetToken (); + } + + if (rtf.CheckCM (TokenClass.Group, Major.EndGroup)) { + rtf.UngetToken(); + } + + return sb.ToString (); + } + private void ReadColorTbl(RTF rtf) { Color color; int num; @@ -943,20 +976,25 @@ SkipCRLF: private void ReadPictGroup(RTF rtf) { bool read_image_data = false; - + int groupDepth = 0; Picture picture = new Picture (); while (true) { rtf.GetToken (); + if (rtf.CheckCM (TokenClass.Group, Major.BeginGroup)) + groupDepth++; + if (rtf.CheckCM (TokenClass.Group, Major.EndGroup)) + groupDepth--; + + if (groupDepth < 0) break; switch (minor) { case Minor.PngBlip: - picture.ImageType = minor; - read_image_data = true; - break; + case Minor.JpegBlip: case Minor.WinMetafile: + case Minor.EnhancedMetafile: picture.ImageType = minor; read_image_data = true; continue; @@ -1047,10 +1085,33 @@ SkipCRLF: } } - private void ReadObjGroup(RTF rtf) { - rtf.SkipGroup(); - rtf.RouteToken(); + private void ReadObjGroup (RTF rtf) + { + int level; + + level = 1; + + while (GetToken () != TokenClass.EOF && this.minor != Minor.ObjResult) { + if (rtf_class == TokenClass.Group) { + if (this.major == Major.BeginGroup) { + level++; + } else if (this.major == Major.EndGroup) { + level--; + if (level < 1) { + break; + } + } + } + } + + if (level >= 1) { + GetToken (); + + if (rtf_class == TokenClass.Group) + GetToken (); + rtf.RouteToken (); + } } #endregion // Default Delegates } -} + } diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/StandardCharCode.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/StandardCharCode.cs deleted file mode 100644 index 906735ba18..0000000000 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/StandardCharCode.cs +++ /dev/null @@ -1,392 +0,0 @@ -// 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. -// -// Copyright (c) 2005 Novell, Inc. (http://www.novell.com) -// -// Authors: -// Peter Bartok (pbartok@novell.com) -// -// - -// COMPLETE - -namespace System.Windows.Forms.RTF { - -#if RTF_LIB - public -#else - internal -#endif - enum StandardCharCode { - nothing = 0, - space = 1, - exclam = 2, - quotedbl = 3, - numbersign = 4, - dollar = 5, - percent = 6, - ampersand = 7, - quoteright = 8, - parenleft = 9, - parenright = 10, - asterisk = 11, - plus = 12, - comma = 13, - hyphen = 14, - period = 15, - slash = 16, - zero = 17, - one = 18, - two = 19, - three = 20, - four = 21, - five = 22, - six = 23, - seven = 24, - eight = 25, - nine = 26, - colon = 27, - semicolon = 28, - less = 29, - equal = 30, - greater = 31, - question = 32, - at = 33, - A = 34, - B = 35, - C = 36, - D = 37, - E = 38, - F = 39, - G = 40, - H = 41, - I = 42, - J = 43, - K = 44, - L = 45, - M = 46, - N = 47, - O = 48, - P = 49, - Q = 50, - R = 51, - S = 52, - T = 53, - U = 54, - V = 55, - W = 56, - X = 57, - Y = 58, - Z = 59, - bracketleft = 60, - backslash = 61, - bracketright = 62, - asciicircum = 63, - underscore = 64, - quoteleft = 65, - a = 66, - b = 67, - c = 68, - d = 69, - e = 70, - f = 71, - g = 72, - h = 73, - i = 74, - j = 75, - k = 76, - l = 77, - m = 78, - n = 79, - o = 80, - p = 81, - q = 82, - r = 83, - s = 84, - t = 85, - u = 86, - v = 87, - w = 88, - x = 89, - y = 90, - z = 91, - braceleft = 92, - bar = 93, - braceright = 94, - asciitilde = 95, - exclamdown = 96, - cent = 97, - sterling = 98, - fraction = 99, - yen = 100, - florin = 101, - section = 102, - currency = 103, - quotedblleft = 104, - guillemotleft = 105, - guilsinglleft = 106, - guilsinglright = 107, - fi = 108, - fl = 109, - endash = 110, - dagger = 111, - daggerdbl = 112, - periodcentered = 113, - paragraph = 114, - bullet = 115, - quotesinglbase = 116, - quotedblbase = 117, - quotedblright = 118, - guillemotright = 119, - ellipsis = 120, - perthousand = 121, - questiondown = 122, - grave = 123, - acute = 124, - circumflex = 125, - tilde = 126, - macron = 127, - breve = 128, - dotaccent = 129, - dieresis = 130, - ring = 131, - cedilla = 132, - hungarumlaut = 133, - ogonek = 134, - caron = 135, - emdash = 136, - AE = 137, - ordfeminine = 138, - Lslash = 139, - Oslash = 140, - OE = 141, - ordmasculine = 142, - ae = 143, - dotlessi = 144, - lslash = 145, - oslash = 146, - oe = 147, - germandbls = 148, - Aacute = 149, - Acircumflex = 150, - Adieresis = 151, - Agrave = 152, - Aring = 153, - Atilde = 154, - Ccedilla = 155, - Eacute = 156, - Ecircumflex = 157, - Edieresis = 158, - Egrave = 159, - Eth = 160, - Iacute = 161, - Icircumflex = 162, - Idieresis = 163, - Igrave = 164, - Ntilde = 165, - Oacute = 166, - Ocircumflex = 167, - Odieresis = 168, - Ograve = 169, - Otilde = 170, - Scaron = 171, - Thorn = 172, - Uacute = 173, - Ucircumflex = 174, - Udieresis = 175, - Ugrave = 176, - Yacute = 177, - Ydieresis = 178, - aacute = 179, - acircumflex = 180, - adieresis = 181, - agrave = 182, - aring = 183, - atilde = 184, - brokenbar = 185, - ccedilla = 186, - copyright = 187, - degree = 188, - divide = 189, - eacute = 190, - ecircumflex = 191, - edieresis = 192, - egrave = 193, - eth = 194, - iacute = 195, - icircumflex = 196, - idieresis = 197, - igrave = 198, - logicalnot = 199, - minus = 200, - multiply = 201, - ntilde = 202, - oacute = 203, - ocircumflex = 204, - odieresis = 205, - ograve = 206, - onehalf = 207, - onequarter = 208, - onesuperior = 209, - otilde = 210, - plusminus = 211, - registered = 212, - thorn = 213, - threequarters = 214, - threesuperior = 215, - trademark = 216, - twosuperior = 217, - uacute = 218, - ucircumflex = 219, - udieresis = 220, - ugrave = 221, - yacute = 222, - ydieresis = 223, - Alpha = 224, - Beta = 225, - Chi = 226, - Delta = 227, - Epsilon = 228, - Phi = 229, - Gamma = 230, - Eta = 231, - Iota = 232, - Kappa = 233, - Lambda = 234, - Mu = 235, - Nu = 236, - Omicron = 237, - Pi = 238, - Theta = 239, - Rho = 240, - Sigma = 241, - Tau = 242, - Upsilon = 243, - varUpsilon = 244, - Omega = 245, - Xi = 246, - Psi = 247, - Zeta = 248, - alpha = 249, - beta = 250, - chi = 251, - delta = 252, - epsilon = 253, - phi = 254, - varphi = 255, - gamma = 256, - eta = 257, - iota = 258, - kappa = 259, - lambda = 260, - mu = 261, - nu = 262, - omicron = 263, - pi = 264, - varpi = 265, - theta = 266, - vartheta = 267, - rho = 268, - sigma = 269, - varsigma = 270, - tau = 271, - upsilon = 272, - omega = 273, - xi = 274, - psi = 275, - zeta = 276, - nobrkspace = 277, - nobrkhyphen = 278, - lessequal = 279, - greaterequal = 280, - infinity = 281, - integral = 282, - notequal = 283, - radical = 284, - radicalex = 285, - approxequal = 286, - apple = 287, - partialdiff = 288, - opthyphen = 289, - formula = 290, - lozenge = 291, - universal = 292, - existential = 293, - suchthat = 294, - congruent = 295, - therefore = 296, - perpendicular = 297, - minute = 298, - club = 299, - diamond = 300, - heart = 301, - spade = 302, - arrowboth = 303, - arrowleft = 304, - arrowup = 305, - arrowright = 306, - arrowdown = 307, - second = 308, - proportional = 309, - equivalence = 310, - arrowvertex = 311, - arrowhorizex = 312, - carriagereturn = 313, - aleph = 314, - Ifraktur = 315, - Rfraktur = 316, - weierstrass = 317, - circlemultiply = 318, - circleplus = 319, - emptyset = 320, - intersection = 321, - union = 322, - propersuperset = 323, - reflexsuperset = 324, - notsubset = 325, - propersubset = 326, - reflexsubset = 327, - element = 328, - notelement = 329, - angle = 330, - gradient = 331, - product = 332, - logicaland = 333, - logicalor = 334, - arrowdblboth = 335, - arrowdblleft = 336, - arrowdblup = 337, - arrowdblright = 338, - arrowdbldown = 339, - angleleft = 340, - registersans = 341, - copyrightsans = 342, - trademarksans = 343, - angleright = 344, - mathplus = 345, - mathminus = 346, - mathasterisk = 347, - mathnumbersign = 348, - dotmath = 349, - mathequal = 350, - mathtilde = 351, - - MaxChar = 352 - } -} diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/StandardCharName.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/StandardCharName.cs deleted file mode 100644 index 0190b798cf..0000000000 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/StandardCharName.cs +++ /dev/null @@ -1,411 +0,0 @@ -// 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. -// -// Copyright (c) 2005 Novell, Inc. (http://www.novell.com) -// -// Authors: -// Peter Bartok (pbartok@novell.com) -// -// - -// COMPLETE - -namespace System.Windows.Forms.RTF { - -#if RTF_LIB - public -#else - internal -#endif - class StandardCharName { - public static string[] Names = { - "nothing", - "space", - "exclam", - "quotedbl", - "numbersign", - "dollar", - "percent", - "ampersand", - "quoteright", - "parenleft", - "parenright", - "asterisk", - "plus", - "comma", - "hyphen", - "period", - "slash", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "colon", - "semicolon", - "less", - "equal", - "greater", - "question", - "at", - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J", - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T", - "U", - "V", - "W", - "X", - "Y", - "Z", - "bracketleft", - "backslash", - "bracketright", - "asciicircum", - "underscore", - "quoteleft", - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z", - "braceleft", - "bar", - "braceright", - "asciitilde", - "exclamdown", - "cent", - "sterling", - "fraction", - "yen", - "florin", - "section", - "currency", - "quotedblleft", - "guillemotleft", - "guilsinglleft", - "guilsinglright", - "fi", - "fl", - "endash", - "dagger", - "daggerdbl", - "periodcentered", - "paragraph", - "bullet", - "quotesinglbase", - "quotedblbase", - "quotedblright", - "guillemotright", - "ellipsis", - "perthousand", - "questiondown", - "grave", - "acute", - "circumflex", - "tilde", - "macron", - "breve", - "dotaccent", - "dieresis", - "ring", - "cedilla", - "hungarumlaut", - "ogonek", - "caron", - "emdash", - "AE", - "ordfeminine", - "Lslash", - "Oslash", - "OE", - "ordmasculine", - "ae", - "dotlessi", - "lslash", - "oslash", - "oe", - "germandbls", - "Aacute", - "Acircumflex", - "Adieresis", - "Agrave", - "Aring", - "Atilde", - "Ccedilla", - "Eacute", - "Ecircumflex", - "Edieresis", - "Egrave", - "Eth", - "Iacute", - "Icircumflex", - "Idieresis", - "Igrave", - "Ntilde", - "Oacute", - "Ocircumflex", - "Odieresis", - "Ograve", - "Otilde", - "Scaron", - "Thorn", - "Uacute", - "Ucircumflex", - "Udieresis", - "Ugrave", - "Yacute", - "Ydieresis", - "aacute", - "acircumflex", - "adieresis", - "agrave", - "aring", - "atilde", - "brokenbar", - "ccedilla", - "copyright", - "degree", - "divide", - "eacute", - "ecircumflex", - "edieresis", - "egrave", - "eth", - "iacute", - "icircumflex", - "idieresis", - "igrave", - "logicalnot", - "minus", - "multiply", - "ntilde", - "oacute", - "ocircumflex", - "odieresis", - "ograve", - "onehalf", - "onequarter", - "onesuperior", - "otilde", - "plusminus", - "registered", - "thorn", - "threequarters", - "threesuperior", - "trademark", - "twosuperior", - "uacute", - "ucircumflex", - "udieresis", - "ugrave", - "yacute", - "ydieresis", - "Alpha", - "Beta", - "Chi", - "Delta", - "Epsilon", - "Phi", - "Gamma", - "Eta", - "Iota", - "Kappa", - "Lambda", - "Mu", - "Nu", - "Omicron", - "Pi", - "Theta", - "Rho", - "Sigma", - "Tau", - "Upsilon", - "varUpsilon", - "Omega", - "Xi", - "Psi", - "Zeta", - "alpha", - "beta", - "chi", - "delta", - "epsilon", - "phi", - "varphi", - "gamma", - "eta", - "iota", - "kappa", - "lambda", - "mu", - "nu", - "omicron", - "pi", - "varpi", - "theta", - "vartheta", - "rho", - "sigma", - "varsigma", - "tau", - "upsilon", - "omega", - "xi", - "psi", - "zeta", - "nobrkspace", - "nobrkhyphen", - "lessequal", - "greaterequal", - "infinity", - "integral", - "notequal", - "radical", - "radicalex", - "approxequal", - "apple", - "partialdiff", - "opthyphen", - "formula", - "lozenge", - "universal", - "existential", - "suchthat", - "congruent", - "therefore", - "perpendicular", - "minute", - "club", - "diamond", - "heart", - "spade", - "arrowboth", - "arrowleft", - "arrowup", - "arrowright", - "arrowdown", - "second", - "proportional", - "equivalence", - "arrowvertex", - "arrowhorizex", - "carriagereturn", - "aleph", - "Ifraktur", - "Rfraktur", - "weierstrass", - "circlemultiply", - "circleplus", - "emptyset", - "intersection", - "union", - "propersuperset", - "reflexsuperset", - "notsubset", - "propersubset", - "reflexsubset", - "element", - "notelement", - "angle", - "gradient", - "product", - "logicaland", - "logicalor", - "arrowdblboth", - "arrowdblleft", - "arrowdblup", - "arrowdblright", - "arrowdbldown", - "angleleft", - "registersans", - "copyrightsans", - "trademarksans", - "angleright", - "mathplus", - "mathminus", - "mathasterisk", - "mathnumbersign", - "dotmath", - "mathequal", - "mathtilde" - }; - - /// Lookup name by ID - public static string Name(int index) { - if ((index < 0) || (index >= Names.Length)) { - return string.Empty; - } - - return Names[index]; - } - - /// Lookup ID by name (e.g. mathtilde) - public static int ID(string name) { - for (int i=0; i < Names.Length; i++) { - if (name.Equals(Names[i])) { - return i; - } - } - return 0; - } - } -} diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/TextMap.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/TextMap.cs deleted file mode 100644 index f4474b9262..0000000000 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/TextMap.cs +++ /dev/null @@ -1,440 +0,0 @@ -// 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. -// -// Copyright (c) 2005 Novell, Inc. (http://www.novell.com) -// -// Authors: -// Peter Bartok (pbartok@novell.com) -// -// - -// This map is for convencience only, any app can create/use it's own -// StdCharCode -> table - -using System.Collections; - -namespace System.Windows.Forms.RTF { - -#if RTF_LIB - public -#else - internal -#endif - class TextMap { - #region Local Variables - private string[] table; - #endregion // Local Variables - - #region Public Constructors - public TextMap() { - table = new string[(int)StandardCharCode.MaxChar]; - - for (int i = 0; i < (int)StandardCharCode.MaxChar; i++) { - table[i] = string.Empty; - } - } - #endregion // Public Constructors - - #region Public Instance Properties - internal string this[StandardCharCode c] { // FIXME - this should be public, if the whole namespace was public (ie standalone RTF parser) - get { - return table[(int)c]; - } - - set { - table[(int)c] = value; - } - } - - public string[] Table { - get { - return table; - } - } - #endregion // Public Instance Properties - - #region Public Static Methods - public static void SetupStandardTable(string[] table) - { - /* - table[(int)StandardCharCode.space] = " "; - table[(int)StandardCharCode.exclam] = "!"; - table[(int)StandardCharCode.quotedbl] = "\""; - table[(int)StandardCharCode.numbersign] = "#"; - table[(int)StandardCharCode.dollar] = "$"; - table[(int)StandardCharCode.percent] = "%"; - table[(int)StandardCharCode.ampersand] = "&"; - table[(int)StandardCharCode.quoteright] = "'"; - table[(int)StandardCharCode.parenleft] = "("; - table[(int)StandardCharCode.parenright] = ")"; - table[(int)StandardCharCode.asterisk] = "*"; - table[(int)StandardCharCode.plus] = "+"; - table[(int)StandardCharCode.comma] = ","; - table[(int)StandardCharCode.hyphen] = "-"; - table[(int)StandardCharCode.period] = "."; - table[(int)StandardCharCode.slash] = "/"; - table[(int)StandardCharCode.zero] = "0"; - table[(int)StandardCharCode.one] = "1"; - table[(int)StandardCharCode.two] = "2"; - table[(int)StandardCharCode.three] = "3"; - table[(int)StandardCharCode.four] = "4"; - table[(int)StandardCharCode.five] = "5"; - table[(int)StandardCharCode.six] = "6"; - table[(int)StandardCharCode.seven] = "7"; - table[(int)StandardCharCode.eight] = "8"; - table[(int)StandardCharCode.nine] = "9"; - table[(int)StandardCharCode.colon] = ":"; - table[(int)StandardCharCode.semicolon] = ";"; - table[(int)StandardCharCode.less] = "<"; - table[(int)StandardCharCode.equal] = "="; - table[(int)StandardCharCode.greater] = ">"; - table[(int)StandardCharCode.question] = "?"; - table[(int)StandardCharCode.at] = "@"; - table[(int)StandardCharCode.A] = "A"; - table[(int)StandardCharCode.B] = "B"; - table[(int)StandardCharCode.C] = "C"; - table[(int)StandardCharCode.D] = "D"; - table[(int)StandardCharCode.E] = "E"; - table[(int)StandardCharCode.F] = "F"; - table[(int)StandardCharCode.G] = "G"; - table[(int)StandardCharCode.H] = "H"; - table[(int)StandardCharCode.I] = "I"; - table[(int)StandardCharCode.J] = "J"; - table[(int)StandardCharCode.K] = "K"; - table[(int)StandardCharCode.L] = "L"; - table[(int)StandardCharCode.M] = "M"; - table[(int)StandardCharCode.N] = "N"; - table[(int)StandardCharCode.O] = "O"; - table[(int)StandardCharCode.P] = "P"; - table[(int)StandardCharCode.Q] = "Q"; - table[(int)StandardCharCode.R] = "R"; - table[(int)StandardCharCode.S] = "S"; - table[(int)StandardCharCode.T] = "T"; - table[(int)StandardCharCode.U] = "U"; - table[(int)StandardCharCode.V] = "V"; - table[(int)StandardCharCode.W] = "W"; - table[(int)StandardCharCode.X] = "X"; - table[(int)StandardCharCode.Y] = "Y"; - table[(int)StandardCharCode.Z] = "Z"; - table[(int)StandardCharCode.bracketleft] = "["; - table[(int)StandardCharCode.backslash] = "\\"; - table[(int)StandardCharCode.bracketright] = "]"; - table[(int)StandardCharCode.asciicircum] = "^"; - table[(int)StandardCharCode.underscore] = "_"; - table[(int)StandardCharCode.quoteleft] = "`"; - table[(int)StandardCharCode.a] = "a"; - table[(int)StandardCharCode.b] = "b"; - table[(int)StandardCharCode.c] = "c"; - table[(int)StandardCharCode.d] = "d"; - table[(int)StandardCharCode.e] = "e"; - table[(int)StandardCharCode.f] = "f"; - table[(int)StandardCharCode.g] = "g"; - table[(int)StandardCharCode.h] = "h"; - table[(int)StandardCharCode.i] = "i"; - table[(int)StandardCharCode.j] = "j"; - table[(int)StandardCharCode.k] = "k"; - table[(int)StandardCharCode.l] = "l"; - table[(int)StandardCharCode.m] = "m"; - table[(int)StandardCharCode.n] = "n"; - table[(int)StandardCharCode.o] = "o"; - table[(int)StandardCharCode.p] = "p"; - table[(int)StandardCharCode.q] = "q"; - table[(int)StandardCharCode.r] = "r"; - table[(int)StandardCharCode.s] = "s"; - table[(int)StandardCharCode.t] = "t"; - table[(int)StandardCharCode.u] = "u"; - table[(int)StandardCharCode.v] = "v"; - table[(int)StandardCharCode.w] = "w"; - table[(int)StandardCharCode.x] = "x"; - table[(int)StandardCharCode.y] = "y"; - table[(int)StandardCharCode.z] = "z"; - table[(int)StandardCharCode.braceleft] = "{"; - table[(int)StandardCharCode.bar] = "|"; - table[(int)StandardCharCode.braceright] = "}"; - table[(int)StandardCharCode.asciitilde] = "~"; - table[(int)StandardCharCode.AE] = "AE"; - table[(int)StandardCharCode.OE] = "OE"; - table[(int)StandardCharCode.acute] = "'"; - table[(int)StandardCharCode.ae] = "ae"; - table[(int)StandardCharCode.angleleft] = "<"; - table[(int)StandardCharCode.angleright] = ">"; - table[(int)StandardCharCode.arrowboth] = "<->"; - table[(int)StandardCharCode.arrowdblboth] = "<=>"; - table[(int)StandardCharCode.arrowdblleft] = "<="; - table[(int)StandardCharCode.arrowdblright] = "=>"; - table[(int)StandardCharCode.arrowleft] = "<-"; - table[(int)StandardCharCode.arrowright] = "->"; - table[(int)StandardCharCode.bullet] = "o"; - table[(int)StandardCharCode.cent] = "cent"; - table[(int)StandardCharCode.circumflex] = "^"; - table[(int)StandardCharCode.copyright] = "(c)"; - table[(int)StandardCharCode.copyrightsans] = "(c)"; - table[(int)StandardCharCode.degree] = "deg."; - table[(int)StandardCharCode.divide] = "/"; - table[(int)StandardCharCode.dotlessi] = "i"; - table[(int)StandardCharCode.ellipsis] = "..."; - table[(int)StandardCharCode.emdash] = "--"; - table[(int)StandardCharCode.endash] = "-"; - table[(int)StandardCharCode.fi] = "fi"; - table[(int)StandardCharCode.fl] = "fl"; - table[(int)StandardCharCode.fraction] = "/"; - table[(int)StandardCharCode.germandbls] = "ss"; - table[(int)StandardCharCode.grave] = "`"; - table[(int)StandardCharCode.greaterequal] = ">="; - table[(int)StandardCharCode.guillemotleft] = "<<"; - table[(int)StandardCharCode.guillemotright] = ">>"; - table[(int)StandardCharCode.guilsinglleft] = "<"; - table[(int)StandardCharCode.guilsinglright] = ">"; - table[(int)StandardCharCode.lessequal] = "<="; - table[(int)StandardCharCode.logicalnot] = "~"; - table[(int)StandardCharCode.mathasterisk] = "*"; - table[(int)StandardCharCode.mathequal] = "="; - table[(int)StandardCharCode.mathminus] = "-"; - table[(int)StandardCharCode.mathnumbersign] = "#"; - table[(int)StandardCharCode.mathplus] = "+"; - table[(int)StandardCharCode.mathtilde] = "~"; - table[(int)StandardCharCode.minus] = "-"; - table[(int)StandardCharCode.mu] = "u"; - table[(int)StandardCharCode.multiply] = "x"; - table[(int)StandardCharCode.nobrkhyphen] = "-"; - table[(int)StandardCharCode.nobrkspace] = ""; - table[(int)StandardCharCode.notequal] = "!="; - table[(int)StandardCharCode.oe] = "oe"; - table[(int)StandardCharCode.onehalf] = "1/2"; - table[(int)StandardCharCode.onequarter] = "1/4"; - table[(int)StandardCharCode.periodcentered] = "."; - table[(int)StandardCharCode.plusminus] = "+/-"; - table[(int)StandardCharCode.quotedblbase] = ",,"; - table[(int)StandardCharCode.quotedblleft] = "\""; - table[(int)StandardCharCode.quotedblright] = "\""; - table[(int)StandardCharCode.quotesinglbase] = ","; - table[(int)StandardCharCode.registered] = "reg."; - table[(int)StandardCharCode.registersans] = "reg."; - table[(int)StandardCharCode.threequarters] = "3/4"; - table[(int)StandardCharCode.tilde] = "~"; - table[(int)StandardCharCode.trademark] = "(TM)"; - table[(int)StandardCharCode.trademarksans] = "(TM)"; - - table[(int)StandardCharCode.aacute] = "\xE0"; - table[(int)StandardCharCode.questiondown] = "\xBF"; - - table[(int)StandardCharCode.udieresis] = "\xFC"; - table[(int)StandardCharCode.Udieresis] = "\xDC"; - table[(int)StandardCharCode.odieresis] = "\xF6"; - table[(int)StandardCharCode.Odieresis] = "\xD6"; - */ - - table [(int) StandardCharCode.formula] = "\x6"; - table [(int) StandardCharCode.nobrkhyphen] = "\x1e"; - table [(int) StandardCharCode.opthyphen] = "\x1f"; - table [(int) StandardCharCode.space] = " "; - table [(int) StandardCharCode.exclam] = "!"; - table [(int) StandardCharCode.quotedbl] = "\""; - table [(int) StandardCharCode.numbersign] = "#"; - table [(int) StandardCharCode.dollar] = "$"; - table [(int) StandardCharCode.percent] = "%"; - table [(int) StandardCharCode.ampersand] = "&"; - table [(int) StandardCharCode.parenleft] = "("; - table [(int) StandardCharCode.parenright] = ")"; - table [(int) StandardCharCode.asterisk] = "*"; - table [(int) StandardCharCode.plus] = "+"; - table [(int) StandardCharCode.comma] = ","; - table [(int) StandardCharCode.hyphen] = "-"; - table [(int) StandardCharCode.period] = "."; - table [(int) StandardCharCode.slash] = "/"; - table [(int) StandardCharCode.zero] = "0"; - table [(int) StandardCharCode.one] = "1"; - table [(int) StandardCharCode.two] = "2"; - table [(int) StandardCharCode.three] = "3"; - table [(int) StandardCharCode.four] = "4"; - table [(int) StandardCharCode.five] = "5"; - table [(int) StandardCharCode.six] = "6"; - table [(int) StandardCharCode.seven] = "7"; - table [(int) StandardCharCode.eight] = "8"; - table [(int) StandardCharCode.nine] = "9"; - table [(int) StandardCharCode.colon] = ":"; - table [(int) StandardCharCode.semicolon] = ";"; - table [(int) StandardCharCode.less] = "<"; - table [(int) StandardCharCode.equal] = "="; - table [(int) StandardCharCode.greater] = ">"; - table [(int) StandardCharCode.question] = "?"; - table [(int) StandardCharCode.at] = "@"; - table [(int) StandardCharCode.A] = "A"; - table [(int) StandardCharCode.B] = "B"; - table [(int) StandardCharCode.C] = "C"; - table [(int) StandardCharCode.D] = "D"; - table [(int) StandardCharCode.E] = "E"; - table [(int) StandardCharCode.F] = "F"; - table [(int) StandardCharCode.G] = "G"; - table [(int) StandardCharCode.H] = "H"; - table [(int) StandardCharCode.I] = "I"; - table [(int) StandardCharCode.J] = "J"; - table [(int) StandardCharCode.K] = "K"; - table [(int) StandardCharCode.L] = "L"; - table [(int) StandardCharCode.M] = "M"; - table [(int) StandardCharCode.N] = "N"; - table [(int) StandardCharCode.O] = "O"; - table [(int) StandardCharCode.P] = "P"; - table [(int) StandardCharCode.Q] = "Q"; - table [(int) StandardCharCode.R] = "R"; - table [(int) StandardCharCode.S] = "S"; - table [(int) StandardCharCode.T] = "T"; - table [(int) StandardCharCode.U] = "U"; - table [(int) StandardCharCode.V] = "V"; - table [(int) StandardCharCode.W] = "W"; - table [(int) StandardCharCode.X] = "X"; - table [(int) StandardCharCode.Y] = "Y"; - table [(int) StandardCharCode.Z] = "Z"; - table [(int) StandardCharCode.bracketleft] = "["; - table [(int) StandardCharCode.backslash] = "\\"; - table [(int) StandardCharCode.bracketright] = "]"; - table [(int) StandardCharCode.asciicircum] = "^"; - table [(int) StandardCharCode.underscore] = "_"; - table [(int) StandardCharCode.quoteleft] = "`"; - table [(int) StandardCharCode.a] = "a"; - table [(int) StandardCharCode.b] = "b"; - table [(int) StandardCharCode.c] = "c"; - table [(int) StandardCharCode.d] = "d"; - table [(int) StandardCharCode.e] = "e"; - table [(int) StandardCharCode.f] = "f"; - table [(int) StandardCharCode.g] = "g"; - table [(int) StandardCharCode.h] = "h"; - table [(int) StandardCharCode.i] = "i"; - table [(int) StandardCharCode.j] = "j"; - table [(int) StandardCharCode.k] = "k"; - table [(int) StandardCharCode.l] = "l"; - table [(int) StandardCharCode.m] = "m"; - table [(int) StandardCharCode.n] = "n"; - table [(int) StandardCharCode.o] = "o"; - table [(int) StandardCharCode.p] = "p"; - table [(int) StandardCharCode.q] = "q"; - table [(int) StandardCharCode.r] = "r"; - table [(int) StandardCharCode.s] = "s"; - table [(int) StandardCharCode.t] = "t"; - table [(int) StandardCharCode.u] = "u"; - table [(int) StandardCharCode.v] = "v"; - table [(int) StandardCharCode.w] = "w"; - table [(int) StandardCharCode.x] = "x"; - table [(int) StandardCharCode.y] = "y"; - table [(int) StandardCharCode.z] = "z"; - table [(int) StandardCharCode.braceleft] = "{"; - table [(int) StandardCharCode.bar] = "|"; - table [(int) StandardCharCode.braceright] = "}"; - table [(int) StandardCharCode.asciitilde] = "~"; - table [(int) StandardCharCode.nobrkspace] = "\xa0"; - table [(int) StandardCharCode.exclamdown] = "\xa1"; - table [(int) StandardCharCode.cent] = "\xa2"; - table [(int) StandardCharCode.sterling] = "\xa3"; - table [(int) StandardCharCode.currency] = "\xa4"; - table [(int) StandardCharCode.yen] = "\xa5"; - table [(int) StandardCharCode.brokenbar] = "\xa6"; - table [(int) StandardCharCode.section] = "\xa7"; - table [(int) StandardCharCode.dieresis] = "\xa8"; - table [(int) StandardCharCode.copyright] = "\xa9"; - table [(int) StandardCharCode.ordfeminine] = "\xaa"; - table [(int) StandardCharCode.guillemotleft] = "\xab"; - table [(int) StandardCharCode.logicalnot] = "\xac"; - table [(int) StandardCharCode.opthyphen] = "\xad"; - table [(int) StandardCharCode.registered] = "\xae"; - table [(int) StandardCharCode.macron] = "\xaf"; - table [(int) StandardCharCode.degree] = "\xb0"; - table [(int) StandardCharCode.plusminus] = "\xb1"; - table [(int) StandardCharCode.twosuperior] = "\xb2"; - table [(int) StandardCharCode.threesuperior] = "\xb3"; - table [(int) StandardCharCode.acute] = "\xb4"; - table [(int) StandardCharCode.mu] = "\xb5"; - table [(int) StandardCharCode.paragraph] = "\xb6"; - table [(int) StandardCharCode.periodcentered] = "\xb7"; - table [(int) StandardCharCode.cedilla] = "\xb8"; - table [(int) StandardCharCode.onesuperior] = "\xb9"; - table [(int) StandardCharCode.ordmasculine] = "\xba"; - table [(int) StandardCharCode.guillemotright] = "\xbb"; - table [(int) StandardCharCode.onequarter] = "\xbc"; - table [(int) StandardCharCode.onehalf] = "\xbd"; - table [(int) StandardCharCode.threequarters] = "\xbe"; - table [(int) StandardCharCode.questiondown] = "\xbf"; - table [(int) StandardCharCode.Agrave] = "\xc0"; - table [(int) StandardCharCode.Aacute] = "\xc1"; - table [(int) StandardCharCode.Acircumflex] = "\xc2"; - table [(int) StandardCharCode.Atilde] = "\xc3"; - table [(int) StandardCharCode.Adieresis] = "\xc4"; - table [(int) StandardCharCode.Aring] = "\xc5"; - table [(int) StandardCharCode.AE] = "\xc6"; - table [(int) StandardCharCode.Ccedilla] = "\xc7"; - table [(int) StandardCharCode.Egrave] = "\xc8"; - table [(int) StandardCharCode.Eacute] = "\xc9"; - table [(int) StandardCharCode.Ecircumflex] = "\xca"; - table [(int) StandardCharCode.Edieresis] = "\xcb"; - table [(int) StandardCharCode.Igrave] = "\xcc"; - table [(int) StandardCharCode.Iacute] = "\xcd"; - table [(int) StandardCharCode.Icircumflex] = "\xce"; - table [(int) StandardCharCode.Idieresis] = "\xcf"; - table [(int) StandardCharCode.Eth] = "\xd0"; - table [(int) StandardCharCode.Ntilde] = "\xd1"; - table [(int) StandardCharCode.Ograve] = "\xd2"; - table [(int) StandardCharCode.Oacute] = "\xd3"; - table [(int) StandardCharCode.Ocircumflex] = "\xd4"; - table [(int) StandardCharCode.Otilde] = "\xd5"; - table [(int) StandardCharCode.Odieresis] = "\xd6"; - table [(int) StandardCharCode.multiply] = "\xd7"; - table [(int) StandardCharCode.Oslash] = "\xd8"; - table [(int) StandardCharCode.Ugrave] = "\xd9"; - table [(int) StandardCharCode.Uacute] = "\xda"; - table [(int) StandardCharCode.Ucircumflex] = "\xdb"; - table [(int) StandardCharCode.Udieresis] = "\xdc"; - table [(int) StandardCharCode.Yacute] = "\xdd"; - table [(int) StandardCharCode.Thorn] = "\xde"; - table [(int) StandardCharCode.germandbls] = "\xdf"; - table [(int) StandardCharCode.agrave] = "\xe0"; - table [(int) StandardCharCode.aacute] = "\xe1"; - table [(int) StandardCharCode.acircumflex] = "\xe2"; - table [(int) StandardCharCode.atilde] = "\xe3"; - table [(int) StandardCharCode.adieresis] = "\xe4"; - table [(int) StandardCharCode.aring] = "\xe5"; - table [(int) StandardCharCode.ae] = "\xe6"; - table [(int) StandardCharCode.ccedilla] = "\xe7"; - table [(int) StandardCharCode.egrave] = "\xe8"; - table [(int) StandardCharCode.eacute] = "\xe9"; - table [(int) StandardCharCode.ecircumflex] = "\xea"; - table [(int) StandardCharCode.edieresis] = "\xeb"; - table [(int) StandardCharCode.igrave] = "\xec"; - table [(int) StandardCharCode.iacute] = "\xed"; - table [(int) StandardCharCode.icircumflex] = "\xee"; - table [(int) StandardCharCode.idieresis] = "\xef"; - table [(int) StandardCharCode.eth] = "\xf0"; - table [(int) StandardCharCode.ntilde] = "\xf1"; - table [(int) StandardCharCode.ograve] = "\xf2"; - table [(int) StandardCharCode.oacute] = "\xf3"; - table [(int) StandardCharCode.ocircumflex] = "\xf4"; - table [(int) StandardCharCode.otilde] = "\xf5"; - table [(int) StandardCharCode.odieresis] = "\xf6"; - table [(int) StandardCharCode.divide] = "\xf7"; - table [(int) StandardCharCode.oslash] = "\xf8"; - table [(int) StandardCharCode.ugrave] = "\xf9"; - table [(int) StandardCharCode.uacute] = "\xfa"; - table [(int) StandardCharCode.ucircumflex] = "\xfb"; - table [(int) StandardCharCode.udieresis] = "\xfc"; - table [(int) StandardCharCode.yacute] = "\xfd"; - table [(int) StandardCharCode.thorn] = "\xfe"; - table [(int) StandardCharCode.ydieresis] = "\xff"; - - } - #endregion // Public Static Methods - } -} diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Default/LabelPainter.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Default/LabelPainter.cs index 221a09c260..ca35cf6e97 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Default/LabelPainter.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Default/LabelPainter.cs @@ -40,6 +40,8 @@ namespace System.Windows.Forms.Theming.Default label.DrawImage (dc, label.Image, rect, label.ImageAlign); + rect.Height = Math.Max(rect.Height, label.Font.Height); + if (label.Enabled) { dc.DrawString (label.Text, label.Font, ThemeEngine.Current.ResPool.GetSolidBrush (label.ForeColor), diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.dll.sources b/mcs/class/System.Windows.Forms/System.Windows.Forms.dll.sources index 0655e69127..235dd61bed 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.dll.sources +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.dll.sources @@ -29,9 +29,7 @@ System.Windows.Forms.Design/WindowsFormsComponentEditor.cs System.Windows.Forms.Internal/Accessor.cs System.Windows.Forms.Internal/DebugHelper.cs System.Windows.Forms.PropertyGridInternal/PropertiesTab.cs -System.Windows.Forms.RTF/Charcode.cs -System.Windows.Forms.RTF/Charset.cs -System.Windows.Forms.RTF/CharsetFlags.cs +System.Windows.Forms.RTF/CharsetToCodepage.cs System.Windows.Forms.RTF/CharsetType.cs System.Windows.Forms.RTF/ClassDelegate.cs System.Windows.Forms.RTF/Color.cs @@ -44,12 +42,9 @@ System.Windows.Forms.RTF/Minor.cs System.Windows.Forms.RTF/Picture.cs System.Windows.Forms.RTF/RTF.cs System.Windows.Forms.RTF/RTFException.cs -System.Windows.Forms.RTF/StandardCharCode.cs -System.Windows.Forms.RTF/StandardCharName.cs System.Windows.Forms.RTF/Style.cs System.Windows.Forms.RTF/StyleElement.cs System.Windows.Forms.RTF/StyleType.cs -System.Windows.Forms.RTF/TextMap.cs System.Windows.Forms.RTF/TokenClass.cs System.Windows.Forms.Theming/Default/LabelPainter.cs System.Windows.Forms.Theming/Default/LinkLabelPainter.cs @@ -657,6 +652,7 @@ System.Windows.Forms/TableLayoutRowStyleCollection.cs System.Windows.Forms/TableLayoutSettings.cs System.Windows.Forms/TableLayoutStyle.cs System.Windows.Forms/TableLayoutStyleCollection.cs +System.Windows.Forms/TabStops.cs System.Windows.Forms/TextBox.cs System.Windows.Forms/TextBoxBase.cs System.Windows.Forms/TextBoxRenderer.cs diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/Button.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/Button.cs index 829c55012f..fee7fb5d79 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/Button.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/Button.cs @@ -92,14 +92,16 @@ namespace System.Windows.Forms { #region Protected Methods protected override void OnClick (EventArgs e) { - if (dialog_result != DialogResult.None) { - Form p = FindForm (); - - if (p != null) + Form p = FindForm (); + if (p != null) { + p.dialog_result_changed = false; // manages the case where the DialogResult of the form is overriden in the button click event. + base.OnClick (e); + if (dialog_result != DialogResult.None && !p.dialog_result_changed) { p.DialogResult = dialog_result; + } + } else { + base.OnClick (e); } - - base.OnClick (e); } protected override void OnFontChanged (EventArgs e) diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ComboBox.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/ComboBox.cs index e807b71190..4d0b4010a4 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ComboBox.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ComboBox.cs @@ -1695,7 +1695,7 @@ namespace System.Windows.Forms } } - void SetSelectedIndex (int value, bool supressAutoScroll) + void SetSelectedIndex (int value, bool supressAutoScroll, bool triggerEvents = true) { if (selected_index == value) return; @@ -1718,9 +1718,11 @@ namespace System.Windows.Forms if (listbox_ctrl != null) listbox_ctrl.HighlightedIndex = value; - OnSelectedValueChanged (EventArgs.Empty); - OnSelectedIndexChanged (EventArgs.Empty); - OnSelectedItemChanged (EventArgs.Empty); + if (triggerEvents) { + OnSelectedValueChanged (EventArgs.Empty); + OnSelectedIndexChanged (EventArgs.Empty); + OnSelectedItemChanged (EventArgs.Empty); + } } // If no item is currently selected, and an item is found matching the text @@ -2134,9 +2136,7 @@ namespace System.Windows.Forms throw new ArgumentOutOfRangeException ("index"); if (index < owner.SelectedIndex) - --owner.SelectedIndex; - else if (index == owner.SelectedIndex) - owner.SelectedIndex = -1; + owner.SetSelectedIndex (owner.SelectedIndex - 1, false, false); object removed = object_items [index]; diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ContextMenuStrip.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/ContextMenuStrip.cs index 1df14883d0..c95804739f 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ContextMenuStrip.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ContextMenuStrip.cs @@ -35,27 +35,23 @@ namespace System.Windows.Forms [DefaultEvent ("Opening")] public class ContextMenuStrip : ToolStripDropDownMenu { - Control source_control; - internal Control container; + internal Control AssociatedControl; #region Public Construtors public ContextMenuStrip () : base () { - source_control = null; } - public ContextMenuStrip (IContainer container) : base () + public ContextMenuStrip (IContainer container) : this () { - source_control = null; + // TODO: handle `container` argument } #endregion #region Public Properties [Browsable (false)] [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] - public Control SourceControl { - get { return this.source_control; } - } + public Control SourceControl { get; protected set; } #endregion #region Protected Methods @@ -70,11 +66,12 @@ namespace System.Windows.Forms if (visible) XplatUI.SetTopmost (this.Handle, true); } - #endregion - internal void SetSourceControl (Control source_control) + protected override void SetOwnerControl (Control control) { - container = this.source_control = source_control; + base.SetOwnerControl (control); + SourceControl = control; } + #endregion } } diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs.REMOVED.git-id b/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs.REMOVED.git-id index e3a7d37212..cfb83b8c0c 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs.REMOVED.git-id +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs.REMOVED.git-id @@ -1 +1 @@ -c92b7a7aae3d0a8d64af67e50cff065c9d7f8009 \ No newline at end of file +53f489d751ba00e713cb24672c38fc36bc72e602 \ No newline at end of file diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ControlPaint.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/ControlPaint.cs index 4004c1ec8e..5a933f1dc1 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ControlPaint.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ControlPaint.cs @@ -370,11 +370,11 @@ namespace System.Windows.Forms { ThemeEngine.Current.CPDrawContainerGrabHandle (graphics, bounds); } - public static void DrawFocusRectangle( Graphics graphics, Rectangle rectangle) { + public static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle) { DrawFocusRectangle(graphics, rectangle, SystemColors.Control, SystemColors.ControlText); } - public static void DrawFocusRectangle( Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor) { + public static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor) { ThemeEngine.Current.CPDrawFocusRectangle (graphics, rectangle, foreColor, backColor); } diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewImageCell.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewImageCell.cs index 9e7daa64ee..1c4dc0b7a7 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewImageCell.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewImageCell.cs @@ -108,6 +108,7 @@ namespace System.Windows.Forms { cell.defaultNewRowValue = this.defaultNewRowValue; cell.description = this.description; cell.valueIsIcon = this.valueIsIcon; + cell.imageLayout = this.imageLayout; return cell; } diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkCell.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkCell.cs index 5ad5379557..904ab9ca7f 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkCell.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkCell.cs @@ -56,6 +56,7 @@ namespace System.Windows.Forms clone.linkBehavior = this.linkBehavior; clone.visited_link_color = this.visited_link_color; clone.trackVisitedState = this.trackVisitedState; + clone.useColumnTextForLinkValue = this.useColumnTextForLinkValue; return clone; } diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkColumn.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkColumn.cs index d5ef3cdd21..2f98878ed9 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkColumn.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkColumn.cs @@ -77,7 +77,8 @@ namespace System.Windows.Forms throw new InvalidOperationException ("CellTemplate is null when getting this property."); template.ActiveLinkColor = value; - + if (DataGridView == null) + return; foreach (DataGridViewRow row in DataGridView.Rows) { DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell; if (cell != null) @@ -113,6 +114,8 @@ namespace System.Windows.Forms throw new InvalidOperationException ("CellTemplate is null when getting this property."); template.LinkBehavior = value; + if (DataGridView == null) + return; foreach (DataGridViewRow row in DataGridView.Rows) { DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell; @@ -137,6 +140,8 @@ namespace System.Windows.Forms if (template == null) throw new InvalidOperationException ("CellTemplate is null when getting this property."); template.LinkColor = value; + if (DataGridView == null) + return; foreach (DataGridViewRow row in DataGridView.Rows) { DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell; @@ -150,20 +155,20 @@ namespace System.Windows.Forms [DefaultValue ((string) null)] public string Text { get { - DataGridViewLinkCell template = CellTemplate as DataGridViewLinkCell; - if (template == null) - throw new InvalidOperationException ("CellTemplate is null when getting this property."); return text; } set { if (this.Text == value) return; - DataGridViewLinkCell template = CellTemplate as DataGridViewLinkCell; - if (template == null) - throw new InvalidOperationException ("CellTemplate is null when getting this property."); - //TODO : sets the Text property of every cell in the column - //TODO only if UseColumnTextForLinkValue is true text = value; + if (DataGridView == null) + return; + foreach (DataGridViewRow row in DataGridView.Rows) + { + DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell; + if (cell != null && cell.UseColumnTextForLinkValue) + cell.Value = value; + } DataGridView.InvalidateColumn (Index); } } @@ -184,6 +189,8 @@ namespace System.Windows.Forms if (template == null) throw new InvalidOperationException ("CellTemplate is null when getting this property."); template.TrackVisitedState = value; + if (DataGridView == null) + return; foreach (DataGridViewRow row in DataGridView.Rows) { DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell; @@ -210,6 +217,8 @@ namespace System.Windows.Forms if (template == null) throw new InvalidOperationException ("CellTemplate is null when getting this property."); template.UseColumnTextForLinkValue = value; + if (DataGridView == null) + return; foreach (DataGridViewRow row in DataGridView.Rows) { DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell; @@ -235,6 +244,8 @@ namespace System.Windows.Forms if (template == null) throw new InvalidOperationException ("CellTemplate is null when getting this property."); template.VisitedLinkColor = value; + if (DataGridView == null) + return; foreach (DataGridViewRow row in DataGridView.Rows) { DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell; diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs index 329736ffb8..fcd9541602 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs @@ -102,6 +102,7 @@ namespace System.Windows.Forms { private bool autoscale_base_size_set; internal ArrayList disabled_by_showdialog = new ArrayList(); internal static ArrayList modal_dialogs = new ArrayList(); + internal bool dialog_result_changed; #endregion // Local Variables #region Private & Internal Methods @@ -200,7 +201,11 @@ namespace System.Windows.Forms { internal override void UpdateWindowText () { + var old_clientsize = ClientSize; + if (!IsHandleCreated) { + if (is_clientsize_set) + ClientSize = old_clientsize; return; } @@ -212,6 +217,9 @@ namespace System.Windows.Forms { } XplatUI.Text (Handle, Text.Replace (Environment.NewLine, string.Empty)); + + if (ClientSize != old_clientsize) + ClientSize = old_clientsize; } internal void SelectActiveControl () @@ -235,7 +243,7 @@ namespace System.Windows.Forms { this.is_visible = visible; } else { - Select (ActiveControl); + SendControlFocus (ActiveControl); } } @@ -595,7 +603,7 @@ namespace System.Windows.Forms { set { if (control_box != value) { control_box = value; - UpdateStyles(); + UpdateFormStyles(); } } } @@ -637,6 +645,7 @@ namespace System.Windows.Forms { typeof (DialogResult)); dialog_result = value; + dialog_result_changed = true; if (dialog_result != DialogResult.None && is_modal) RaiseCloseEvents (false, false); // .Net doesn't send WM_CLOSE here. } @@ -660,15 +669,10 @@ namespace System.Windows.Forms { window_manager.UpdateBorderStyle (value); } - Size current_client_size = ClientSize; - UpdateStyles(); + UpdateFormStyles(); - if (this.IsHandleCreated) { - this.Size = InternalSizeFromClientSize (current_client_size); + if (this.IsHandleCreated) XplatUI.InvalidateNC (this.Handle); - } else if (is_clientsize_set) { - this.Size = InternalSizeFromClientSize (current_client_size); - } } } @@ -1097,6 +1101,8 @@ namespace System.Windows.Forms { XplatUI.SetOwner(this.window.Handle, IntPtr.Zero); } } + // UIA Framework: Raises internal event + OnUIAOwnerChanged (); } } } @@ -1120,7 +1126,7 @@ namespace System.Windows.Forms { set { if (this.show_icon != value ) { this.show_icon = value; - UpdateStyles (); + UpdateFormStyles (); if (IsHandleCreated) { XplatUI.SetIcon (this.Handle, value == true ? this.Icon : null); @@ -2193,7 +2199,7 @@ namespace System.Windows.Forms { if (keyData == Keys.Enter) { IntPtr window = XplatUI.GetFocus (); Control c = Control.FromHandle (window); - if (c is Button && c.FindForm () == this) { + if (c is Button && c.Visible && c.Enabled && c.FindForm () == this) { ((Button)c).PerformClick (); return true; } @@ -2890,6 +2896,13 @@ namespace System.Windows.Forms { is_loaded = true; } + private void UpdateFormStyles() { + var old_clientsize = ClientSize; + UpdateStyles(); + if ((!IsHandleCreated && is_clientsize_set) || ClientSize != old_clientsize) + ClientSize = old_clientsize; + } + private void UpdateMinMax() { var min_size = AutoSize ? new Size (Math.Max (minimum_auto_size.Width, minimum_size.Width), Math.Max (minimum_auto_size.Height, minimum_size.Height)) : minimum_size; @@ -3200,6 +3213,7 @@ namespace System.Windows.Forms { static object UIAMenuChangedEvent = new object (); static object UIATopMostChangedEvent = new object (); static object UIAWindowStateChangedEvent = new object (); + static object UIAOwnerChangedEvent = new object (); internal event EventHandler UIAMenuChanged { add { Events.AddHandler (UIAMenuChangedEvent, value); } @@ -3216,6 +3230,11 @@ namespace System.Windows.Forms { remove { Events.RemoveHandler (UIAWindowStateChangedEvent, value); } } + internal event EventHandler UIAOwnerChanged { + add { Events.AddHandler (UIAOwnerChangedEvent, value); } + remove { Events.RemoveHandler (UIAOwnerChangedEvent, value); } + } + internal void OnUIAMenuChanged (EventArgs e) { EventHandler eh = (EventHandler) Events [UIAMenuChangedEvent]; @@ -3236,6 +3255,13 @@ namespace System.Windows.Forms { if (eh != null) eh (this, EventArgs.Empty); } + + internal void OnUIAOwnerChanged () + { + EventHandler eh = (EventHandler) Events [UIAOwnerChangedEvent]; + if (eh != null) + eh (this, EventArgs.Empty); + } #endregion // UIA Framework Events #endregion // Events } diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/GroupBox.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/GroupBox.cs index c047a77ebf..02bbd3ca9e 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/GroupBox.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/GroupBox.cs @@ -307,28 +307,12 @@ namespace System.Windows.Forms #region Internal Methods internal override Size GetPreferredSizeCore (Size proposedSize) { - Size retsize = new Size (Padding.Left, Padding.Top); - - foreach (Control child in Controls) { - if (child.Dock == DockStyle.Fill) { - if (child.Bounds.Right > retsize.Width) - retsize.Width = child.Bounds.Right; - } else if (child.Dock != DockStyle.Top && child.Dock != DockStyle.Bottom && (child.Bounds.Right + child.Margin.Right) > retsize.Width) - retsize.Width = child.Bounds.Right + child.Margin.Right; - - if (child.Dock == DockStyle.Fill) { - if (child.Bounds.Bottom > retsize.Height) - retsize.Height = child.Bounds.Bottom; - } else if (child.Dock != DockStyle.Left && child.Dock != DockStyle.Right && (child.Bounds.Bottom + child.Margin.Bottom) > retsize.Height) - retsize.Height = child.Bounds.Bottom + child.Margin.Bottom; - } - - retsize.Width += Padding.Right; - retsize.Height += Padding.Bottom; - - retsize.Height += this.Font.Height; - - return retsize; + // (Copied from Panel) + // Translating 0, 0 from ClientSize to actual Size tells us how much space + // is required for the borders. + Size borderSize = SizeFromClientSize(Size.Empty); + Size totalPadding = borderSize + Padding.Size; + return LayoutEngine.GetPreferredSize(this, proposedSize - totalPadding) + totalPadding; } #endregion diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/Line.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/Line.cs index d169d9adfd..f7f063a8b7 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/Line.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/Line.cs @@ -21,6 +21,7 @@ // // Authors: // Peter Bartok pbartok@novell.com +// Karl Scowen // // @@ -44,14 +45,20 @@ namespace System.Windows.Forms internal int line_no; // Line number internal LineTag tags; // Tags describing the text internal int offset; // Baseline can be on the X or Y axis depending if we are in multiline mode or not - internal int height; // Height of the line (height of tallest tag) - internal int ascent; // Ascent of the line (ascent of the tallest tag) + internal int height; // Total height of the line, including TotalParagraphSpacing and LineSpacing + private int textHeight; // Height of the line without spacing. + internal int ascent; // Ascent of the line (highest distance above the baseline, including character offset) internal HorizontalAlignment alignment; // Alignment of the line internal int align_shift; // Pixel shift caused by the alignment - internal int indent; // Left indent for the first line - internal int hanging_indent; // Hanging indent (left indent for all but the first line) - internal int right_indent; // Right indent for all lines + internal float indent; // Left indent for the first line + internal float hanging_indent; // Hanging indent (difference between first line indent and other lines) + internal float right_indent; // Right indent for all lines internal LineEnding ending; + internal float spacing_before; + internal float spacing_after; + internal float line_spacing; + internal bool line_spacing_multiple; + internal TabStopCollection tab_stops; // Custom tabstops for this paragraph. // Stuff that's important for the tree internal Line parent; // Our parent line @@ -86,10 +93,11 @@ namespace System.Windows.Forms text = new StringBuilder (Text, space); line_no = LineNo; this.ending = ending; + tab_stops = new TabStopCollection(); widths = new float[space + 1]; - + tags = new LineTag(this, 1); tags.Font = font; tags.Color = color; @@ -103,6 +111,7 @@ namespace System.Windows.Forms line_no = LineNo; this.ending = ending; alignment = align; + tab_stops = new TabStopCollection(); widths = new float[space + 1]; @@ -112,6 +121,38 @@ namespace System.Windows.Forms tags.Color = color; } + internal Line (Document document, int LineNo, string Text, HorizontalAlignment align, Font font, Color color, + Color back_color, TextPositioning text_position, float char_offset, float left_indent, float hanging_indent, + float right_indent, float spacing_before, float spacing_after, float line_spacing, bool line_spacing_multiple, + TabStopCollection tab_stops, bool visible, LineEnding ending) : this(document, ending) + { + space = Text.Length > DEFAULT_TEXT_LEN ? Text.Length+1 : DEFAULT_TEXT_LEN; + + text = new StringBuilder (Text, space); + line_no = LineNo; + this.ending = ending; + alignment = align; + indent = left_indent; + HangingIndent = hanging_indent; + this.right_indent = right_indent; + this.spacing_before = spacing_before; + this.spacing_after = spacing_after; + this.tab_stops = tab_stops; + this.line_spacing = line_spacing; + this.line_spacing_multiple = line_spacing_multiple; + + widths = new float[space + 1]; + + + tags = new LineTag(this, 1); + tags.Font = font; + tags.Color = color; + tags.BackColor = back_color; + tags.TextPosition = text_position; + tags.CharOffset = char_offset; + tags.Visible = visible; + } + internal Line (Document document, int LineNo, string Text, LineTag tag, LineEnding ending) : this(document, ending) { space = Text.Length > DEFAULT_TEXT_LEN ? Text.Length+1 : DEFAULT_TEXT_LEN; @@ -137,10 +178,10 @@ namespace System.Windows.Forms } } - internal int HangingIndent { + internal float HangingIndent { get { return hanging_indent; } set { - hanging_indent = value; + this.hanging_indent = value; recalc = true; } } @@ -151,7 +192,63 @@ namespace System.Windows.Forms set { height = value; } } - internal int Indent { + internal int TextHeight { + get { + return textHeight; + } + } + + internal TabStopCollection TabStops { + get { return tab_stops; } + set { tab_stops = value; } + } + + internal float TotalParagraphSpacing { + get { + return SpacingBefore + SpacingAfter; + } + } + + internal float LineSpacing { + get { + if (textHeight == 0) { + throw new InvalidOperationException("Can't get LineSpacing when the line height isn't calculated!"); + } + if (line_spacing < 0) { + return -line_spacing; + } else if (line_spacing_multiple) { + return line_spacing * textHeight * 6f / document.Dpi; + } else { + return Math.Max(line_spacing, textHeight); + } + } + } + + internal float SpacingBefore { + get { + bool has_spacing = true; + if (line_no > 1) { + Line previous_line = document.GetLine(line_no - 1); + if (previous_line != null && (previous_line.ending == LineEnding.Wrap || previous_line.ending == LineEnding.None)) + has_spacing = false; + } + if (has_spacing) + return spacing_before; + else + return 0; + } + } + + internal float SpacingAfter { + get { + if (ending == LineEnding.Wrap) + return 0; + else + return spacing_after; + } + } + + internal float Indent { get { return indent; } set { indent = value; @@ -164,7 +261,7 @@ namespace System.Windows.Forms set { line_no = value; } } - internal int RightIndent { + internal float RightIndent { get { return right_indent; } set { right_indent = value; @@ -254,7 +351,7 @@ namespace System.Windows.Forms return; // Find the first tag that we are deleting from - tag = FindTag (pos + 1); + tag = FindTag (pos); // Remove the characters from the line text.Remove (pos, count); @@ -271,10 +368,10 @@ namespace System.Windows.Forms left = count; left -= tag.Start + tag.Length - pos - 1; - tag = tag.Next; // Update the start of each tag - while ((tag != null) && (left > 0)) { + while ((tag.Next != null) && (left > 0)) { + tag = tag.Next; // Cache tag.Length as is will be indireclty modified // by changes to tag.Start int tag_length = tag.Length; @@ -284,7 +381,6 @@ namespace System.Windows.Forms left = 0; } else { left -= tag_length; - tag = tag.Next; } } @@ -295,15 +391,7 @@ namespace System.Windows.Forms streamline = true; } - // Delete empty orphaned tags at the end LineTag walk = tag; - while (walk != null && walk.Next != null && walk.Next.Length == 0) { - LineTag t = walk; - walk.Next = walk.Next.Next; - if (walk.Next != null) - walk.Next.Previous = t; - walk = walk.Next; - } // Adjust the start point of any tags following if (tag != null) { @@ -314,6 +402,15 @@ namespace System.Windows.Forms } } + // Delete empty orphaned tags at the end. Do this after adjusting their starts, otherwise we might delete tags that acutally do have content. + while (walk != null && walk.Next != null && walk.Next.Length == 0) { + LineTag t = walk; + walk.Next = walk.Next.Next; + if (walk.Next != null) + walk.Next.Previous = t; + walk = walk.Next; + } + recalc = true; if (streamline) @@ -361,7 +458,7 @@ namespace System.Windows.Forms pos = text.Length - 1; while (tag != null) { - if (((tag.Start - 1) <= pos) && (pos <= (tag.Start + tag.Length - 1))) + if (((tag.Start - 1) <= pos) && (pos < (tag.Start + tag.Length - 1))) return LineTag.GetFinalTag (tag); tag = tag.Next; @@ -434,6 +531,33 @@ namespace System.Windows.Forms // Insert the text into the StringBuilder text.Insert (pos, s); + // Check that tag is still in use in the line. If not, then we choose the last tag at that position. + LineTag t = tags; + while (t != null) { + if (((t.Start - 1) <= pos) && (pos < (t.End - 1) || (pos == t.End - 1 && t.Length == 0))) { + // found the location + bool foundTag = false; + while (pos < (t.Start + t.Length - 1)) { + if (t == tag) { + foundTag = true; + break; + } + if (t.Next == null) + break; + t = t.Next; + } + if (!foundTag) { + if (pos < (t.Start + t.Length - 1)) { + tag = t.Previous; + } else { + tag = t; + } + } + break; + } + t = t.Next; + } + // Update the start position of every tag after this one tag = tag.Next; @@ -454,56 +578,95 @@ namespace System.Windows.Forms /// returns true if lineheight changed /// internal bool RecalculateLine (Graphics g, Document doc) - { - return RecalculateLine (g, doc, kerning_fonts.ContainsKey (tags.Font.GetHashCode ())); - } - - private bool RecalculateLine (Graphics g, Document doc, bool handleKerning) { LineTag tag; int pos; int len; + Font currentFont; + int currentFontStart; SizeF size; float w; int prev_offset; bool retval; bool wrapped; + bool first_in_para; Line line; int wrap_pos; + int prev_wrap_pos; int prev_height; int prev_ascent; - float add_width; + float prev_spacing_before; + int max_above_baseline; + int max_below_baseline; + int total_ascent; + int total_descent; + TabStop lastTab; + int lastTabPos; + char c; + bool handleKerning; + float right_indent; pos = 0; len = this.text.Length; + currentFont = tags.FontToDisplay; + currentFontStart = 0; tag = this.tags; prev_offset = this.offset; // For drawing optimization calculations prev_height = this.height; prev_ascent = this.ascent; + prev_spacing_before = this.SpacingBefore; + max_above_baseline = 0; + max_below_baseline = 0; + total_ascent = 0; + total_descent = 0; + lastTab = null; + lastTabPos = 0; this.height = 0; // Reset line height this.ascent = 0; // Reset the ascent for the line tag.Shift = 0; // Reset shift (which should be stored as pixels, not as points) + right_indent = Math.Max(this.right_indent, 0); // Ignore any negative right indent. - if (ending == LineEnding.Wrap) - widths[0] = document.left_margin + hanging_indent; + if (line_no > 0) { + line = doc.GetLine (LineNo - 1); + first_in_para = line != null && line.ending != LineEnding.Wrap; + } else { + first_in_para = true; + } + + if (first_in_para) + widths [0] = indent; else - widths[0] = document.left_margin + indent; + widths [0] = indent + hanging_indent; + + if (widths [0] < 0) + widths [0] = 0; // Don't allow a negative indent to take the line to a negative position. + + widths [0] += document.left_margin; this.recalc = false; retval = false; wrapped = false; wrap_pos = 0; - add_width = 0; + prev_wrap_pos = 0; + + handleKerning = kerning_fonts.ContainsKey (currentFont.GetHashCode ()); while (pos < len) { - while (tag.Length == 0) { // We should always have tags after a tag.length==0 unless len==0 //tag.Ascent = 0; - tag.Shift = (tag.Line.ascent - tag.Ascent) / 72; + tag.Shift = (tag.Line.ascent - tag.Ascent); // / 72; tag = tag.Next; + if (tag.Length != 0 && tag.FontToDisplay != currentFont) { + CheckKerning (g, currentFont, currentFontStart, pos - currentFontStart); + currentFont = tag.FontToDisplay; + currentFontStart = pos; + handleKerning = kerning_fonts.ContainsKey (currentFont.GetHashCode ()); + } } + c = text [pos]; + // kerning is a problem. The original code in this method assumed that the // width of a string equals the sum of the widths of its characters. This is // not true when kerning takes place during the display process. Since it's @@ -520,44 +683,103 @@ namespace System.Windows.Forms // MeasureText doesn't measure trailing spaces, so we do the best we can for those // in the else branch. // It doesn't measure /t characters either, we need to add it manually with add_width. - size = TextBoxTextRenderer.MeasureText (g, text.ToString (0, pos + 1), tag.Font); - newWidth = widths[0] + size.Width + add_width; + size = TextBoxTextRenderer.MeasureText (g, text.ToString (currentFontStart, pos + 1 - currentFontStart), currentFont); + newWidth = widths [currentFontStart] + size.Width; } - else - { + else if (c != '\t') { size = tag.SizeOfPosition (g, pos); w = size.Width; newWidth = widths[pos] + w; - if (text[pos] == '\t') add_width += w; + } else { + CheckKerning (g, currentFont, currentFontStart, pos - currentFontStart); + currentFontStart = pos + 1; // Don't try handling the tab along with kerned text. + + if (lastTab != null) { + ProcessLastTab (lastTab, lastTabPos, pos); + lastTab = null; + } + + float l = widths [pos]; + w = -1; + for (int i = 0; i < tab_stops.Count; i++) { + if (tab_stops [i].Position > l) { + lastTab = tab_stops [i]; + lastTabPos = pos; + w = lastTab.GetInitialWidth (this, pos); + break; + } + } + + if (w < 0) { + w = tag.SizeOfPosition (g, pos).Width; + } + + newWidth = widths [pos] + w; } - if (Char.IsWhiteSpace (text[pos])) - wrap_pos = pos + 1; + if (doc.Wrap) { + // FIXME: Technically there are multiple no-break spaces, not just the main one. + if ((Char.IsWhiteSpace (c) && c != '\u00A0') || c == '-' || c == '\u2013' || c == '\u2014') { + // Primarily break on dashes or whitespace other than a no-break space. + prev_wrap_pos = wrap_pos; + if (c == '\t') { + wrap_pos = pos; // Wrap before tabs for some reason. + } else { + wrap_pos = pos + 1; + } + } - if (doc.wrap) { - if ((wrap_pos > 0) && (wrap_pos != len) && (newWidth + 5) > (doc.viewport_width - this.right_indent)) { - // Make sure to set the last width of the line before wrapping - widths[pos + 1] = newWidth; + if (newWidth > (doc.viewport_width - this.right_indent)) { + LineTag split_tag = null; + if (wrap_pos > 0) { + // Make sure to set the last width of the line before wrapping + widths [pos + 1] = newWidth; - pos = wrap_pos; - len = text.Length; - doc.Split (this, tag, pos); - ending = LineEnding.Wrap; - len = this.text.Length; + if (Char.IsWhiteSpace (c)) { + if (wrap_pos > pos) { + while (wrap_pos < text.Length && Char.IsWhiteSpace (text [wrap_pos]) && text [wrap_pos] != '\t') { + wrap_pos++; + } + pos++; + wrapped = true; + // don't try pulling more into this line, but keep looping to deal with the rest of the widths and tags + } + } else { + if (wrap_pos > pos && pos > 0) { + // We're at a dash (otherwise we'd be above), but don't have room to fit it in. + // Wrap at the previous wrap point if possible. + wrap_pos = prev_wrap_pos > 0 ? prev_wrap_pos : pos; + } + split_tag = tag; + pos = wrap_pos; + } + } else if (pos > 0) { + // No suitable wrap position was found so break right in the middle of a word - retval = true; - wrapped = true; - } else if (pos > 1 && newWidth > (doc.viewport_width - this.right_indent)) { - // No suitable wrap position was found so break right in the middle of a word + // Make sure to set the last width of the line before wrapping + widths [pos + 1] = newWidth; - // Make sure to set the last width of the line before wrapping - widths[pos + 1] = newWidth; + split_tag = tag; + } // Else don't wrap -- pos == 0, so we'd infinite loop adding blank lines before this. - doc.Split (this, tag, pos); - ending = LineEnding.Wrap; - len = this.text.Length; - retval = true; - wrapped = true; + if (split_tag != null) { + if (lastTab != null) { + ProcessLastTab (lastTab, lastTabPos, pos); + lastTab = null; + } + + while (pos < split_tag.Start) + split_tag = split_tag.Previous; + // We have to pass Split the correct tag, and that can change if pos + // is set somewhere before the tag change (e.g. by wrap_pos). + + doc.Split (this, split_tag, pos); + ending = LineEnding.Wrap; + len = this.text.Length; + + retval = true; + wrapped = true; + } } } @@ -569,12 +791,23 @@ namespace System.Windows.Forms if (pos == len) { line = doc.GetLine (this.line_no + 1); - if ((line != null) && (ending == LineEnding.Wrap || ending == LineEnding.None)) { - // Pull the two lines together - doc.Combine (this.line_no, this.line_no + 1); - len = this.text.Length; - retval = true; - } + do { + if ((line != null) && (ending == LineEnding.Wrap || ending == LineEnding.None) && + (widths[pos] < (doc.viewport_width - this.right_indent) || line.text.Length == 0)) { + // Pull the two lines together + // Only do this if the line isn't already full, or the next line is empty. + var h = this.height; // Back up h, because Combine sets it to zero. + doc.Combine (this, line); + this.height = h; // And restore it. There's no point starting at the start again. + // Document.Combine() called Line.Streamline(), so it is possible tag points a tag that got removed. + tag = FindTag (pos - 1); // So make sure we've got the correct tag. + len = this.text.Length; + line = doc.GetLine (this.line_no + 1); + retval = true; + } + } while ((ending == LineEnding.Wrap || ending == LineEnding.None) && line != null && line.text.Length == 0); + // If the next line is empty, do it again (if possible). + // The amount of room on this line doesn't matter when there's no text being added... } } @@ -582,54 +815,63 @@ namespace System.Windows.Forms // We just found the end of our current tag tag.Height = tag.MaxHeight (); - // Check if we're the tallest on the line (so far) - if (tag.Height > this.height) - this.height = tag.Height; // Yep; make sure the line knows + /* line.ascent is the highest point above the baseline. + * total_ascent will equal the maximum distance of the tag above the baseline. + * total_descent is needed to calculate the line height. + * tag.Shift does not include tag.CharOffset, because Shift puts the tag + * on the baseline, while CharOffset moves the baseline. + * However, we move the normal baseline when CharOffset is trying to push + * stuff off the top. + */ + total_ascent = tag.Ascent + (int)tag.CharOffset; + total_descent = tag.Descent - (int)tag.CharOffset; // gets bigger as CharOffset gets smaller + if (total_ascent > max_above_baseline) { + int moveBy = total_ascent - max_above_baseline; + max_above_baseline = total_ascent; - if (tag.Ascent > this.ascent) { - LineTag t; - - // We have a tag that has a taller ascent than the line; - t = tags; + LineTag t = tags; while (t != null && t != tag) { - t.Shift = (tag.Ascent - t.Ascent) / 72; + t.Shift += moveBy; t = t.Next; } - // Save on our line - this.ascent = tag.Ascent; + tag.Shift = (int)tag.CharOffset; + this.ascent = max_above_baseline; } else { - tag.Shift = (this.ascent - tag.Ascent) / 72; + tag.Shift = (this.ascent - tag.Ascent); } + if (total_descent > max_below_baseline) + max_below_baseline = total_descent; + + if (this.height < max_above_baseline + max_below_baseline + tag.Height - tag.Ascent - tag.Descent) + this.height = max_above_baseline + max_below_baseline + tag.Height - tag.Ascent - tag.Descent; + tag = tag.Next; if (tag != null) { + if (tag.Length != 0 && tag.FontToDisplay != currentFont) { + CheckKerning (g, currentFont, currentFontStart, pos - currentFontStart); + currentFont = tag.FontToDisplay; + currentFontStart = pos; + handleKerning = kerning_fonts.ContainsKey (currentFont.GetHashCode ()); + } tag.Shift = 0; - wrap_pos = pos; + // We can't just wrap on tag boundaries -- e.g. if the first letter of the word has a different colour / font. } } } - var fullText = text.ToString(); - if (!handleKerning && fullText.Length > 1 && !wrapped) - { - // Check whether kerning takes place for this string and font. - var realSize = TextBoxTextRenderer.MeasureText(g, fullText, tags.Font); - float realWidth = realSize.Width + widths[0]; - // MeasureText ignores trailing whitespace, so we will too at this point. - int length = fullText.TrimEnd().Length; - float sumWidth = widths[length]; - if (realWidth != sumWidth) - { - kerning_fonts.Add(tags.Font.GetHashCode (), true); - // Using a slightly incorrect width this time around isn't that bad. All that happens - // is that the cursor is a pixel or two off until the next character is typed. It's - // the accumulation of pixel after pixel that causes display problems. - } + if (pos != currentFontStart) { + CheckKerning (g, currentFont, currentFontStart, pos - currentFontStart); } - while (tag != null) { - tag.Shift = (tag.Line.ascent - tag.Ascent) / 72; + if (lastTab != null) { + ProcessLastTab (lastTab, lastTabPos, pos); + lastTab = null; + } + + while (tag != null) { + tag.Shift = (tag.Line.ascent - tag.Ascent); // / 72; tag = tag.Next; } @@ -639,12 +881,49 @@ namespace System.Windows.Forms tags.Shift = 0; } - if (prev_offset != offset || prev_height != this.height || prev_ascent != this.ascent) + this.textHeight = this.height; + this.height = (int)(this.LineSpacing + this.TotalParagraphSpacing); + + if (prev_offset != offset || prev_height != this.height || prev_ascent != this.ascent || + Math.Abs (prev_spacing_before - this.SpacingBefore) > document.Dpi / 1440f) retval = true; return retval; } + private void ProcessLastTab (TabStop tab, int tab_pos, int pos) + { + float prevTabRight = widths[tab_pos + 1]; + float tabRight = tab.CalculateRight (this, tab_pos); + float change = tabRight - prevTabRight; + + for (int i = tab_pos + 1; i <= pos; i++) { + widths[i] += change; + } + } + + private void CheckKerning (Graphics g, Font font, int start, int length) + { + if (length > 1) { + if (!kerning_fonts.ContainsKey (font.GetHashCode ())) { + // Check whether kerning takes place for this string and font. + var partText = text.ToString(start, length); + var realSize = TextBoxTextRenderer.MeasureText(g, partText, font); + float realWidth = realSize.Width + widths[start + 1]; + // MeasureText ignores trailing whitespace, so we will too at this point. + int textLength = partText.TrimEnd().Length; + float sumWidth = widths[textLength + start + 1]; + if (realWidth != sumWidth) + { + kerning_fonts.Add(font.GetHashCode (), true); + // Using a slightly incorrect width this time around isn't that bad. All that happens + // is that the cursor is a pixel or two off until the next character is typed. It's + // the accumulation of pixel after pixel that causes display problems. + } + } + } + } + /// /// Recalculate a single line using the same char for every character in the line /// @@ -667,13 +946,14 @@ namespace System.Windows.Forms w = TextBoxTextRenderer.MeasureText (g, doc.password_char, tags.Font).Width; - if (this.height != (int)tag.Font.Height) + if (this.textHeight != (int)tag.Font.Height) ret = true; else ret = false; - this.height = (int)tag.Font.Height; - tag.Height = this.height; + this.textHeight = (int)tag.Font.Height; + tag.Height = this.textHeight; + this.height = (int)(this.textHeight + this.LineSpacing + this.TotalParagraphSpacing); this.ascent = tag.Ascent; @@ -684,7 +964,42 @@ namespace System.Windows.Forms return ret; } - + + internal void CalculateAlignment () + { + var alignmentWidth = document.ViewPortWidth - document.left_margin - document.right_margin; + var alignmentLineWidth = GetAlignmentLineWidth (); + + switch (alignment) { + case HorizontalAlignment.Left: + align_shift = 0; + break; + case HorizontalAlignment.Center: + align_shift = (alignmentWidth - alignmentLineWidth) / 2; + break; + case HorizontalAlignment.Right: + align_shift = alignmentWidth - alignmentLineWidth; + break; + } + + align_shift = Math.Max (align_shift, 0); // Don't allow negative shifts. + } + + private int GetAlignmentLineWidth () + { + int last = text.Length - 1; + if (last < 0) + return 0; + + char c = text [last]; + while (last > 0 && Char.IsWhiteSpace (c) && c != '\t' && c != '\u00A0') { + c = text [--last]; + } + // widths[0] has both the left margin and the left indents. + // Remove the margin (it is part of the viewport) and add the right indents (part of the line width, for alignment purposes). + return (int)(widths [last + 1] - document.left_margin + Math.Max (right_indent, 0)); + } + internal void Streamline (int lines) { LineTag current; @@ -711,7 +1026,7 @@ namespace System.Windows.Forms return; while (next != null) { - // Take out 0 length tags unless it's the last tag in the document + // Take out 0 length tags unless it's the last tag in the document. if (current.IsTextTag && next.Length == 0 && next.IsTextTag) { if ((next.Next != null) || (line_no != lines)) { current.Next = next.Next; diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/LineTag.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/LineTag.cs index a551e813de..38e5bb58dd 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/LineTag.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/LineTag.cs @@ -21,6 +21,7 @@ // // Authors: // Peter Bartok pbartok@novell.com +// Karl Scowen // // @@ -44,6 +45,10 @@ namespace System.Windows.Forms private string link_text; // The full link text e.g. this might be // word-wrapped to "w" but this would be // "www.example.com" + private bool visible; + private TextPositioning text_position; // Normal / superscript / subscript + private Font small_font; // Cached font for superscript / subscript + private float char_offset; // Shift the text baseline up or down // Payload; text private int start; // start, in chars; index into Line.text @@ -53,7 +58,8 @@ namespace System.Windows.Forms private int height; // Height in pixels of the text this tag describes private int ascent; // Ascent of the font for this tag private int descent; // Descent of the font for this tag - private int shift; // Shift down for this tag, to stay on baseline + private int shift; // Shift down for this tag, to stay on baseline. + // Measured from top of line to top of tag. // Administrative private Line line; // The line we're on @@ -69,6 +75,7 @@ namespace System.Windows.Forms link_font = null; is_link = false; link_text = null; + visible = true; } #endregion // Constructors @@ -113,6 +120,16 @@ namespace System.Windows.Forms return link_font; } + if (TextPosition != TextPositioning.Normal) { + if (small_font == null) + small_font = new Font (font.FontFamily, font.Size * 0.583F, font.Style); + + if (IsLink) + return new Font (small_font, font.Style | FontStyle.Underline); + else + return small_font; + } + return font; } } @@ -122,20 +139,43 @@ namespace System.Windows.Forms set { if (font != value) { link_font = null; + small_font = null; font = value; height = Font.Height; XplatUI.GetFontMetrics (Hwnd.GraphicsContext, Font, out ascent, out descent); + float scale_factor = font.GetHeight () / font.FontFamily.GetLineSpacing (font.Style); + ascent = (int) Math.Ceiling (ascent * scale_factor); + descent = (int) Math.Ceiling (descent * scale_factor); line.recalc = true; } } } + public TextPositioning TextPosition { + get { return text_position; } + set { text_position = value; } + } + + public float CharOffset { + get { return char_offset; } + set { char_offset = value; } + } + public int Height { get { return height; } set { height = value; } } + public int DrawnHeight { + get { + if (text_position != TextPositioning.Normal) + return (int) (height * 0.583F); + + return height; + } + } + public virtual bool IsTextTag { get { return true; } } @@ -186,7 +226,7 @@ namespace System.Windows.Forms throw new Exception("New tag makes an insane tag"); } #endif - start = value; + start = value; } } @@ -206,9 +246,14 @@ namespace System.Windows.Forms } } + public bool Visible { + get { return visible; } + set { visible = value; } + } + public float Width { get { - if (Length == 0) + if (Length == 0 || !visible) return 0; return line.widths [start + Length - 1] - (start != 0 ? line.widths [start - 1] : 0); } @@ -222,6 +267,15 @@ namespace System.Windows.Forms } } + public int OffsetY { + get { + if (text_position == TextPositioning.Subscript) + return (int) (height * 0.45F); + + return 0; + } + } + public bool IsLink { get { return is_link; } set { is_link = value; } @@ -253,8 +307,8 @@ namespace System.Windows.Forms new_tag = new LineTag(line, pos); new_tag.CopyFormattingFrom (this); - new_tag.next = this.next; - this.next = new_tag; + new_tag.Next = this.next; + this.Next = new_tag; new_tag.previous = this; if (new_tag.next != null) @@ -269,7 +323,7 @@ namespace System.Windows.Forms if (!this.Equals (other)) return false; - this.next = other.next; + this.Next = other.next; if (this.next != null) this.next.previous = this; @@ -282,6 +336,9 @@ namespace System.Windows.Forms Font = other.font; color = other.color; back_color = other.back_color; + TextPosition = other.text_position; + CharOffset = other.CharOffset; + Visible = other.Visible; } public void Delete () @@ -312,6 +369,8 @@ namespace System.Windows.Forms public virtual void Draw (Graphics dc, Color color, float x, float y, int start, int end) { + if (text_position == TextPositioning.Subscript) + y += OffsetY; TextBoxTextRenderer.DrawText (dc, line.text.ToString (start, end).Replace ("\r", string.Empty), FontToDisplay, color, x, y, false); } @@ -328,6 +387,14 @@ namespace System.Windows.Forms public virtual void Draw (Graphics dc, Color color, float xoff, float y, int drawStart, int drawEnd, string text, out Rectangle measuredText, bool measureText) { + if (!visible) { + measuredText = new Rectangle (); + return; + } + + if (text_position == TextPositioning.Subscript) + y += OffsetY; + if (measureText) { int xstart = (int)line.widths [drawStart] + (int)xoff; int xend = (int)line.widths [drawEnd] - (int)line.widths [drawStart]; @@ -342,7 +409,7 @@ namespace System.Windows.Forms while (drawStart < drawEnd) { int tab_index = text.IndexOf ("\t", drawStart); - if (tab_index == -1) + if (tab_index == -1 || tab_index > drawEnd) tab_index = drawEnd; TextBoxTextRenderer.DrawText (dc, text.Substring (drawStart, tab_index - drawStart).Replace ("\r", string.Empty), FontToDisplay, color, xoff + line.widths [drawStart], y, false); @@ -380,7 +447,16 @@ namespace System.Windows.Forms if (this.LinkText != other.LinkText) return false; - if (this.font.Equals (other.font) && this.color.Equals (other.color)) + if (this.TextPosition != other.TextPosition) + return false; + + if (this.CharOffset != other.CharOffset) + return false; + + if (this.Visible != other.Visible) + return false; + + if (this.font.Equals (other.font) && this.color.Equals (other.color) && this.back_color.Equals (other.back_color)) return true; return false; @@ -409,11 +485,17 @@ namespace System.Windows.Forms return null; } + public static bool FormatText (Line line, int formatStart, int length, Font font, Color color, Color backColor, FormatSpecified specified) + { + return FormatText (line, formatStart, length, font, color, backColor, TextPositioning.Normal, 0, true, specified); + } + /// Applies 'font' and 'brush' to characters starting at 'start' for 'length' chars; /// Removes any previous tags overlapping the same area; /// returns true if lineheight has changed /// 1-based character position on line - public static bool FormatText (Line line, int formatStart, int length, Font font, Color color, Color backColor, FormatSpecified specified) + public static bool FormatText (Line line, int formatStart, int length, Font font, Color color, Color backColor, + TextPositioning text_position, float char_offset, bool visible, FormatSpecified specified) { LineTag tag; LineTag start_tag; @@ -422,7 +504,7 @@ namespace System.Windows.Forms bool retval = false; // Assume line-height doesn't change // Too simple? - if (((FormatSpecified.Font & specified) == FormatSpecified.Font) && font.Height != line.height) + if (((FormatSpecified.Font & specified) == FormatSpecified.Font) && font.Height != line.TextHeight) retval = true; line.recalc = true; // This forces recalculation of the line in RecalculateDocument @@ -436,7 +518,7 @@ namespace System.Windows.Forms // Common special case if ((formatStart == 1) && (length == tag.Length)) { - SetFormat (tag, font, color, backColor, specified); + SetFormat (tag, font, color, backColor, text_position, char_offset, visible, specified); return retval; } @@ -444,7 +526,7 @@ namespace System.Windows.Forms // we only need one new tag if (formatStart == 1 && length == 0) { line.tags.Break (1); - SetFormat (line.tags, font, color, backColor, specified); + SetFormat (line.tags, font, color, backColor, text_position, char_offset, visible, specified); return retval; } @@ -455,7 +537,7 @@ namespace System.Windows.Forms // Find Tag will return tag 0 at position 3, but we should just // use the empty tag after.. if (start_tag.End == formatStart && length == 0 && start_tag.Next != null && start_tag.Next.Length == 0) { - SetFormat (start_tag.Next, font, color, backColor, specified); + SetFormat (start_tag.Next, font, color, backColor, text_position, char_offset, visible, specified); return retval; } @@ -463,13 +545,22 @@ namespace System.Windows.Forms while (start_tag.End == formatStart && start_tag.Next != null) start_tag = start_tag.Next; - tag = start_tag.Break (formatStart); + if (start_tag.Start == formatStart && start_tag.Length == length) { + SetFormat (start_tag, font, color, backColor, text_position, char_offset, visible, specified); + return retval; + } + + // Break the tag if needed -- we don't need to break for the start if we're starting at its start. + if (start_tag.Start != formatStart) + tag = start_tag.Break (formatStart); + else + tag = start_tag; // empty selection style at end of line - its the only situation // where the rest of the tag would be empty, since we moved to the // begining of next non empty tag if (tag.Length == 0) { - SetFormat (tag, font, color, backColor, specified); + SetFormat (tag, font, color, backColor, text_position, char_offset, visible, specified); return retval; } @@ -477,25 +568,27 @@ namespace System.Windows.Forms // after our new (now) empty one.. if (length == 0) { tag.Break (formatStart); - SetFormat (tag, font, color, backColor, specified); + SetFormat (tag, font, color, backColor, text_position, char_offset, visible, specified); return retval; } + bool atEnd = false; while (tag != null && tag.End <= end) { - SetFormat (tag, font, color, backColor, specified); + SetFormat (tag, font, color, backColor, text_position, char_offset, visible, specified); + atEnd |= tag.End == end; tag = tag.next; } // did the last tag conveniently fit? - if (tag != null && tag.End == end) + if (atEnd || (tag != null && tag.End == end)) return retval; - /// Now do the last tag + // Now do the last tag end_tag = FindTag (line, end-1); if (end_tag != null) { end_tag.Break (end); - SetFormat (end_tag, font, color, backColor, specified); + SetFormat (end_tag, font, color, backColor, text_position, char_offset, visible, specified); } return retval; @@ -509,6 +602,7 @@ namespace System.Windows.Forms int low = start; int high = low + Length; int length_no_ending = line.TextLengthWithoutEnding (); + float char_mid; if (Length == 0) return low-1; @@ -517,7 +611,8 @@ namespace System.Windows.Forms return 0; if (x < line.widths [low]) { - if (low == 1 && x > (line.widths [1] / 2)) + char_mid = (line.widths [1] + line.widths [0]) / 2; + if (low == 1 && x >= char_mid) return low; return low - 1; } @@ -535,9 +630,9 @@ namespace System.Windows.Forms high = mid; } - float char_width = line.widths[high] - line.widths[low]; + char_mid = (line.widths [high] + line.widths [low]) / 2; - if ((x - line.widths[low]) >= (char_width / 2)) + if (x >= char_mid) return high; else return low; @@ -568,6 +663,12 @@ namespace System.Windows.Forms } private static void SetFormat (LineTag tag, Font font, Color color, Color back_color, FormatSpecified specified) + { + SetFormat (tag, font, color, back_color, TextPositioning.Normal, 0, true, specified); + } + + private static void SetFormat (LineTag tag, Font font, Color color, Color back_color, TextPositioning text_position, + float char_offset, bool visible, FormatSpecified specified) { if ((FormatSpecified.Font & specified) == FormatSpecified.Font) { tag.Font = font; @@ -577,28 +678,52 @@ namespace System.Windows.Forms if ((FormatSpecified.BackColor & specified) == FormatSpecified.BackColor) { tag.back_color = back_color; } + if ((FormatSpecified.TextPosition & specified) == FormatSpecified.TextPosition) + tag.TextPosition = text_position; + if ((FormatSpecified.CharOffset & specified) == FormatSpecified.CharOffset) + tag.CharOffset = char_offset; + if ((FormatSpecified.Visibility & specified) == FormatSpecified.Visibility) + tag.Visible = visible; // Console.WriteLine ("setting format: {0} {1} new color {2}", color.Color, specified, tag.color.Color); } public virtual SizeF SizeOfPosition (Graphics dc, int pos) { - if (pos >= line.TextLengthWithoutEnding () && line.document.multiline) + if ((pos >= line.TextLengthWithoutEnding () && line.document.multiline) || !visible) return SizeF.Empty; string text = line.text.ToString (pos, 1); - switch ((int) text [0]) { + switch ((int)text [0]) { case '\t': if (!line.document.multiline) goto case 10; - SizeF res = TextBoxTextRenderer.MeasureText (dc, " ", font); - res.Width *= 8.0F; + SizeF res = TextBoxTextRenderer.MeasureText (dc, " ", FontToDisplay); // This way we get the height, not that it is ever used... + float left = line.widths [pos]; + float right = -1; + TabStopCollection stops = line.tab_stops; + float tabPos; + for (int i = 0; i < stops.Count; i++) { + tabPos = stops [i].Position; + if (tabPos >= left) { + if (tabPos <= line.document.viewport_width - line.RightIndent) + break; // Can't use tabs that are past the end of the line. + + right = stops [i].CalculateRight (line, pos); + break; + } + } + if (right < 0) { + float maxWidth = dc.DpiX / 2; // tab stops are 1/2" + right = (float)(Math.Floor (left / maxWidth) + 1) * maxWidth; + } + res.Width = right - left; return res; case 10: case 13: - return TextBoxTextRenderer.MeasureText (dc, "\u000D", font); + return TextBoxTextRenderer.MeasureText (dc, "\u000D", FontToDisplay); } - - return TextBoxTextRenderer.MeasureText (dc, text, font); + + return TextBoxTextRenderer.MeasureText (dc, text, FontToDisplay); } public virtual string Text () diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ListBox.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/ListBox.cs index fbc74eed38..b513cf9091 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ListBox.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ListBox.cs @@ -1614,7 +1614,7 @@ namespace System.Windows.Forms private bool KeySearch (Keys key) { char c = (char) key; - if (!Char.IsLetterOrDigit (c)) + if (!Char.IsLetterOrDigit (c) || SelectionMode == SelectionMode.None) return false; int idx = FindString (c.ToString (), SelectedIndex); diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/RadioButton.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/RadioButton.cs index 4290a1e262..89fb9d1a32 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/RadioButton.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/RadioButton.cs @@ -326,8 +326,6 @@ namespace System.Windows.Forms { if (!Checked) { Checked = true; } - } else { - Checked = !Checked; } base.OnClick (e); diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/RichTextBox.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/RichTextBox.cs index 9073f2c10c..1b5f9513a2 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/RichTextBox.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/RichTextBox.cs @@ -21,6 +21,7 @@ // // Authors: // Peter Bartok +// Karl Scowen // // @@ -28,6 +29,7 @@ using System; using System.Collections; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Drawing.Imaging; @@ -55,7 +57,9 @@ namespace System.Windows.Forms { // properties so we can revert private Stack rtf_section_stack; - private RTF.TextMap rtf_text_map; + bool fire_contents_resized; + Size existing_contents_size; + private int rtf_skip_count; private int rtf_cursor_x; private int rtf_cursor_y; @@ -64,7 +68,7 @@ namespace System.Windows.Forms { private bool enable_auto_drag_drop; private RichTextBoxLanguageOptions language_option; private bool rich_text_shortcuts_enabled; - private Color selection_back_color; + #endregion // Local Variables #region Public Constructors @@ -85,15 +89,17 @@ namespace System.Windows.Forms { rtf_style = new RtfSectionStyle (); rtf_section_stack = null; + fire_contents_resized = true; + scrollbars = RichTextBoxScrollBars.Both; alignment = HorizontalAlignment.Left; + document.SizeChanged += new EventHandler (ContentSizeChanged); LostFocus += new EventHandler(RichTextBox_LostFocus); GotFocus += new EventHandler(RichTextBox_GotFocus); BackColor = ThemeEngine.Current.ColorWindow; backcolor_set = false; language_option = RichTextBoxLanguageOptions.AutoFontSizeAdjust; rich_text_shortcuts_enabled = true; - selection_back_color = DefaultBackColor; ForeColor = ThemeEngine.Current.ColorWindowText; base.HScrolled += new EventHandler(RichTextBox_HScrolled); @@ -133,6 +139,29 @@ namespace System.Windows.Forms { private void RichTextBox_GotFocus(object sender, EventArgs e) { Invalidate(); } + + private void ContentSizeChanged (object sender, Document.SizeChangedEventArgs e) + { + ContentSizeChanged (); + } + + private void ContentSizeChanged () + { + if (fire_contents_resized && (existing_contents_size.IsEmpty || + existing_contents_size.Height != document.Height || existing_contents_size.Width != document.Width)) { + int width; + int height = document.Height + document.top_margin * 2 + Height - ClientRectangle.Height; + + if (Multiline) { + width = Width; // yes, this is the insanity that is the traditional .Net implementation... + } else { + width = document.Width + document.left_margin + document.right_margin + Width - ClientRectangle.Width; + } + + ContentsResizedEventArgs args = new ContentsResizedEventArgs (new Rectangle (Left, Top, width, height)); + OnContentsResized (args); + } + } #endregion // Private & Internal Methods #region Public Instance Properties @@ -324,14 +353,25 @@ namespace System.Windows.Forms { set { MemoryStream data; + fire_contents_resized = false; + existing_contents_size = new Size (document.Width, document.Height); + document.Empty(); data = new MemoryStream(Encoding.ASCII.GetBytes(value), false); InsertRTFFromStream(data, 0, 1); + Line line = document.GetLine (1); + document.SetSelection (line, 0); + document.PositionCaret (line, 0); + data.Close(); Invalidate(); + + fire_contents_resized = true; + ContentSizeChanged (); + existing_contents_size = Size.Empty; } } @@ -371,6 +411,9 @@ namespace System.Windows.Forms { Line line; LineTag tag; + fire_contents_resized = false; + existing_contents_size = new Size (document.Width, document.Height); + document.SuspendRecalc (); if (document.selection_visible) { document.ReplaceSelection("", false); } @@ -393,14 +436,19 @@ namespace System.Windows.Forms { int nl_length = document.LineEndingLength (XplatUI.RunningOnUnix ? LineEnding.Rich : LineEnding.Hard); document.CharIndexToLineTag(sel_start + chars + (y - document.selection_start.line.line_no) * nl_length, out line, out tag, out sel_start); - if (sel_start >= line.text.Length) - sel_start = line.text.Length -1; + if (sel_start > line.text.Length) + sel_start = line.text.Length; //zero-based, but we want to go after the last character rather than before. document.SetSelection(line, sel_start); document.PositionCaret(line, sel_start); + document.ResumeRecalc(true); document.DisplayCaret(); ScrollToCaret(); OnTextChanged(EventArgs.Empty); + + fire_contents_resized = true; + ContentSizeChanged(); + existing_contents_size = Size.Empty; } } @@ -473,12 +521,56 @@ namespace System.Windows.Forms { } } - [MonoTODO ("Stub, does nothing")] [Browsable (false)] [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] public Color SelectionBackColor { - get { return selection_back_color; } - set { selection_back_color = value; } + get { + Color back_colour; + LineTag start; + LineTag end; + LineTag tag; + + start = document.selection_start.line.FindTag (document.selection_start.pos); + + if (SelectionLength > 0) { + end = document.selection_start.line.FindTag (document.selection_end.pos - 1); + } else { + end = start; + } + + back_colour = start.BackColor; + + tag = start; + while (tag != null) { + if (back_colour != tag.BackColor) + return Color.Empty; + + if (tag == end) + break; + + tag = document.NextTag (tag); + } + + return back_colour; + } + set { + int sel_start; + int sel_end; + + sel_start = document.LineTagToCharIndex (document.selection_start.line, document.selection_start.pos); + sel_end = document.LineTagToCharIndex (document.selection_end.line, document.selection_end.pos); + + document.FormatText (document.selection_start.line, document.selection_start.pos + 1, + document.selection_end.line, document.selection_end.pos + 1, null, + Color.Empty, value, FormatSpecified.BackColor); + + document.CharIndexToLineTag (sel_start, out document.selection_start.line, out document.selection_start.tag, out document.selection_start.pos); + document.CharIndexToLineTag (sel_end, out document.selection_end.line, out document.selection_end.tag, out document.selection_end.pos); + + document.UpdateView (document.selection_start.line, 0); + //Re-Align the caret in case its changed size or position + Document.AlignCaret (false); + } } [Browsable(false)] @@ -497,13 +589,54 @@ namespace System.Windows.Forms { [Browsable(false)] [DefaultValue(0)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - [MonoTODO ("Stub, does nothing")] public int SelectionCharOffset { get { - return 0; + float char_offset; + LineTag start; + LineTag end; + LineTag tag; + + start = document.selection_start.line.FindTag (document.selection_start.pos); + + if (SelectionLength > 0) { + end = document.selection_start.line.FindTag (document.selection_end.pos - 1); + } else { + end = start; + } + + char_offset = start.CharOffset; + + tag = start; + while (tag != null) { + if (Math.Abs(char_offset - tag.CharOffset) > 0.01) + return 0; + + if (tag == end) + break; + + tag = document.NextTag (tag); + } + + return (int)char_offset; } set { + int sel_start; + int sel_end; + + sel_start = document.LineTagToCharIndex (document.selection_start.line, document.selection_start.pos); + sel_end = document.LineTagToCharIndex (document.selection_end.line, document.selection_end.pos); + + document.FormatText (document.selection_start.line, document.selection_start.pos + 1, + document.selection_end.line, document.selection_end.pos + 1, null, + Color.Empty, Color.Empty, TextPositioning.Normal, value, true, FormatSpecified.CharOffset); + + document.CharIndexToLineTag (sel_start, out document.selection_start.line, out document.selection_start.tag, out document.selection_start.pos); + document.CharIndexToLineTag (sel_end, out document.selection_end.line, out document.selection_end.tag, out document.selection_end.pos); + + document.UpdateView (document.selection_start.line, 0); + //Re-Align the caret in case its changed size or position -- probably not necessary + Document.AlignCaret (false); } } @@ -516,11 +649,11 @@ namespace System.Windows.Forms { LineTag end; LineTag tag; - if (selection_length > 0) { - start = document.selection_start.line.FindTag (document.selection_start.pos + 1); - end = document.selection_start.line.FindTag (document.selection_end.pos); + start = document.selection_start.line.FindTag (document.selection_start.pos); + + if (SelectionLength > 0) { + end = document.selection_start.line.FindTag (document.selection_end.pos - 1); } else { - start = document.selection_start.line.FindTag (document.selection_start.pos); end = start; } @@ -575,17 +708,16 @@ namespace System.Windows.Forms { LineTag end; LineTag tag; - if (selection_length > 0) { - start = document.selection_start.line.FindTag (document.selection_start.pos + 1); - end = document.selection_start.line.FindTag (document.selection_end.pos); + start = document.selection_start.line.FindTag (document.selection_start.pos); + if (SelectionLength > 0) { + end = document.selection_start.line.FindTag (document.selection_end.pos - 1); } else { - start = document.selection_start.line.FindTag (document.selection_start.pos); end = start; } font = start.Font; - if (selection_length > 1) { + if (SelectionLength > 1) { tag = start; while (tag != null) { @@ -626,26 +758,106 @@ namespace System.Windows.Forms { [Browsable(false)] [DefaultValue(0)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - [MonoTODO ("Stub, does nothing")] public int SelectionHangingIndent { get { - return 0; + int indent; + Line start; + Line end; + Line line; + + start = document.ParagraphStart (document.selection_start.line); + indent = (int)start.hanging_indent; + + end = document.ParagraphEnd (document.selection_end.line); + + line = start; + + while (true) { + if ((int)line.hanging_indent != indent) { + return 0; + } + + if (line == end) { + break; + } + line = document.GetLine (line.line_no + 1); + } + + return indent; } set { + Line start; + Line end; + Line line; + + start = document.ParagraphStart (document.selection_start.line); + end = document.ParagraphEnd (document.selection_end.line); + + line = start; + + while (true) { + line.HangingIndent = value; + + if (line == end) { + break; + } + line = document.GetLine (line.line_no + 1); + } + this.CalculateDocument (); } } [Browsable(false)] [DefaultValue(0)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - [MonoTODO ("Stub, does nothing")] public int SelectionIndent { get { - return 0; + int indent; + Line start; + Line end; + Line line; + + start = document.ParagraphStart (document.selection_start.line); + indent = (int)start.indent; + + end = document.ParagraphEnd (document.selection_end.line); + + line = start; + + while (true) { + if ((int)line.indent != indent) { + return 0; + } + + if (line == end) { + break; + } + line = document.GetLine (line.line_no + 1); + } + + return indent; } set { + Line start; + Line end; + Line line; + + start = document.ParagraphStart (document.selection_start.line); + end = document.ParagraphEnd (document.selection_end.line); + + line = start; + + while (true) { + line.Indent = value; + + if (line == end) { + break; + } + line = document.GetLine (line.line_no + 1); + } + this.CalculateDocument (); } } @@ -677,25 +889,105 @@ namespace System.Windows.Forms { [Browsable(false)] [DefaultValue(0)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - [MonoTODO ("Stub, does nothing")] public int SelectionRightIndent { get { - return 0; + int indent; + Line start; + Line end; + Line line; + + start = document.ParagraphStart (document.selection_start.line); + indent = (int)start.right_indent; + + end = document.ParagraphEnd (document.selection_end.line); + + line = start; + + while (true) { + if ((int)line.right_indent != indent) { + return 0; + } + + if (line == end) { + break; + } + line = document.GetLine (line.line_no + 1); + } + + return indent; } set { + Line start; + Line end; + Line line; + + start = document.ParagraphStart (document.selection_start.line); + end = document.ParagraphEnd (document.selection_end.line); + + line = start; + + while (true) { + line.RightIndent = value; + + if (line == end) { + break; + } + line = document.GetLine (line.line_no + 1); + } + this.CalculateDocument (); } } [Browsable(false)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - [MonoTODO ("Stub, does nothing")] public int[] SelectionTabs { get { - return new int[0]; + TabStopCollection tabs; + Line start; + Line end; + Line line; + + start = document.ParagraphStart (document.selection_start.line); + tabs = start.TabStops; + + end = document.ParagraphEnd (document.selection_end.line); + + line = start; + + while (true) { + if (!line.TabStops.Equals (tabs)) + return new int[0]; + + if (line == end) + break; + line = document.GetLine (line.line_no + 1); + } + + return tabs.ToPosArray (); } set { + Line start; + Line end; + Line line; + + start = document.ParagraphStart (document.selection_start.line); + end = document.ParagraphEnd (document.selection_end.line); + + line = start; + + while (true) { + line.TabStops.Clear (); + foreach (int val in value) + line.TabStops.Add (new LeftTabStop (val)); + + if (line == end) { + break; + } + line = document.GetLine (line.line_no + 1); + } + this.CalculateDocument (); } } @@ -1308,26 +1600,47 @@ namespace System.Windows.Forms { private class RtfSectionStyle : ICloneable { internal Color rtf_color; + internal Color rtf_back_color; internal RTF.Font rtf_rtffont; - internal int rtf_rtffont_size; + internal float rtf_rtffont_size; internal FontStyle rtf_rtfstyle; - internal HorizontalAlignment rtf_rtfalign; - internal int rtf_par_line_left_indent; + internal HorizontalAlignment rtf_par_align; + internal float rtf_par_line_left_indent; + internal float rtf_par_first_line_indent; + internal float rtf_par_line_right_indent; internal bool rtf_visible; internal int rtf_skip_width; + internal float rtf_par_spacing_after; + internal float rtf_par_spacing_before; + internal float rtf_par_line_spacing; + internal bool rtf_par_line_spacing_multiple; + internal TextPositioning rtf_text_position; + internal float rtf_char_offset; + internal TabStop rtf_par_next_tab_stop = null; + internal TabStopCollection rtf_par_tab_stops = new TabStopCollection (); public object Clone () { RtfSectionStyle new_style = new RtfSectionStyle (); new_style.rtf_color = rtf_color; + new_style.rtf_back_color = rtf_back_color; new_style.rtf_par_line_left_indent = rtf_par_line_left_indent; - new_style.rtf_rtfalign = rtf_rtfalign; + new_style.rtf_par_first_line_indent = rtf_par_first_line_indent; + new_style.rtf_par_line_right_indent = rtf_par_line_right_indent; + new_style.rtf_par_align = rtf_par_align; new_style.rtf_rtffont = rtf_rtffont; new_style.rtf_rtffont_size = rtf_rtffont_size; new_style.rtf_rtfstyle = rtf_rtfstyle; new_style.rtf_visible = rtf_visible; new_style.rtf_skip_width = rtf_skip_width; + new_style.rtf_par_spacing_after = rtf_par_spacing_after; + new_style.rtf_par_spacing_before = rtf_par_spacing_before; + new_style.rtf_par_line_spacing = rtf_par_line_spacing; + new_style.rtf_par_line_spacing_multiple = rtf_par_line_spacing_multiple; + new_style.rtf_text_position = rtf_text_position; + new_style.rtf_char_offset = rtf_char_offset; + new_style.rtf_par_tab_stops = rtf_par_tab_stops.Clone (); return new_style; } @@ -1385,11 +1698,9 @@ namespace System.Windows.Forms { case RTF.Major.PictAttr: if (rtf.Picture != null && rtf.Picture.IsValid ()) { + FlushText (rtf, false, true); Line line = document.GetLine (rtf_cursor_y); - document.InsertPicture (line, 0, rtf.Picture); - rtf_cursor_x++; - - FlushText (rtf, true); + document.InsertPicture (line, rtf_cursor_x++, rtf.Picture); rtf.Picture = null; } break; @@ -1399,14 +1710,31 @@ namespace System.Windows.Forms { case RTF.Minor.ForeColor: { System.Windows.Forms.RTF.Color color; - color = System.Windows.Forms.RTF.Color.GetColor(rtf, rtf.Param); - + color = System.Windows.Forms.RTF.Color.GetColor (rtf, rtf.Param); + if (color != null) { - FlushText(rtf, false); + FlushText (rtf, false); if (color.Red == -1 && color.Green == -1 && color.Blue == -1) { this.rtf_style.rtf_color = ForeColor; } else { - this.rtf_style.rtf_color = Color.FromArgb(color.Red, color.Green, color.Blue); + this.rtf_style.rtf_color = Color.FromArgb (color.Red, color.Green, color.Blue); + } + FlushText (rtf, false); + } + break; + } + + case RTF.Minor.BackColor: { + System.Windows.Forms.RTF.Color color; + + color = System.Windows.Forms.RTF.Color.GetColor(rtf, rtf.Param); + + if (color != null) { + FlushText(rtf, false); + if (color.Red == -1 && color.Green == -1 && color.Blue == -1) { + this.rtf_style.rtf_back_color = BackColor; + } else { + this.rtf_style.rtf_back_color = Color.FromArgb(color.Red, color.Green, color.Blue); } FlushText (rtf, false); } @@ -1415,7 +1743,7 @@ namespace System.Windows.Forms { case RTF.Minor.FontSize: { FlushText(rtf, false); - this.rtf_style.rtf_rtffont_size = rtf.Param / 2; + this.rtf_style.rtf_rtffont_size = rtf.Param / 2f; break; } @@ -1478,7 +1806,7 @@ namespace System.Windows.Forms { case RTF.Minor.Invisible: { FlushText (rtf, false); - rtf_style.rtf_visible = false; + rtf_style.rtf_visible = (rtf.Param != RTF.RTF.NoParam); break; } @@ -1487,6 +1815,36 @@ namespace System.Windows.Forms { rtf_style.rtf_rtfstyle &= ~FontStyle.Underline; break; } + + case RTF.Minor.SuperScrShrink: { + FlushText (rtf, false); + rtf_style.rtf_text_position = TextPositioning.Superscript; + break; + } + + case RTF.Minor.SubScrShrink: { + FlushText (rtf, false); + rtf_style.rtf_text_position = TextPositioning.Subscript; + break; + } + + case RTF.Minor.NoSuperSub: { + FlushText (rtf, false); + rtf_style.rtf_text_position = TextPositioning.Normal; + break; + } + + case RTF.Minor.SuperScript: { + FlushText (rtf, false); + rtf_style.rtf_char_offset = ((float) rtf.Param / 144.0F) * document.Dpi; + break; + } + + case RTF.Minor.SubScript: { + FlushText (rtf, false); + rtf_style.rtf_char_offset = -((float) rtf.Param / 144.0F) * document.Dpi; + break; + } } break; } @@ -1497,32 +1855,90 @@ namespace System.Windows.Forms { case RTF.Minor.ParDef: FlushText (rtf, false); rtf_style.rtf_par_line_left_indent = 0; - rtf_style.rtf_rtfalign = HorizontalAlignment.Left; + rtf_style.rtf_par_first_line_indent = 0; + rtf_style.rtf_par_line_right_indent = 0; + rtf_style.rtf_par_spacing_after = 0; + rtf_style.rtf_par_spacing_before = 0; + rtf_style.rtf_par_line_spacing = 0; + rtf_style.rtf_par_line_spacing_multiple = false; + rtf_style.rtf_par_align = HorizontalAlignment.Left; + rtf_style.rtf_par_next_tab_stop = null; + rtf_style.rtf_par_tab_stops.Clear (); + break; + + case RTF.Minor.TabLeft: + rtf_style.rtf_par_next_tab_stop = new LeftTabStop (); + break; + + case RTF.Minor.TabCenter: + rtf_style.rtf_par_next_tab_stop = new CentredTabStop (); + break; + + case RTF.Minor.TabRight: + rtf_style.rtf_par_next_tab_stop = new RightTabStop (); + break; + + case RTF.Minor.TabDecimal: + rtf_style.rtf_par_next_tab_stop = new DecimalTabStop (); + break; + + case RTF.Minor.TabPos: + float tabPos = ((float)rtf.Param / 1440.0F) * document.Dpi; + if (rtf_style.rtf_par_next_tab_stop != null) { + rtf_style.rtf_par_next_tab_stop.Position = tabPos; + rtf_style.rtf_par_tab_stops.Add (rtf_style.rtf_par_next_tab_stop); + rtf_style.rtf_par_next_tab_stop = null; + } else { + rtf_style.rtf_par_tab_stops.Add (new LeftTabStop (tabPos)); + } break; case RTF.Minor.LeftIndent: - using (Graphics g = CreateGraphics ()) - rtf_style.rtf_par_line_left_indent = (int) (((float) rtf.Param / 1440.0F) * g.DpiX + 0.5F); + rtf_style.rtf_par_line_left_indent = ((float) rtf.Param / 1440.0F) * document.Dpi; + break; + + case RTF.Minor.FirstIndent: + rtf_style.rtf_par_first_line_indent = ((float) rtf.Param / 1440.0F) * document.Dpi; + break; + + case RTF.Minor.RightIndent: + rtf_style.rtf_par_line_right_indent = ((float) rtf.Param / 1440.0F) * document.Dpi; break; case RTF.Minor.QuadCenter: FlushText (rtf, false); - rtf_style.rtf_rtfalign = HorizontalAlignment.Center; + rtf_style.rtf_par_align = HorizontalAlignment.Center; break; case RTF.Minor.QuadJust: FlushText (rtf, false); - rtf_style.rtf_rtfalign = HorizontalAlignment.Center; + rtf_style.rtf_par_align = HorizontalAlignment.Left; break; case RTF.Minor.QuadLeft: FlushText (rtf, false); - rtf_style.rtf_rtfalign = HorizontalAlignment.Left; + rtf_style.rtf_par_align = HorizontalAlignment.Left; break; case RTF.Minor.QuadRight: FlushText (rtf, false); - rtf_style.rtf_rtfalign = HorizontalAlignment.Right; + rtf_style.rtf_par_align = HorizontalAlignment.Right; + break; + + case RTF.Minor.SpaceAfter: + rtf_style.rtf_par_spacing_after = ((float) rtf.Param / 1440.0F) * document.Dpi; + break; + + case RTF.Minor.SpaceBefore: + rtf_style.rtf_par_spacing_before = ((float) rtf.Param / 1440.0F) * document.Dpi; + break; + + case RTF.Minor.SpaceBetween: + rtf_style.rtf_par_line_spacing = ((float) rtf.Param / 1440.0F) * document.Dpi; + break; + + case RTF.Minor.SpaceMultiply: + rtf_style.rtf_par_line_spacing_multiple = (rtf.Param == 1); break; } break; @@ -1543,7 +1959,8 @@ namespace System.Windows.Forms { case RTF.Minor.Row: case RTF.Minor.Line: case RTF.Minor.Par: { - FlushText(rtf, true); + if (Multiline) + FlushText (rtf, true); break; } @@ -1575,8 +1992,8 @@ namespace System.Windows.Forms { break; } - case RTF.Minor.WidowCtrl: - break; + case RTF.Minor.WidowCtrl: + break; case RTF.Minor.EmDash: { rtf_line.Append ("\u2014"); @@ -1587,7 +2004,7 @@ namespace System.Windows.Forms { rtf_line.Append ("\u2013"); break; } -/* + case RTF.Minor.LQuote: { Console.Write("\u2018"); break; @@ -1607,7 +2024,7 @@ namespace System.Windows.Forms { Console.Write("\u201D"); break; } -*/ + default: { // Console.WriteLine ("skipped special char: {0}", rtf.Minor); // rtf.SkipGroup(); @@ -1640,16 +2057,21 @@ namespace System.Windows.Forms { } */ - if (rtf_style.rtf_visible) - rtf_line.Append (str); + rtf_line.Append (str); } private void FlushText(RTF.RTF rtf, bool newline) { + FlushText (rtf, newline, false); + } + + private void FlushText(RTF.RTF rtf, bool newline, bool force) { int length; + float hanging_indent; + float left_indent; Font font; length = rtf_line.Length; - if (!newline && (length == 0)) { + if (!newline && (length == 0) && !force) { return; } @@ -1659,7 +2081,12 @@ namespace System.Windows.Forms { } font = new Font (rtf_style.rtf_rtffont.Name, rtf_style.rtf_rtffont_size, rtf_style.rtf_rtfstyle); + if (font.Name != rtf_style.rtf_rtffont.Name && !string.IsNullOrEmpty (rtf_style.rtf_rtffont.AltName)) + font = new Font (rtf_style.rtf_rtffont.AltName, rtf_style.rtf_rtffont_size, rtf_style.rtf_rtfstyle); + hanging_indent = -rtf_style.rtf_par_first_line_indent; + left_indent = rtf_style.rtf_par_line_left_indent - hanging_indent; + if (rtf_style.rtf_color == Color.Empty) { System.Windows.Forms.RTF.Color color; @@ -1682,30 +2109,40 @@ namespace System.Windows.Forms { if (newline && rtf_line.ToString ().EndsWith (Environment.NewLine) == false) rtf_line.Append (Environment.NewLine); - document.Add (rtf_cursor_y, rtf_line.ToString (), rtf_style.rtf_rtfalign, font, rtf_style.rtf_color, - newline ? LineEnding.Rich : LineEnding.Wrap); - if (rtf_style.rtf_par_line_left_indent != 0) { - Line line = document.GetLine (rtf_cursor_y); - line.indent = rtf_style.rtf_par_line_left_indent; - } + document.Add (rtf_cursor_y, rtf_line.ToString (), rtf_style.rtf_par_align, font, rtf_style.rtf_color, + rtf_style.rtf_back_color, rtf_style.rtf_text_position, rtf_style.rtf_char_offset, left_indent, hanging_indent, + rtf_style.rtf_par_line_right_indent, rtf_style.rtf_par_spacing_before, rtf_style.rtf_par_spacing_after, + rtf_style.rtf_par_line_spacing, rtf_style.rtf_par_line_spacing_multiple, + rtf_style.rtf_par_tab_stops.Clone() , rtf_style.rtf_visible, + newline ? LineEnding.Rich : LineEnding.None); } else { - Line line; + Line line = document.GetLine (rtf_cursor_y); + + if (newline) { + if (rtf_cursor_x < line.text.Length) + document.Split(line, rtf_cursor_x); + line.ending = LineEnding.Rich; + } + + line.indent = left_indent; + line.HangingIndent = hanging_indent; + line.right_indent = rtf_style.rtf_par_line_right_indent; + line.spacing_after = rtf_style.rtf_par_spacing_after; + line.spacing_before = rtf_style.rtf_par_spacing_before; + line.line_spacing = rtf_style.rtf_par_line_spacing; + line.line_spacing_multiple = rtf_style.rtf_par_line_spacing_multiple; + line.alignment = rtf_style.rtf_par_align; - line = document.GetLine (rtf_cursor_y); - line.indent = rtf_style.rtf_par_line_left_indent; if (rtf_line.Length > 0) { document.InsertString (line, rtf_cursor_x, rtf_line.ToString ()); document.FormatText (line, rtf_cursor_x + 1, line, rtf_cursor_x + 1 + length, - font, rtf_style.rtf_color, Color.Empty, - FormatSpecified.Font | FormatSpecified.Color); + font, rtf_style.rtf_color, rtf_style.rtf_back_color, rtf_style.rtf_text_position, rtf_style.rtf_char_offset, + rtf_style.rtf_visible, FormatSpecified.Font | FormatSpecified.Color | FormatSpecified.BackColor | + FormatSpecified.TextPosition | FormatSpecified.CharOffset | FormatSpecified.Visibility); } - if (newline) { - line = document.GetLine (rtf_cursor_y); - line.ending = LineEnding.Rich; - if (line.Text.EndsWith (Environment.NewLine) == false) - line.Text += Environment.NewLine; - } + if (newline && line.Text.EndsWith (Environment.NewLine) == false) + line.Text += Environment.NewLine; reuse_line = false; // sanity assignment - in this case we have already re-used one line. } @@ -1740,9 +2177,20 @@ namespace System.Windows.Forms { rtf_skip_count = 0; rtf_line = new StringBuilder(); rtf_style.rtf_color = Color.Empty; + rtf_style.rtf_back_color = Color.Empty; rtf_style.rtf_rtffont_size = (int)this.Font.Size; - rtf_style.rtf_rtfalign = HorizontalAlignment.Left; + rtf_style.rtf_par_align = HorizontalAlignment.Left; rtf_style.rtf_rtfstyle = FontStyle.Regular; + rtf_style.rtf_text_position = TextPositioning.Normal; + rtf_style.rtf_par_spacing_after = 0; + rtf_style.rtf_par_spacing_before = 0; + rtf_style.rtf_par_line_spacing = 0; + rtf_style.rtf_par_line_spacing_multiple = false; + rtf_style.rtf_par_line_left_indent = 0; + rtf_style.rtf_par_first_line_indent = 0; + rtf_style.rtf_par_line_right_indent = 0; + rtf_style.rtf_par_tab_stops.Clear (); + rtf_style.rtf_char_offset = 0; rtf_style.rtf_rtffont = null; rtf_style.rtf_visible = true; rtf_style.rtf_skip_width = 1; @@ -1751,15 +2199,18 @@ namespace System.Windows.Forms { rtf_chars = 0; rtf.DefaultFont(this.Font.Name); - rtf_text_map = new RTF.TextMap(); - RTF.TextMap.SetupStandardTable(rtf_text_map.Table); - document.SuspendRecalc (); try { rtf.Read(); // That's it FlushText(rtf, false); + if (document.Lines > 1) { + Line last_line = document.GetLine (document.Lines); + if (last_line.text.Length == 0) { + document.Delete (last_line); + } + } } @@ -1780,10 +2231,11 @@ namespace System.Windows.Forms { rtf_section_stack.Clear(); if (IsHandleCreated) { + CalculateScrollBars (); using (var graphics = CreateGraphics()) document.RecalculateDocument(graphics, cursor_y, document.Lines, false); document.ResumeRecalc (true); - document.Invalidate (document.GetLine(cursor_y), 0, document.GetLine(document.Lines), -1); + document.InvalidateLinesAfter(document.GetLine(cursor_y)); } else { document.ResumeRecalc (false); } @@ -1822,7 +2274,7 @@ namespace System.Windows.Forms { rtf.Append(String.Format("\\f{0}", font_index)); // Font table entry } - if ((prev_font == null) || (prev_font.Size != font.Size)) { + if ((prev_font == null) || (Math.Abs (prev_font.Size - font.Size) > 0.01)) { rtf.Append(String.Format("\\fs{0}", (int)(font.Size * 2))); // Font size } @@ -1873,19 +2325,20 @@ namespace System.Windows.Forms { int start = rtf.Length; int count = text.Length; - // First emit simple unicode chars as escaped - EmitEscapedUnicode (rtf, text); - // This method emits user text *only*, so it's safe to escape any reserved rtf chars // Escape '\' first, since it is used later to escape the other chars if (text.IndexOfAny (ReservedRTFChars) > -1) { - rtf.Replace ("\\", "\\\\", start, count); - rtf.Replace ("{", "\\{", start, count); - rtf.Replace ("}", "\\}", start, count); + StringBuilder sb = new StringBuilder(text); // Would it be better to just use text = text.Replace for this? + sb.Replace ("\\", "\\\\"); + sb.Replace ("{", "\\{"); + sb.Replace ("}", "\\}"); + text = sb.ToString (); } + + // Then actually emit the text, and also escape any Unicode + EmitEscapedUnicode (rtf, text); } - // The chars to be escaped use "\'" + its hexadecimal value. private void EmitEscapedUnicode (StringBuilder sb, string text) { int pos; @@ -1894,9 +2347,10 @@ namespace System.Windows.Forms { while ((pos = IndexOfNonAscii (text, start)) > -1) { sb.Append (text, start, pos - start); - int n = (int)text [pos]; - sb.Append ("\\'"); - sb.Append (n.ToString ("X")); + short n = (short)text [pos]; + sb.Append ("\\u"); + sb.Append (n.ToString ()); + sb.Append ("?"); start = pos + 1; } @@ -1918,24 +2372,182 @@ namespace System.Windows.Forms { return -1; } + static char[] GetHexChars (byte[] bytes, int length) + { + if (length > bytes.Length) + throw new ArgumentOutOfRangeException ("length"); + + var chars = new char [length * 2]; + int n; + for (int i = 0; i < length; i++) { + n = bytes [i] >> 4; + chars [i * 2] = (char)('A' - 10 + n + (((n - 10) >> 31) & ('0' - 55))); + n = bytes [i] & 0x0F; + chars [i * 2 + 1] = (char)('A' - 10 + n + (((n - 10) >> 31) & ('0' - 55))); + } + return chars; + } + + void EmitRtfPicture (PictureTag picture, StringBuilder sb) + { + if (!picture.picture.IsValid ()) { + return; + } + + int width = (int)((float)picture.picture.Width / document.Dpi * 1440f); + int height = (int)((float)picture.picture.Height / document.Dpi * 1440f); + string type = ""; + switch (picture.picture.ImageType) { + case RTF.Minor.WinMetafile: + type = "wmetafile1"; // The number should actually vary, but I don't see how it is used here at all. + break; + case RTF.Minor.EnhancedMetafile: + type = "emfblip"; + break; + case RTF.Minor.PngBlip: + type = "pngblip"; + break; + case RTF.Minor.JpegBlip: + type = "jpegblip"; + break; + } + sb.AppendFormat ("{{\\pict\\{0}\\picwgoal{1}\\pichgoal{2} ", type, width, height); + + var data = picture.picture.Data; + data.Position = 0; + if (sb.Capacity - sb.Length < data.Length) { + sb.Capacity += (int)data.Length * 2; + } + var buffer = new byte [39]; + int length; + while ((length = data.Read (buffer, 0, buffer.Length)) > 0) { + sb.AppendLine ().Append (GetHexChars (buffer, length)); + } + sb.Append ("}"); + } + + void EmitTabStops (StringBuilder sb, TabStopCollection tabs) + { + foreach (var tab in tabs) { + if (tab is DecimalTabStop) { + sb.Append ("\\tqdec"); + } else if (tab is CentredTabStop) { + sb.Append ("\\tqc"); + } else if (tab is RightTabStop) { + sb.Append ("\\tqr"); + } + sb.Append ("\\tx"); + sb.Append (Int (tab.Position / document.Dpi * 1440f)); + } + } + + void EmitPard (StringBuilder sb, ArrayList fonts, Line line, LineTag tag, TabStopCollection tabs, float ppt) + { + var first_line_indent = -line.HangingIndent; + var left_indent = line.Indent - first_line_indent; + var right_indent = line.RightIndent; + + sb.Append ("\\pard"); + // Reset to default paragraph properties + switch (line.alignment) { + case HorizontalAlignment.Left: + sb.Append ("\\ql"); + break; + case HorizontalAlignment.Center: + sb.Append ("\\qc"); + break; + case HorizontalAlignment.Right: + sb.Append ("\\qr"); + break; + } + if (Math.Abs (line.spacing_after) > ppt) { + sb.Append ("\\sa"); + sb.Append (Int (line.spacing_after / ppt)); + } + if (Math.Abs (line.spacing_before) > ppt) { + sb.Append ("\\sb"); + sb.Append (Int (line.spacing_before / ppt)); + } + if (Math.Abs (line.line_spacing) > ppt) { + sb.Append ("\\sl"); + sb.Append (Int (line.line_spacing / ppt)); + sb.Append ("\\slmult"); + sb.Append (line.line_spacing_multiple ? "1" : "0"); + } + if (Math.Abs (left_indent) > ppt) { + sb.Append ("\\li"); + sb.Append (Int (left_indent / ppt)); + } + if (Math.Abs (first_line_indent) > ppt) { + sb.Append ("\\fi"); + sb.Append (Int (first_line_indent / ppt)); + } + if (Math.Abs (right_indent) > ppt) { + sb.Append ("\\ri"); + sb.Append (Int (right_indent / ppt)); + } + if (tabs.Count > 0) { + EmitTabStops (sb, tabs); + } + } + + static void LoadParaSettings (Line line, out HorizontalAlignment line_alignment, out float spacing_after, out float spacing_before, out float line_spacing, + out bool line_spacing_multiple, out float left_indent, out float prev_left_indent, out float first_line_indent, + out float prev_first_line_indent, out float right_indent, out TabStopCollection tabs) + { + spacing_after = line.spacing_after; + spacing_before = line.spacing_before; + line_spacing = line.line_spacing; + line_spacing_multiple = line.line_spacing_multiple; + line_alignment = line.alignment; + first_line_indent = -line.HangingIndent; + left_indent = line.Indent - first_line_indent; + prev_first_line_indent = first_line_indent; + prev_left_indent = left_indent; + right_indent = line.RightIndent; + tabs = line.TabStops; + } + // start_pos and end_pos are 0-based private StringBuilder GenerateRTF(Line start_line, int start_pos, Line end_line, int end_pos) { StringBuilder sb; ArrayList fonts; ArrayList colors; Color color; + Color back_color; Font font; Line line; LineTag tag; + TextPositioning text_position; + HorizontalAlignment line_alignment; + float spacing_after; + float spacing_before; + float line_spacing; + bool line_spacing_multiple; + float left_indent; + float prev_left_indent; + float first_line_indent; + float prev_first_line_indent; + float right_indent; + TabStopCollection tabs; + TabStopCollection tabDiff; + bool emit_defaults; + float char_offset; + bool visible; int pos; int line_no; int line_len; - int i; + int i, j; int length; + float ppt; // pixels per twip + + ppt = document.Dpi / 1440f; // 1 twip = 1/20 point, 1 point = 1/72 inch, thus 1440 twips = 1 inch. + emit_defaults = false; sb = new StringBuilder(); fonts = new ArrayList(10); colors = new ArrayList(10); + tabDiff = new TabStopCollection (); // Two runs, first we parse to determine tables; // and unlike most of our processing here we work on tags @@ -1949,6 +2561,7 @@ namespace System.Windows.Forms { tag = LineTag.FindTag(start_line, pos); font = tag.Font; color = tag.Color; + back_color = Color.Empty; fonts.Add(font.Name); colors.Add(color); @@ -1972,11 +2585,18 @@ namespace System.Windows.Forms { if (tag.Color != color) { color = tag.Color; - if (!colors.Contains(color)) { + if (color != Color.Empty && !colors.Contains (color)) { colors.Add(color); } } + if (tag.BackColor != back_color) { + back_color = tag.BackColor; + if (back_color != Color.Empty && !colors.Contains (back_color)) { + colors.Add (back_color); + } + } + pos = tag.Start + tag.Length - 1; tag = tag.Next; } @@ -2008,7 +2628,7 @@ namespace System.Windows.Forms { // Emit the color table (if needed) if ((colors.Count > 1) || ((((Color)colors[0]).R != this.ForeColor.R) || (((Color)colors[0]).G != this.ForeColor.G) || (((Color)colors[0]).B != this.ForeColor.B))) { - sb.Append("{\\colortbl "); // Header and NO! default color + sb.Append("{\\colortbl;"); // Header and default color (default is needed) for (i = 0; i < colors.Count; i++) { sb.Append(String.Format("\\red{0}", ((Color)colors[i]).R)); sb.Append(String.Format("\\green{0}", ((Color)colors[i]).G)); @@ -2020,17 +2640,24 @@ namespace System.Windows.Forms { } sb.Append("{\\*\\generator Mono RichTextBox;}"); - // Emit initial paragraph settings - tag = LineTag.FindTag(start_line, start_pos); - sb.Append("\\pard"); // Reset to default paragraph properties - EmitRTFFontProperties(sb, -1, fonts.IndexOf(tag.Font.Name), null, tag.Font); // Font properties - sb.Append(" "); // Space separator + tag = LineTag.FindTag (start_line, start_pos); font = tag.Font; - color = (Color)colors[0]; + color = Color.Empty; + back_color = Color.Empty; + text_position = TextPositioning.Normal; + char_offset = 0; + visible = true; line = start_line; line_no = start_line.line_no; pos = start_pos; + LoadParaSettings (line, out line_alignment, out spacing_after, out spacing_before, out line_spacing, + out line_spacing_multiple, out left_indent, out prev_left_indent, out first_line_indent, + out prev_first_line_indent, out right_indent, out tabs); + + EmitPard (sb, fonts, line, tag, tabs, ppt); + EmitRTFFontProperties (sb, -1, fonts.IndexOf (tag.Font.Name), null, tag.Font); // Font properties + sb.Append(" "); // Space separator while (line_no <= end_line.line_no) { line = document.GetLine(line_no); @@ -2042,7 +2669,110 @@ namespace System.Windows.Forms { line_len = end_pos; } - while (pos < line_len) { + i = 0; + j = 0; + tabDiff.Clear (); + emit_defaults = line.TabStops.Count < tabs.Count; // If there are less tabs on the new line, we've got to start over. + while (!emit_defaults && i < tabs.Count && j < line.TabStops.Count) { + if (tabs [i].Equals (line.TabStops [j])) { + i++; + j++; + } else if (tabs [i].Position - ppt > line.TabStops [j].Position) { + // The current tabstop is after the new line's one, so we need to add one in between. + tabDiff.Add (line.TabStops [j]); + j++; + } else { + // Either the tabs are at the same position and are of different types, or this line is missing at least one. + // This in turn means we must start the line with a \pard, and re-emit all other paragraph properties. + emit_defaults = true; + } + } + if (i < tabs.Count) // We didn't reach the end of the existing tabstops, so the rest have to be removed. + emit_defaults = true; + while (!emit_defaults && j < line.TabStops.Count) { // Any new ones have to be added on the end too. + tabDiff.Add (line.TabStops[j]); + j++; + } + tabs = line.TabStops; + + if (!emit_defaults) { + length = sb.Length; + if (line.Alignment != line_alignment) { + line_alignment = line.Alignment; + switch (line_alignment) { + case HorizontalAlignment.Left: + sb.Append("\\ql"); + break; + case HorizontalAlignment.Center: + sb.Append("\\qc"); + break; + case HorizontalAlignment.Right: + sb.Append("\\qr"); + break; + } + } + + if (Math.Abs(line.spacing_after - spacing_after) > ppt) { + spacing_after = line.spacing_after; + sb.Append("\\sa"); + sb.Append(Int(spacing_after / ppt)); + } + + if (Math.Abs(line.spacing_before - spacing_before) > ppt) { + spacing_before = line.spacing_before; + sb.Append("\\sb"); + sb.Append(Int(spacing_before / ppt)); + } + + if (Math.Abs(line.line_spacing - line_spacing) > ppt) { + line_spacing = line.line_spacing; + sb.Append("\\sl"); + sb.Append(Int(line.line_spacing / ppt)); + } + + if (line.line_spacing_multiple != line_spacing_multiple) { + line_spacing_multiple = line.line_spacing_multiple; + sb.Append("\\slmult"); + sb.Append(line.line_spacing_multiple ? "1" : "0"); + } + + first_line_indent = -line.HangingIndent; + left_indent = line.Indent - first_line_indent; + + if (Math.Abs(prev_left_indent - left_indent) > ppt) { + prev_left_indent = left_indent; + sb.Append("\\li"); + sb.Append(Int(left_indent / ppt)); + } + + if (Math.Abs(prev_first_line_indent - first_line_indent) > ppt) { + prev_first_line_indent = first_line_indent; + sb.Append("\\fi"); + sb.Append(Int(first_line_indent / ppt)); + } + + if (Math.Abs(line.right_indent - right_indent) > ppt) { + right_indent = line.right_indent; + sb.Append("\\ri"); + sb.Append(Int(right_indent / ppt)); + } + + if (tabDiff.Count > 0) { + EmitTabStops(sb, tabDiff); + } + + if (length != sb.Length) { + sb.Append(" "); + } + } else { + EmitPard (sb, fonts, line, tag, tabs, ppt); + sb.Append(" "); + LoadParaSettings (line, out line_alignment, out spacing_after, out spacing_before, out line_spacing, + out line_spacing_multiple, out left_indent, out prev_left_indent, out first_line_indent, + out prev_first_line_indent, out right_indent, out tabs); + } + + while (pos < line_len && tag != null) { length = sb.Length; if (tag.Font != font) { @@ -2052,14 +2782,65 @@ namespace System.Windows.Forms { if (tag.Color != color) { color = tag.Color; - sb.Append(String.Format("\\cf{0}", colors.IndexOf(color))); + if (color != Color.Empty) + sb.Append(String.Format("\\cf{0}", colors.IndexOf(color) + 1)); + else + sb.Append("\\cf0"); } + + if (tag.BackColor != back_color) { + back_color = tag.BackColor; + if (back_color != Color.Empty) + sb.Append(String.Format("\\cb{0}", colors.IndexOf(back_color) + 1)); + else + sb.Append("\\cb0"); + } + + if (tag.TextPosition != text_position) { + if (text_position != TextPositioning.Normal && tag.TextPosition != TextPositioning.Normal) + sb.Append("\\nosupersub"); + // Technically it is possible to have subscripts in superscript and vise versa. But that's not what we've got. + text_position = tag.TextPosition; + switch (tag.TextPosition) { + case TextPositioning.Normal: + sb.Append("\\nosupersub"); + break; + case TextPositioning.Subscript: + sb.Append("\\sub"); + break; + case TextPositioning.Superscript: + sb.Append("\\super"); + break; + } + } + + if (tag.CharOffset != char_offset) { + char_offset = tag.CharOffset; + if (char_offset >= 0) { + sb.Append("\\up"); + sb.Append(Int((char_offset / document.Dpi) * 144)); + } else { + sb.Append("\\dn"); + sb.Append(-Int((char_offset / document.Dpi) * 144)); + } + } + + if (tag.Visible != visible) { + visible = tag.Visible; + if (visible) + sb.Append("\\v0"); + else + sb.Append("\\v"); + } + if (length != sb.Length) { sb.Append(" "); // Emit space to separate keywords from text } // Emit the string itself - if (line_no != end_line.line_no) { + if (tag is PictureTag) { + EmitRtfPicture((PictureTag)tag, sb); + } else if (line_no != end_line.line_no) { EmitRTFText(sb, tag.Line.text.ToString(pos, tag.Start + tag.Length - pos - 1)); } else { if (end_pos < (tag.Start + tag.Length - 1)) { @@ -2071,11 +2852,16 @@ namespace System.Windows.Forms { } pos = tag.Start + tag.Length - 1; - tag = tag.Next; + do { + tag = tag.Next; + } while (tag != null && tag.IsTextTag && tag.Length == 0); } if (pos >= line.text.Length) { if (line.ending != LineEnding.Wrap) { - sb.Append("\\par"); + // pos is incremented by the tag length, so it can be after where we want to finish. + // If we're on the last line we don't want to output \par when we're stopping before the end of the line. + if (!(line_no == end_line.line_no && pos > end_pos)) + sb.Append("\\par"); sb.Append(Environment.NewLine); } } @@ -2088,6 +2874,11 @@ namespace System.Windows.Forms { return sb; } + + int Int (float f) + { + return (int)(f + 0.5f); + } #endregion // Private Methods } } diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/TabStops.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/TabStops.cs new file mode 100644 index 0000000000..6226024cdc --- /dev/null +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/TabStops.cs @@ -0,0 +1,258 @@ +// 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. +// +// Copyright (c) 2015 Karl Scowen +// +// Authors: +// Karl Scowen +// +// + +using System; +using System.Collections.Generic; + +namespace System.Windows.Forms { + abstract class TabStop : IComparable { + float _pos = -1; + + internal float Position { + get { + return _pos; + } + + set { + if (_pos >= 0) + throw new InvalidOperationException ("Can't change Position once it has been set!"); + + _pos = value; + } + } + + internal virtual float GetInitialWidth (Line line, int pos) + { + return 0; + } + + internal abstract float CalculateRight (Line line, int pos); + + public override bool Equals (object obj) + { + return obj.GetType () == this.GetType () && Math.Abs (((TabStop)obj).Position - Position) < 0.01; + } + + public override int GetHashCode () + { + return this.GetType ().GetHashCode () ^ Position.GetHashCode (); + } + + public override string ToString () + { + return string.Format ("[{0}: Position {1}]", this.GetType().Name, Position); + } + + #region IComparable implementation + public int CompareTo (TabStop other) + { + return Position.CompareTo (other.Position); + } + + #endregion + } + + class LeftTabStop : TabStop { + internal LeftTabStop () + { + } + internal LeftTabStop (float position) + { + Position = position; + } + + internal override float GetInitialWidth (Line line, int pos) + { + return Position - line.widths[pos]; + } + + internal override float CalculateRight (Line line, int pos) + { + return Position; + } + } + + class CentredTabStop : TabStop { + internal override float CalculateRight (Line line, int pos) + { + int endIndex = line.Text.IndexOfAny (new [] {'\t', '\n', '\r'}, pos + 1); // pos is this tab's index, so look after that. + if (endIndex < 0) + endIndex = line.text.Length; + float textWidth = line.widths [endIndex] - line.widths [pos + 1]; // We use the position after this tabstop, hence pos + 1. + return Math.Max (Position - textWidth / 2f, line.widths [pos]); // We want the width until the start of the text, which is before Position, but we can't go below zero. + } + } + + internal class RightTabStop : TabStop { + internal override float CalculateRight (Line line, int pos) + { + int endIndex = line.Text.IndexOfAny (new [] {'\t', '\n', '\r'}, pos + 1); // pos is this tab's index, so look after that. + return calcWidth (line, pos, endIndex); + } + + protected float calcWidth (Line line, int pos, int endIndex) + { + if (endIndex < 0) + endIndex = line.text.Length; + float textWidth = line.widths [endIndex] - line.widths [pos + 1]; // We use the position after this tabstop, hence pos + 1. + return Math.Max (Position - textWidth, line.widths [pos]); + } + } + + internal class DecimalTabStop : RightTabStop { + internal override float CalculateRight (Line line, int pos) + { + // This is simply a right-align tabstop that regards the decimal as the end. + int endIndex = line.Text.IndexOfAny (new [] {'\t', '\n', '\r', '.'}, pos + 1); // pos is this tab's index, so look after that. + return calcWidth (line, pos, endIndex); + } + } + + internal class TabStopCollection : IList { + SortedList tabs = new SortedList (); + + public TabStopCollection Clone () + { + var n = new TabStopCollection (); + foreach (var tab in tabs.Keys) { + n.tabs.Add (tab, null); + } + return n; + } + + public int IndexOf (TabStop tab) + { + return tabs.IndexOfKey (tab); + } + + public void Insert (int index, TabStop item) + { + throw new NotSupportedException ("Not relevant to sorted data!"); + } + + public void RemoveAt (int index) + { + tabs.RemoveAt (index); + } + + public TabStop this [int index] { + get { + return tabs.Keys [index]; + } + set { + throw new NotSupportedException ("Not relevant to sorted data!"); + } + } + + #region ICollection implementation + public void Add (TabStop tab) + { + tabs.Add (tab, null); + } + + public void Clear () + { + tabs.Clear (); + } + + public bool Contains (TabStop tab) + { + return tabs.ContainsKey (tab); + } + + public void CopyTo (TabStop[] array, int arrayIndex) + { + tabs.Keys.CopyTo (array, arrayIndex); + } + + public TabStop[] ToArray () + { + var arr = new TabStop [Count]; + CopyTo (arr, 0); + return arr; + } + + public int[] ToPosArray () + { + var arr = new int [Count]; + for (int i = 0; i < Count; i++) { + arr [i] = (int)this [i].Position; + } + return arr; + } + + public bool Remove (TabStop tab) + { + return tabs.Remove (tab); + } + + public int Count { + get { + return tabs.Count; + } + } + + bool ICollection.IsReadOnly { + get { + return false; + } + } + #endregion + + #region IEnumerable implementation + public IEnumerator GetEnumerator () + { + return tabs.Keys.GetEnumerator (); + } + #endregion + + #region IEnumerable implementation + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator () + { + return GetEnumerator (); + } + #endregion + + public override bool Equals (object obj) + { + var other = obj as TabStopCollection; + if (other == null || other.Count != this.Count) + return false; + + for (int i = 0; i < Count; i++) { + if (!tabs.Keys [i].Equals (other.tabs.Keys [i])) + return false; + } + return true; + } + + public override int GetHashCode () + { + // I don't like warnings, but I honestly don't care about the hash code. + return base.GetHashCode (); + } + } +} \ No newline at end of file diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs index 9ff8e33e47..1eba622e6b 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs @@ -284,8 +284,8 @@ namespace System.Windows.Forms { if (control == null) throw new ArgumentNullException (); - if (value < -1) - throw new ArgumentException (); + if (value < 1) + throw new ArgumentOutOfRangeException (); column_spans[control] = value; @@ -310,8 +310,8 @@ namespace System.Windows.Forms { if (control == null) throw new ArgumentNullException (); - if (value < -1) - throw new ArgumentException (); + if (value < 1) + throw new ArgumentOutOfRangeException (); row_spans[control] = value; diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/TextBoxBase.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/TextBoxBase.cs index bda0cff694..b4440143b7 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/TextBoxBase.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/TextBoxBase.cs @@ -21,6 +21,7 @@ // // Authors: // Peter Bartok pbartok@novell.com +// Karl Scowen // // @@ -116,8 +117,7 @@ namespace System.Windows.Forms current_link = null; show_caret_w_selection = (this is TextBox); document = new Document(this); - document.WidthChanged += new EventHandler(document_WidthChanged); - document.HeightChanged += new EventHandler(document_HeightChanged); + document.SizeChanged += new EventHandler (document_SizeChanged); //document.CaretMoved += new EventHandler(CaretMoved); document.Wrap = false; click_last = DateTime.Now; @@ -296,8 +296,7 @@ namespace System.Windows.Forms if (value == actual_border_style) return; - if (actual_border_style != BorderStyle.Fixed3D || value != BorderStyle.Fixed3D) - Invalidate (); + Invalidate (); actual_border_style = value; document.UpdateMargins (); @@ -617,7 +616,10 @@ namespace System.Windows.Forms Line line = null; for (int i = 1; i <= document.Lines; i++) { line = document.GetLine (i); - sb.Append(line.text.ToString ()); + if (i == document.Lines) + sb.Append(line.TextWithoutEnding ()); + else + sb.Append(line.text.ToString ()); } return sb.ToString(); @@ -1821,6 +1823,7 @@ namespace System.Windows.Forms } document.PositionCaret(e.X + document.ViewPortX, e.Y + document.ViewPortY); + document.DisplayCaret (); if (dbliclick) { switch (click_mode) { @@ -2042,22 +2045,24 @@ namespace System.Windows.Forms Invalidate(); } - internal void CalculateScrollBars () + internal bool CalculateScrollBars () { - // FIXME - need separate calculations for center and right alignment + var old_canvas_width = canvas_width; + SizeControls (); - if (document.Width >= document.ViewPortWidth) { + if (document.Width > document.ViewPortWidth) { hscroll.SetValues (0, Math.Max (1, document.Width), -1, document.ViewPortWidth < 0 ? 0 : document.ViewPortWidth); if (document.multiline) hscroll.Enabled = true; } else { hscroll.Enabled = false; + hscroll.Value = hscroll.Minimum; hscroll.Maximum = document.ViewPortWidth; } - if (document.Height >= document.ViewPortHeight) { + if (document.Height > document.ViewPortHeight) { vscroll.SetValues (0, Math.Max (1, document.Height), -1, document.ViewPortHeight < 0 ? 0 : document.ViewPortHeight); if (document.multiline) @@ -2108,16 +2113,16 @@ namespace System.Windows.Forms PositionControls (); SizeControls (); //Update sizings now we've decided whats visible + + return (canvas_width != old_canvas_width); } - private void document_WidthChanged (object sender, EventArgs e) + private void document_SizeChanged (object sender, Document.SizeChangedEventArgs e) { - CalculateScrollBars(); - } - - private void document_HeightChanged (object sender, EventArgs e) - { - CalculateScrollBars(); + var canvas_width_changed = CalculateScrollBars (); + if (e.HeightChanged && canvas_width_changed) + CalculateDocument (); // Viewport has changed due to the document change, update the document. + // TODO: technically the opposite situation could happen too, where a document width change causes a change in canvas height. } private void ScrollLinks (int xChange, int yChange) @@ -2310,40 +2315,41 @@ namespace System.Windows.Forms // If the caret moves to the left outside the visible area, we jump the document into view, not just one // character, but 1/3 of the width of the document // If the caret moves to the right outside the visible area, we scroll just enough to keep the caret visible + // For comparison, in Windows 8.1 / .Net 4: + // Multiline: as above, but 1/4 + // Single line: either direction with the cursors jumps 1/4 + // Both are irrespective of alignment. // Handle horizontal scrolling - if (document.CaretLine.alignment == HorizontalAlignment.Left) { - // Check if we moved out of view to the left - if (pos.X < (document.ViewPortX)) { - do { - if ((hscroll.Value - document.ViewPortWidth / 3) >= hscroll.Minimum) { - hscroll.SafeValueSet (hscroll.Value - document.ViewPortWidth / 3); - } else { - hscroll.Value = hscroll.Minimum; - } - } while (hscroll.Value > pos.X); - } - - // Check if we moved out of view to the right - if ((pos.X >= (document.ViewPortWidth + document.ViewPortX)) && (hscroll.Value != hscroll.Maximum)) { - if ((pos.X - document.ViewPortWidth + 1) <= hscroll.Maximum) { - if (pos.X - document.ViewPortWidth >= 0) { - hscroll.SafeValueSet (pos.X - document.ViewPortWidth + 1); - } else { - hscroll.Value = 0; - } + // Check if we moved out of view to the left + if (pos.X < (document.ViewPortX)) { + do { + var newVal = hscroll.Value - document.ViewPortWidth / 3 - 1; // - 1 so that we're guaranteed to move, even if document.ViewPortWidth is < 3. + if (newVal >= hscroll.Minimum) { + hscroll.SafeValueSet (newVal); } else { - hscroll.Value = hscroll.Maximum; + hscroll.Value = hscroll.Minimum; } - } - } else if (document.CaretLine.alignment == HorizontalAlignment.Right) { -// hscroll.Value = pos.X; + } while (hscroll.Value > pos.X); + } -// if ((pos.X > (this.canvas_width + document.ViewPortX)) && (hscroll.Enabled && (hscroll.Value != hscroll.Maximum))) { -// hscroll.Value = hscroll.Maximum; -// } - } else { - // FIXME - implement center cursor alignment + // Check if we moved out of view to the right + if ((pos.X >= (document.ViewPortWidth + document.ViewPortX)) && (hscroll.Value != hscroll.Maximum)) { + int newVal; + if (Multiline) { + newVal = pos.X - document.ViewPortWidth + 1; + } else { + newVal = pos.X - document.ViewPortWidth * 2 / 3 + 1; + } + if (newVal <= hscroll.Maximum - document.ViewPortWidth + 1) { + if (newVal >= 0) { + hscroll.SafeValueSet (newVal); + } else { + hscroll.Value = 0; + } + } else { + hscroll.Value = hscroll.Maximum - document.ViewPortWidth + 1; + } } if (Text.Length > 0) @@ -2353,7 +2359,10 @@ namespace System.Windows.Forms return; // Handle vertical scrolling - height = document.CaretLine.Height + 1; + height = document.CaretLine.Height; + + if (document.CaretLine.line_no < document.Lines) + height += 1; // Add a bit of room on the bottom if there are more lines - but don't scroll past the bottom when ther aren't. if (pos.Y < document.ViewPortY) vscroll.SafeValueSet (pos.Y); diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs.REMOVED.git-id b/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs.REMOVED.git-id index abc6834f93..fbdeb41a45 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs.REMOVED.git-id +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs.REMOVED.git-id @@ -1 +1 @@ -24859dbf3fb500cd8b45e0af3aeca79ebb6a1f29 \ No newline at end of file +cf65c990cbf84419525f3ec10d349d46314cf7f2 \ No newline at end of file diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs index 33eb3c50b9..2bf3249537 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs @@ -383,26 +383,36 @@ namespace System.Windows.Forms [EditorBrowsable (EditorBrowsableState.Never)] public new void Show () { - Show (Location, DefaultDropDownDirection); + Show (Location); + } + + public void Show (int x, int y) + { + Show (new Point (x, y)); } public void Show (Point screenLocation) { + SetOwnerControl (null); Show (screenLocation, DefaultDropDownDirection); } - + + public void Show (Control control, int x, int y) + { + Show (control, new Point (x, y)); + } + public void Show (Control control, Point position) + { + Show (control, position, DefaultDropDownDirection); + } + + public void Show (Control control, Point position, ToolStripDropDownDirection direction) { if (control == null) throw new ArgumentNullException ("control"); - - XplatUI.SetOwner (Handle, control.Handle); - Show (control.PointToScreen (position), DefaultDropDownDirection); - } - - public void Show (int x, int y) - { - Show (new Point (x, y), DefaultDropDownDirection); + SetOwnerControl (control); + Show (control.PointToScreen (position), direction); } public void Show (Point position, ToolStripDropDownDirection direction) @@ -522,26 +532,17 @@ namespace System.Windows.Forms this.OnOpened (EventArgs.Empty); } - - public void Show (Control control, int x, int y) - { - if (control == null) - throw new ArgumentNullException ("control"); - Show (control, new Point (x, y)); - } - - public void Show (Control control, Point position, ToolStripDropDownDirection direction) - { - if (control == null) - throw new ArgumentNullException ("control"); - - XplatUI.SetOwner (Handle, control.Handle); - Show (control.PointToScreen (position), direction); - } #endregion #region Protected Methods + + protected virtual void SetOwnerControl (Control ownerControl) + { + var ownerControlHandle = (ownerControl == null) ? IntPtr.Zero : ownerControl.Handle; + XplatUI.SetOwner (Handle, ownerControlHandle); + } + protected override AccessibleObject CreateAccessibilityInstance () { return new ToolStripDropDownAccessibleObject (this); diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs index 4df3397908..7a60ac82f2 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs @@ -419,10 +419,8 @@ namespace System.Windows.Forms if (item.Owner == null) return null; - if (item.Owner is ContextMenuStrip) { - Control container = ((ContextMenuStrip)item.Owner).container; - return container == null ? null : container.TopLevelControl; - } + if (item.Owner is ContextMenuStrip ownerContextMenuStrip) + return ownerContextMenuStrip.SourceControl?.TopLevelControl; // MainMenuStrip return item.Owner.TopLevelControl; diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/TreeView.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/TreeView.cs index 74d77f5f80..a66f82ccc3 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/TreeView.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/TreeView.cs @@ -1419,7 +1419,7 @@ namespace System.Windows.Forms { private void Draw (Rectangle clip, Graphics dc) { - dc.FillRectangle (ThemeEngine.Current.ResPool.GetSolidBrush (BackColor), clip); + dc.FillRectangle (BackColorBrush, clip); if (dash == null) CreateDashPen (); @@ -1670,7 +1670,6 @@ namespace System.Windows.Forms { { if (!full_row_select || show_lines) DrawSelectionAndFocus(node, dc, node.Bounds); - Font font = node.NodeFont; if (node.NodeFont == null) @@ -1691,7 +1690,7 @@ namespace System.Windows.Forms { int middle = y + (ActualItemHeight / 2); if (full_row_select && !show_lines) { - Rectangle r = new Rectangle (1, y, ViewportRectangle.Width - 2, ActualItemHeight); + var r = new Rectangle (1, y, ViewportRectangle.Width - 2, ActualItemHeight); DrawSelectionAndFocus (node, dc, r); } @@ -1716,26 +1715,25 @@ namespace System.Windows.Forms { } if (draw_mode != TreeViewDrawMode.Normal) { - dc.FillRectangle (Brushes.White, node.Bounds); - TreeNodeStates tree_node_state = TreeNodeStates.Default;; + dc.FillRectangle (BackColorBrush, node.Bounds); + + var tree_node_state = TreeNodeStates.Default;; if (node.IsSelected) tree_node_state = TreeNodeStates.Selected; if (node.Checked) tree_node_state |= TreeNodeStates.Checked; if (node == focused_node) tree_node_state |= TreeNodeStates.Focused; - Rectangle node_bounds = node.Bounds; - if (draw_mode == TreeViewDrawMode.OwnerDrawText) { - node_bounds.X += 3; - node_bounds.Y += 1; - } else { + + var node_bounds = node.Bounds; + if (draw_mode != TreeViewDrawMode.OwnerDrawText) { node_bounds.X = 0; node_bounds.Width = Width; } - DrawTreeNodeEventArgs e = new DrawTreeNodeEventArgs (dc, node, node_bounds, tree_node_state); + var e = new DrawTreeNodeEventArgs (dc, node, node_bounds, tree_node_state); - OnDrawNode (e); + OnDrawNode (e); if (!e.DrawDefault) return; } diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Keyboard.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Keyboard.cs index 74ab0cffad..d2de95a510 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Keyboard.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Keyboard.cs @@ -416,6 +416,11 @@ namespace System.Windows.Forms { return 0; } + if (vkey == 0) { + buffer = String.Empty; + return 0; + } + XEvent e = new XEvent (); e.AnyEvent.type = XEventName.KeyPress; e.KeyEvent.display = display; @@ -440,6 +445,15 @@ namespace System.Windows.Forms { e.KeyEvent.state |= AltGrMask; + if ((vkey >= (int) VirtualKeys.VK_NUMPAD0) && (vkey <= (int) VirtualKeys.VK_NUMPAD9)) + e.KeyEvent.keycode = XKeysymToKeycode (display, vkey - (int) VirtualKeys.VK_NUMPAD0 + (int) KeypadKeys.XK_KP_0); + + if (vkey == (int) VirtualKeys.VK_DECIMAL) + e.KeyEvent.keycode = XKeysymToKeycode (display, (int) KeypadKeys.XK_KP_Decimal); + + if (vkey == (int) VirtualKeys.VK_SEPARATOR) + e.KeyEvent.keycode = XKeysymToKeycode(display, (int) KeypadKeys.XK_KP_Separator); + for (int keyc = min_keycode; (keyc <= max_keycode) && (e.KeyEvent.keycode == 0); keyc++) { // find keycode that could have generated this vkey if ((keyc2vkey [keyc] & 0xFF) == vkey) { @@ -452,15 +466,6 @@ namespace System.Windows.Forms { } } - if ((vkey >= (int) VirtualKeys.VK_NUMPAD0) && (vkey <= (int) VirtualKeys.VK_NUMPAD9)) - e.KeyEvent.keycode = XKeysymToKeycode (display, vkey - (int) VirtualKeys.VK_NUMPAD0 + (int) KeypadKeys.XK_KP_0); - - if (vkey == (int) VirtualKeys.VK_DECIMAL) - e.KeyEvent.keycode = XKeysymToKeycode (display, (int) KeypadKeys.XK_KP_Decimal); - - if (vkey == (int) VirtualKeys.VK_SEPARATOR) - e.KeyEvent.keycode = XKeysymToKeycode(display, (int) KeypadKeys.XK_KP_Separator); - if (e.KeyEvent.keycode == 0 && vkey != (int) VirtualKeys.VK_NONAME) { // And I couldn't find the keycode so i returned the vkey and was like whatever Console.Error.WriteLine ("unknown virtual key {0:X}", vkey); @@ -1213,7 +1218,7 @@ namespace System.Windows.Forms { if (xic != IntPtr.Zero && have_Xutf8LookupString && xevent.type == XEventName.KeyPress) { do { try { - res = Xutf8LookupString (xic, ref xevent, lookup_byte_buffer, 100, out keysym_res, out status); + res = Xutf8LookupString (xic, ref xevent, lookup_byte_buffer, lookup_byte_buffer.Length, out keysym_res, out status); } catch (EntryPointNotFoundException) { have_Xutf8LookupString = false; @@ -1231,8 +1236,10 @@ namespace System.Windows.Forms { return s.Length; } else { IntPtr statusPtr = IntPtr.Zero; + res = XLookupString (ref xevent, lookup_byte_buffer, len, out keysym_res, out statusPtr); lookup_buffer.Length = 0; - res = XLookupString (ref xevent, lookup_buffer, len, out keysym_res, out statusPtr); + string s = Encoding.ASCII.GetString (lookup_byte_buffer, 0, res); + lookup_buffer.Append (s); keysym = (XKeySym) keysym_res.ToInt32 (); return res; } @@ -1298,7 +1305,7 @@ namespace System.Windows.Forms { private static extern bool XSetLocaleModifiers (string mods); [DllImport ("libX11")] - internal extern static int XLookupString(ref XEvent xevent, StringBuilder buffer, int num_bytes, out IntPtr keysym, out IntPtr status); + internal extern static int XLookupString(ref XEvent xevent, byte [] buffer, int num_bytes, out IntPtr keysym, out IntPtr status); [DllImport ("libX11")] internal extern static int Xutf8LookupString(IntPtr xic, ref XEvent xevent, byte [] buffer, int num_bytes, out IntPtr keysym, out XLookupStatus status); diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Structs.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Structs.cs index cfac29e9be..42eb4f89fd 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Structs.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Structs.cs @@ -1696,6 +1696,16 @@ namespace System.Windows.Forms { public short Y; } + [StructLayout (LayoutKind.Sequential)] + [Serializable] + internal struct XRectangle + { + public short X; + public short Y; + public ushort Width; + public ushort Height; + } + [StructLayout (LayoutKind.Sequential)] [Serializable] internal class XIMCallback @@ -1818,4 +1828,25 @@ namespace System.Windows.Forms { public short width; public short height; } + + internal enum XShapeOperation { + ShapeSet, + ShapeUnion, + ShapeIntersect, + ShapeSubtract, + ShapeInvert + } + + internal enum XShapeKind { + ShapeBounding, + ShapeClip, + //ShapeInput // Not usable without more imports + } + + internal enum XOrdering { + Unsorted, + YSorted, + YXSorted, + YXBanded + } } diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs.REMOVED.git-id b/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs.REMOVED.git-id index b3021b7143..c9b679f00a 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs.REMOVED.git-id +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs.REMOVED.git-id @@ -1 +1 @@ -cde5f7ae773f572f136e3d20f48827e6cf964100 \ No newline at end of file +2a5355160824edaa6cfd0e82930b4e1519809a8c \ No newline at end of file diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms_test.dll.sources b/mcs/class/System.Windows.Forms/System.Windows.Forms_test.dll.sources index a4045f284e..c9eb689855 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms_test.dll.sources +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms_test.dll.sources @@ -26,6 +26,7 @@ System.Windows.Forms/Common.cs System.Windows.Forms/CommonDialogsTest.cs System.Windows.Forms/ContainerControlTest.cs System.Windows.Forms/ContextMenuTest.cs +System.Windows.Forms/ContextMenuStripTest.cs System.Windows.Forms/ControlBindingsCollectionTest.cs System.Windows.Forms/ControlBindingsConverterTest.cs System.Windows.Forms/ControlCollectionTest.cs diff --git a/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs b/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs index 530e5717de..252068a95c 100644 --- a/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs +++ b/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs @@ -732,6 +732,22 @@ namespace MonoTests.System.Windows.Forms Assert.IsTrue (cmbbox.ItemHeight > 0, "#21"); } + [Test] + public void RemoveAt_SelectedIndex () + { + ComboBox cmbbox = new ComboBox (); + cmbbox.Items.AddRange (new object[] {"1", "2", "3"}); + cmbbox.SelectedIndex = 0; + cmbbox.Items.RemoveAt (0); + Assert.AreEqual (0, cmbbox.SelectedIndex, "#A1"); + + cmbbox.Items.Clear (); + cmbbox.Items.AddRange (new object[] {"1", "2", "3"}); + cmbbox.SelectedIndex = 2; + cmbbox.Items.RemoveAt (0); + Assert.AreEqual (1, cmbbox.SelectedIndex, "#A2"); + } + // // Exceptions // diff --git a/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ContextMenuStripTest.cs b/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ContextMenuStripTest.cs new file mode 100644 index 0000000000..f5f62d6d33 --- /dev/null +++ b/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ContextMenuStripTest.cs @@ -0,0 +1,166 @@ +// +// ContextMenuTestStrip.cs: Test cases for ContextMenuStrip +// +// Author: +// Nikita Voronchev (nikita.voronchev@ru.axxonsoft.com) +// +// (C) 2020 AxxonSoft (https://www.axxonsoft.com/) +// + +using System; +using System.Drawing; +using System.Windows.Forms; +using NUnit.Framework; + +namespace MonoTests.System.Windows.Forms +{ + // TODO: + // -- Tests around `OwnerItem`. + + [TestFixture] + public class ContextMenuStripTest : TestHelper + { + static TestExtendedForm form; + static Label explicitMenuSrcLabel; + static TestExtendedLabel testExtendedLabel; + static ContextMenuStrip contextMenuStrip; + + static readonly Lazy[] testCaseExplicitMenuSources = new Lazy[] { + new Lazy(() => null), + new Lazy(() => explicitMenuSrcLabel) + }; // Involve `Lazy` to use `TestCaseSource` attribute. + + static readonly Lazy[] testCaseAssociatedControls = new Lazy[] { + new Lazy(() => form), + new Lazy(() => testExtendedLabel) + }; // Involve `Lazy` to use `TestCaseSource` attribute. + + [SetUp] + public void SetUp() + { + form = new TestExtendedForm (); + explicitMenuSrcLabel = new Label (); + testExtendedLabel = new TestExtendedLabel (); + contextMenuStrip = new ContextMenuStrip (); + + form.ShowInTaskbar = false; + form.Controls.Add (explicitMenuSrcLabel); + form.Controls.Add (testExtendedLabel); + } + + [TearDown] + public void TearDown() + { + contextMenuStrip.Close (); + form.Controls.Clear (); + + contextMenuStrip.Dispose (); + testExtendedLabel.Dispose (); + explicitMenuSrcLabel.Dispose (); + form.Dispose (); + } + + [Test, TestCaseSource ("testCaseExplicitMenuSources")] + public void DirectShowTest01 (Lazy explicitMenuSrc) + { + AssingOwner (explicitMenuSrc.Value); + contextMenuStrip.Show (); + Assert.IsNull (contextMenuStrip.SourceControl, "SourceControl"); + } + + [Test, TestCaseSource ("testCaseExplicitMenuSources")] + public void DirectShowTest02 (Lazy explicitMenuSrc) + { + AssingOwner (explicitMenuSrc.Value); + contextMenuStrip.Show (form, Point.Empty); + Assert.AreEqual (form, contextMenuStrip.SourceControl, "SourceControl"); + } + + [Test, TestCaseSource ("testCaseExplicitMenuSources")] + public void DirectShowTest03 (Lazy explicitMenuSrc) + { + AssingOwner (explicitMenuSrc.Value); + contextMenuStrip.Show (explicitMenuSrcLabel, Point.Empty); + Assert.AreEqual (explicitMenuSrcLabel, contextMenuStrip.SourceControl, "SourceControl"); + } + + [Test, TestCaseSource ("testCaseExplicitMenuSources")] + public void DirectShowTest04 (Lazy explicitMenuSrc) + { + AssingOwner (explicitMenuSrc.Value); + contextMenuStrip.Show (testExtendedLabel, Point.Empty); + Assert.AreEqual (testExtendedLabel, contextMenuStrip.SourceControl, "SourceControl"); + } + + [Test, TestCaseSource ("testCaseExplicitMenuSources")] + public void DirectShowTest05 (Lazy explicitMenuSrc) + { + AssingOwner (explicitMenuSrc.Value); + contextMenuStrip.Show (form, Point.Empty); + contextMenuStrip.Close (); + contextMenuStrip.Show (); + Assert.IsNull (contextMenuStrip.SourceControl, "SourceControl"); + } + + [Test, TestCaseSource("testCaseAssociatedControls")] + public void ContextShowTest (Lazy associatedControl) + { + bool menuHasBeenOpened = false; + contextMenuStrip.Opened += (sender, args) => { menuHasBeenOpened = true; }; + + var assCtrl = associatedControl.Value; + assCtrl.ContextMenuStrip = contextMenuStrip; + + Assert.IsFalse (menuHasBeenOpened, "menuHasBeenOpened"); + assCtrl.EmulateWmContextMenu (); + Assert.IsTrue (menuHasBeenOpened, "menuHasBeenOpened"); + Assert.AreEqual (assCtrl, contextMenuStrip.SourceControl, "SourceControl"); + + } + + #region Helpers + + private void AssingOwner (Control explicitMenuSrc) + { + if (explicitMenuSrc != null) + explicitMenuSrc.ContextMenuStrip = contextMenuStrip; + } + + public interface ITestExtendedControl + { + void EmulateWmContextMenu (); + ContextMenuStrip ContextMenuStrip { set; } + } + + class TestExtendedForm : Form, ITestExtendedControl + { + public void EmulateWmContextMenu () + { + var m = TestExtendedControlHelper.MakeWmContextMenu (); + WndProc (ref m); + } + } + + class TestExtendedLabel : Label, ITestExtendedControl + { + public void EmulateWmContextMenu () + { + var m = TestExtendedControlHelper.MakeWmContextMenu (); + WndProc (ref m); + } + } + + static class TestExtendedControlHelper + { + public static Message MakeWmContextMenu () + { + return new Message () { + Msg = (int)Msg.WM_CONTEXTMENU, + LParam = IntPtr.Zero + }; + } + } + + #endregion // end of Helpers + } +} diff --git a/mcs/class/System/Assembly/AssemblyInfo.cs b/mcs/class/System/Assembly/AssemblyInfo.cs index bfe1e6a7b9..15e072796c 100644 --- a/mcs/class/System/Assembly/AssemblyInfo.cs +++ b/mcs/class/System/Assembly/AssemblyInfo.cs @@ -90,6 +90,10 @@ using System.Runtime.InteropServices; [assembly: InternalsVisibleTo ("Mono.Android, PublicKey=0024000004800000940000000602000000240000525341310004000011000000438ac2a5acfbf16cbd2b2b47a62762f273df9cb2795ceccdf77d10bf508e69e7a362ea7a45455bbf3ac955e1f2e2814f144e5d817efc4c6502cc012df310783348304e3ae38573c6d658c234025821fda87a0be8a0d504df564e2c93b2b878925f42503e9d54dfef9f9586d9e6f38a305769587b1de01f6c0410328b2c9733db")] #endif +#if WASM +[assembly: InternalsVisibleTo ("WebAssembly.Net.WebSockets, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")] +#endif + [assembly: TypeForwardedTo (typeof (System.Collections.Generic.Stack<>))] [assembly: TypeForwardedTo (typeof (System.Collections.Generic.Queue<>))] [assembly: TypeForwardedTo (typeof (System.IO.Enumeration.FileSystemName))] diff --git a/mcs/class/System/Makefile b/mcs/class/System/Makefile index f3252e4cc3..ed30dfc6fc 100644 --- a/mcs/class/System/Makefile +++ b/mcs/class/System/Makefile @@ -116,6 +116,10 @@ API_BIN_REFS += System.Configuration LIB_MCS_FLAGS += -d:CONFIGURATION_DEP endif +ifeq (wasm,$(PROFILE)) +API_BIN_REFS += WebAssembly.Net.WebSockets +endif + EXTRA_DISTFILES = \ Test/test-config-file \ Test/System.Security.Cryptography.X509Certificates/pkits/Makefile \ diff --git a/mcs/class/System/System.Net.NetworkInformation/AixIPInterfaceProperties.cs b/mcs/class/System/System.Net.NetworkInformation/AixIPInterfaceProperties.cs index 15a15b241a..d5f0e30d01 100644 --- a/mcs/class/System/System.Net.NetworkInformation/AixIPInterfaceProperties.cs +++ b/mcs/class/System/System.Net.NetworkInformation/AixIPInterfaceProperties.cs @@ -54,13 +54,13 @@ namespace System.Net.NetworkInformation { } [MethodImplAttribute(MethodImplOptions.InternalCall)] - private extern static bool ParseRouteInfo_internal(string iface, out string[] gw_addr_list); + private extern static bool ParseRouteInfo_icall (string iface, out string[] gw_addr_list); public override GatewayIPAddressInformationCollection GatewayAddresses { get { var gateways = new IPAddressCollection (); string[] gw_addrlist; - if (!ParseRouteInfo_internal (this.iface.Name.ToString(), out gw_addrlist)) + if (!ParseRouteInfo_icall (this.iface.Name.ToString(), out gw_addrlist)) return new GatewayIPAddressInformationCollection (); for(int i=0; i (asyncResult); + } + + public override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback callback, object state) + { + return TaskToApm.Begin (Impl.WriteAsync (buffer, offset, count), callback, state); + } + + public override void EndWrite (IAsyncResult asyncResult) + { + TaskToApm.End (asyncResult); + } + #else // !SECURITY_DEP const string EXCEPTION_MESSAGE = "System.Net.Security.SslStream is not supported on the current platform."; diff --git a/mcs/class/System/System.Net.Sockets/SafeSocketHandle.cs b/mcs/class/System/System.Net.Sockets/SafeSocketHandle.cs index 25da5dcbba..6c77621bb3 100644 --- a/mcs/class/System/System.Net.Sockets/SafeSocketHandle.cs +++ b/mcs/class/System/System.Net.Sockets/SafeSocketHandle.cs @@ -44,10 +44,10 @@ namespace System.Net.Sockets { { int error = 0; - Socket.Blocking_internal (handle, false, out error); + Socket.Blocking_icall (handle, false, out error); #if FULL_AOT_DESKTOP /* It's only for platforms that do not have working syscall abort mechanism, like WatchOS and TvOS */ - Socket.Shutdown_internal (handle, SocketShutdown.Both, out error); + Socket.Shutdown_icall (handle, SocketShutdown.Both, out error); #endif if (blocking_threads != null) { @@ -93,7 +93,7 @@ namespace System.Net.Sockets { } } - Socket.Close_internal (handle, out error); + Socket.Close_icall (handle, out error); return error == 0; } diff --git a/mcs/class/System/System.Net.Sockets/Socket.cs b/mcs/class/System/System.Net.Sockets/Socket.cs index b52f42dc96..f55cf33653 100644 --- a/mcs/class/System/System.Net.Sockets/Socket.cs +++ b/mcs/class/System/System.Net.Sockets/Socket.cs @@ -56,7 +56,7 @@ namespace System.Net.Sockets const string TIMEOUT_EXCEPTION_MSG = "A connection attempt failed because the connected party did not properly respond" + "after a period of time, or established connection failed because connected host has failed to respond"; - /* true if we called Close_internal */ + /* true if we called Close_icall */ bool is_closed; bool is_listening; @@ -163,7 +163,7 @@ namespace System.Net.Sockets /* Creates a new system socket, returning the handle */ [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern IntPtr Socket_internal (AddressFamily family, SocketType type, ProtocolType proto, out int error); + extern static IntPtr Socket_icall (AddressFamily family, SocketType type, ProtocolType proto, out int error); #endregion @@ -188,7 +188,7 @@ namespace System.Net.Sockets bool release = false; try { safeHandle.DangerousAddRef (ref release); - return Available_internal (safeHandle.DangerousGetHandle (), out error); + return Available_icall (safeHandle.DangerousGetHandle (), out error); } finally { if (release) safeHandle.DangerousRelease (); @@ -197,7 +197,7 @@ namespace System.Net.Sockets /* Returns the amount of data waiting to be read on socket */ [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static int Available_internal (IntPtr socket, out int error); + extern static int Available_icall (IntPtr socket, out int error); // FIXME: import from referencesource public bool EnableBroadcast { @@ -296,7 +296,7 @@ namespace System.Net.Sockets bool release = false; try { safeHandle.DangerousAddRef (ref release); - return LocalEndPoint_internal (safeHandle.DangerousGetHandle (), family, out error); + return LocalEndPoint_icall (safeHandle.DangerousGetHandle (), family, out error); } finally { if (release) safeHandle.DangerousRelease (); @@ -305,7 +305,7 @@ namespace System.Net.Sockets /* Returns the local endpoint details in addr and port */ [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static SocketAddress LocalEndPoint_internal (IntPtr socket, int family, out int error); + extern static SocketAddress LocalEndPoint_icall (IntPtr socket, int family, out int error); public bool Blocking { get { return is_blocking; } @@ -327,7 +327,7 @@ namespace System.Net.Sockets bool release = false; try { safeHandle.DangerousAddRef (ref release); - Blocking_internal (safeHandle.DangerousGetHandle (), block, out error); + Blocking_icall (safeHandle.DangerousGetHandle (), block, out error); } finally { if (release) safeHandle.DangerousRelease (); @@ -335,7 +335,7 @@ namespace System.Net.Sockets } [MethodImplAttribute(MethodImplOptions.InternalCall)] - internal extern static void Blocking_internal(IntPtr socket, bool block, out int error); + internal extern static void Blocking_icall (IntPtr socket, bool block, out int error); public bool Connected { get { return is_connected; } @@ -382,7 +382,7 @@ namespace System.Net.Sockets bool release = false; try { safeHandle.DangerousAddRef (ref release); - return RemoteEndPoint_internal (safeHandle.DangerousGetHandle (), family, out error); + return RemoteEndPoint_icall (safeHandle.DangerousGetHandle (), family, out error); } finally { if (release) safeHandle.DangerousRelease (); @@ -391,7 +391,7 @@ namespace System.Net.Sockets /* Returns the remote endpoint details in addr and port */ [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static SocketAddress RemoteEndPoint_internal (IntPtr socket, int family, out int error); + extern static SocketAddress RemoteEndPoint_icall (IntPtr socket, int family, out int error); internal SafeHandle SafeHandle { @@ -419,7 +419,7 @@ namespace System.Net.Sockets Socket [] sockets = list.ToArray (); int error; - Select_internal (ref sockets, microSeconds, out error); + Select_icall (ref sockets, microSeconds, out error); if (error != 0) throw new SocketException (error); @@ -480,7 +480,7 @@ namespace System.Net.Sockets } [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void Select_internal (ref Socket [] sockets, int microSeconds, out int error); + extern static void Select_icall (ref Socket [] sockets, int microSeconds, out int error); #endregion @@ -514,7 +514,7 @@ namespace System.Net.Sockets bool release = false; try { safeHandle.DangerousAddRef (ref release); - return Poll_internal (safeHandle.DangerousGetHandle (), mode, timeout, out error); + return Poll_icall (safeHandle.DangerousGetHandle (), mode, timeout, out error); } finally { if (release) safeHandle.DangerousRelease (); @@ -522,7 +522,7 @@ namespace System.Net.Sockets } [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static bool Poll_internal (IntPtr socket, SelectMode mode, int timeout, out int error); + extern static bool Poll_icall (IntPtr socket, SelectMode mode, int timeout, out int error); #endregion @@ -750,7 +750,7 @@ namespace System.Net.Sockets { try { safeHandle.RegisterForBlockingSyscall (); - var ret = Accept_internal (safeHandle.DangerousGetHandle (), out error, blocking); + var ret = Accept_icall (safeHandle.DangerousGetHandle (), out error, blocking); return new SafeSocketHandle (ret, true); } finally { safeHandle.UnRegisterForBlockingSyscall (); @@ -759,7 +759,7 @@ namespace System.Net.Sockets /* Creates a new system socket, returning the handle */ [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static IntPtr Accept_internal (IntPtr sock, out int error, bool blocking); + extern static IntPtr Accept_icall (IntPtr sock, out int error, bool blocking); #endregion @@ -797,7 +797,7 @@ namespace System.Net.Sockets bool release = false; try { safeHandle.DangerousAddRef (ref release); - Bind_internal (safeHandle.DangerousGetHandle (), sa, out error); + Bind_icall (safeHandle.DangerousGetHandle (), sa, out error); } finally { if (release) safeHandle.DangerousRelease (); @@ -806,7 +806,7 @@ namespace System.Net.Sockets // Creates a new system socket, returning the handle [MethodImplAttribute(MethodImplOptions.InternalCall)] - private extern static void Bind_internal(IntPtr sock, SocketAddress sa, out int error); + private extern static void Bind_icall (IntPtr sock, SocketAddress sa, out int error); #endregion @@ -833,7 +833,7 @@ namespace System.Net.Sockets bool release = false; try { safeHandle.DangerousAddRef (ref release); - Listen_internal (safeHandle.DangerousGetHandle (), backlog, out error); + Listen_icall (safeHandle.DangerousGetHandle (), backlog, out error); } finally { if (release) safeHandle.DangerousRelease (); @@ -841,7 +841,7 @@ namespace System.Net.Sockets } [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void Listen_internal (IntPtr sock, int backlog, out int error); + extern static void Listen_icall (IntPtr sock, int backlog, out int error); #endregion @@ -1124,7 +1124,7 @@ namespace System.Net.Sockets // an error. Better to just close the socket and move on. sockares.socket.connect_in_progress = false; sockares.socket.m_Handle.Dispose (); - sockares.socket.m_Handle = new SafeSocketHandle (sockares.socket.Socket_internal (sockares.socket.addressFamily, sockares.socket.socketType, sockares.socket.protocolType, out error), true); + sockares.socket.m_Handle = new SafeSocketHandle (Socket_icall (sockares.socket.addressFamily, sockares.socket.socketType, sockares.socket.protocolType, out error), true); if (error != 0) { sockares.Complete (new SocketException (error), true); return false; @@ -1218,7 +1218,7 @@ namespace System.Net.Sockets { try { safeHandle.RegisterForBlockingSyscall (); - Connect_internal (safeHandle.DangerousGetHandle (), sa, out error, blocking); + Connect_icall (safeHandle.DangerousGetHandle (), sa, out error, blocking); } finally { safeHandle.UnRegisterForBlockingSyscall (); } @@ -1226,7 +1226,7 @@ namespace System.Net.Sockets /* Connects to the remote address */ [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void Connect_internal(IntPtr sock, SocketAddress sa, out int error, bool blocking); + extern static void Connect_icall (IntPtr sock, SocketAddress sa, out int error, bool blocking); /* Returns : * - false when it is ok to use RemoteEndPoint @@ -1363,7 +1363,7 @@ namespace System.Net.Sockets bool release = false; try { safeHandle.DangerousAddRef (ref release); - Disconnect_internal (safeHandle.DangerousGetHandle (), reuse, out error); + Disconnect_icall (safeHandle.DangerousGetHandle (), reuse, out error); } finally { if (release) safeHandle.DangerousRelease (); @@ -1371,7 +1371,7 @@ namespace System.Net.Sockets } [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void Disconnect_internal (IntPtr sock, bool reuse, out int error); + extern static void Disconnect_icall (IntPtr sock, bool reuse, out int error); #endregion @@ -1644,27 +1644,27 @@ namespace System.Net.Sockets { try { safeHandle.RegisterForBlockingSyscall (); - return Receive_internal (safeHandle.DangerousGetHandle (), bufarray, count, flags, out error, blocking); + return Receive_array_icall (safeHandle.DangerousGetHandle (), bufarray, count, flags, out error, blocking); } finally { safeHandle.UnRegisterForBlockingSyscall (); } } [MethodImplAttribute (MethodImplOptions.InternalCall)] - extern static unsafe int Receive_internal (IntPtr sock, WSABUF* bufarray, int count, SocketFlags flags, out int error, bool blocking); + extern static unsafe int Receive_array_icall (IntPtr sock, WSABUF* bufarray, int count, SocketFlags flags, out int error, bool blocking); static unsafe int Receive_internal (SafeSocketHandle safeHandle, byte* buffer, int count, SocketFlags flags, out int error, bool blocking) { try { safeHandle.RegisterForBlockingSyscall (); - return Receive_internal (safeHandle.DangerousGetHandle (), buffer, count, flags, out error, blocking); + return Receive_icall (safeHandle.DangerousGetHandle (), buffer, count, flags, out error, blocking); } finally { safeHandle.UnRegisterForBlockingSyscall (); } } [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static unsafe int Receive_internal(IntPtr sock, byte* buffer, int count, SocketFlags flags, out int error, bool blocking); + extern static unsafe int Receive_icall (IntPtr sock, byte* buffer, int count, SocketFlags flags, out int error, bool blocking); #endregion @@ -1884,14 +1884,14 @@ namespace System.Net.Sockets { try { safeHandle.RegisterForBlockingSyscall (); - return ReceiveFrom_internal (safeHandle.DangerousGetHandle (), buffer, count, flags, ref sockaddr, out error, blocking); + return ReceiveFrom_icall (safeHandle.DangerousGetHandle (), buffer, count, flags, ref sockaddr, out error, blocking); } finally { safeHandle.UnRegisterForBlockingSyscall (); } } [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static unsafe int ReceiveFrom_internal(IntPtr sock, byte* buffer, int count, SocketFlags flags, ref SocketAddress sockaddr, out int error, bool blocking); + extern static unsafe int ReceiveFrom_icall (IntPtr sock, byte* buffer, int count, SocketFlags flags, ref SocketAddress sockaddr, out int error, bool blocking); #endregion @@ -2209,27 +2209,27 @@ namespace System.Net.Sockets { try { safeHandle.RegisterForBlockingSyscall (); - return Send_internal (safeHandle.DangerousGetHandle (), bufarray, count, flags, out error, blocking); + return Send_array_icall (safeHandle.DangerousGetHandle (), bufarray, count, flags, out error, blocking); } finally { safeHandle.UnRegisterForBlockingSyscall (); } } [MethodImplAttribute (MethodImplOptions.InternalCall)] - extern static unsafe int Send_internal (IntPtr sock, WSABUF* bufarray, int count, SocketFlags flags, out int error, bool blocking); + extern static unsafe int Send_array_icall (IntPtr sock, WSABUF* bufarray, int count, SocketFlags flags, out int error, bool blocking); static unsafe int Send_internal (SafeSocketHandle safeHandle, byte* buffer, int count, SocketFlags flags, out int error, bool blocking) { try { safeHandle.RegisterForBlockingSyscall (); - return Send_internal (safeHandle.DangerousGetHandle (), buffer, count, flags, out error, blocking); + return Send_icall (safeHandle.DangerousGetHandle (), buffer, count, flags, out error, blocking); } finally { safeHandle.UnRegisterForBlockingSyscall (); } } [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static unsafe int Send_internal(IntPtr sock, byte* buffer, int count, SocketFlags flags, out int error, bool blocking); + extern static unsafe int Send_icall (IntPtr sock, byte* buffer, int count, SocketFlags flags, out int error, bool blocking); #endregion @@ -2399,14 +2399,14 @@ namespace System.Net.Sockets { try { safeHandle.RegisterForBlockingSyscall (); - return SendTo_internal (safeHandle.DangerousGetHandle (), buffer, count, flags, sa, out error, blocking); + return SendTo_icall (safeHandle.DangerousGetHandle (), buffer, count, flags, sa, out error, blocking); } finally { safeHandle.UnRegisterForBlockingSyscall (); } } [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static unsafe int SendTo_internal (IntPtr sock, byte* buffer, int count, SocketFlags flags, SocketAddress sa, out int error, bool blocking); + extern static unsafe int SendTo_icall (IntPtr sock, byte* buffer, int count, SocketFlags flags, SocketAddress sa, out int error, bool blocking); #endregion @@ -2462,14 +2462,14 @@ namespace System.Net.Sockets { try { safeHandle.RegisterForBlockingSyscall (); - return SendFile_internal (safeHandle.DangerousGetHandle (), filename, pre_buffer, post_buffer, flags, out error, blocking); + return SendFile_icall (safeHandle.DangerousGetHandle (), filename, pre_buffer, post_buffer, flags, out error, blocking); } finally { safeHandle.UnRegisterForBlockingSyscall (); } } [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static bool SendFile_internal (IntPtr sock, string filename, byte [] pre_buffer, byte [] post_buffer, TransmitFileOptions flags, out int error, bool blocking); + extern static bool SendFile_icall (IntPtr sock, string filename, byte [] pre_buffer, byte [] post_buffer, TransmitFileOptions flags, out int error, bool blocking); delegate void SendFileHandler (string fileName, byte [] preBuffer, byte [] postBuffer, TransmitFileOptions flags); @@ -2527,7 +2527,7 @@ namespace System.Net.Sockets #region DuplicateAndClose [MethodImplAttribute(MethodImplOptions.InternalCall)] - static extern bool Duplicate_internal(IntPtr handle, int targetProcessId, out IntPtr duplicateHandle, out MonoIOError error); + static extern bool Duplicate_icall (IntPtr handle, int targetProcessId, out IntPtr duplicateHandle, out MonoIOError error); [MonoLimitation ("We do not support passing sockets across processes, we merely allow this API to pass the socket across AppDomains")] public SocketInformation DuplicateAndClose (int targetProcessId) @@ -2540,7 +2540,7 @@ namespace System.Net.Sockets (useOverlappedIO ? SocketInformationOptions.UseOnlyOverlappedIO : 0); IntPtr duplicateHandle; - if (!Duplicate_internal (Handle, targetProcessId, out duplicateHandle, out MonoIOError error)) + if (!Duplicate_icall (Handle, targetProcessId, out duplicateHandle, out MonoIOError error)) throw MonoIO.GetException (error); si.ProtocolInformation = Mono.DataConverter.Pack ("iiiil", (int)addressFamily, (int)socketType, (int)protocolType, is_bound ? 1 : 0, (long)duplicateHandle); @@ -2607,7 +2607,7 @@ namespace System.Net.Sockets bool release = false; try { safeHandle.DangerousAddRef (ref release); - GetSocketOption_arr_internal (safeHandle.DangerousGetHandle (), level, name, ref byte_val, out error); + GetSocketOption_arr_icall (safeHandle.DangerousGetHandle (), level, name, ref byte_val, out error); } finally { if (release) safeHandle.DangerousRelease (); @@ -2615,14 +2615,14 @@ namespace System.Net.Sockets } [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void GetSocketOption_arr_internal(IntPtr socket, SocketOptionLevel level, SocketOptionName name, ref byte[] byte_val, out int error); + extern static void GetSocketOption_arr_icall (IntPtr socket, SocketOptionLevel level, SocketOptionName name, ref byte[] byte_val, out int error); static void GetSocketOption_obj_internal (SafeSocketHandle safeHandle, SocketOptionLevel level, SocketOptionName name, out object obj_val, out int error) { bool release = false; try { safeHandle.DangerousAddRef (ref release); - GetSocketOption_obj_internal (safeHandle.DangerousGetHandle (), level, name, out obj_val, out error); + GetSocketOption_obj_icall (safeHandle.DangerousGetHandle (), level, name, out obj_val, out error); } finally { if (release) safeHandle.DangerousRelease (); @@ -2630,7 +2630,7 @@ namespace System.Net.Sockets } [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void GetSocketOption_obj_internal(IntPtr socket, SocketOptionLevel level, SocketOptionName name, out object obj_val, out int error); + extern static void GetSocketOption_obj_icall (IntPtr socket, SocketOptionLevel level, SocketOptionName name, out object obj_val, out int error); #endregion @@ -2716,7 +2716,7 @@ namespace System.Net.Sockets bool release = false; try { safeHandle.DangerousAddRef (ref release); - SetSocketOption_internal (safeHandle.DangerousGetHandle (), level, name, obj_val, byte_val, int_val, out error); + SetSocketOption_icall (safeHandle.DangerousGetHandle (), level, name, obj_val, byte_val, int_val, out error); } finally { if (release) safeHandle.DangerousRelease (); @@ -2724,7 +2724,7 @@ namespace System.Net.Sockets } [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static void SetSocketOption_internal (IntPtr socket, SocketOptionLevel level, SocketOptionName name, object obj_val, byte [] byte_val, int int_val, out int error); + extern static void SetSocketOption_icall (IntPtr socket, SocketOptionLevel level, SocketOptionName name, object obj_val, byte [] byte_val, int int_val, out int error); #endregion @@ -2751,7 +2751,7 @@ namespace System.Net.Sockets bool release = false; try { safeHandle.DangerousAddRef (ref release); - return IOControl_internal (safeHandle.DangerousGetHandle (), ioctl_code, input, output, out error); + return IOControl_icall (safeHandle.DangerousGetHandle (), ioctl_code, input, output, out error); } finally { if (release) safeHandle.DangerousRelease (); @@ -2762,7 +2762,7 @@ namespace System.Net.Sockets * and Winsock are FIONREAD, FIONBIO and SIOCATMARK. Anything else will depend on the system * except SIO_KEEPALIVE_VALS which is properly handled on both windows and linux. */ [MethodImplAttribute(MethodImplOptions.InternalCall)] - extern static int IOControl_internal (IntPtr sock, int ioctl_code, byte [] input, byte [] output, out int error); + extern static int IOControl_icall (IntPtr sock, int ioctl_code, byte [] input, byte [] output, out int error); #endregion @@ -2781,7 +2781,7 @@ namespace System.Net.Sockets } [MethodImplAttribute(MethodImplOptions.InternalCall)] - internal extern static void Close_internal (IntPtr socket, out int error); + internal extern static void Close_icall (IntPtr socket, out int error); #endregion @@ -2818,7 +2818,7 @@ namespace System.Net.Sockets bool release = false; try { safeHandle.DangerousAddRef (ref release); - Shutdown_internal (safeHandle.DangerousGetHandle (), how, out error); + Shutdown_icall (safeHandle.DangerousGetHandle (), how, out error); } finally { if (release) safeHandle.DangerousRelease (); @@ -2826,7 +2826,7 @@ namespace System.Net.Sockets } [MethodImplAttribute (MethodImplOptions.InternalCall)] - internal extern static void Shutdown_internal (IntPtr socket, SocketShutdown how, out int error); + internal extern static void Shutdown_icall (IntPtr socket, SocketShutdown how, out int error); #endregion @@ -2859,7 +2859,7 @@ namespace System.Net.Sockets /* We don't want to receive any more data */ int error; - Shutdown_internal (handle, SocketShutdown.Receive, out error); + Shutdown_icall (handle, SocketShutdown.Receive, out error); if (error != 0) return; @@ -2868,14 +2868,14 @@ namespace System.Net.Sockets int ms = linger_timeout % 1000; if (ms > 0) { /* If the other end closes, this will return 'true' with 'Available' == 0 */ - Poll_internal (handle, SelectMode.SelectRead, ms * 1000, out error); + Poll_icall (handle, SelectMode.SelectRead, ms * 1000, out error); if (error != 0) return; } if (seconds > 0) { LingerOption linger = new LingerOption (true, seconds); - SetSocketOption_internal (handle, SocketOptionLevel.Socket, SocketOptionName.Linger, linger, null, 0, out error); + SetSocketOption_icall (handle, SocketOptionLevel.Socket, SocketOptionName.Linger, linger, null, 0, out error); /* Not needed, we're closing upon return */ //if (error != 0) // return; diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketHandle.wasm.cs b/mcs/class/System/System.Net.WebSockets/WebSocketHandle.wasm.cs new file mode 100644 index 0000000000..5219654c97 --- /dev/null +++ b/mcs/class/System/System.Net.WebSockets/WebSocketHandle.wasm.cs @@ -0,0 +1,108 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Net.Security; +using System.Net.Sockets; +using System.Runtime.ExceptionServices; +using System.Security.Cryptography; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace System.Net.WebSockets +{ + internal sealed class WebSocketHandle + { + private WebSocketState _state = WebSocketState.Connecting; + private WebAssembly.Net.WebSockets.ClientWebSocket _webSocket; + + public static WebSocketHandle Create() => new WebSocketHandle(); + + public static bool IsValid(WebSocketHandle handle) => handle != null; + + public WebSocketCloseStatus? CloseStatus => _webSocket?.CloseStatus; + + public string CloseStatusDescription => _webSocket?.CloseStatusDescription; + + public WebSocketState State => _webSocket?.State ?? _state; + + public string SubProtocol => _webSocket?.SubProtocol; + + public static void CheckPlatformSupport() { /* nop */ } + + public void Dispose() + { + _state = WebSocketState.Closed; + _webSocket?.Dispose(); + } + + public void Abort() + { + _webSocket?.Abort(); + } + + public Task SendAsync(ArraySegment buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken) => + _webSocket.SendAsync(buffer, messageType, endOfMessage, cancellationToken); + + public ValueTask SendAsync(ReadOnlyMemory buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken) => + _webSocket.SendAsync(buffer, messageType, endOfMessage, cancellationToken); + + public Task ReceiveAsync(ArraySegment buffer, CancellationToken cancellationToken) => + _webSocket.ReceiveAsync(buffer, cancellationToken); + + public ValueTask ReceiveAsync(Memory buffer, CancellationToken cancellationToken) => + _webSocket.ReceiveAsync(buffer, cancellationToken); + + public Task CloseAsync(WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken) => + _webSocket.CloseAsync(closeStatus, statusDescription, cancellationToken); + + public Task CloseOutputAsync(WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken) => + _webSocket.CloseOutputAsync(closeStatus, statusDescription, cancellationToken); + + public async Task ConnectAsyncCore(Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options) + { + // TODO #14480 : Not currently implemented, or explicitly ignored: + // - ClientWebSocketOptions.UseDefaultCredentials + // - ClientWebSocketOptions.Credentials + // - ClientWebSocketOptions.Proxy + // - ClientWebSocketOptions._sendBufferSize + // throw new PlatformNotSupportedException (); + // Establish connection to the server + CancellationTokenRegistration registration = cancellationToken.Register(s => ((WebSocketHandle)s).Abort(), this); + try + { + _webSocket = new WebAssembly.Net.WebSockets.ClientWebSocket ();//(options); + foreach (var t in options.RequestedSubProtocols) { + _webSocket.Options.AddSubProtocol (t); + } + + await _webSocket.ConnectAsync (uri, cancellationToken); + + } + catch (Exception exc) + { + if (_state < WebSocketState.Closed) + { + _state = WebSocketState.Closed; + } + + Abort(); + + if (exc is WebSocketException) + { + throw; + } + throw new WebSocketException(SR.net_webstatus_ConnectFailure, exc); + } + finally + { + registration.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/mcs/class/System/System.Net/Dns.cs b/mcs/class/System/System.Net/Dns.cs index df56625330..31ae8cff15 100644 --- a/mcs/class/System/System.Net/Dns.cs +++ b/mcs/class/System/System.Net/Dns.cs @@ -295,13 +295,13 @@ namespace System.Net { [MethodImplAttribute(MethodImplOptions.InternalCall)] - private extern static bool GetHostByName_internal(string host, out string h_name, out string[] h_aliases, out string[] h_addr_list, int hint); + private extern static bool GetHostByName_icall (string host, out string h_name, out string[] h_aliases, out string[] h_addr_list, int hint); [MethodImplAttribute(MethodImplOptions.InternalCall)] - private extern static bool GetHostByAddr_internal(string addr, out string h_name, out string[] h_aliases, out string[] h_addr_list, int hint); + private extern static bool GetHostByAddr_icall (string addr, out string h_name, out string[] h_aliases, out string[] h_addr_list, int hint); [MethodImplAttribute(MethodImplOptions.InternalCall)] - private extern static bool GetHostName_internal(out string h_name); + private extern static bool GetHostName_icall (out string h_name); static void Error_11001 (string hostName) { @@ -372,7 +372,7 @@ namespace System.Net { string h_name; string[] h_aliases, h_addrlist; - bool ret = GetHostByAddr_internal(address, out h_name, out h_aliases, out h_addrlist, Socket.FamilyHint); + bool ret = GetHostByAddr_icall (address, out h_name, out h_aliases, out h_addrlist, Socket.FamilyHint); if (!ret) Error_11001 (address); return (hostent_to_IPHostEntry (address, h_name, h_aliases, h_addrlist)); @@ -436,7 +436,7 @@ namespace System.Net { string h_name; string[] h_aliases, h_addrlist; - bool ret = GetHostByName_internal(hostName, out h_name, out h_aliases, out h_addrlist, Socket.FamilyHint); + bool ret = GetHostByName_icall (hostName, out h_name, out h_aliases, out h_addrlist, Socket.FamilyHint); if (ret == false) Error_11001 (hostName); @@ -447,7 +447,7 @@ namespace System.Net { { string hostName; - bool ret = GetHostName_internal(out hostName); + bool ret = GetHostName_icall (out hostName); if (ret == false) Error_11001 (hostName); diff --git a/mcs/class/System/System.Net/HttpConnection.cs b/mcs/class/System/System.Net/HttpConnection.cs index 90ddf31f17..ddc9b80da9 100644 --- a/mcs/class/System/System.Net/HttpConnection.cs +++ b/mcs/class/System/System.Net/HttpConnection.cs @@ -237,8 +237,12 @@ namespace System.Net { } if (ProcessInput (ms)) { - if (!context.HaveError) - context.Request.FinishInitialization (); + if (!context.HaveError) { + if (!context.Request.FinishInitialization()) { + Close (true); + return; + } + } if (context.HaveError) { SendError (); diff --git a/mcs/class/System/System.Net/HttpListenerRequest.cs b/mcs/class/System/System.Net/HttpListenerRequest.cs index e351807aa3..63aa0bcf51 100644 --- a/mcs/class/System/System.Net/HttpListenerRequest.cs +++ b/mcs/class/System/System.Net/HttpListenerRequest.cs @@ -192,12 +192,12 @@ namespace System.Net { return false; } - internal void FinishInitialization () + internal bool FinishInitialization () { string host = UserHostName; if (version > HttpVersion.Version10 && (host == null || host.Length == 0)) { context.ErrorMessage = "Invalid host name"; - return; + return true; } string path; @@ -223,7 +223,7 @@ namespace System.Net { if (!Uri.TryCreate (base_uri + path, UriKind.Absolute, out url)){ context.ErrorMessage = WebUtility.HtmlEncode ("Invalid url: " + base_uri + path); - return; + return true; } CreateQueryString (url.Query); @@ -239,7 +239,7 @@ namespace System.Net { // 'identity' is not valid! if (t_encoding != null && !is_chunked) { context.Connection.SendError (null, 501); - return; + return false; } } @@ -247,7 +247,7 @@ namespace System.Net { if (String.Compare (method, "POST", StringComparison.OrdinalIgnoreCase) == 0 || String.Compare (method, "PUT", StringComparison.OrdinalIgnoreCase) == 0) { context.Connection.SendError (null, 411); - return; + return false; } } @@ -255,6 +255,8 @@ namespace System.Net { ResponseStream output = context.Connection.GetResponseStream (); output.InternalWrite (_100continue, 0, _100continue.Length); } + + return true; } internal static string Unquote (String str) { diff --git a/mcs/class/System/Test/System.Collections.Concurrent/ConcurrentBagTests.cs b/mcs/class/System/Test/System.Collections.Concurrent/ConcurrentBagTests.cs index 223c5207db..0d7f7faa49 100644 --- a/mcs/class/System/Test/System.Collections.Concurrent/ConcurrentBagTests.cs +++ b/mcs/class/System/Test/System.Collections.Concurrent/ConcurrentBagTests.cs @@ -197,6 +197,9 @@ namespace MonoTests.System.Collections.Concurrent } [Test] +#if WASM + [Category ("MultiThreaded")] +#endif public void BasicRemoveEmptyTest () { int result; @@ -205,6 +208,9 @@ namespace MonoTests.System.Collections.Concurrent } [Test] +#if WASM + [Category ("MultiThreaded")] +#endif public void BasicRemoveTwiceTest() { bag.Add (1); diff --git a/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionTest.cs b/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionTest.cs index 03d4b3212d..2a1f9eb18b 100644 --- a/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionTest.cs +++ b/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionTest.cs @@ -254,6 +254,9 @@ namespace MonoTests.System.Collections.Specialized { } [Test] +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void CaseInsensitive () { // default constructor is case insensitive @@ -347,6 +350,9 @@ namespace MonoTests.System.Collections.Specialized { } [Test] +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Remove () { string[] items = { "mono", "MoNo", "mOnO", "MONO" }; @@ -414,6 +420,9 @@ namespace MonoTests.System.Collections.Specialized { } [Test] +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Constructor_IEqualityComparer_Null () { NameValueCollection c1 = new NameValueCollection ((IEqualityComparer)null); @@ -423,6 +432,9 @@ namespace MonoTests.System.Collections.Specialized { } [Test] +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Constructor_NameValueCollection () { NameValueCollection c1 = new NameValueCollection (StringComparer.InvariantCultureIgnoreCase); diff --git a/mcs/class/System/Test/System.ComponentModel/AsyncOperationManagerTest.cs b/mcs/class/System/Test/System.ComponentModel/AsyncOperationManagerTest.cs index 1c348dc488..411f7d176c 100644 --- a/mcs/class/System/Test/System.ComponentModel/AsyncOperationManagerTest.cs +++ b/mcs/class/System/Test/System.ComponentModel/AsyncOperationManagerTest.cs @@ -18,6 +18,7 @@ using NUnit.Framework; namespace MonoTests.System.ComponentModel { [TestFixture] + [NUnit.Framework.CategoryAttribute ("NotWasm")] public class AsyncOperationManagerTest { [Test] diff --git a/mcs/class/System/Test/System.ComponentModel/BackgroundWorkerTest.cs b/mcs/class/System/Test/System.ComponentModel/BackgroundWorkerTest.cs index b46c924f41..d4ee0685ea 100644 --- a/mcs/class/System/Test/System.ComponentModel/BackgroundWorkerTest.cs +++ b/mcs/class/System/Test/System.ComponentModel/BackgroundWorkerTest.cs @@ -81,6 +81,9 @@ namespace MonoTests.System.ComponentModel } [Test] +#if WASM + [NUnit.Framework.CategoryAttribute ("MultiThreaded")] +#endif public void CancelBackgroundWorker () { BackgroundWorker bw = new BackgroundWorker (); @@ -117,6 +120,9 @@ namespace MonoTests.System.ComponentModel } [Test] +#if WASM + [NUnit.Framework.CategoryAttribute ("MultiThreaded")] +#endif public void ExceptionBackgroundWorker () { BackgroundWorker bw = new BackgroundWorker (); @@ -154,6 +160,9 @@ namespace MonoTests.System.ComponentModel } [Test] +#if WASM + [NUnit.Framework.CategoryAttribute ("MultiThreaded")] +#endif public void CompleteBackgroundWorker () { BackgroundWorker bw = new BackgroundWorker (); diff --git a/mcs/class/System/Test/System.ComponentModel/EventDescriptorCollectionTests.cs b/mcs/class/System/Test/System.ComponentModel/EventDescriptorCollectionTests.cs index 6ae957c9a2..45544f5b9b 100644 --- a/mcs/class/System/Test/System.ComponentModel/EventDescriptorCollectionTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/EventDescriptorCollectionTests.cs @@ -151,6 +151,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort () +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort1 () { EventDescriptorCollection descriptors; @@ -192,6 +195,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort (String []) +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort2 () { EventDescriptorCollection descriptors; @@ -249,6 +255,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort (IComparer) +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort3 () { EventDescriptorCollection descriptors; @@ -306,6 +315,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort (String [], IComparer) +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort4 () { EventDescriptorCollection descriptors; diff --git a/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs b/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs index 8c4730d7bf..d7b19e35d0 100644 --- a/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs @@ -247,6 +247,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort () +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort1 () { PropertyDescriptorCollection descriptors; @@ -288,6 +291,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort (String []) +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort2 () { PropertyDescriptorCollection descriptors; @@ -345,6 +351,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort (IComparer) +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort3 () { PropertyDescriptorCollection descriptors; @@ -402,6 +411,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort (String [], IComparer) +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort4 () { PropertyDescriptorCollection descriptors; diff --git a/mcs/class/System/Test/System.Net.Mail/SmtpClientTest.cs b/mcs/class/System/Test/System.Net.Mail/SmtpClientTest.cs index 233415074c..411af2bc6c 100644 --- a/mcs/class/System/Test/System.Net.Mail/SmtpClientTest.cs +++ b/mcs/class/System/Test/System.Net.Mail/SmtpClientTest.cs @@ -40,7 +40,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Credentials_Default () @@ -49,7 +49,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void DeliveryMethod () @@ -67,7 +67,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void EnableSsl () @@ -80,7 +80,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Host () @@ -99,7 +99,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Host_Value_Null () @@ -116,7 +116,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Host_Value_Empty () @@ -134,7 +134,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void PickupDirectoryLocation () @@ -153,7 +153,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Port () @@ -166,7 +166,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Port_Value_Invalid () @@ -195,7 +195,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_Message_Null () @@ -212,7 +212,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_Network_Host_Null () @@ -230,7 +230,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_Network_Host_Whitespace () @@ -249,7 +249,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_SpecifiedPickupDirectory () @@ -265,7 +265,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_SpecifiedPickupDirectory_PickupDirectoryLocation_DirectoryNotFound () @@ -295,7 +295,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_SpecifiedPickupDirectory_PickupDirectoryLocation_Empty () @@ -317,7 +317,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_SpecifiedPickupDirectory_PickupDirectoryLocation_IllegalChars () @@ -345,7 +345,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_SpecifiedPickupDirectory_PickupDirectoryLocation_NotAbsolute () @@ -367,7 +367,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_SpecifiedPickupDirectory_PickupDirectoryLocation_Null () @@ -388,7 +388,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Timeout () @@ -401,7 +401,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ArgumentOutOfRangeException))] @@ -412,7 +412,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void UseDefaultCredentials_Default () diff --git a/mcs/class/System/Test/System.Net.NetworkInformation/IPInterfacePropertiesTest.cs b/mcs/class/System/Test/System.Net.NetworkInformation/IPInterfacePropertiesTest.cs index 7e693d4e1d..fbde01c444 100644 --- a/mcs/class/System/Test/System.Net.NetworkInformation/IPInterfacePropertiesTest.cs +++ b/mcs/class/System/Test/System.Net.NetworkInformation/IPInterfacePropertiesTest.cs @@ -19,6 +19,9 @@ namespace MonoTests.System.Net.NetworkInformation public class IPInterfacePropertiesTest { [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void AtLeastOneUnicastAddress () { int numUnicastAddresses = 0; @@ -112,10 +115,13 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void DnsEnabled () { if (Environment.OSVersion.Platform == PlatformID.Win32NT) - Assert.Ignore ("IsDnsEnabled is not nessasarily enabled for all interfaces on windows."); + Assert.Ignore ("IsDnsEnabled is not necessarily enabled for all interfaces on windows."); NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces (); foreach (NetworkInterface adapter in adapters) @@ -126,6 +132,9 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif // The code works as expected when part of a regular app. It fails when executed from within an NUnit test // Might be a problem with the test suite. To investigate. [Category("AndroidNotWorking")] diff --git a/mcs/class/System/Test/System.Net.NetworkInformation/NetworkInterfaceTest.cs b/mcs/class/System/Test/System.Net.NetworkInformation/NetworkInterfaceTest.cs index b124403e0d..e42b0f8fc9 100644 --- a/mcs/class/System/Test/System.Net.NetworkInformation/NetworkInterfaceTest.cs +++ b/mcs/class/System/Test/System.Net.NetworkInformation/NetworkInterfaceTest.cs @@ -19,18 +19,27 @@ namespace MonoTests.System.Net.NetworkInformation public class NetworkInterfaceTest { [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void IsNetworkAvailable () { Assert.IsTrue (NetworkInterface.GetIsNetworkAvailable ()); } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void LoopbackInterfaceIndex () { Assert.IsTrue (NetworkInterface.LoopbackInterfaceIndex > 0); } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void AtLeastOneInterface () { NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces (); @@ -38,6 +47,9 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void FirstInterfaceId () { NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces (); @@ -45,6 +57,9 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void FirstInterfaceName () { NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces (); @@ -52,6 +67,9 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void FirstInterfaceType () { NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces (); @@ -59,6 +77,9 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void FirstInterfaceOperationalStatus () { var adapter = NetworkInterface.GetAllNetworkInterfaces ()[0]; @@ -68,6 +89,9 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void FirstInterfaceSpeed () { NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces (); @@ -75,6 +99,9 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void IPv4Mask () { NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces (); diff --git a/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs b/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs index 89ac4c971d..bf63ddb4d6 100644 --- a/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs +++ b/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs @@ -93,7 +93,7 @@ namespace MonoTests.System.Net.Sockets } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ArgumentNullException))] @@ -104,7 +104,7 @@ namespace MonoTests.System.Net.Sockets } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ArgumentNullException))] @@ -115,7 +115,7 @@ namespace MonoTests.System.Net.Sockets } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ArgumentOutOfRangeException))] diff --git a/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs b/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs index 557c3292ee..c2d73619ca 100644 --- a/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs +++ b/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs @@ -95,7 +95,7 @@ namespace MonoTests.System.Net.Sockets { } [Test] // .ctor (AddressFamily) -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Constructor2_Family_Invalid () @@ -176,7 +176,7 @@ namespace MonoTests.System.Net.Sockets { } [Test] // .ctor (Int32) -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Constructor3_Port_OutOfRange () @@ -240,7 +240,7 @@ namespace MonoTests.System.Net.Sockets { } [Test] // .ctor (IPEndPoint) -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Constructor4_LocalEP_Null () @@ -313,7 +313,7 @@ namespace MonoTests.System.Net.Sockets { } [Test] // .ctor (Int32, AddressFamily) -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Constructor5_Family_Invalid () @@ -346,7 +346,7 @@ namespace MonoTests.System.Net.Sockets { } [Test] // .ctor (Int32, AddressFamily) -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Constructor5_Port_OutOfRange () @@ -426,7 +426,7 @@ namespace MonoTests.System.Net.Sockets { } [Test] // .ctor (String, Int32) -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Constructor6_HostName_Null () @@ -443,7 +443,7 @@ namespace MonoTests.System.Net.Sockets { } [Test] // .ctor (String, Int32) -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Constructor6_Port_OutOfRange () diff --git a/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs b/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs index 20763df580..a256846f5b 100644 --- a/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs +++ b/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs @@ -38,7 +38,7 @@ namespace MonoTests.System.Net { public class HttpListenerPrefixCollectionTest { // NL -> Not listening -> tests when listener.IsListening == false [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void NL_DefaultProperties () @@ -51,7 +51,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void DefaultProperties () @@ -100,7 +100,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void EndsWithSlash () @@ -110,7 +110,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void DifferentPath () @@ -122,7 +122,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void NL_Clear () @@ -133,7 +133,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void NL_Remove () @@ -144,7 +144,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void NL_RemoveBadUri () @@ -155,7 +155,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ArgumentException))] @@ -168,7 +168,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ArgumentException))] @@ -180,7 +180,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void MultipleSlashes () @@ -196,7 +196,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void PercentSign () @@ -212,7 +212,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Disposed1 () @@ -226,7 +226,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -240,7 +240,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -254,7 +254,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -268,7 +268,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -283,7 +283,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Disposed6 () @@ -299,7 +299,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Disposed7 () diff --git a/mcs/class/System/Test/System.Net/HttpListenerTest.cs b/mcs/class/System/Test/System.Net/HttpListenerTest.cs index 2683fc6166..7d14e06378 100644 --- a/mcs/class/System/Test/System.Net/HttpListenerTest.cs +++ b/mcs/class/System/Test/System.Net/HttpListenerTest.cs @@ -39,7 +39,7 @@ namespace MonoTests.System.Net { [TestFixture] public class HttpListenerTest { [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void DefaultProperties () @@ -55,7 +55,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Start1 () @@ -65,7 +65,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Stop1 () @@ -75,7 +75,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (InvalidOperationException))] @@ -88,7 +88,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (InvalidOperationException))] @@ -102,7 +102,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (InvalidOperationException))] @@ -115,7 +115,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void BeginGetContext2 () @@ -227,7 +227,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void CloseBeforeStart () @@ -271,7 +271,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void AbortBeforeStart () @@ -292,7 +292,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void PropertiesWhenClosed1 () @@ -308,7 +308,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -321,7 +321,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -334,7 +334,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -347,7 +347,8 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS + [Category ("NotWasm")] +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -360,7 +361,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -373,7 +374,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -386,7 +387,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void PropertiesWhenClosed3 () diff --git a/mcs/class/System/Test/System.Net/ServicePointTest.cs b/mcs/class/System/Test/System.Net/ServicePointTest.cs index 506d87a0bf..1a1a89e012 100644 --- a/mcs/class/System/Test/System.Net/ServicePointTest.cs +++ b/mcs/class/System/Test/System.Net/ServicePointTest.cs @@ -209,11 +209,13 @@ public class ServicePointTest Assert.AreSame (host0, host1, "HostEntry should result in the same IPHostEntry object."); +#if !WASM Thread.Sleep (dnsRefreshTimeout * 2); host2 = hostEntryProperty.GetValue (sp, null) as IPHostEntry; Assert.AreNotSame(host0, host2, "HostEntry should result in a new IPHostEntry " + "object when DnsRefreshTimeout is reached."); +#endif } // Debug code not used now, but could be useful later diff --git a/mcs/class/System/Test/System.Net/WebClientTestAsync.cs b/mcs/class/System/Test/System.Net/WebClientTestAsync.cs index 549929304a..3ebb27c22a 100644 --- a/mcs/class/System/Test/System.Net/WebClientTestAsync.cs +++ b/mcs/class/System/Test/System.Net/WebClientTestAsync.cs @@ -41,6 +41,7 @@ namespace MonoTests.System.Net public class WebClientTestAsync { [Test] + [Category("NotWasm")] [Category("Async")] [Category("AndroidNotWorking")] // Attempts to access the test dll which won't work on Android [Category("BitcodeNotSupported")] diff --git a/mcs/class/System/Test/System.Net/WebProxyTest.cs b/mcs/class/System/Test/System.Net/WebProxyTest.cs index 4fa3b0bfb2..e20c8e319a 100644 --- a/mcs/class/System/Test/System.Net/WebProxyTest.cs +++ b/mcs/class/System/Test/System.Net/WebProxyTest.cs @@ -66,6 +66,9 @@ namespace MonoTests.System.Net } [Test] +#if WASM + [Ignore ("WASM - libc issue")] +#endif public void BypassArrayList () { Uri proxy1 = new Uri ("http://proxy.contoso.com"); @@ -124,6 +127,9 @@ namespace MonoTests.System.Net } [Test] +#if WASM + [Ignore ("WASM - libc issue")] +#endif public void IsByPassed () { WebProxy p = new WebProxy ("http://proxy.contoso.com", true); diff --git a/mcs/class/System/Test/System.Net/WebRequestTest.cs b/mcs/class/System/Test/System.Net/WebRequestTest.cs index 4493b8ebdf..51d7a24732 100644 --- a/mcs/class/System/Test/System.Net/WebRequestTest.cs +++ b/mcs/class/System/Test/System.Net/WebRequestTest.cs @@ -267,7 +267,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void DefaultWebProxy () diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2CollectionTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2CollectionTest.cs index 3f7ef18e70..ad44b00e9d 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2CollectionTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2CollectionTest.cs @@ -579,6 +579,9 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } [Test] +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Find_FindByIssuerName () { // empty @@ -692,6 +695,9 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } [Test] +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Find_FindBySubjectName () { // empty diff --git a/mcs/class/System/Test/System.Timers/TimerTest.cs b/mcs/class/System/Test/System.Timers/TimerTest.cs index 00a238f2e9..6c7206a390 100644 --- a/mcs/class/System/Test/System.Timers/TimerTest.cs +++ b/mcs/class/System/Test/System.Timers/TimerTest.cs @@ -287,6 +287,7 @@ namespace MonoTests.System.Timers } [Test] // bug https://bugzilla.novell.com/show_bug.cgi?id=325368 + [Category ("NotWasm")] public void EnabledInElapsed () { var elapsedCount = 0; @@ -309,6 +310,7 @@ namespace MonoTests.System.Timers } [Test] + [Category ("NotWasm")] public void AutoResetEventFalseStopsFiringElapsed () { var elapsedCount = 0; diff --git a/mcs/class/System/wasm_System.dll.exclude.sources b/mcs/class/System/wasm_System.dll.exclude.sources index a6a19c8bc9..adb10a980d 100644 --- a/mcs/class/System/wasm_System.dll.exclude.sources +++ b/mcs/class/System/wasm_System.dll.exclude.sources @@ -1,3 +1,4 @@ System.IO/FileSystemWatcher.cs ../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.UnknownUnix.cs ../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs +../../../external/corefx/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs \ No newline at end of file diff --git a/mcs/class/System/wasm_System.dll.sources b/mcs/class/System/wasm_System.dll.sources index a6748349a0..b5ce06f016 100644 --- a/mcs/class/System/wasm_System.dll.sources +++ b/mcs/class/System/wasm_System.dll.sources @@ -1,2 +1,3 @@ #include mobile_System.dll.sources -#include fsw.pns.sources \ No newline at end of file +#include fsw.pns.sources +System.Net.WebSockets/WebSocketHandle.wasm.cs diff --git a/mcs/class/corlib/LinkerDescriptor/mscorlib.xml b/mcs/class/corlib/LinkerDescriptor/mscorlib.xml index ecc8c043b6..cc06dbfe9e 100644 --- a/mcs/class/corlib/LinkerDescriptor/mscorlib.xml +++ b/mcs/class/corlib/LinkerDescriptor/mscorlib.xml @@ -645,7 +645,6 @@ - diff --git a/mcs/class/corlib/Makefile b/mcs/class/corlib/Makefile index 0bc725bedd..e399631886 100644 --- a/mcs/class/corlib/Makefile +++ b/mcs/class/corlib/Makefile @@ -6,7 +6,7 @@ export __SECURITY_BOOTSTRAP_DB=$(topdir)/class/corlib LIBRARY = corlib.dll LIBRARY_NAME = mscorlib.dll -LIB_MCS_FLAGS = $(REFERENCE_SOURCES_FLAGS) $(RESOURCE_FILES:%=-resource:%) +LIB_MCS_FLAGS = $(REFERENCE_SOURCES_FLAGS) $(RESOURCE_FILES:%=-resource:%) $(UNICODECHARINFO:%=-resource:%) USE_XTEST_REMOTE_EXECUTOR = YES LIBRARY_WARN_AS_ERROR = yes @@ -88,8 +88,13 @@ MANAGED_COLLATOR_RESOURCES_FILES = \ resources/collation.cjkKOlv2.bin endif +ifdef MCS_MODE + UNICODECHARINFO = resources/charinfo.nlp +else + UNICODECHARINFO = +endif + RESOURCE_FILES = \ - resources/charinfo.nlp \ $(MANAGED_COLLATOR_RESOURCES_FILES) \ LinkerDescriptor/mscorlib.xml @@ -201,6 +206,7 @@ EXTRA_DISTFILES = \ $(RESOURCE_FILES) \ $(TEST_RESOURCE_FILES) \ $(TEST_RESOURCES:.resources=.resx) \ + resources/charinfo.nlp \ LinkerDescriptor/mscorlib_test.xml TEST_RESOURCE_FILES = \ diff --git a/mcs/class/corlib/Mono.Interop/ComInteropProxy.cs b/mcs/class/corlib/Mono.Interop/ComInteropProxy.cs index 3738f0fb03..a50c92193b 100644 --- a/mcs/class/corlib/Mono.Interop/ComInteropProxy.cs +++ b/mcs/class/corlib/Mono.Interop/ComInteropProxy.cs @@ -50,10 +50,10 @@ namespace Mono.Interop private string type_name; [MethodImplAttribute (MethodImplOptions.InternalCall)] - private extern static void AddProxy (IntPtr pItf, ComInteropProxy proxy); + private extern static void AddProxy (IntPtr pItf, ref ComInteropProxy proxy); [MethodImplAttribute (MethodImplOptions.InternalCall)] - internal extern static ComInteropProxy FindProxy (IntPtr pItf); + internal extern static void FindProxy (IntPtr pItf, ref ComInteropProxy proxy); // Private. Objects must be created with CreateProxy. ComInteropProxy (Type t) @@ -68,8 +68,12 @@ namespace Mono.Interop { // called from unmanaged code after .ctor is invoked // we need .ctor to create unmanaged object and thus IUnknown property value - if (FindProxy (com_object.IUnknown) == null) - AddProxy (com_object.IUnknown, this); + ComInteropProxy proxy = null; + FindProxy (com_object.IUnknown, ref proxy); + if (proxy == null) { + var self = this; + AddProxy (com_object.IUnknown, ref self); + } else System.Threading.Interlocked.Increment (ref ref_count); } @@ -92,7 +96,8 @@ namespace Mono.Interop Guid iid = __ComObject.IID_IUnknown; int hr = Marshal.QueryInterface (pItf, ref iid, out ppv); Marshal.ThrowExceptionForHR (hr); - ComInteropProxy obj = FindProxy (ppv); + ComInteropProxy obj = null; + FindProxy (ppv, ref obj); if (obj == null) { Marshal.Release (ppv); return new ComInteropProxy (ppv); @@ -110,7 +115,8 @@ namespace Mono.Interop { IntPtr iunknown = __ComObject.CreateIUnknown (t); ComInteropProxy proxy; - ComInteropProxy cachedProxy = FindProxy (iunknown); + ComInteropProxy cachedProxy = null; + FindProxy (iunknown, ref cachedProxy); if (cachedProxy != null) { // check that the COM type of the cached proxy matches // the requested type. See 2nd part of bug #520437. diff --git a/mcs/class/corlib/Mono/Runtime.cs b/mcs/class/corlib/Mono/Runtime.cs index f59a7e9389..c85a3a3b1f 100644 --- a/mcs/class/corlib/Mono/Runtime.cs +++ b/mcs/class/corlib/Mono/Runtime.cs @@ -27,6 +27,7 @@ // using System; +using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -255,6 +256,43 @@ namespace Mono { } } + static string get_breadcrumb_value (string file_prefix, string directory_str, bool clear) + { + var allfiles = Directory.GetFiles (directory_str, $"{file_prefix}_*" ); + if (allfiles.Length == 0) + return string.Empty; + + if (allfiles.Length > 1) { + // it's impossible to tell which breadcrumb is the last one (let's not trust filesystem timestamps) + // delete the multiple files so at least next crash can make sense + try { + Array.ForEach (allfiles, f => File.Delete (f) ); + } catch (Exception) { } + + return string.Empty; + } + + if (clear) + File.Delete (allfiles [0]); + + var filename = Path.GetFileName (allfiles [0]); + return filename.Substring (file_prefix.Length + 1); + } + + static long CheckCrashReportHash (string directory_str, bool clear) + { + var value = get_breadcrumb_value ("crash_hash", directory_str, clear); + if (value == string.Empty) + return 0; + else + return Convert.ToInt64 (value, 16); + } + + static string CheckCrashReportReason (string directory_str, bool clear) + { + return get_breadcrumb_value ("crash_reason", directory_str, clear); + } + [MethodImplAttribute (MethodImplOptions.InternalCall)] static extern void AnnotateMicrosoftTelemetry_internal (IntPtr key, IntPtr val); diff --git a/mcs/class/corlib/ReferenceSources/Buffer.cs b/mcs/class/corlib/ReferenceSources/Buffer.cs index f89199219b..5c83291cf5 100644 --- a/mcs/class/corlib/ReferenceSources/Buffer.cs +++ b/mcs/class/corlib/ReferenceSources/Buffer.cs @@ -86,14 +86,14 @@ namespace System var src = (byte*)source; var dst = (byte*)destination; - while (sourceBytesToCopy > int.MaxValue) { - Memcpy (dst, src, int.MaxValue); - sourceBytesToCopy -= int.MaxValue; - src += int.MaxValue; - dst += int.MaxValue; + while (sourceBytesToCopy > uint.MaxValue) { + Memmove (dst, src, uint.MaxValue); + sourceBytesToCopy -= uint.MaxValue; + src += uint.MaxValue; + dst += uint.MaxValue; } - Memcpy (dst, src, (int) sourceBytesToCopy); + Memmove (dst, src, (uint) sourceBytesToCopy); } [CLSCompliantAttribute (false)] @@ -105,14 +105,14 @@ namespace System var src = (byte*)source; var dst = (byte*)destination; - while (sourceBytesToCopy > int.MaxValue) { - Memcpy (dst, src, int.MaxValue); - sourceBytesToCopy -= int.MaxValue; - src += int.MaxValue; - dst += int.MaxValue; + while (sourceBytesToCopy > uint.MaxValue) { + Memmove (dst, src, uint.MaxValue); + sourceBytesToCopy -= uint.MaxValue; + src += uint.MaxValue; + dst += uint.MaxValue; } - Memcpy (dst, src, (int) sourceBytesToCopy); + Memmove (dst, src, (uint) sourceBytesToCopy); } internal static unsafe void memcpy4 (byte *dest, byte *src, int size) { diff --git a/mcs/class/corlib/System.Diagnostics/StackTrace.cs b/mcs/class/corlib/System.Diagnostics/StackTrace.cs index dc2c7a4339..a70b0ae7d8 100644 --- a/mcs/class/corlib/System.Diagnostics/StackTrace.cs +++ b/mcs/class/corlib/System.Diagnostics/StackTrace.cs @@ -243,6 +243,7 @@ namespace System.Diagnostics { } var filename = frame.GetSecureFileName (); +#if !WASM if (filename[0] == '<') { var mvid = frame.GetMethod ().Module.ModuleVersionId.ToString ("N"); var aotid = GetAotId (); @@ -252,6 +253,7 @@ namespace System.Diagnostics { filename = string.Format ("<{0}#{1}>", mvid, aotid); } } +#endif sb.AppendFormat (" in {0}:{1} ", filename, frame.GetFileLineNumber ()); } diff --git a/mcs/class/corlib/System.Globalization/CultureInfo.cs b/mcs/class/corlib/System.Globalization/CultureInfo.cs index deeecd8b56..b21a89a716 100644 --- a/mcs/class/corlib/System.Globalization/CultureInfo.cs +++ b/mcs/class/corlib/System.Globalization/CultureInfo.cs @@ -154,6 +154,9 @@ namespace System.Globalization if (default_current_culture != null) return default_current_culture; + if (GlobalizationMode.Invariant) + return InvariantCulture; + var locale_name = get_current_locale_name (); CultureInfo ci = null; diff --git a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs index 598795926a..0fb48003c8 100644 --- a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs +++ b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs @@ -1066,12 +1066,6 @@ namespace System.Reflection.Emit { return new Guid (guid); } - // Used by mcs, the symbol writer, and mdb through reflection - internal static Guid Mono_GetGuid (ModuleBuilder mb) - { - return mb.GetModuleVersionId (); - } - public override Assembly Assembly { get { return assemblyb; } } diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/Unsafe.cs b/mcs/class/corlib/System.Runtime.CompilerServices/Unsafe.cs index a3abb1ef80..318bf290b7 100644 --- a/mcs/class/corlib/System.Runtime.CompilerServices/Unsafe.cs +++ b/mcs/class/corlib/System.Runtime.CompilerServices/Unsafe.cs @@ -82,6 +82,11 @@ namespace System.Runtime.CompilerServices { throw new NotImplementedException (); } + + public static ref T AsRef (in T source) + { + throw new NotImplementedException (); + } public static System.IntPtr ByteOffset (ref T origin, ref T target) { diff --git a/mcs/class/corlib/System.Security.Principal/SecurityIdentifier.cs b/mcs/class/corlib/System.Security.Principal/SecurityIdentifier.cs index 48d00175c4..453339846e 100644 --- a/mcs/class/corlib/System.Security.Principal/SecurityIdentifier.cs +++ b/mcs/class/corlib/System.Security.Principal/SecurityIdentifier.cs @@ -16,10 +16,10 @@ // 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 @@ -48,7 +48,7 @@ namespace System.Security.Principal { if (sddlForm == null) throw new ArgumentNullException ("sddlForm"); - + buffer = ParseSddlForm (sddlForm); } @@ -58,42 +58,42 @@ namespace System.Security.Principal throw new ArgumentNullException ("binaryForm"); if ((offset < 0) || (offset > binaryForm.Length - 2)) throw new ArgumentException ("offset"); - + fixed (byte* binaryFormPtr = binaryForm) CreateFromBinaryForm ((IntPtr)(binaryFormPtr + offset), binaryForm.Length - offset); } public SecurityIdentifier (IntPtr binaryForm) - { + { CreateFromBinaryForm (binaryForm, int.MaxValue); } - + void CreateFromBinaryForm (IntPtr binaryForm, int length) - { + { int revision = Marshal.ReadByte (binaryForm, 0); int numSubAuthorities = Marshal.ReadByte (binaryForm, 1); if (revision != 1 || numSubAuthorities > 15) throw new ArgumentException ("Value was invalid."); if (length < (8 + (numSubAuthorities * 4))) throw new ArgumentException ("offset"); - + buffer = new byte[8 + (numSubAuthorities * 4)]; Marshal.Copy (binaryForm, buffer, 0, buffer.Length); } - + public SecurityIdentifier (WellKnownSidType sidType, SecurityIdentifier domainSid) { WellKnownAccount acct = WellKnownAccount.LookupByType (sidType); if (acct == null) throw new ArgumentException ("Unable to convert SID type: " + sidType); - + if (acct.IsAbsolute) { buffer = ParseSddlForm (acct.Sid); } else { if (domainSid == null) throw new ArgumentNullException ("domainSid"); - + buffer = ParseSddlForm (domainSid.Value + "-" + acct.Rid); } } @@ -101,11 +101,11 @@ namespace System.Security.Principal public SecurityIdentifier AccountDomainSid { get { string strForm = this.Value; - + // Check prefix, and ensure at least 4 sub authorities if (!strForm.StartsWith ("S-1-5-21") || buffer[1] < 4) return null; - + // Domain is first four sub-authorities byte[] temp = new byte[8 + (4 * 4)]; Array.Copy (buffer, 0, temp, 0, temp.Length); @@ -121,15 +121,15 @@ namespace System.Security.Principal public override string Value { get { StringBuilder s = new StringBuilder (); - + ulong authority = GetSidAuthority (); s.AppendFormat (CultureInfo.InvariantCulture, "S-1-{0}", authority); - + for (byte i = 0; i < GetSidSubAuthorityCount (); ++i) s.AppendFormat ( CultureInfo.InvariantCulture, "-{0}", GetSidSubAuthority (i)); - + return s.ToString (); } } @@ -140,23 +140,23 @@ namespace System.Security.Principal | (((ulong)buffer [4]) << 24) | (((ulong)buffer [5]) << 16) | (((ulong)buffer [6]) << 8) | (((ulong)buffer [7]) << 0); } - + byte GetSidSubAuthorityCount () { return buffer [1]; } - + uint GetSidSubAuthority (byte index) { // Note sub authorities little-endian, authority (above) is big-endian! int offset = 8 + (index * 4); - + return (((uint)buffer [offset + 0]) << 0) | (((uint)buffer [offset + 1]) << 8) | (((uint)buffer [offset + 2]) << 16) | (((uint)buffer [offset + 3]) << 24); } - + // The CompareTo ordering was determined by unit test applied to MS.NET implementation, // necessary because the CompareTo has no details in its documentation. // (See MonoTests.System.Security.AccessControl.DiscretionaryAclTest.) @@ -165,7 +165,7 @@ namespace System.Security.Principal { if (sid == null) throw new ArgumentNullException ("sid"); - + int result; if (0 != (result = GetSidAuthority ().CompareTo (sid.GetSidAuthority ()))) return result; if (0 != (result = GetSidSubAuthorityCount ().CompareTo (sid.GetSidSubAuthorityCount ()))) return result; @@ -192,7 +192,7 @@ namespace System.Security.Principal throw new ArgumentNullException ("binaryForm"); if ((offset < 0) || (offset > binaryForm.Length - buffer.Length)) throw new ArgumentException ("offset"); - + Array.Copy (buffer, 0, binaryForm, offset, buffer.Length); } @@ -211,7 +211,7 @@ namespace System.Security.Principal SecurityIdentifier domSid = AccountDomainSid; if (domSid == null) return false; - + return domSid.Equals (sid.AccountDomainSid); } @@ -229,12 +229,12 @@ namespace System.Security.Principal WellKnownAccount acct = WellKnownAccount.LookupByType (type); if (acct == null) return false; - + string sid = Value; - + if (acct.IsAbsolute) return sid == acct.Sid; - + return sid.StartsWith ("S-1-5-21", StringComparison.OrdinalIgnoreCase) && sid.EndsWith ("-" + acct.Rid, StringComparison.OrdinalIgnoreCase); } @@ -248,15 +248,15 @@ namespace System.Security.Principal { if (targetType == typeof(SecurityIdentifier)) return this; - + if (targetType == typeof(NTAccount)) { WellKnownAccount acct = WellKnownAccount.LookupBySid (this.Value); if (acct == null || acct.Name == null) throw new IdentityNotMappedException ("Unable to map SID: " + this.Value); - + return new NTAccount (acct.Name); } - + throw new ArgumentException ("Unknown type.", "targetType"); } @@ -281,11 +281,11 @@ namespace System.Security.Principal internal string GetSddlForm() { string sidString = Value; - + WellKnownAccount acct = WellKnownAccount.LookupBySid(sidString); if(acct == null || acct.SddlForm == null) return sidString; - + return acct.SddlForm; } @@ -293,30 +293,34 @@ namespace System.Security.Principal { if (sddlForm.Length - pos < 2) throw new ArgumentException("Invalid SDDL string.", "sddlForm"); - + string sid; int len; - + string prefix = sddlForm.Substring(pos, 2).ToUpperInvariant(); if (prefix == "S-") { // Looks like a SID, try to parse it. int endPos = pos; - + char ch = Char.ToUpperInvariant(sddlForm[endPos]); while (ch == 'S' || ch == '-' || ch == 'X' || (ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'F')) { ++endPos; ch = Char.ToUpperInvariant(sddlForm[endPos]); } - + + if (ch == ':' && sddlForm[endPos - 1] == 'D') { + endPos--; + } + sid = sddlForm.Substring(pos, endPos - pos); len = endPos - pos; } else { sid = prefix; len = 2; } - + SecurityIdentifier ret = new SecurityIdentifier(sid); pos += len; return ret; @@ -325,7 +329,7 @@ namespace System.Security.Principal private static byte[] ParseSddlForm (string sddlForm) { string sid = sddlForm; - + // If only 2 characters long, can't be a full SID string - so assume // it's an attempted alias. Do that conversion first. if(sddlForm.Length == 2) { @@ -341,20 +345,20 @@ namespace System.Security.Principal sid = acct.Sid; } - + string[] elements = sid.ToUpperInvariant ().Split ('-'); int numSubAuthorities = elements.Length - 3; - + if (elements.Length < 3 || elements[0] != "S" || numSubAuthorities > 15) throw new ArgumentException ("Value was invalid."); - + if (elements[1] != "1") throw new ArgumentException ("Only SIDs with revision 1 are supported"); - + byte[] buffer = new byte[8 + (numSubAuthorities * 4)]; buffer[0] = 1; buffer[1] = (byte)numSubAuthorities; - + ulong authority; if (!TryParseAuthority (elements[2], out authority)) throw new ArgumentException ("Value was invalid."); @@ -364,14 +368,14 @@ namespace System.Security.Principal buffer[5] = (byte)((authority >> 16) & 0xFF); buffer[6] = (byte)((authority >> 8) & 0xFF); buffer[7] = (byte)((authority >> 0) & 0xFF); - + for (int i = 0; i < numSubAuthorities; ++i) { uint subAuthority; - + if (!TryParseSubAuthority (elements[i + 3], out subAuthority)) throw new ArgumentException ("Value was invalid."); - + // Note sub authorities little-endian! int offset = 8 + (i * 4); buffer[offset + 0] = (byte)(subAuthority >> 0); @@ -379,7 +383,7 @@ namespace System.Security.Principal buffer[offset + 2] = (byte)(subAuthority >> 16); buffer[offset + 3] = (byte)(subAuthority >> 24); } - + return buffer; } @@ -412,4 +416,3 @@ namespace System.Security.Principal } } } - diff --git a/mcs/class/corlib/System.Threading/Thread.cs b/mcs/class/corlib/System.Threading/Thread.cs index cbc56275f9..7e2db6cff1 100644 --- a/mcs/class/corlib/System.Threading/Thread.cs +++ b/mcs/class/corlib/System.Threading/Thread.cs @@ -55,8 +55,7 @@ namespace System.Threading { IntPtr native_handle; // used only on Win32 /* accessed only from unmanaged code */ private IntPtr name_chars; - private IntPtr name_generation; - private int name_free; + private int name_free; // bool private int name_length; private ThreadState state; private object abort_exc; @@ -307,7 +306,13 @@ namespace System.Threading { #endif [MethodImplAttribute(MethodImplOptions.InternalCall)] - private extern static Thread GetCurrentThread (); + private extern static void GetCurrentThread_icall (ref Thread thread); + + private static Thread GetCurrentThread () { + Thread thread = null; + GetCurrentThread_icall (ref thread); + return thread; + } public static Thread CurrentThread { [ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)] diff --git a/mcs/class/corlib/System/Console.cs b/mcs/class/corlib/System/Console.cs index 1cb266ad91..0830e4ff07 100644 --- a/mcs/class/corlib/System/Console.cs +++ b/mcs/class/corlib/System/Console.cs @@ -186,7 +186,11 @@ namespace System { try { // TODO: Should use __ConsoleStream from reference sources - return new FileStream (handle, access, false, bufferSize, false, true); + var stream = new FileStream (handle, access, false, bufferSize, false, true); + // Don't run the finalizer on the underlying stream so that System.WriteLine can be + // called inside a finalizer during shutdown or domain unload. + GC.SuppressFinalize (stream); + return stream; } catch (IOException) { return Stream.Null; } diff --git a/mcs/class/corlib/System/MonoCustomAttrs.cs b/mcs/class/corlib/System/MonoCustomAttrs.cs index b79760fef3..5761df5fa6 100644 --- a/mcs/class/corlib/System/MonoCustomAttrs.cs +++ b/mcs/class/corlib/System/MonoCustomAttrs.cs @@ -67,7 +67,7 @@ namespace System } [MethodImplAttribute (MethodImplOptions.InternalCall)] - internal static extern object[] GetCustomAttributesInternal (ICustomAttributeProvider obj, Type attributeType, bool pseudoAttrs); + internal static extern Attribute[] GetCustomAttributesInternal (ICustomAttributeProvider obj, Type attributeType, bool pseudoAttrs); internal static object[] GetPseudoCustomAttributes (ICustomAttributeProvider obj, Type attributeType) { object[] pseudoAttrs = null; @@ -134,7 +134,7 @@ namespace System if (!inheritedOnly) { object[] pseudoAttrs = GetPseudoCustomAttributes (obj, attributeType); if (pseudoAttrs != null) { - object[] res = new object [attrs.Length + pseudoAttrs.Length]; + object[] res = new Attribute [attrs.Length + pseudoAttrs.Length]; System.Array.Copy (attrs, res, attrs.Length); System.Array.Copy (pseudoAttrs, 0, res, attrs.Length, pseudoAttrs.Length); return res; diff --git a/mcs/class/corlib/Test/System.Security.AccessControl/RawSecurityDescriptorTest.cs b/mcs/class/corlib/Test/System.Security.AccessControl/RawSecurityDescriptorTest.cs index 7a0e837cac..b9ffa6b4eb 100644 --- a/mcs/class/corlib/Test/System.Security.AccessControl/RawSecurityDescriptorTest.cs +++ b/mcs/class/corlib/Test/System.Security.AccessControl/RawSecurityDescriptorTest.cs @@ -17,10 +17,10 @@ namespace MonoTests.System.Security.AccessControl { private void CheckSddlConstructor (string sddl, byte[] expectedBinary) { RawSecurityDescriptor sd = new RawSecurityDescriptor (sddl); - + Assert.That (sd.BinaryLength, Is.GreaterThanOrEqualTo (0)); byte[] buffer = new byte[sd.BinaryLength]; - + sd.GetBinaryForm (buffer, 0); Assert.AreEqual (expectedBinary, buffer); } @@ -28,7 +28,7 @@ namespace MonoTests.System.Security.AccessControl { private void CheckBinaryConstructor (string expectedSddl, byte[] binary) { RawSecurityDescriptor sd = new RawSecurityDescriptor (binary, 0); - + Assert.AreEqual (sd.BinaryLength, binary.Length); Assert.AreEqual (expectedSddl, sd.GetSddlForm (AccessControlSections.All)); } @@ -36,10 +36,10 @@ namespace MonoTests.System.Security.AccessControl { private void CheckRoundTrip (string sddl) { RawSecurityDescriptor sd = new RawSecurityDescriptor (sddl); - + byte[] buffer = new byte[sd.BinaryLength]; sd.GetBinaryForm (buffer, 0); - + sd = new RawSecurityDescriptor (buffer, 0); Assert.AreEqual (sddl, sd.GetSddlForm (AccessControlSections.All)); } @@ -69,7 +69,7 @@ namespace MonoTests.System.Security.AccessControl { CheckSddlConstructor ("G:BAO:BUD:(A;;RPWPCCDCLCSWRCWDWOGA;;;S-1-0-0)", sdBinary); CheckSddlConstructor ("G:BAD:(A; ;RPWPCCDCLCSWRCWDWOGA;;;S-1-0-0)O:BU", sdBinary); CheckSddlConstructor ("O:buG:baD:(a;;rpwpccdclcswrcwdwoga;;;s-1-0-0)", sdBinary); - + sdBinary = new byte[] { 0x01, 0x00, 0x00, 0x80, 0x14, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -78,7 +78,7 @@ namespace MonoTests.System.Security.AccessControl { 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00 }; CheckSddlConstructor ("O:BUG:BA", sdBinary); - + sdBinary = new byte[] { 0x01, 0x00, 0x04, 0x80, 0x14, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, @@ -116,7 +116,7 @@ namespace MonoTests.System.Security.AccessControl { 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00 }; CheckBinaryConstructor ("O:BUG:BA", sdBinary); - + sdBinary = new byte[] { 0x01, 0x00, 0x04, 0x80, 0x14, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, @@ -147,7 +147,7 @@ namespace MonoTests.System.Security.AccessControl { 0x01, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; Assert.AreEqual (sdBinary, buffer); - + // Check unsetting DACL-present flag on SD with DACL sd = new RawSecurityDescriptor ("O:BUG:BAD:(A;;RPWPCCDCLCSWRCWDWOGA;;;S-1-0-0)"); Assert.AreEqual (80, sd.BinaryLength); @@ -175,7 +175,7 @@ namespace MonoTests.System.Security.AccessControl { sd.DiscretionaryAcl = new RawAcl (1, 0); sd.SystemAcl = new RawAcl (1, 0); sd.SetFlags (sd.ControlFlags | ControlFlags.DiscretionaryAclPresent | ControlFlags.SystemAclPresent); - + // Empty ACL form byte[] buffer = new byte[sd.BinaryLength]; sd.GetBinaryForm (buffer, 0); @@ -188,7 +188,7 @@ namespace MonoTests.System.Security.AccessControl { 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00 }; Assert.AreEqual (sdBinary, buffer); - + // Add an ACE to the DACL SecurityIdentifier builtInAdmins = new SecurityIdentifier (WellKnownSidType.BuiltinAdministratorsSid, null); CommonAce ace = new CommonAce (AceFlags.None, AceQualifier.AccessAllowed, 0x7FFFFFFF, builtInAdmins, false, null); @@ -207,7 +207,7 @@ namespace MonoTests.System.Security.AccessControl { 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00 }; Assert.AreEqual (sdBinary, buffer); - + // This time with an Object ACE ObjectAce objectAce = new ObjectAce (AceFlags.Inherited, AceQualifier.AccessAllowed, 0x12345678, builtInAdmins, ObjectAceFlags.ObjectAceTypePresent | ObjectAceFlags.InheritedObjectAceTypePresent, new Guid ("189c0dc7-b849-4dea-93a5-6d4cb8857a5c"), new Guid ("53b4a3d4-fe39-468b-bc60-b4fcba772fa5"), false, null); sd.DiscretionaryAcl = new RawAcl (2, 0); @@ -236,37 +236,37 @@ namespace MonoTests.System.Security.AccessControl { { RawSecurityDescriptor sd = new RawSecurityDescriptor (""); Assert.AreEqual ("", sd.GetSddlForm (AccessControlSections.All)); - + // Ask for part of SD that isn't represented sd.Owner = new SecurityIdentifier (WellKnownSidType.BuiltinUsersSid, null); sd.Group = new SecurityIdentifier (WellKnownSidType.BuiltinAdministratorsSid, null); Assert.AreEqual ("", sd.GetSddlForm (AccessControlSections.Access)); - + // Empty ACL form sd.DiscretionaryAcl = new RawAcl (2, 0); sd.SystemAcl = new RawAcl (1, 0); sd.SetFlags (sd.ControlFlags | ControlFlags.DiscretionaryAclPresent | ControlFlags.SystemAclPresent); Assert.AreEqual ("O:BUG:BAD:S:", sd.GetSddlForm (AccessControlSections.All)); - + // Add an ACE to the DACL SecurityIdentifier builtInAdmins = new SecurityIdentifier (WellKnownSidType.BuiltinAdministratorsSid, null); CommonAce ace = new CommonAce (AceFlags.None, AceQualifier.AccessAllowed, 0x7FFFFFFF, builtInAdmins, false, null); sd.DiscretionaryAcl.InsertAce (0, ace); Assert.AreEqual ("O:BUG:BAD:(A;;0x7fffffff;;;BA)S:", sd.GetSddlForm (AccessControlSections.All)); - + // Add second ACE to the DACL SecurityIdentifier randomUser = new SecurityIdentifier ("S-1-5-21-324-23423-234-334"); ace = new CommonAce (AceFlags.Inherited | AceFlags.ContainerInherit, AceQualifier.AccessDenied, 0x12345678, randomUser, true, null); sd.DiscretionaryAcl.InsertAce (0, ace); Assert.AreEqual ("O:BUD:(XD;CIID;0x12345678;;;S-1-5-21-324-23423-234-334)(A;;0x7fffffff;;;BA)", sd.GetSddlForm (AccessControlSections.Owner | AccessControlSections.Access)); - + // DACL & SACL flags sd.SetFlags (sd.ControlFlags | ControlFlags.DiscretionaryAclProtected | ControlFlags.DiscretionaryAclAutoInherited | ControlFlags.DiscretionaryAclAutoInheritRequired | ControlFlags.SystemAclAutoInherited); sd.DiscretionaryAcl = new RawAcl (1, 0); ace = new CommonAce (AceFlags.None, AceQualifier.AccessAllowed, 0x7FFFFFFF, builtInAdmins, false, null); sd.DiscretionaryAcl.InsertAce (0, ace); Assert.AreEqual ("O:BUG:BAD:PARAI(A;;0x7fffffff;;;BA)S:AI", sd.GetSddlForm (AccessControlSections.All)); - + sd.SetFlags (sd.ControlFlags | ControlFlags.ServerSecurity | ControlFlags.DiscretionaryAclDefaulted); Assert.AreEqual ("O:BUG:BAD:PARAI(A;;0x7fffffff;;;BA)S:AI", sd.GetSddlForm (AccessControlSections.All)); } @@ -281,6 +281,7 @@ namespace MonoTests.System.Security.AccessControl { CheckRoundTrip ("O:SYG:BAD:(A;;0x12019f;;;SY)(A;;0x12019f;;;BA)"); CheckRoundTrip ("O:SYG:BAD:(A;OICINPIOID;0x12019f;;;SY)"); CheckRoundTrip ("O:SYG:BAS:(AU;SAFA;0x12019f;;;SY)"); + CheckRoundTrip ("O:S-1-5-21-1356517589-3987021482-2501375073-1001G:S-1-5-21-1356517589-3987021482-2501375073-513D:(A;;FA;;;SY)(A;;FA;;;BA)(A;;FA;;;S-1-5-21-1356517589-3987021482-2501375073-1001)"); } } } diff --git a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs index 0b605c3d1a..a563ecefc5 100644 --- a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs +++ b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs @@ -1313,6 +1313,9 @@ namespace MonoTests.System.Threading Thread.VolatileWrite (ref v3, double.MaxValue); Assert.AreEqual (v3, double.MaxValue); + object o = "ABC"; + Assert.AreEqual ("ABC", Thread.VolatileRead (ref o)); + float v4 = 1; Thread.VolatileWrite (ref v4, float.MaxValue); Assert.AreEqual (v4, float.MaxValue); diff --git a/mcs/class/corlib/Test/System/BufferTest.cs b/mcs/class/corlib/Test/System/BufferTest.cs index 120f75bd43..06ad188180 100644 --- a/mcs/class/corlib/Test/System/BufferTest.cs +++ b/mcs/class/corlib/Test/System/BufferTest.cs @@ -297,5 +297,27 @@ namespace MonoTests.System { Assert.AreEqual (0xAABB0000, b, "#2"); } } + + [Test] // https://github.com/mono/mono/issues/18516 + public unsafe void MemoryCopy_Overlapped () + { + byte [] buffer = new byte [5]; + for (int i = 0; i < buffer.Length; i++) + buffer [i] = (byte)i; + + int bytesToCopy = buffer.Length - 1; + fixed (byte* pBuffer = buffer) + Buffer.MemoryCopy (pBuffer, pBuffer + 1, buffer.Length - 1, bytesToCopy); + + bool failed = false; + for (int i = 0; i < buffer.Length; i++) + { + byte expectedByte = (byte)(i == 0 ? 0 : i - 1); + if (buffer [i] != expectedByte) + failed = true; + } + + Assert.IsFalse (failed); + } } } diff --git a/mcs/class/corlib/Test/System/CharCategoryTest.cs b/mcs/class/corlib/Test/System/CharCategoryTest.cs index f81f7acd42..f64d8a13d6 100644 --- a/mcs/class/corlib/Test/System/CharCategoryTest.cs +++ b/mcs/class/corlib/Test/System/CharCategoryTest.cs @@ -113,13 +113,13 @@ namespace MonoTests.System + "85 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 93 94 95 96 97 " + "98 99 9a 9b 9c 9d 9e 9f found 65 chars."; - string digits = "30 31 32 33 34 35 36 37 38 39 660 661 662 663 664 665 666 667 668 669 6f0 6f1 6f2 6f3 6f4 6f5 6f6 6f7 6f8 6f9 7c0 7c1 7c2 7c3 7c4 7c5 7c6 7c7 7c8 7c9 966 967 968 969 96a 96b 96c 96d 96e 96f 9e6 9e7 9e8 9e9 9ea 9eb 9ec 9ed 9ee 9ef a66 a67 a68 a69 a6a a6b a6c a6d a6e a6f ae6 ae7 ae8 ae9 aea aeb aec aed aee aef b66 b67 b68 b69 b6a b6b b6c b6d b6e b6f be6 be7 be8 be9 bea beb bec bed bee bef c66 c67 c68 c69 c6a c6b c6c c6d c6e c6f ce6 ce7 ce8 ce9 cea ceb cec ced cee cef d66 d67 d68 d69 d6a d6b d6c d6d d6e d6f e50 e51 e52 e53 e54 e55 e56 e57 e58 e59 ed0 ed1 ed2 ed3 ed4 ed5 ed6 ed7 ed8 ed9 f20 f21 f22 f23 f24 f25 f26 f27 f28 f29 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 17e0 17e1 17e2 17e3 17e4 17e5 17e6 17e7 17e8 17e9 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1946 1947 1948 1949 194a 194b 194c 194d 194e 194f 19d0 19d1 19d2 19d3 19d4 19d5 19d6 19d7 19d8 19d9 1a80 1a81 1a82 1a83 1a84 1a85 1a86 1a87 1a88 1a89 1a90 1a91 1a92 1a93 1a94 1a95 1a96 1a97 1a98 1a99 1b50 1b51 1b52 1b53 1b54 1b55 1b56 1b57 1b58 1b59 1bb0 1bb1 1bb2 1bb3 1bb4 1bb5 1bb6 1bb7 1bb8 1bb9 1c40 1c41 1c42 1c43 1c44 1c45 1c46 1c47 1c48 1c49 1c50 1c51 1c52 1c53 1c54 1c55 1c56 1c57 1c58 1c59 a620 a621 a622 a623 a624 a625 a626 a627 a628 a629 a8d0 a8d1 a8d2 a8d3 a8d4 a8d5 a8d6 a8d7 a8d8 a8d9 a900 a901 a902 a903 a904 a905 a906 a907 a908 a909 a9d0 a9d1 a9d2 a9d3 a9d4 a9d5 a9d6 a9d7 a9d8 a9d9 aa50 aa51 aa52 aa53 aa54 aa55 aa56 aa57 aa58 aa59 abf0 abf1 abf2 abf3 abf4 abf5 abf6 abf7 abf8 abf9 ff10 ff11 ff12 ff13 ff14 ff15 ff16 ff17 ff18 ff19 found 350 chars."; + string digits = "30 31 32 33 34 35 36 37 38 39 660 661 662 663 664 665 666 667 668 669 6f0 6f1 6f2 6f3 6f4 6f5 6f6 6f7 6f8 6f9 7c0 7c1 7c2 7c3 7c4 7c5 7c6 7c7 7c8 7c9 966 967 968 969 96a 96b 96c 96d 96e 96f 9e6 9e7 9e8 9e9 9ea 9eb 9ec 9ed 9ee 9ef a66 a67 a68 a69 a6a a6b a6c a6d a6e a6f ae6 ae7 ae8 ae9 aea aeb aec aed aee aef b66 b67 b68 b69 b6a b6b b6c b6d b6e b6f be6 be7 be8 be9 bea beb bec bed bee bef c66 c67 c68 c69 c6a c6b c6c c6d c6e c6f ce6 ce7 ce8 ce9 cea ceb cec ced cee cef d66 d67 d68 d69 d6a d6b d6c d6d d6e d6f de6 de7 de8 de9 dea deb dec ded dee def e50 e51 e52 e53 e54 e55 e56 e57 e58 e59 ed0 ed1 ed2 ed3 ed4 ed5 ed6 ed7 ed8 ed9 f20 f21 f22 f23 f24 f25 f26 f27 f28 f29 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 17e0 17e1 17e2 17e3 17e4 17e5 17e6 17e7 17e8 17e9 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1946 1947 1948 1949 194a 194b 194c 194d 194e 194f 19d0 19d1 19d2 19d3 19d4 19d5 19d6 19d7 19d8 19d9 1a80 1a81 1a82 1a83 1a84 1a85 1a86 1a87 1a88 1a89 1a90 1a91 1a92 1a93 1a94 1a95 1a96 1a97 1a98 1a99 1b50 1b51 1b52 1b53 1b54 1b55 1b56 1b57 1b58 1b59 1bb0 1bb1 1bb2 1bb3 1bb4 1bb5 1bb6 1bb7 1bb8 1bb9 1c40 1c41 1c42 1c43 1c44 1c45 1c46 1c47 1c48 1c49 1c50 1c51 1c52 1c53 1c54 1c55 1c56 1c57 1c58 1c59 a620 a621 a622 a623 a624 a625 a626 a627 a628 a629 a8d0 a8d1 a8d2 a8d3 a8d4 a8d5 a8d6 a8d7 a8d8 a8d9 a900 a901 a902 a903 a904 a905 a906 a907 a908 a909 a9d0 a9d1 a9d2 a9d3 a9d4 a9d5 a9d6 a9d7 a9d8 a9d9 a9f0 a9f1 a9f2 a9f3 a9f4 a9f5 a9f6 a9f7 a9f8 a9f9 aa50 aa51 aa52 aa53 aa54 aa55 aa56 aa57 aa58 aa59 abf0 abf1 abf2 abf3 abf4 abf5 abf6 abf7 abf8 abf9 ff10 ff11 ff12 ff13 ff14 ff15 ff16 ff17 ff18 ff19 found 370 chars."; - string lowerChars = "61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a aa b5 ba df e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef f0 f1 f2 f3 f4 f5 f6 f8 f9 fa fb fc fd fe ff 101 103 105 107 109 10b 10d 10f 111 113 115 117 119 11b 11d 11f 121 123 125 127 129 12b 12d 12f 131 133 135 137 138 13a 13c 13e 140 142 144 146 148 149 14b 14d 14f 151 153 155 157 159 15b 15d 15f 161 163 165 167 169 16b 16d 16f 171 173 175 177 17a 17c 17e 17f 180 183 185 188 18c 18d 192 195 199 19a 19b 19e 1a1 1a3 1a5 1a8 1aa 1ab 1ad 1b0 1b4 1b6 1b9 1ba 1bd 1be 1bf 1c6 1c9 1cc 1ce 1d0 1d2 1d4 1d6 1d8 1da 1dc 1dd 1df 1e1 1e3 1e5 1e7 1e9 1eb 1ed 1ef 1f0 1f3 1f5 1f9 1fb 1fd 1ff 201 203 205 207 209 20b 20d 20f 211 213 215 217 219 21b 21d 21f 221 223 225 227 229 22b 22d 22f 231 233 234 235 236 237 238 239 23c 23f 240 242 247 249 24b 24d 24f 250 251 252 253 254 255 256 257 258 259 25a 25b 25c 25d 25e 25f 260 261 262 263 264 265 266 267 268 269 26a 26b 26c 26d 26e 26f 270 271 272 273 274 275 276 277 278 279 27a 27b 27c 27d 27e 27f 280 281 282 283 284 285 286 287 288 289 28a 28b 28c 28d 28e 28f 290 291 292 293 295 296 297 298 299 29a 29b 29c 29d 29e 29f 2a0 2a1 2a2 2a3 2a4 2a5 2a6 2a7 2a8 2a9 2aa 2ab 2ac 2ad 2ae 2af 371 373 377 37b 37c 37d 390 3ac 3ad 3ae 3af 3b0 3b1 3b2 3b3 3b4 3b5 3b6 3b7 3b8 3b9 3ba 3bb 3bc 3bd 3be 3bf 3c0 3c1 3c2 3c3 3c4 3c5 3c6 3c7 3c8 3c9 3ca 3cb 3cc 3cd 3ce 3d0 3d1 3d5 3d6 3d7 3d9 3db 3dd 3df 3e1 3e3 3e5 3e7 3e9 3eb 3ed 3ef 3f0 3f1 3f2 3f3 3f5 3f8 3fb 3fc 430 431 432 433 434 435 436 437 438 439 43a 43b 43c 43d 43e 43f 440 441 442 443 444 445 446 447 448 449 44a 44b 44c 44d 44e 44f 450 451 452 453 454 455 456 457 458 459 45a 45b 45c 45d 45e 45f 461 463 465 467 469 46b 46d 46f 471 473 475 477 479 47b 47d 47f 481 48b 48d 48f 491 493 495 497 499 49b 49d 49f 4a1 4a3 4a5 4a7 4a9 4ab 4ad 4af 4b1 4b3 4b5 4b7 4b9 4bb 4bd 4bf 4c2 4c4 4c6 4c8 4ca 4cc 4ce 4cf 4d1 4d3 4d5 4d7 4d9 4db 4dd 4df 4e1 4e3 4e5 4e7 4e9 4eb 4ed 4ef 4f1 4f3 4f5 4f7 4f9 4fb 4fd 4ff 501 503 505 507 509 50b 50d 50f 511 513 515 517 519 51b 51d 51f 521 523 525 527 561 562 563 564 565 566 567 568 569 56a 56b 56c 56d 56e 56f 570 571 572 573 574 575 576 577 578 579 57a 57b 57c 57d 57e 57f 580 581 582 583 584 585 586 587 1d00 1d01 1d02 1d03 1d04 1d05 1d06 1d07 1d08 1d09 1d0a 1d0b 1d0c 1d0d 1d0e 1d0f 1d10 1d11 1d12 1d13 1d14 1d15 1d16 1d17 1d18 1d19 1d1a 1d1b 1d1c 1d1d 1d1e 1d1f 1d20 1d21 1d22 1d23 1d24 1d25 1d26 1d27 1d28 1d29 1d2a 1d2b 1d6b 1d6c 1d6d 1d6e 1d6f 1d70 1d71 1d72 1d73 1d74 1d75 1d76 1d77 1d79 1d7a 1d7b 1d7c 1d7d 1d7e 1d7f 1d80 1d81 1d82 1d83 1d84 1d85 1d86 1d87 1d88 1d89 1d8a 1d8b 1d8c 1d8d 1d8e 1d8f 1d90 1d91 1d92 1d93 1d94 1d95 1d96 1d97 1d98 1d99 1d9a 1e01 1e03 1e05 1e07 1e09 1e0b 1e0d 1e0f 1e11 1e13 1e15 1e17 1e19 1e1b 1e1d 1e1f 1e21 1e23 1e25 1e27 1e29 1e2b 1e2d 1e2f 1e31 1e33 1e35 1e37 1e39 1e3b 1e3d 1e3f 1e41 1e43 1e45 1e47 1e49 1e4b 1e4d 1e4f 1e51 1e53 1e55 1e57 1e59 1e5b 1e5d 1e5f 1e61 1e63 1e65 1e67 1e69 1e6b 1e6d 1e6f 1e71 1e73 1e75 1e77 1e79 1e7b 1e7d 1e7f 1e81 1e83 1e85 1e87 1e89 1e8b 1e8d 1e8f 1e91 1e93 1e95 1e96 1e97 1e98 1e99 1e9a 1e9b 1e9c 1e9d 1e9f 1ea1 1ea3 1ea5 1ea7 1ea9 1eab 1ead 1eaf 1eb1 1eb3 1eb5 1eb7 1eb9 1ebb 1ebd 1ebf 1ec1 1ec3 1ec5 1ec7 1ec9 1ecb 1ecd 1ecf 1ed1 1ed3 1ed5 1ed7 1ed9 1edb 1edd 1edf 1ee1 1ee3 1ee5 1ee7 1ee9 1eeb 1eed 1eef 1ef1 1ef3 1ef5 1ef7 1ef9 1efb 1efd 1eff 1f00 1f01 1f02 1f03 1f04 1f05 1f06 1f07 1f10 1f11 1f12 1f13 1f14 1f15 1f20 1f21 1f22 1f23 1f24 1f25 1f26 1f27 1f30 1f31 1f32 1f33 1f34 1f35 1f36 1f37 1f40 1f41 1f42 1f43 1f44 1f45 1f50 1f51 1f52 1f53 1f54 1f55 1f56 1f57 1f60 1f61 1f62 1f63 1f64 1f65 1f66 1f67 1f70 1f71 1f72 1f73 1f74 1f75 1f76 1f77 1f78 1f79 1f7a 1f7b 1f7c 1f7d 1f80 1f81 1f82 1f83 1f84 1f85 1f86 1f87 1f90 1f91 1f92 1f93 1f94 1f95 1f96 1f97 1fa0 1fa1 1fa2 1fa3 1fa4 1fa5 1fa6 1fa7 1fb0 1fb1 1fb2 1fb3 1fb4 1fb6 1fb7 1fbe 1fc2 1fc3 1fc4 1fc6 1fc7 1fd0 1fd1 1fd2 1fd3 1fd6 1fd7 1fe0 1fe1 1fe2 1fe3 1fe4 1fe5 1fe6 1fe7 1ff2 1ff3 1ff4 1ff6 1ff7 210a 210e 210f 2113 212f 2134 2139 213c 213d 2146 2147 2148 2149 214e 2184 2c30 2c31 2c32 2c33 2c34 2c35 2c36 2c37 2c38 2c39 2c3a 2c3b 2c3c 2c3d 2c3e 2c3f 2c40 2c41 2c42 2c43 2c44 2c45 2c46 2c47 2c48 2c49 2c4a 2c4b 2c4c 2c4d 2c4e 2c4f 2c50 2c51 2c52 2c53 2c54 2c55 2c56 2c57 2c58 2c59 2c5a 2c5b 2c5c 2c5d 2c5e 2c61 2c65 2c66 2c68 2c6a 2c6c 2c71 2c73 2c74 2c76 2c77 2c78 2c79 2c7a 2c7b 2c81 2c83 2c85 2c87 2c89 2c8b 2c8d 2c8f 2c91 2c93 2c95 2c97 2c99 2c9b 2c9d 2c9f 2ca1 2ca3 2ca5 2ca7 2ca9 2cab 2cad 2caf 2cb1 2cb3 2cb5 2cb7 2cb9 2cbb 2cbd 2cbf 2cc1 2cc3 2cc5 2cc7 2cc9 2ccb 2ccd 2ccf 2cd1 2cd3 2cd5 2cd7 2cd9 2cdb 2cdd 2cdf 2ce1 2ce3 2ce4 2cec 2cee 2cf3 2d00 2d01 2d02 2d03 2d04 2d05 2d06 2d07 2d08 2d09 2d0a 2d0b 2d0c 2d0d 2d0e 2d0f 2d10 2d11 2d12 2d13 2d14 2d15 2d16 2d17 2d18 2d19 2d1a 2d1b 2d1c 2d1d 2d1e 2d1f 2d20 2d21 2d22 2d23 2d24 2d25 2d27 2d2d a641 a643 a645 a647 a649 a64b a64d a64f a651 a653 a655 a657 a659 a65b a65d a65f a661 a663 a665 a667 a669 a66b a66d a681 a683 a685 a687 a689 a68b a68d a68f a691 a693 a695 a697 a723 a725 a727 a729 a72b a72d a72f a730 a731 a733 a735 a737 a739 a73b a73d a73f a741 a743 a745 a747 a749 a74b a74d a74f a751 a753 a755 a757 a759 a75b a75d a75f a761 a763 a765 a767 a769 a76b a76d a76f a771 a772 a773 a774 a775 a776 a777 a778 a77a a77c a77f a781 a783 a785 a787 a78c a78e a791 a793 a7a1 a7a3 a7a5 a7a7 a7a9 a7fa fb00 fb01 fb02 fb03 fb04 fb05 fb06 fb13 fb14 fb15 fb16 fb17 ff41 ff42 ff43 ff44 ff45 ff46 ff47 ff48 ff49 ff4a ff4b ff4c ff4d ff4e ff4f ff50 ff51 ff52 ff53 ff54 ff55 ff56 ff57 ff58 ff59 ff5a found 1221 chars."; + string lowerChars = "61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a aa b5 ba df e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef f0 f1 f2 f3 f4 f5 f6 f8 f9 fa fb fc fd fe ff 101 103 105 107 109 10b 10d 10f 111 113 115 117 119 11b 11d 11f 121 123 125 127 129 12b 12d 12f 131 133 135 137 138 13a 13c 13e 140 142 144 146 148 149 14b 14d 14f 151 153 155 157 159 15b 15d 15f 161 163 165 167 169 16b 16d 16f 171 173 175 177 17a 17c 17e 17f 180 183 185 188 18c 18d 192 195 199 19a 19b 19e 1a1 1a3 1a5 1a8 1aa 1ab 1ad 1b0 1b4 1b6 1b9 1ba 1bd 1be 1bf 1c6 1c9 1cc 1ce 1d0 1d2 1d4 1d6 1d8 1da 1dc 1dd 1df 1e1 1e3 1e5 1e7 1e9 1eb 1ed 1ef 1f0 1f3 1f5 1f9 1fb 1fd 1ff 201 203 205 207 209 20b 20d 20f 211 213 215 217 219 21b 21d 21f 221 223 225 227 229 22b 22d 22f 231 233 234 235 236 237 238 239 23c 23f 240 242 247 249 24b 24d 24f 250 251 252 253 254 255 256 257 258 259 25a 25b 25c 25d 25e 25f 260 261 262 263 264 265 266 267 268 269 26a 26b 26c 26d 26e 26f 270 271 272 273 274 275 276 277 278 279 27a 27b 27c 27d 27e 27f 280 281 282 283 284 285 286 287 288 289 28a 28b 28c 28d 28e 28f 290 291 292 293 295 296 297 298 299 29a 29b 29c 29d 29e 29f 2a0 2a1 2a2 2a3 2a4 2a5 2a6 2a7 2a8 2a9 2aa 2ab 2ac 2ad 2ae 2af 371 373 377 37b 37c 37d 390 3ac 3ad 3ae 3af 3b0 3b1 3b2 3b3 3b4 3b5 3b6 3b7 3b8 3b9 3ba 3bb 3bc 3bd 3be 3bf 3c0 3c1 3c2 3c3 3c4 3c5 3c6 3c7 3c8 3c9 3ca 3cb 3cc 3cd 3ce 3d0 3d1 3d5 3d6 3d7 3d9 3db 3dd 3df 3e1 3e3 3e5 3e7 3e9 3eb 3ed 3ef 3f0 3f1 3f2 3f3 3f5 3f8 3fb 3fc 430 431 432 433 434 435 436 437 438 439 43a 43b 43c 43d 43e 43f 440 441 442 443 444 445 446 447 448 449 44a 44b 44c 44d 44e 44f 450 451 452 453 454 455 456 457 458 459 45a 45b 45c 45d 45e 45f 461 463 465 467 469 46b 46d 46f 471 473 475 477 479 47b 47d 47f 481 48b 48d 48f 491 493 495 497 499 49b 49d 49f 4a1 4a3 4a5 4a7 4a9 4ab 4ad 4af 4b1 4b3 4b5 4b7 4b9 4bb 4bd 4bf 4c2 4c4 4c6 4c8 4ca 4cc 4ce 4cf 4d1 4d3 4d5 4d7 4d9 4db 4dd 4df 4e1 4e3 4e5 4e7 4e9 4eb 4ed 4ef 4f1 4f3 4f5 4f7 4f9 4fb 4fd 4ff 501 503 505 507 509 50b 50d 50f 511 513 515 517 519 51b 51d 51f 521 523 525 527 529 52b 52d 52f 560 561 562 563 564 565 566 567 568 569 56a 56b 56c 56d 56e 56f 570 571 572 573 574 575 576 577 578 579 57a 57b 57c 57d 57e 57f 580 581 582 583 584 585 586 587 588 10d0 10d1 10d2 10d3 10d4 10d5 10d6 10d7 10d8 10d9 10da 10db 10dc 10dd 10de 10df 10e0 10e1 10e2 10e3 10e4 10e5 10e6 10e7 10e8 10e9 10ea 10eb 10ec 10ed 10ee 10ef 10f0 10f1 10f2 10f3 10f4 10f5 10f6 10f7 10f8 10f9 10fa 10fd 10fe 10ff 13f8 13f9 13fa 13fb 13fc 13fd 1c80 1c81 1c82 1c83 1c84 1c85 1c86 1c87 1c88 1d00 1d01 1d02 1d03 1d04 1d05 1d06 1d07 1d08 1d09 1d0a 1d0b 1d0c 1d0d 1d0e 1d0f 1d10 1d11 1d12 1d13 1d14 1d15 1d16 1d17 1d18 1d19 1d1a 1d1b 1d1c 1d1d 1d1e 1d1f 1d20 1d21 1d22 1d23 1d24 1d25 1d26 1d27 1d28 1d29 1d2a 1d2b 1d6b 1d6c 1d6d 1d6e 1d6f 1d70 1d71 1d72 1d73 1d74 1d75 1d76 1d77 1d79 1d7a 1d7b 1d7c 1d7d 1d7e 1d7f 1d80 1d81 1d82 1d83 1d84 1d85 1d86 1d87 1d88 1d89 1d8a 1d8b 1d8c 1d8d 1d8e 1d8f 1d90 1d91 1d92 1d93 1d94 1d95 1d96 1d97 1d98 1d99 1d9a 1e01 1e03 1e05 1e07 1e09 1e0b 1e0d 1e0f 1e11 1e13 1e15 1e17 1e19 1e1b 1e1d 1e1f 1e21 1e23 1e25 1e27 1e29 1e2b 1e2d 1e2f 1e31 1e33 1e35 1e37 1e39 1e3b 1e3d 1e3f 1e41 1e43 1e45 1e47 1e49 1e4b 1e4d 1e4f 1e51 1e53 1e55 1e57 1e59 1e5b 1e5d 1e5f 1e61 1e63 1e65 1e67 1e69 1e6b 1e6d 1e6f 1e71 1e73 1e75 1e77 1e79 1e7b 1e7d 1e7f 1e81 1e83 1e85 1e87 1e89 1e8b 1e8d 1e8f 1e91 1e93 1e95 1e96 1e97 1e98 1e99 1e9a 1e9b 1e9c 1e9d 1e9f 1ea1 1ea3 1ea5 1ea7 1ea9 1eab 1ead 1eaf 1eb1 1eb3 1eb5 1eb7 1eb9 1ebb 1ebd 1ebf 1ec1 1ec3 1ec5 1ec7 1ec9 1ecb 1ecd 1ecf 1ed1 1ed3 1ed5 1ed7 1ed9 1edb 1edd 1edf 1ee1 1ee3 1ee5 1ee7 1ee9 1eeb 1eed 1eef 1ef1 1ef3 1ef5 1ef7 1ef9 1efb 1efd 1eff 1f00 1f01 1f02 1f03 1f04 1f05 1f06 1f07 1f10 1f11 1f12 1f13 1f14 1f15 1f20 1f21 1f22 1f23 1f24 1f25 1f26 1f27 1f30 1f31 1f32 1f33 1f34 1f35 1f36 1f37 1f40 1f41 1f42 1f43 1f44 1f45 1f50 1f51 1f52 1f53 1f54 1f55 1f56 1f57 1f60 1f61 1f62 1f63 1f64 1f65 1f66 1f67 1f70 1f71 1f72 1f73 1f74 1f75 1f76 1f77 1f78 1f79 1f7a 1f7b 1f7c 1f7d 1f80 1f81 1f82 1f83 1f84 1f85 1f86 1f87 1f90 1f91 1f92 1f93 1f94 1f95 1f96 1f97 1fa0 1fa1 1fa2 1fa3 1fa4 1fa5 1fa6 1fa7 1fb0 1fb1 1fb2 1fb3 1fb4 1fb6 1fb7 1fbe 1fc2 1fc3 1fc4 1fc6 1fc7 1fd0 1fd1 1fd2 1fd3 1fd6 1fd7 1fe0 1fe1 1fe2 1fe3 1fe4 1fe5 1fe6 1fe7 1ff2 1ff3 1ff4 1ff6 1ff7 210a 210e 210f 2113 212f 2134 2139 213c 213d 2146 2147 2148 2149 214e 2184 2c30 2c31 2c32 2c33 2c34 2c35 2c36 2c37 2c38 2c39 2c3a 2c3b 2c3c 2c3d 2c3e 2c3f 2c40 2c41 2c42 2c43 2c44 2c45 2c46 2c47 2c48 2c49 2c4a 2c4b 2c4c 2c4d 2c4e 2c4f 2c50 2c51 2c52 2c53 2c54 2c55 2c56 2c57 2c58 2c59 2c5a 2c5b 2c5c 2c5d 2c5e 2c61 2c65 2c66 2c68 2c6a 2c6c 2c71 2c73 2c74 2c76 2c77 2c78 2c79 2c7a 2c7b 2c81 2c83 2c85 2c87 2c89 2c8b 2c8d 2c8f 2c91 2c93 2c95 2c97 2c99 2c9b 2c9d 2c9f 2ca1 2ca3 2ca5 2ca7 2ca9 2cab 2cad 2caf 2cb1 2cb3 2cb5 2cb7 2cb9 2cbb 2cbd 2cbf 2cc1 2cc3 2cc5 2cc7 2cc9 2ccb 2ccd 2ccf 2cd1 2cd3 2cd5 2cd7 2cd9 2cdb 2cdd 2cdf 2ce1 2ce3 2ce4 2cec 2cee 2cf3 2d00 2d01 2d02 2d03 2d04 2d05 2d06 2d07 2d08 2d09 2d0a 2d0b 2d0c 2d0d 2d0e 2d0f 2d10 2d11 2d12 2d13 2d14 2d15 2d16 2d17 2d18 2d19 2d1a 2d1b 2d1c 2d1d 2d1e 2d1f 2d20 2d21 2d22 2d23 2d24 2d25 2d27 2d2d a641 a643 a645 a647 a649 a64b a64d a64f a651 a653 a655 a657 a659 a65b a65d a65f a661 a663 a665 a667 a669 a66b a66d a681 a683 a685 a687 a689 a68b a68d a68f a691 a693 a695 a697 a699 a69b a723 a725 a727 a729 a72b a72d a72f a730 a731 a733 a735 a737 a739 a73b a73d a73f a741 a743 a745 a747 a749 a74b a74d a74f a751 a753 a755 a757 a759 a75b a75d a75f a761 a763 a765 a767 a769 a76b a76d a76f a771 a772 a773 a774 a775 a776 a777 a778 a77a a77c a77f a781 a783 a785 a787 a78c a78e a791 a793 a794 a795 a797 a799 a79b a79d a79f a7a1 a7a3 a7a5 a7a7 a7a9 a7af a7b5 a7b7 a7b9 a7fa ab30 ab31 ab32 ab33 ab34 ab35 ab36 ab37 ab38 ab39 ab3a ab3b ab3c ab3d ab3e ab3f ab40 ab41 ab42 ab43 ab44 ab45 ab46 ab47 ab48 ab49 ab4a ab4b ab4c ab4d ab4e ab4f ab50 ab51 ab52 ab53 ab54 ab55 ab56 ab57 ab58 ab59 ab5a ab60 ab61 ab62 ab63 ab64 ab65 ab70 ab71 ab72 ab73 ab74 ab75 ab76 ab77 ab78 ab79 ab7a ab7b ab7c ab7d ab7e ab7f ab80 ab81 ab82 ab83 ab84 ab85 ab86 ab87 ab88 ab89 ab8a ab8b ab8c ab8d ab8e ab8f ab90 ab91 ab92 ab93 ab94 ab95 ab96 ab97 ab98 ab99 ab9a ab9b ab9c ab9d ab9e ab9f aba0 aba1 aba2 aba3 aba4 aba5 aba6 aba7 aba8 aba9 abaa abab abac abad abae abaf abb0 abb1 abb2 abb3 abb4 abb5 abb6 abb7 abb8 abb9 abba abbb abbc abbd abbe abbf fb00 fb01 fb02 fb03 fb04 fb05 fb06 fb13 fb14 fb15 fb16 fb17 ff41 ff42 ff43 ff44 ff45 ff46 ff47 ff48 ff49 ff4a ff4b ff4c ff4d ff4e ff4f ff50 ff51 ff52 ff53 ff54 ff55 ff56 ff57 ff58 ff59 ff5a found 1430 chars."; - string numbers = "30 31 32 33 34 35 36 37 38 39 b2 b3 b9 bc bd be 660 661 662 663 664 665 666 667 668 669 6f0 6f1 6f2 6f3 6f4 6f5 6f6 6f7 6f8 6f9 7c0 7c1 7c2 7c3 7c4 7c5 7c6 7c7 7c8 7c9 966 967 968 969 96a 96b 96c 96d 96e 96f 9e6 9e7 9e8 9e9 9ea 9eb 9ec 9ed 9ee 9ef 9f4 9f5 9f6 9f7 9f8 9f9 a66 a67 a68 a69 a6a a6b a6c a6d a6e a6f ae6 ae7 ae8 ae9 aea aeb aec aed aee aef b66 b67 b68 b69 b6a b6b b6c b6d b6e b6f b72 b73 b74 b75 b76 b77 be6 be7 be8 be9 bea beb bec bed bee bef bf0 bf1 bf2 c66 c67 c68 c69 c6a c6b c6c c6d c6e c6f c78 c79 c7a c7b c7c c7d c7e ce6 ce7 ce8 ce9 cea ceb cec ced cee cef d66 d67 d68 d69 d6a d6b d6c d6d d6e d6f d70 d71 d72 d73 d74 d75 e50 e51 e52 e53 e54 e55 e56 e57 e58 e59 ed0 ed1 ed2 ed3 ed4 ed5 ed6 ed7 ed8 ed9 f20 f21 f22 f23 f24 f25 f26 f27 f28 f29 f2a f2b f2c f2d f2e f2f f30 f31 f32 f33 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1369 136a 136b 136c 136d 136e 136f 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 137a 137b 137c 16ee 16ef 16f0 17e0 17e1 17e2 17e3 17e4 17e5 17e6 17e7 17e8 17e9 17f0 17f1 17f2 17f3 17f4 17f5 17f6 17f7 17f8 17f9 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1946 1947 1948 1949 194a 194b 194c 194d 194e 194f 19d0 19d1 19d2 19d3 19d4 19d5 19d6 19d7 19d8 19d9 19da 1a80 1a81 1a82 1a83 1a84 1a85 1a86 1a87 1a88 1a89 1a90 1a91 1a92 1a93 1a94 1a95 1a96 1a97 1a98 1a99 1b50 1b51 1b52 1b53 1b54 1b55 1b56 1b57 1b58 1b59 1bb0 1bb1 1bb2 1bb3 1bb4 1bb5 1bb6 1bb7 1bb8 1bb9 1c40 1c41 1c42 1c43 1c44 1c45 1c46 1c47 1c48 1c49 1c50 1c51 1c52 1c53 1c54 1c55 1c56 1c57 1c58 1c59 2070 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 215a 215b 215c 215d 215e 215f 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 216a 216b 216c 216d 216e 216f 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 217a 217b 217c 217d 217e 217f 2180 2181 2182 2185 2186 2187 2188 2189 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 246a 246b 246c 246d 246e 246f 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 247a 247b 247c 247d 247e 247f 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 248a 248b 248c 248d 248e 248f 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 249a 249b 24ea 24eb 24ec 24ed 24ee 24ef 24f0 24f1 24f2 24f3 24f4 24f5 24f6 24f7 24f8 24f9 24fa 24fb 24fc 24fd 24fe 24ff 2776 2777 2778 2779 277a 277b 277c 277d 277e 277f 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 278a 278b 278c 278d 278e 278f 2790 2791 2792 2793 2cfd 3007 3021 3022 3023 3024 3025 3026 3027 3028 3029 3038 3039 303a 3192 3193 3194 3195 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3248 3249 324a 324b 324c 324d 324e 324f 3251 3252 3253 3254 3255 3256 3257 3258 3259 325a 325b 325c 325d 325e 325f 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 32b1 32b2 32b3 32b4 32b5 32b6 32b7 32b8 32b9 32ba 32bb 32bc 32bd 32be 32bf a620 a621 a622 a623 a624 a625 a626 a627 a628 a629 a6e6 a6e7 a6e8 a6e9 a6ea a6eb a6ec a6ed a6ee a6ef a830 a831 a832 a833 a834 a835 a8d0 a8d1 a8d2 a8d3 a8d4 a8d5 a8d6 a8d7 a8d8 a8d9 a900 a901 a902 a903 a904 a905 a906 a907 a908 a909 a9d0 a9d1 a9d2 a9d3 a9d4 a9d5 a9d6 a9d7 a9d8 a9d9 aa50 aa51 aa52 aa53 aa54 aa55 aa56 aa57 aa58 aa59 abf0 abf1 abf2 abf3 abf4 abf5 abf6 abf7 abf8 abf9 ff10 ff11 ff12 ff13 ff14 ff15 ff16 ff17 ff18 ff19 found 705 chars."; + string numbers = "30 31 32 33 34 35 36 37 38 39 b2 b3 b9 bc bd be 660 661 662 663 664 665 666 667 668 669 6f0 6f1 6f2 6f3 6f4 6f5 6f6 6f7 6f8 6f9 7c0 7c1 7c2 7c3 7c4 7c5 7c6 7c7 7c8 7c9 966 967 968 969 96a 96b 96c 96d 96e 96f 9e6 9e7 9e8 9e9 9ea 9eb 9ec 9ed 9ee 9ef 9f4 9f5 9f6 9f7 9f8 9f9 a66 a67 a68 a69 a6a a6b a6c a6d a6e a6f ae6 ae7 ae8 ae9 aea aeb aec aed aee aef b66 b67 b68 b69 b6a b6b b6c b6d b6e b6f b72 b73 b74 b75 b76 b77 be6 be7 be8 be9 bea beb bec bed bee bef bf0 bf1 bf2 c66 c67 c68 c69 c6a c6b c6c c6d c6e c6f c78 c79 c7a c7b c7c c7d c7e ce6 ce7 ce8 ce9 cea ceb cec ced cee cef d58 d59 d5a d5b d5c d5d d5e d66 d67 d68 d69 d6a d6b d6c d6d d6e d6f d70 d71 d72 d73 d74 d75 d76 d77 d78 de6 de7 de8 de9 dea deb dec ded dee def e50 e51 e52 e53 e54 e55 e56 e57 e58 e59 ed0 ed1 ed2 ed3 ed4 ed5 ed6 ed7 ed8 ed9 f20 f21 f22 f23 f24 f25 f26 f27 f28 f29 f2a f2b f2c f2d f2e f2f f30 f31 f32 f33 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1369 136a 136b 136c 136d 136e 136f 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 137a 137b 137c 16ee 16ef 16f0 17e0 17e1 17e2 17e3 17e4 17e5 17e6 17e7 17e8 17e9 17f0 17f1 17f2 17f3 17f4 17f5 17f6 17f7 17f8 17f9 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1946 1947 1948 1949 194a 194b 194c 194d 194e 194f 19d0 19d1 19d2 19d3 19d4 19d5 19d6 19d7 19d8 19d9 19da 1a80 1a81 1a82 1a83 1a84 1a85 1a86 1a87 1a88 1a89 1a90 1a91 1a92 1a93 1a94 1a95 1a96 1a97 1a98 1a99 1b50 1b51 1b52 1b53 1b54 1b55 1b56 1b57 1b58 1b59 1bb0 1bb1 1bb2 1bb3 1bb4 1bb5 1bb6 1bb7 1bb8 1bb9 1c40 1c41 1c42 1c43 1c44 1c45 1c46 1c47 1c48 1c49 1c50 1c51 1c52 1c53 1c54 1c55 1c56 1c57 1c58 1c59 2070 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 215a 215b 215c 215d 215e 215f 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 216a 216b 216c 216d 216e 216f 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 217a 217b 217c 217d 217e 217f 2180 2181 2182 2185 2186 2187 2188 2189 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 246a 246b 246c 246d 246e 246f 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 247a 247b 247c 247d 247e 247f 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 248a 248b 248c 248d 248e 248f 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 249a 249b 24ea 24eb 24ec 24ed 24ee 24ef 24f0 24f1 24f2 24f3 24f4 24f5 24f6 24f7 24f8 24f9 24fa 24fb 24fc 24fd 24fe 24ff 2776 2777 2778 2779 277a 277b 277c 277d 277e 277f 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 278a 278b 278c 278d 278e 278f 2790 2791 2792 2793 2cfd 3007 3021 3022 3023 3024 3025 3026 3027 3028 3029 3038 3039 303a 3192 3193 3194 3195 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3248 3249 324a 324b 324c 324d 324e 324f 3251 3252 3253 3254 3255 3256 3257 3258 3259 325a 325b 325c 325d 325e 325f 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 32b1 32b2 32b3 32b4 32b5 32b6 32b7 32b8 32b9 32ba 32bb 32bc 32bd 32be 32bf a620 a621 a622 a623 a624 a625 a626 a627 a628 a629 a6e6 a6e7 a6e8 a6e9 a6ea a6eb a6ec a6ed a6ee a6ef a830 a831 a832 a833 a834 a835 a8d0 a8d1 a8d2 a8d3 a8d4 a8d5 a8d6 a8d7 a8d8 a8d9 a900 a901 a902 a903 a904 a905 a906 a907 a908 a909 a9d0 a9d1 a9d2 a9d3 a9d4 a9d5 a9d6 a9d7 a9d8 a9d9 a9f0 a9f1 a9f2 a9f3 a9f4 a9f5 a9f6 a9f7 a9f8 a9f9 aa50 aa51 aa52 aa53 aa54 aa55 aa56 aa57 aa58 aa59 abf0 abf1 abf2 abf3 abf4 abf5 abf6 abf7 abf8 abf9 ff10 ff11 ff12 ff13 ff14 ff15 ff16 ff17 ff18 ff19 found 735 chars."; - string puncts = "21 22 23 25 26 27 28 29 2a 2c 2d 2e 2f 3a 3b 3f 40 5b 5c 5d 5f 7b 7d a1 ab ad b7 bb bf 37e 387 55a 55b 55c 55d 55e 55f 589 58a 5be 5c0 5c3 5c6 5f3 5f4 609 60a 60c 60d 61b 61e 61f 66a 66b 66c 66d 6d4 700 701 702 703 704 705 706 707 708 709 70a 70b 70c 70d 7f7 7f8 7f9 830 831 832 833 834 835 836 837 838 839 83a 83b 83c 83d 83e 85e 964 965 970 af0 df4 e4f e5a e5b f04 f05 f06 f07 f08 f09 f0a f0b f0c f0d f0e f0f f10 f11 f12 f14 f3a f3b f3c f3d f85 fd0 fd1 fd2 fd3 fd4 fd9 fda 104a 104b 104c 104d 104e 104f 10fb 1360 1361 1362 1363 1364 1365 1366 1367 1368 1400 166d 166e 169b 169c 16eb 16ec 16ed 1735 1736 17d4 17d5 17d6 17d8 17d9 17da 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 180a 1944 1945 1a1e 1a1f 1aa0 1aa1 1aa2 1aa3 1aa4 1aa5 1aa6 1aa8 1aa9 1aaa 1aab 1aac 1aad 1b5a 1b5b 1b5c 1b5d 1b5e 1b5f 1b60 1bfc 1bfd 1bfe 1bff 1c3b 1c3c 1c3d 1c3e 1c3f 1c7e 1c7f 1cc0 1cc1 1cc2 1cc3 1cc4 1cc5 1cc6 1cc7 1cd3 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 201a 201b 201c 201d 201e 201f 2020 2021 2022 2023 2024 2025 2026 2027 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 203a 203b 203c 203d 203e 203f 2040 2041 2042 2043 2045 2046 2047 2048 2049 204a 204b 204c 204d 204e 204f 2050 2051 2053 2054 2055 2056 2057 2058 2059 205a 205b 205c 205d 205e 207d 207e 208d 208e 2308 2309 230a 230b 2329 232a 2768 2769 276a 276b 276c 276d 276e 276f 2770 2771 2772 2773 2774 2775 27c5 27c6 27e6 27e7 27e8 27e9 27ea 27eb 27ec 27ed 27ee 27ef 2983 2984 2985 2986 2987 2988 2989 298a 298b 298c 298d 298e 298f 2990 2991 2992 2993 2994 2995 2996 2997 2998 29d8 29d9 29da 29db 29fc 29fd 2cf9 2cfa 2cfb 2cfc 2cfe 2cff 2d70 2e00 2e01 2e02 2e03 2e04 2e05 2e06 2e07 2e08 2e09 2e0a 2e0b 2e0c 2e0d 2e0e 2e0f 2e10 2e11 2e12 2e13 2e14 2e15 2e16 2e17 2e18 2e19 2e1a 2e1b 2e1c 2e1d 2e1e 2e1f 2e20 2e21 2e22 2e23 2e24 2e25 2e26 2e27 2e28 2e29 2e2a 2e2b 2e2c 2e2d 2e2e 2e30 2e31 2e32 2e33 2e34 2e35 2e36 2e37 2e38 2e39 2e3a 2e3b 3001 3002 3003 3008 3009 300a 300b 300c 300d 300e 300f 3010 3011 3014 3015 3016 3017 3018 3019 301a 301b 301c 301d 301e 301f 3030 303d 30a0 30fb a4fe a4ff a60d a60e a60f a673 a67e a6f2 a6f3 a6f4 a6f5 a6f6 a6f7 a874 a875 a876 a877 a8ce a8cf a8f8 a8f9 a8fa a92e a92f a95f a9c1 a9c2 a9c3 a9c4 a9c5 a9c6 a9c7 a9c8 a9c9 a9ca a9cb a9cc a9cd a9de a9df aa5c aa5d aa5e aa5f aade aadf aaf0 aaf1 abeb fd3e fd3f fe10 fe11 fe12 fe13 fe14 fe15 fe16 fe17 fe18 fe19 fe30 fe31 fe32 fe33 fe34 fe35 fe36 fe37 fe38 fe39 fe3a fe3b fe3c fe3d fe3e fe3f fe40 fe41 fe42 fe43 fe44 fe45 fe46 fe47 fe48 fe49 fe4a fe4b fe4c fe4d fe4e fe4f fe50 fe51 fe52 fe54 fe55 fe56 fe57 fe58 fe59 fe5a fe5b fe5c fe5d fe5e fe5f fe60 fe61 fe63 fe68 fe6a fe6b ff01 ff02 ff03 ff05 ff06 ff07 ff08 ff09 ff0a ff0c ff0d ff0e ff0f ff1a ff1b ff1f ff20 ff3b ff3c ff3d ff3f ff5b ff5d ff5f ff60 ff61 ff62 ff63 ff64 ff65 found 585 chars."; + string puncts = "21 22 23 25 26 27 28 29 2a 2c 2d 2e 2f 3a 3b 3f 40 5b 5c 5d 5f 7b 7d a1 ab ad b7 bb bf 37e 387 55a 55b 55c 55d 55e 55f 589 58a 5be 5c0 5c3 5c6 5f3 5f4 609 60a 60c 60d 61b 61e 61f 66a 66b 66c 66d 6d4 700 701 702 703 704 705 706 707 708 709 70a 70b 70c 70d 7f7 7f8 7f9 830 831 832 833 834 835 836 837 838 839 83a 83b 83c 83d 83e 85e 964 965 970 9fd a76 af0 c84 df4 e4f e5a e5b f04 f05 f06 f07 f08 f09 f0a f0b f0c f0d f0e f0f f10 f11 f12 f14 f3a f3b f3c f3d f85 fd0 fd1 fd2 fd3 fd4 fd9 fda 104a 104b 104c 104d 104e 104f 10fb 1360 1361 1362 1363 1364 1365 1366 1367 1368 1400 166d 166e 169b 169c 16eb 16ec 16ed 1735 1736 17d4 17d5 17d6 17d8 17d9 17da 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 180a 1944 1945 1a1e 1a1f 1aa0 1aa1 1aa2 1aa3 1aa4 1aa5 1aa6 1aa8 1aa9 1aaa 1aab 1aac 1aad 1b5a 1b5b 1b5c 1b5d 1b5e 1b5f 1b60 1bfc 1bfd 1bfe 1bff 1c3b 1c3c 1c3d 1c3e 1c3f 1c7e 1c7f 1cc0 1cc1 1cc2 1cc3 1cc4 1cc5 1cc6 1cc7 1cd3 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 201a 201b 201c 201d 201e 201f 2020 2021 2022 2023 2024 2025 2026 2027 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 203a 203b 203c 203d 203e 203f 2040 2041 2042 2043 2045 2046 2047 2048 2049 204a 204b 204c 204d 204e 204f 2050 2051 2053 2054 2055 2056 2057 2058 2059 205a 205b 205c 205d 205e 207d 207e 208d 208e 2308 2309 230a 230b 2329 232a 2768 2769 276a 276b 276c 276d 276e 276f 2770 2771 2772 2773 2774 2775 27c5 27c6 27e6 27e7 27e8 27e9 27ea 27eb 27ec 27ed 27ee 27ef 2983 2984 2985 2986 2987 2988 2989 298a 298b 298c 298d 298e 298f 2990 2991 2992 2993 2994 2995 2996 2997 2998 29d8 29d9 29da 29db 29fc 29fd 2cf9 2cfa 2cfb 2cfc 2cfe 2cff 2d70 2e00 2e01 2e02 2e03 2e04 2e05 2e06 2e07 2e08 2e09 2e0a 2e0b 2e0c 2e0d 2e0e 2e0f 2e10 2e11 2e12 2e13 2e14 2e15 2e16 2e17 2e18 2e19 2e1a 2e1b 2e1c 2e1d 2e1e 2e1f 2e20 2e21 2e22 2e23 2e24 2e25 2e26 2e27 2e28 2e29 2e2a 2e2b 2e2c 2e2d 2e2e 2e30 2e31 2e32 2e33 2e34 2e35 2e36 2e37 2e38 2e39 2e3a 2e3b 2e3c 2e3d 2e3e 2e3f 2e40 2e41 2e42 2e43 2e44 2e45 2e46 2e47 2e48 2e49 2e4a 2e4b 2e4c 2e4d 2e4e 3001 3002 3003 3008 3009 300a 300b 300c 300d 300e 300f 3010 3011 3014 3015 3016 3017 3018 3019 301a 301b 301c 301d 301e 301f 3030 303d 30a0 30fb a4fe a4ff a60d a60e a60f a673 a67e a6f2 a6f3 a6f4 a6f5 a6f6 a6f7 a874 a875 a876 a877 a8ce a8cf a8f8 a8f9 a8fa a8fc a92e a92f a95f a9c1 a9c2 a9c3 a9c4 a9c5 a9c6 a9c7 a9c8 a9c9 a9ca a9cb a9cc a9cd a9de a9df aa5c aa5d aa5e aa5f aade aadf aaf0 aaf1 abeb fd3e fd3f fe10 fe11 fe12 fe13 fe14 fe15 fe16 fe17 fe18 fe19 fe30 fe31 fe32 fe33 fe34 fe35 fe36 fe37 fe38 fe39 fe3a fe3b fe3c fe3d fe3e fe3f fe40 fe41 fe42 fe43 fe44 fe45 fe46 fe47 fe48 fe49 fe4a fe4b fe4c fe4d fe4e fe4f fe50 fe51 fe52 fe54 fe55 fe56 fe57 fe58 fe59 fe5a fe5b fe5c fe5d fe5e fe5f fe60 fe61 fe63 fe68 fe6a fe6b ff01 ff02 ff03 ff05 ff06 ff07 ff08 ff09 ff0a ff0c ff0d ff0e ff0f ff1a ff1b ff1f ff20 ff3b ff3c ff3d ff3f ff5b ff5d ff5f ff60 ff61 ff62 ff63 ff64 ff65 found 608 chars."; string separators = "20 a0 1680 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 200a 2028 2029 202f 205f 3000 found 19 chars."; @@ -311,9 +311,9 @@ namespace MonoTests.System + "dfef dff0 dff1 dff2 dff3 dff4 dff5 dff6 dff7 dff8 dff9 " + "dffa dffb dffc dffd dffe dfff found 2048 chars."; - string symbolChars = "24 2b 3c 3d 3e 5e 60 7c 7e a2 a3 a4 a5 a6 a7 a8 a9 ac ae af b0 b1 b4 b6 b8 d7 f7 2c2 2c3 2c4 2c5 2d2 2d3 2d4 2d5 2d6 2d7 2d8 2d9 2da 2db 2dc 2dd 2de 2df 2e5 2e6 2e7 2e8 2e9 2ea 2eb 2ed 2ef 2f0 2f1 2f2 2f3 2f4 2f5 2f6 2f7 2f8 2f9 2fa 2fb 2fc 2fd 2fe 2ff 375 384 385 3f6 482 58f 606 607 608 60b 60e 60f 6de 6e9 6fd 6fe 7f6 9f2 9f3 9fa 9fb af1 b70 bf3 bf4 bf5 bf6 bf7 bf8 bf9 bfa c7f d79 e3f f01 f02 f03 f13 f15 f16 f17 f1a f1b f1c f1d f1e f1f f34 f36 f38 fbe fbf fc0 fc1 fc2 fc3 fc4 fc5 fc7 fc8 fc9 fca fcb fcc fce fcf fd5 fd6 fd7 fd8 109e 109f 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 17db 1940 19de 19df 19e0 19e1 19e2 19e3 19e4 19e5 19e6 19e7 19e8 19e9 19ea 19eb 19ec 19ed 19ee 19ef 19f0 19f1 19f2 19f3 19f4 19f5 19f6 19f7 19f8 19f9 19fa 19fb 19fc 19fd 19fe 19ff 1b61 1b62 1b63 1b64 1b65 1b66 1b67 1b68 1b69 1b6a 1b74 1b75 1b76 1b77 1b78 1b79 1b7a 1b7b 1b7c 1fbd 1fbf 1fc0 1fc1 1fcd 1fce 1fcf 1fdd 1fde 1fdf 1fed 1fee 1fef 1ffd 1ffe 2044 2052 207a 207b 207c 208a 208b 208c 20a0 20a1 20a2 20a3 20a4 20a5 20a6 20a7 20a8 20a9 20aa 20ab 20ac 20ad 20ae 20af 20b0 20b1 20b2 20b3 20b4 20b5 20b6 20b7 20b8 20b9 20ba 2100 2101 2103 2104 2105 2106 2108 2109 2114 2116 2117 2118 211e 211f 2120 2121 2122 2123 2125 2127 2129 212e 213a 213b 2140 2141 2142 2143 2144 214a 214b 214c 214d 214f 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 219a 219b 219c 219d 219e 219f 21a0 21a1 21a2 21a3 21a4 21a5 21a6 21a7 21a8 21a9 21aa 21ab 21ac 21ad 21ae 21af 21b0 21b1 21b2 21b3 21b4 21b5 21b6 21b7 21b8 21b9 21ba 21bb 21bc 21bd 21be 21bf 21c0 21c1 21c2 21c3 21c4 21c5 21c6 21c7 21c8 21c9 21ca 21cb 21cc 21cd 21ce 21cf 21d0 21d1 21d2 21d3 21d4 21d5 21d6 21d7 21d8 21d9 21da 21db 21dc 21dd 21de 21df 21e0 21e1 21e2 21e3 21e4 21e5 21e6 21e7 21e8 21e9 21ea 21eb 21ec 21ed 21ee 21ef 21f0 21f1 21f2 21f3 21f4 21f5 21f6 21f7 21f8 21f9 21fa 21fb 21fc 21fd 21fe 21ff 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 220a 220b 220c 220d 220e 220f 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 221a 221b 221c 221d 221e 221f 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 222a 222b 222c 222d 222e 222f 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 223a 223b 223c 223d 223e 223f 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 224a 224b 224c 224d 224e 224f 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 225a 225b 225c 225d 225e 225f 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 226a 226b 226c 226d 226e 226f 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 227a 227b 227c 227d 227e 227f 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 228a 228b 228c 228d 228e 228f 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 229a 229b 229c 229d 229e 229f 22a0 22a1 22a2 22a3 22a4 22a5 22a6 22a7 22a8 22a9 22aa 22ab 22ac 22ad 22ae 22af 22b0 22b1 22b2 22b3 22b4 22b5 22b6 22b7 22b8 22b9 22ba 22bb 22bc 22bd 22be 22bf 22c0 22c1 22c2 22c3 22c4 22c5 22c6 22c7 22c8 22c9 22ca 22cb 22cc 22cd 22ce 22cf 22d0 22d1 22d2 22d3 22d4 22d5 22d6 22d7 22d8 22d9 22da 22db 22dc 22dd 22de 22df 22e0 22e1 22e2 22e3 22e4 22e5 22e6 22e7 22e8 22e9 22ea 22eb 22ec 22ed 22ee 22ef 22f0 22f1 22f2 22f3 22f4 22f5 22f6 22f7 22f8 22f9 22fa 22fb 22fc 22fd 22fe 22ff 2300 2301 2302 2303 2304 2305 2306 2307 230c 230d 230e 230f 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 231a 231b 231c 231d 231e 231f 2320 2321 2322 2323 2324 2325 2326 2327 2328 232b 232c 232d 232e 232f 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 233a 233b 233c 233d 233e 233f 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 234a 234b 234c 234d 234e 234f 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 235a 235b 235c 235d 235e 235f 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 236a 236b 236c 236d 236e 236f 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 237a 237b 237c 237d 237e 237f 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 238a 238b 238c 238d 238e 238f 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 239a 239b 239c 239d 239e 239f 23a0 23a1 23a2 23a3 23a4 23a5 23a6 23a7 23a8 23a9 23aa 23ab 23ac 23ad 23ae 23af 23b0 23b1 23b2 23b3 23b4 23b5 23b6 23b7 23b8 23b9 23ba 23bb 23bc 23bd 23be 23bf 23c0 23c1 23c2 23c3 23c4 23c5 23c6 23c7 23c8 23c9 23ca 23cb 23cc 23cd 23ce 23cf 23d0 23d1 23d2 23d3 23d4 23d5 23d6 23d7 23d8 23d9 23da 23db 23dc 23dd 23de 23df 23e0 23e1 23e2 23e3 23e4 23e5 23e6 23e7 23e8 23e9 23ea 23eb 23ec 23ed 23ee 23ef 23f0 23f1 23f2 23f3 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 240a 240b 240c 240d 240e 240f 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 241a 241b 241c 241d 241e 241f 2420 2421 2422 2423 2424 2425 2426 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 244a 249c 249d 249e 249f 24a0 24a1 24a2 24a3 24a4 24a5 24a6 24a7 24a8 24a9 24aa 24ab 24ac 24ad 24ae 24af 24b0 24b1 24b2 24b3 24b4 24b5 24b6 24b7 24b8 24b9 24ba 24bb 24bc 24bd 24be 24bf 24c0 24c1 24c2 24c3 24c4 24c5 24c6 24c7 24c8 24c9 24ca 24cb 24cc 24cd 24ce 24cf 24d0 24d1 24d2 24d3 24d4 24d5 24d6 24d7 24d8 24d9 24da 24db 24dc 24dd 24de 24df 24e0 24e1 24e2 24e3 24e4 24e5 24e6 24e7 24e8 24e9 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 250a 250b 250c 250d 250e 250f 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 251a 251b 251c 251d 251e 251f 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 252a 252b 252c 252d 252e 252f 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 253a 253b 253c 253d 253e 253f 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 254a 254b 254c 254d 254e 254f 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 255a 255b 255c 255d 255e 255f 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 256a 256b 256c 256d 256e 256f 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 257a 257b 257c 257d 257e 257f 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 258a 258b 258c 258d 258e 258f 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 259a 259b 259c 259d 259e 259f 25a0 25a1 25a2 25a3 25a4 25a5 25a6 25a7 25a8 25a9 25aa 25ab 25ac 25ad 25ae 25af 25b0 25b1 25b2 25b3 25b4 25b5 25b6 25b7 25b8 25b9 25ba 25bb 25bc 25bd 25be 25bf 25c0 25c1 25c2 25c3 25c4 25c5 25c6 25c7 25c8 25c9 25ca 25cb 25cc 25cd 25ce 25cf 25d0 25d1 25d2 25d3 25d4 25d5 25d6 25d7 25d8 25d9 25da 25db 25dc 25dd 25de 25df 25e0 25e1 25e2 25e3 25e4 25e5 25e6 25e7 25e8 25e9 25ea 25eb 25ec 25ed 25ee 25ef 25f0 25f1 25f2 25f3 25f4 25f5 25f6 25f7 25f8 25f9 25fa 25fb 25fc 25fd 25fe 25ff 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 260a 260b 260c 260d 260e 260f 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 261a 261b 261c 261d 261e 261f 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 262a 262b 262c 262d 262e 262f 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 263a 263b 263c 263d 263e 263f 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 264a 264b 264c 264d 264e 264f 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 265a 265b 265c 265d 265e 265f 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 266a 266b 266c 266d 266e 266f 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 267a 267b 267c 267d 267e 267f 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 268a 268b 268c 268d 268e 268f 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 269a 269b 269c 269d 269e 269f 26a0 26a1 26a2 26a3 26a4 26a5 26a6 26a7 26a8 26a9 26aa 26ab 26ac 26ad 26ae 26af 26b0 26b1 26b2 26b3 26b4 26b5 26b6 26b7 26b8 26b9 26ba 26bb 26bc 26bd 26be 26bf 26c0 26c1 26c2 26c3 26c4 26c5 26c6 26c7 26c8 26c9 26ca 26cb 26cc 26cd 26ce 26cf 26d0 26d1 26d2 26d3 26d4 26d5 26d6 26d7 26d8 26d9 26da 26db 26dc 26dd 26de 26df 26e0 26e1 26e2 26e3 26e4 26e5 26e6 26e7 26e8 26e9 26ea 26eb 26ec 26ed 26ee 26ef 26f0 26f1 26f2 26f3 26f4 26f5 26f6 26f7 26f8 26f9 26fa 26fb 26fc 26fd 26fe 26ff 2701 2702 2703 2704 2705 2706 2707 2708 2709 270a 270b 270c 270d 270e 270f 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 271a 271b 271c 271d 271e 271f 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 272a 272b 272c 272d 272e 272f 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 273a 273b 273c 273d 273e 273f 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 274a 274b 274c 274d 274e 274f 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 275a 275b 275c 275d 275e 275f 2760 2761 2762 2763 2764 2765 2766 2767 2794 2795 2796 2797 2798 2799 279a 279b 279c 279d 279e 279f 27a0 27a1 27a2 27a3 27a4 27a5 27a6 27a7 27a8 27a9 27aa 27ab 27ac 27ad 27ae 27af 27b0 27b1 27b2 27b3 27b4 27b5 27b6 27b7 27b8 27b9 27ba 27bb 27bc 27bd 27be 27bf 27c0 27c1 27c2 27c3 27c4 27c7 27c8 27c9 27ca 27cb 27cc 27cd 27ce 27cf 27d0 27d1 27d2 27d3 27d4 27d5 27d6 27d7 27d8 27d9 27da 27db 27dc 27dd 27de 27df 27e0 27e1 27e2 27e3 27e4 27e5 27f0 27f1 27f2 27f3 27f4 27f5 27f6 27f7 27f8 27f9 27fa 27fb 27fc 27fd 27fe 27ff 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 280a 280b 280c 280d 280e 280f 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 281a 281b 281c 281d 281e 281f 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 282a 282b 282c 282d 282e 282f 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 283a 283b 283c 283d 283e 283f 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 284a 284b 284c 284d 284e 284f 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 285a 285b 285c 285d 285e 285f 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 286a 286b 286c 286d 286e 286f 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 287a 287b 287c 287d 287e 287f 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 288a 288b 288c 288d 288e 288f 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 289a 289b 289c 289d 289e 289f 28a0 28a1 28a2 28a3 28a4 28a5 28a6 28a7 28a8 28a9 28aa 28ab 28ac 28ad 28ae 28af 28b0 28b1 28b2 28b3 28b4 28b5 28b6 28b7 28b8 28b9 28ba 28bb 28bc 28bd 28be 28bf 28c0 28c1 28c2 28c3 28c4 28c5 28c6 28c7 28c8 28c9 28ca 28cb 28cc 28cd 28ce 28cf 28d0 28d1 28d2 28d3 28d4 28d5 28d6 28d7 28d8 28d9 28da 28db 28dc 28dd 28de 28df 28e0 28e1 28e2 28e3 28e4 28e5 28e6 28e7 28e8 28e9 28ea 28eb 28ec 28ed 28ee 28ef 28f0 28f1 28f2 28f3 28f4 28f5 28f6 28f7 28f8 28f9 28fa 28fb 28fc 28fd 28fe 28ff 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 290a 290b 290c 290d 290e 290f 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 291a 291b 291c 291d 291e 291f 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 292a 292b 292c 292d 292e 292f 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 293a 293b 293c 293d 293e 293f 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 294a 294b 294c 294d 294e 294f 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 295a 295b 295c 295d 295e 295f 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 296a 296b 296c 296d 296e 296f 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 297a 297b 297c 297d 297e 297f 2980 2981 2982 2999 299a 299b 299c 299d 299e 299f 29a0 29a1 29a2 29a3 29a4 29a5 29a6 29a7 29a8 29a9 29aa 29ab 29ac 29ad 29ae 29af 29b0 29b1 29b2 29b3 29b4 29b5 29b6 29b7 29b8 29b9 29ba 29bb 29bc 29bd 29be 29bf 29c0 29c1 29c2 29c3 29c4 29c5 29c6 29c7 29c8 29c9 29ca 29cb 29cc 29cd 29ce 29cf 29d0 29d1 29d2 29d3 29d4 29d5 29d6 29d7 29dc 29dd 29de 29df 29e0 29e1 29e2 29e3 29e4 29e5 29e6 29e7 29e8 29e9 29ea 29eb 29ec 29ed 29ee 29ef 29f0 29f1 29f2 29f3 29f4 29f5 29f6 29f7 29f8 29f9 29fa 29fb 29fe 29ff 2a00 2a01 2a02 2a03 2a04 2a05 2a06 2a07 2a08 2a09 2a0a 2a0b 2a0c 2a0d 2a0e 2a0f 2a10 2a11 2a12 2a13 2a14 2a15 2a16 2a17 2a18 2a19 2a1a 2a1b 2a1c 2a1d 2a1e 2a1f 2a20 2a21 2a22 2a23 2a24 2a25 2a26 2a27 2a28 2a29 2a2a 2a2b 2a2c 2a2d 2a2e 2a2f 2a30 2a31 2a32 2a33 2a34 2a35 2a36 2a37 2a38 2a39 2a3a 2a3b 2a3c 2a3d 2a3e 2a3f 2a40 2a41 2a42 2a43 2a44 2a45 2a46 2a47 2a48 2a49 2a4a 2a4b 2a4c 2a4d 2a4e 2a4f 2a50 2a51 2a52 2a53 2a54 2a55 2a56 2a57 2a58 2a59 2a5a 2a5b 2a5c 2a5d 2a5e 2a5f 2a60 2a61 2a62 2a63 2a64 2a65 2a66 2a67 2a68 2a69 2a6a 2a6b 2a6c 2a6d 2a6e 2a6f 2a70 2a71 2a72 2a73 2a74 2a75 2a76 2a77 2a78 2a79 2a7a 2a7b 2a7c 2a7d 2a7e 2a7f 2a80 2a81 2a82 2a83 2a84 2a85 2a86 2a87 2a88 2a89 2a8a 2a8b 2a8c 2a8d 2a8e 2a8f 2a90 2a91 2a92 2a93 2a94 2a95 2a96 2a97 2a98 2a99 2a9a 2a9b 2a9c 2a9d 2a9e 2a9f 2aa0 2aa1 2aa2 2aa3 2aa4 2aa5 2aa6 2aa7 2aa8 2aa9 2aaa 2aab 2aac 2aad 2aae 2aaf 2ab0 2ab1 2ab2 2ab3 2ab4 2ab5 2ab6 2ab7 2ab8 2ab9 2aba 2abb 2abc 2abd 2abe 2abf 2ac0 2ac1 2ac2 2ac3 2ac4 2ac5 2ac6 2ac7 2ac8 2ac9 2aca 2acb 2acc 2acd 2ace 2acf 2ad0 2ad1 2ad2 2ad3 2ad4 2ad5 2ad6 2ad7 2ad8 2ad9 2ada 2adb 2adc 2add 2ade 2adf 2ae0 2ae1 2ae2 2ae3 2ae4 2ae5 2ae6 2ae7 2ae8 2ae9 2aea 2aeb 2aec 2aed 2aee 2aef 2af0 2af1 2af2 2af3 2af4 2af5 2af6 2af7 2af8 2af9 2afa 2afb 2afc 2afd 2afe 2aff 2b00 2b01 2b02 2b03 2b04 2b05 2b06 2b07 2b08 2b09 2b0a 2b0b 2b0c 2b0d 2b0e 2b0f 2b10 2b11 2b12 2b13 2b14 2b15 2b16 2b17 2b18 2b19 2b1a 2b1b 2b1c 2b1d 2b1e 2b1f 2b20 2b21 2b22 2b23 2b24 2b25 2b26 2b27 2b28 2b29 2b2a 2b2b 2b2c 2b2d 2b2e 2b2f 2b30 2b31 2b32 2b33 2b34 2b35 2b36 2b37 2b38 2b39 2b3a 2b3b 2b3c 2b3d 2b3e 2b3f 2b40 2b41 2b42 2b43 2b44 2b45 2b46 2b47 2b48 2b49 2b4a 2b4b 2b4c 2b50 2b51 2b52 2b53 2b54 2b55 2b56 2b57 2b58 2b59 2ce5 2ce6 2ce7 2ce8 2ce9 2cea 2e80 2e81 2e82 2e83 2e84 2e85 2e86 2e87 2e88 2e89 2e8a 2e8b 2e8c 2e8d 2e8e 2e8f 2e90 2e91 2e92 2e93 2e94 2e95 2e96 2e97 2e98 2e99 2e9b 2e9c 2e9d 2e9e 2e9f 2ea0 2ea1 2ea2 2ea3 2ea4 2ea5 2ea6 2ea7 2ea8 2ea9 2eaa 2eab 2eac 2ead 2eae 2eaf 2eb0 2eb1 2eb2 2eb3 2eb4 2eb5 2eb6 2eb7 2eb8 2eb9 2eba 2ebb 2ebc 2ebd 2ebe 2ebf 2ec0 2ec1 2ec2 2ec3 2ec4 2ec5 2ec6 2ec7 2ec8 2ec9 2eca 2ecb 2ecc 2ecd 2ece 2ecf 2ed0 2ed1 2ed2 2ed3 2ed4 2ed5 2ed6 2ed7 2ed8 2ed9 2eda 2edb 2edc 2edd 2ede 2edf 2ee0 2ee1 2ee2 2ee3 2ee4 2ee5 2ee6 2ee7 2ee8 2ee9 2eea 2eeb 2eec 2eed 2eee 2eef 2ef0 2ef1 2ef2 2ef3 2f00 2f01 2f02 2f03 2f04 2f05 2f06 2f07 2f08 2f09 2f0a 2f0b 2f0c 2f0d 2f0e 2f0f 2f10 2f11 2f12 2f13 2f14 2f15 2f16 2f17 2f18 2f19 2f1a 2f1b 2f1c 2f1d 2f1e 2f1f 2f20 2f21 2f22 2f23 2f24 2f25 2f26 2f27 2f28 2f29 2f2a 2f2b 2f2c 2f2d 2f2e 2f2f 2f30 2f31 2f32 2f33 2f34 2f35 2f36 2f37 2f38 2f39 2f3a 2f3b 2f3c 2f3d 2f3e 2f3f 2f40 2f41 2f42 2f43 2f44 2f45 2f46 2f47 2f48 2f49 2f4a 2f4b 2f4c 2f4d 2f4e 2f4f 2f50 2f51 2f52 2f53 2f54 2f55 2f56 2f57 2f58 2f59 2f5a 2f5b 2f5c 2f5d 2f5e 2f5f 2f60 2f61 2f62 2f63 2f64 2f65 2f66 2f67 2f68 2f69 2f6a 2f6b 2f6c 2f6d 2f6e 2f6f 2f70 2f71 2f72 2f73 2f74 2f75 2f76 2f77 2f78 2f79 2f7a 2f7b 2f7c 2f7d 2f7e 2f7f 2f80 2f81 2f82 2f83 2f84 2f85 2f86 2f87 2f88 2f89 2f8a 2f8b 2f8c 2f8d 2f8e 2f8f 2f90 2f91 2f92 2f93 2f94 2f95 2f96 2f97 2f98 2f99 2f9a 2f9b 2f9c 2f9d 2f9e 2f9f 2fa0 2fa1 2fa2 2fa3 2fa4 2fa5 2fa6 2fa7 2fa8 2fa9 2faa 2fab 2fac 2fad 2fae 2faf 2fb0 2fb1 2fb2 2fb3 2fb4 2fb5 2fb6 2fb7 2fb8 2fb9 2fba 2fbb 2fbc 2fbd 2fbe 2fbf 2fc0 2fc1 2fc2 2fc3 2fc4 2fc5 2fc6 2fc7 2fc8 2fc9 2fca 2fcb 2fcc 2fcd 2fce 2fcf 2fd0 2fd1 2fd2 2fd3 2fd4 2fd5 2ff0 2ff1 2ff2 2ff3 2ff4 2ff5 2ff6 2ff7 2ff8 2ff9 2ffa 2ffb 3004 3012 3013 3020 3036 3037 303e 303f 309b 309c 3190 3191 3196 3197 3198 3199 319a 319b 319c 319d 319e 319f 31c0 31c1 31c2 31c3 31c4 31c5 31c6 31c7 31c8 31c9 31ca 31cb 31cc 31cd 31ce 31cf 31d0 31d1 31d2 31d3 31d4 31d5 31d6 31d7 31d8 31d9 31da 31db 31dc 31dd 31de 31df 31e0 31e1 31e2 31e3 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 320a 320b 320c 320d 320e 320f 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 321a 321b 321c 321d 321e 322a 322b 322c 322d 322e 322f 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 323a 323b 323c 323d 323e 323f 3240 3241 3242 3243 3244 3245 3246 3247 3250 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 326a 326b 326c 326d 326e 326f 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 327a 327b 327c 327d 327e 327f 328a 328b 328c 328d 328e 328f 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 329a 329b 329c 329d 329e 329f 32a0 32a1 32a2 32a3 32a4 32a5 32a6 32a7 32a8 32a9 32aa 32ab 32ac 32ad 32ae 32af 32b0 32c0 32c1 32c2 32c3 32c4 32c5 32c6 32c7 32c8 32c9 32ca 32cb 32cc 32cd 32ce 32cf 32d0 32d1 32d2 32d3 32d4 32d5 32d6 32d7 32d8 32d9 32da 32db 32dc 32dd 32de 32df 32e0 32e1 32e2 32e3 32e4 32e5 32e6 32e7 32e8 32e9 32ea 32eb 32ec 32ed 32ee 32ef 32f0 32f1 32f2 32f3 32f4 32f5 32f6 32f7 32f8 32f9 32fa 32fb 32fc 32fd 32fe 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 330a 330b 330c 330d 330e 330f 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 331a 331b 331c 331d 331e 331f 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 332a 332b 332c 332d 332e 332f 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 333a 333b 333c 333d 333e 333f 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 334a 334b 334c 334d 334e 334f 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 335a 335b 335c 335d 335e 335f 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 336a 336b 336c 336d 336e 336f 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 337a 337b 337c 337d 337e 337f 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 338a 338b 338c 338d 338e 338f 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 339a 339b 339c 339d 339e 339f 33a0 33a1 33a2 33a3 33a4 33a5 33a6 33a7 33a8 33a9 33aa 33ab 33ac 33ad 33ae 33af 33b0 33b1 33b2 33b3 33b4 33b5 33b6 33b7 33b8 33b9 33ba 33bb 33bc 33bd 33be 33bf 33c0 33c1 33c2 33c3 33c4 33c5 33c6 33c7 33c8 33c9 33ca 33cb 33cc 33cd 33ce 33cf 33d0 33d1 33d2 33d3 33d4 33d5 33d6 33d7 33d8 33d9 33da 33db 33dc 33dd 33de 33df 33e0 33e1 33e2 33e3 33e4 33e5 33e6 33e7 33e8 33e9 33ea 33eb 33ec 33ed 33ee 33ef 33f0 33f1 33f2 33f3 33f4 33f5 33f6 33f7 33f8 33f9 33fa 33fb 33fc 33fd 33fe 33ff 4dc0 4dc1 4dc2 4dc3 4dc4 4dc5 4dc6 4dc7 4dc8 4dc9 4dca 4dcb 4dcc 4dcd 4dce 4dcf 4dd0 4dd1 4dd2 4dd3 4dd4 4dd5 4dd6 4dd7 4dd8 4dd9 4dda 4ddb 4ddc 4ddd 4dde 4ddf 4de0 4de1 4de2 4de3 4de4 4de5 4de6 4de7 4de8 4de9 4dea 4deb 4dec 4ded 4dee 4def 4df0 4df1 4df2 4df3 4df4 4df5 4df6 4df7 4df8 4df9 4dfa 4dfb 4dfc 4dfd 4dfe 4dff a490 a491 a492 a493 a494 a495 a496 a497 a498 a499 a49a a49b a49c a49d a49e a49f a4a0 a4a1 a4a2 a4a3 a4a4 a4a5 a4a6 a4a7 a4a8 a4a9 a4aa a4ab a4ac a4ad a4ae a4af a4b0 a4b1 a4b2 a4b3 a4b4 a4b5 a4b6 a4b7 a4b8 a4b9 a4ba a4bb a4bc a4bd a4be a4bf a4c0 a4c1 a4c2 a4c3 a4c4 a4c5 a4c6 a700 a701 a702 a703 a704 a705 a706 a707 a708 a709 a70a a70b a70c a70d a70e a70f a710 a711 a712 a713 a714 a715 a716 a720 a721 a789 a78a a828 a829 a82a a82b a836 a837 a838 a839 aa77 aa78 aa79 fb29 fbb2 fbb3 fbb4 fbb5 fbb6 fbb7 fbb8 fbb9 fbba fbbb fbbc fbbd fbbe fbbf fbc0 fbc1 fdfc fdfd fe62 fe64 fe65 fe66 fe69 ff04 ff0b ff1c ff1d ff1e ff3e ff40 ff5c ff5e ffe0 ffe1 ffe2 ffe3 ffe4 ffe5 ffe6 ffe8 ffe9 ffea ffeb ffec ffed ffee fffc fffd found 3626 chars."; + string symbolChars = "24 2b 3c 3d 3e 5e 60 7c 7e a2 a3 a4 a5 a6 a7 a8 a9 ac ae af b0 b1 b4 b6 b8 d7 f7 2c2 2c3 2c4 2c5 2d2 2d3 2d4 2d5 2d6 2d7 2d8 2d9 2da 2db 2dc 2dd 2de 2df 2e5 2e6 2e7 2e8 2e9 2ea 2eb 2ed 2ef 2f0 2f1 2f2 2f3 2f4 2f5 2f6 2f7 2f8 2f9 2fa 2fb 2fc 2fd 2fe 2ff 375 384 385 3f6 482 58d 58e 58f 606 607 608 60b 60e 60f 6de 6e9 6fd 6fe 7f6 7fe 7ff 9f2 9f3 9fa 9fb af1 b70 bf3 bf4 bf5 bf6 bf7 bf8 bf9 bfa c7f d4f d79 e3f f01 f02 f03 f13 f15 f16 f17 f1a f1b f1c f1d f1e f1f f34 f36 f38 fbe fbf fc0 fc1 fc2 fc3 fc4 fc5 fc7 fc8 fc9 fca fcb fcc fce fcf fd5 fd6 fd7 fd8 109e 109f 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 17db 1940 19de 19df 19e0 19e1 19e2 19e3 19e4 19e5 19e6 19e7 19e8 19e9 19ea 19eb 19ec 19ed 19ee 19ef 19f0 19f1 19f2 19f3 19f4 19f5 19f6 19f7 19f8 19f9 19fa 19fb 19fc 19fd 19fe 19ff 1b61 1b62 1b63 1b64 1b65 1b66 1b67 1b68 1b69 1b6a 1b74 1b75 1b76 1b77 1b78 1b79 1b7a 1b7b 1b7c 1fbd 1fbf 1fc0 1fc1 1fcd 1fce 1fcf 1fdd 1fde 1fdf 1fed 1fee 1fef 1ffd 1ffe 2044 2052 207a 207b 207c 208a 208b 208c 20a0 20a1 20a2 20a3 20a4 20a5 20a6 20a7 20a8 20a9 20aa 20ab 20ac 20ad 20ae 20af 20b0 20b1 20b2 20b3 20b4 20b5 20b6 20b7 20b8 20b9 20ba 20bb 20bc 20bd 20be 20bf 2100 2101 2103 2104 2105 2106 2108 2109 2114 2116 2117 2118 211e 211f 2120 2121 2122 2123 2125 2127 2129 212e 213a 213b 2140 2141 2142 2143 2144 214a 214b 214c 214d 214f 218a 218b 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 219a 219b 219c 219d 219e 219f 21a0 21a1 21a2 21a3 21a4 21a5 21a6 21a7 21a8 21a9 21aa 21ab 21ac 21ad 21ae 21af 21b0 21b1 21b2 21b3 21b4 21b5 21b6 21b7 21b8 21b9 21ba 21bb 21bc 21bd 21be 21bf 21c0 21c1 21c2 21c3 21c4 21c5 21c6 21c7 21c8 21c9 21ca 21cb 21cc 21cd 21ce 21cf 21d0 21d1 21d2 21d3 21d4 21d5 21d6 21d7 21d8 21d9 21da 21db 21dc 21dd 21de 21df 21e0 21e1 21e2 21e3 21e4 21e5 21e6 21e7 21e8 21e9 21ea 21eb 21ec 21ed 21ee 21ef 21f0 21f1 21f2 21f3 21f4 21f5 21f6 21f7 21f8 21f9 21fa 21fb 21fc 21fd 21fe 21ff 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 220a 220b 220c 220d 220e 220f 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 221a 221b 221c 221d 221e 221f 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 222a 222b 222c 222d 222e 222f 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 223a 223b 223c 223d 223e 223f 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 224a 224b 224c 224d 224e 224f 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 225a 225b 225c 225d 225e 225f 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 226a 226b 226c 226d 226e 226f 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 227a 227b 227c 227d 227e 227f 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 228a 228b 228c 228d 228e 228f 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 229a 229b 229c 229d 229e 229f 22a0 22a1 22a2 22a3 22a4 22a5 22a6 22a7 22a8 22a9 22aa 22ab 22ac 22ad 22ae 22af 22b0 22b1 22b2 22b3 22b4 22b5 22b6 22b7 22b8 22b9 22ba 22bb 22bc 22bd 22be 22bf 22c0 22c1 22c2 22c3 22c4 22c5 22c6 22c7 22c8 22c9 22ca 22cb 22cc 22cd 22ce 22cf 22d0 22d1 22d2 22d3 22d4 22d5 22d6 22d7 22d8 22d9 22da 22db 22dc 22dd 22de 22df 22e0 22e1 22e2 22e3 22e4 22e5 22e6 22e7 22e8 22e9 22ea 22eb 22ec 22ed 22ee 22ef 22f0 22f1 22f2 22f3 22f4 22f5 22f6 22f7 22f8 22f9 22fa 22fb 22fc 22fd 22fe 22ff 2300 2301 2302 2303 2304 2305 2306 2307 230c 230d 230e 230f 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 231a 231b 231c 231d 231e 231f 2320 2321 2322 2323 2324 2325 2326 2327 2328 232b 232c 232d 232e 232f 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 233a 233b 233c 233d 233e 233f 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 234a 234b 234c 234d 234e 234f 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 235a 235b 235c 235d 235e 235f 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 236a 236b 236c 236d 236e 236f 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 237a 237b 237c 237d 237e 237f 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 238a 238b 238c 238d 238e 238f 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 239a 239b 239c 239d 239e 239f 23a0 23a1 23a2 23a3 23a4 23a5 23a6 23a7 23a8 23a9 23aa 23ab 23ac 23ad 23ae 23af 23b0 23b1 23b2 23b3 23b4 23b5 23b6 23b7 23b8 23b9 23ba 23bb 23bc 23bd 23be 23bf 23c0 23c1 23c2 23c3 23c4 23c5 23c6 23c7 23c8 23c9 23ca 23cb 23cc 23cd 23ce 23cf 23d0 23d1 23d2 23d3 23d4 23d5 23d6 23d7 23d8 23d9 23da 23db 23dc 23dd 23de 23df 23e0 23e1 23e2 23e3 23e4 23e5 23e6 23e7 23e8 23e9 23ea 23eb 23ec 23ed 23ee 23ef 23f0 23f1 23f2 23f3 23f4 23f5 23f6 23f7 23f8 23f9 23fa 23fb 23fc 23fd 23fe 23ff 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 240a 240b 240c 240d 240e 240f 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 241a 241b 241c 241d 241e 241f 2420 2421 2422 2423 2424 2425 2426 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 244a 249c 249d 249e 249f 24a0 24a1 24a2 24a3 24a4 24a5 24a6 24a7 24a8 24a9 24aa 24ab 24ac 24ad 24ae 24af 24b0 24b1 24b2 24b3 24b4 24b5 24b6 24b7 24b8 24b9 24ba 24bb 24bc 24bd 24be 24bf 24c0 24c1 24c2 24c3 24c4 24c5 24c6 24c7 24c8 24c9 24ca 24cb 24cc 24cd 24ce 24cf 24d0 24d1 24d2 24d3 24d4 24d5 24d6 24d7 24d8 24d9 24da 24db 24dc 24dd 24de 24df 24e0 24e1 24e2 24e3 24e4 24e5 24e6 24e7 24e8 24e9 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 250a 250b 250c 250d 250e 250f 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 251a 251b 251c 251d 251e 251f 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 252a 252b 252c 252d 252e 252f 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 253a 253b 253c 253d 253e 253f 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 254a 254b 254c 254d 254e 254f 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 255a 255b 255c 255d 255e 255f 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 256a 256b 256c 256d 256e 256f 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 257a 257b 257c 257d 257e 257f 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 258a 258b 258c 258d 258e 258f 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 259a 259b 259c 259d 259e 259f 25a0 25a1 25a2 25a3 25a4 25a5 25a6 25a7 25a8 25a9 25aa 25ab 25ac 25ad 25ae 25af 25b0 25b1 25b2 25b3 25b4 25b5 25b6 25b7 25b8 25b9 25ba 25bb 25bc 25bd 25be 25bf 25c0 25c1 25c2 25c3 25c4 25c5 25c6 25c7 25c8 25c9 25ca 25cb 25cc 25cd 25ce 25cf 25d0 25d1 25d2 25d3 25d4 25d5 25d6 25d7 25d8 25d9 25da 25db 25dc 25dd 25de 25df 25e0 25e1 25e2 25e3 25e4 25e5 25e6 25e7 25e8 25e9 25ea 25eb 25ec 25ed 25ee 25ef 25f0 25f1 25f2 25f3 25f4 25f5 25f6 25f7 25f8 25f9 25fa 25fb 25fc 25fd 25fe 25ff 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 260a 260b 260c 260d 260e 260f 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 261a 261b 261c 261d 261e 261f 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 262a 262b 262c 262d 262e 262f 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 263a 263b 263c 263d 263e 263f 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 264a 264b 264c 264d 264e 264f 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 265a 265b 265c 265d 265e 265f 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 266a 266b 266c 266d 266e 266f 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 267a 267b 267c 267d 267e 267f 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 268a 268b 268c 268d 268e 268f 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 269a 269b 269c 269d 269e 269f 26a0 26a1 26a2 26a3 26a4 26a5 26a6 26a7 26a8 26a9 26aa 26ab 26ac 26ad 26ae 26af 26b0 26b1 26b2 26b3 26b4 26b5 26b6 26b7 26b8 26b9 26ba 26bb 26bc 26bd 26be 26bf 26c0 26c1 26c2 26c3 26c4 26c5 26c6 26c7 26c8 26c9 26ca 26cb 26cc 26cd 26ce 26cf 26d0 26d1 26d2 26d3 26d4 26d5 26d6 26d7 26d8 26d9 26da 26db 26dc 26dd 26de 26df 26e0 26e1 26e2 26e3 26e4 26e5 26e6 26e7 26e8 26e9 26ea 26eb 26ec 26ed 26ee 26ef 26f0 26f1 26f2 26f3 26f4 26f5 26f6 26f7 26f8 26f9 26fa 26fb 26fc 26fd 26fe 26ff 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 270a 270b 270c 270d 270e 270f 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 271a 271b 271c 271d 271e 271f 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 272a 272b 272c 272d 272e 272f 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 273a 273b 273c 273d 273e 273f 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 274a 274b 274c 274d 274e 274f 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 275a 275b 275c 275d 275e 275f 2760 2761 2762 2763 2764 2765 2766 2767 2794 2795 2796 2797 2798 2799 279a 279b 279c 279d 279e 279f 27a0 27a1 27a2 27a3 27a4 27a5 27a6 27a7 27a8 27a9 27aa 27ab 27ac 27ad 27ae 27af 27b0 27b1 27b2 27b3 27b4 27b5 27b6 27b7 27b8 27b9 27ba 27bb 27bc 27bd 27be 27bf 27c0 27c1 27c2 27c3 27c4 27c7 27c8 27c9 27ca 27cb 27cc 27cd 27ce 27cf 27d0 27d1 27d2 27d3 27d4 27d5 27d6 27d7 27d8 27d9 27da 27db 27dc 27dd 27de 27df 27e0 27e1 27e2 27e3 27e4 27e5 27f0 27f1 27f2 27f3 27f4 27f5 27f6 27f7 27f8 27f9 27fa 27fb 27fc 27fd 27fe 27ff 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 280a 280b 280c 280d 280e 280f 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 281a 281b 281c 281d 281e 281f 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 282a 282b 282c 282d 282e 282f 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 283a 283b 283c 283d 283e 283f 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 284a 284b 284c 284d 284e 284f 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 285a 285b 285c 285d 285e 285f 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 286a 286b 286c 286d 286e 286f 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 287a 287b 287c 287d 287e 287f 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 288a 288b 288c 288d 288e 288f 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 289a 289b 289c 289d 289e 289f 28a0 28a1 28a2 28a3 28a4 28a5 28a6 28a7 28a8 28a9 28aa 28ab 28ac 28ad 28ae 28af 28b0 28b1 28b2 28b3 28b4 28b5 28b6 28b7 28b8 28b9 28ba 28bb 28bc 28bd 28be 28bf 28c0 28c1 28c2 28c3 28c4 28c5 28c6 28c7 28c8 28c9 28ca 28cb 28cc 28cd 28ce 28cf 28d0 28d1 28d2 28d3 28d4 28d5 28d6 28d7 28d8 28d9 28da 28db 28dc 28dd 28de 28df 28e0 28e1 28e2 28e3 28e4 28e5 28e6 28e7 28e8 28e9 28ea 28eb 28ec 28ed 28ee 28ef 28f0 28f1 28f2 28f3 28f4 28f5 28f6 28f7 28f8 28f9 28fa 28fb 28fc 28fd 28fe 28ff 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 290a 290b 290c 290d 290e 290f 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 291a 291b 291c 291d 291e 291f 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 292a 292b 292c 292d 292e 292f 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 293a 293b 293c 293d 293e 293f 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 294a 294b 294c 294d 294e 294f 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 295a 295b 295c 295d 295e 295f 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 296a 296b 296c 296d 296e 296f 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 297a 297b 297c 297d 297e 297f 2980 2981 2982 2999 299a 299b 299c 299d 299e 299f 29a0 29a1 29a2 29a3 29a4 29a5 29a6 29a7 29a8 29a9 29aa 29ab 29ac 29ad 29ae 29af 29b0 29b1 29b2 29b3 29b4 29b5 29b6 29b7 29b8 29b9 29ba 29bb 29bc 29bd 29be 29bf 29c0 29c1 29c2 29c3 29c4 29c5 29c6 29c7 29c8 29c9 29ca 29cb 29cc 29cd 29ce 29cf 29d0 29d1 29d2 29d3 29d4 29d5 29d6 29d7 29dc 29dd 29de 29df 29e0 29e1 29e2 29e3 29e4 29e5 29e6 29e7 29e8 29e9 29ea 29eb 29ec 29ed 29ee 29ef 29f0 29f1 29f2 29f3 29f4 29f5 29f6 29f7 29f8 29f9 29fa 29fb 29fe 29ff 2a00 2a01 2a02 2a03 2a04 2a05 2a06 2a07 2a08 2a09 2a0a 2a0b 2a0c 2a0d 2a0e 2a0f 2a10 2a11 2a12 2a13 2a14 2a15 2a16 2a17 2a18 2a19 2a1a 2a1b 2a1c 2a1d 2a1e 2a1f 2a20 2a21 2a22 2a23 2a24 2a25 2a26 2a27 2a28 2a29 2a2a 2a2b 2a2c 2a2d 2a2e 2a2f 2a30 2a31 2a32 2a33 2a34 2a35 2a36 2a37 2a38 2a39 2a3a 2a3b 2a3c 2a3d 2a3e 2a3f 2a40 2a41 2a42 2a43 2a44 2a45 2a46 2a47 2a48 2a49 2a4a 2a4b 2a4c 2a4d 2a4e 2a4f 2a50 2a51 2a52 2a53 2a54 2a55 2a56 2a57 2a58 2a59 2a5a 2a5b 2a5c 2a5d 2a5e 2a5f 2a60 2a61 2a62 2a63 2a64 2a65 2a66 2a67 2a68 2a69 2a6a 2a6b 2a6c 2a6d 2a6e 2a6f 2a70 2a71 2a72 2a73 2a74 2a75 2a76 2a77 2a78 2a79 2a7a 2a7b 2a7c 2a7d 2a7e 2a7f 2a80 2a81 2a82 2a83 2a84 2a85 2a86 2a87 2a88 2a89 2a8a 2a8b 2a8c 2a8d 2a8e 2a8f 2a90 2a91 2a92 2a93 2a94 2a95 2a96 2a97 2a98 2a99 2a9a 2a9b 2a9c 2a9d 2a9e 2a9f 2aa0 2aa1 2aa2 2aa3 2aa4 2aa5 2aa6 2aa7 2aa8 2aa9 2aaa 2aab 2aac 2aad 2aae 2aaf 2ab0 2ab1 2ab2 2ab3 2ab4 2ab5 2ab6 2ab7 2ab8 2ab9 2aba 2abb 2abc 2abd 2abe 2abf 2ac0 2ac1 2ac2 2ac3 2ac4 2ac5 2ac6 2ac7 2ac8 2ac9 2aca 2acb 2acc 2acd 2ace 2acf 2ad0 2ad1 2ad2 2ad3 2ad4 2ad5 2ad6 2ad7 2ad8 2ad9 2ada 2adb 2adc 2add 2ade 2adf 2ae0 2ae1 2ae2 2ae3 2ae4 2ae5 2ae6 2ae7 2ae8 2ae9 2aea 2aeb 2aec 2aed 2aee 2aef 2af0 2af1 2af2 2af3 2af4 2af5 2af6 2af7 2af8 2af9 2afa 2afb 2afc 2afd 2afe 2aff 2b00 2b01 2b02 2b03 2b04 2b05 2b06 2b07 2b08 2b09 2b0a 2b0b 2b0c 2b0d 2b0e 2b0f 2b10 2b11 2b12 2b13 2b14 2b15 2b16 2b17 2b18 2b19 2b1a 2b1b 2b1c 2b1d 2b1e 2b1f 2b20 2b21 2b22 2b23 2b24 2b25 2b26 2b27 2b28 2b29 2b2a 2b2b 2b2c 2b2d 2b2e 2b2f 2b30 2b31 2b32 2b33 2b34 2b35 2b36 2b37 2b38 2b39 2b3a 2b3b 2b3c 2b3d 2b3e 2b3f 2b40 2b41 2b42 2b43 2b44 2b45 2b46 2b47 2b48 2b49 2b4a 2b4b 2b4c 2b4d 2b4e 2b4f 2b50 2b51 2b52 2b53 2b54 2b55 2b56 2b57 2b58 2b59 2b5a 2b5b 2b5c 2b5d 2b5e 2b5f 2b60 2b61 2b62 2b63 2b64 2b65 2b66 2b67 2b68 2b69 2b6a 2b6b 2b6c 2b6d 2b6e 2b6f 2b70 2b71 2b72 2b73 2b76 2b77 2b78 2b79 2b7a 2b7b 2b7c 2b7d 2b7e 2b7f 2b80 2b81 2b82 2b83 2b84 2b85 2b86 2b87 2b88 2b89 2b8a 2b8b 2b8c 2b8d 2b8e 2b8f 2b90 2b91 2b92 2b93 2b94 2b95 2b98 2b99 2b9a 2b9b 2b9c 2b9d 2b9e 2b9f 2ba0 2ba1 2ba2 2ba3 2ba4 2ba5 2ba6 2ba7 2ba8 2ba9 2baa 2bab 2bac 2bad 2bae 2baf 2bb0 2bb1 2bb2 2bb3 2bb4 2bb5 2bb6 2bb7 2bb8 2bb9 2bba 2bbb 2bbc 2bbd 2bbe 2bbf 2bc0 2bc1 2bc2 2bc3 2bc4 2bc5 2bc6 2bc7 2bc8 2bca 2bcb 2bcc 2bcd 2bce 2bcf 2bd0 2bd1 2bd2 2bd3 2bd4 2bd5 2bd6 2bd7 2bd8 2bd9 2bda 2bdb 2bdc 2bdd 2bde 2bdf 2be0 2be1 2be2 2be3 2be4 2be5 2be6 2be7 2be8 2be9 2bea 2beb 2bec 2bed 2bee 2bef 2bf0 2bf1 2bf2 2bf3 2bf4 2bf5 2bf6 2bf7 2bf8 2bf9 2bfa 2bfb 2bfc 2bfd 2bfe 2ce5 2ce6 2ce7 2ce8 2ce9 2cea 2e80 2e81 2e82 2e83 2e84 2e85 2e86 2e87 2e88 2e89 2e8a 2e8b 2e8c 2e8d 2e8e 2e8f 2e90 2e91 2e92 2e93 2e94 2e95 2e96 2e97 2e98 2e99 2e9b 2e9c 2e9d 2e9e 2e9f 2ea0 2ea1 2ea2 2ea3 2ea4 2ea5 2ea6 2ea7 2ea8 2ea9 2eaa 2eab 2eac 2ead 2eae 2eaf 2eb0 2eb1 2eb2 2eb3 2eb4 2eb5 2eb6 2eb7 2eb8 2eb9 2eba 2ebb 2ebc 2ebd 2ebe 2ebf 2ec0 2ec1 2ec2 2ec3 2ec4 2ec5 2ec6 2ec7 2ec8 2ec9 2eca 2ecb 2ecc 2ecd 2ece 2ecf 2ed0 2ed1 2ed2 2ed3 2ed4 2ed5 2ed6 2ed7 2ed8 2ed9 2eda 2edb 2edc 2edd 2ede 2edf 2ee0 2ee1 2ee2 2ee3 2ee4 2ee5 2ee6 2ee7 2ee8 2ee9 2eea 2eeb 2eec 2eed 2eee 2eef 2ef0 2ef1 2ef2 2ef3 2f00 2f01 2f02 2f03 2f04 2f05 2f06 2f07 2f08 2f09 2f0a 2f0b 2f0c 2f0d 2f0e 2f0f 2f10 2f11 2f12 2f13 2f14 2f15 2f16 2f17 2f18 2f19 2f1a 2f1b 2f1c 2f1d 2f1e 2f1f 2f20 2f21 2f22 2f23 2f24 2f25 2f26 2f27 2f28 2f29 2f2a 2f2b 2f2c 2f2d 2f2e 2f2f 2f30 2f31 2f32 2f33 2f34 2f35 2f36 2f37 2f38 2f39 2f3a 2f3b 2f3c 2f3d 2f3e 2f3f 2f40 2f41 2f42 2f43 2f44 2f45 2f46 2f47 2f48 2f49 2f4a 2f4b 2f4c 2f4d 2f4e 2f4f 2f50 2f51 2f52 2f53 2f54 2f55 2f56 2f57 2f58 2f59 2f5a 2f5b 2f5c 2f5d 2f5e 2f5f 2f60 2f61 2f62 2f63 2f64 2f65 2f66 2f67 2f68 2f69 2f6a 2f6b 2f6c 2f6d 2f6e 2f6f 2f70 2f71 2f72 2f73 2f74 2f75 2f76 2f77 2f78 2f79 2f7a 2f7b 2f7c 2f7d 2f7e 2f7f 2f80 2f81 2f82 2f83 2f84 2f85 2f86 2f87 2f88 2f89 2f8a 2f8b 2f8c 2f8d 2f8e 2f8f 2f90 2f91 2f92 2f93 2f94 2f95 2f96 2f97 2f98 2f99 2f9a 2f9b 2f9c 2f9d 2f9e 2f9f 2fa0 2fa1 2fa2 2fa3 2fa4 2fa5 2fa6 2fa7 2fa8 2fa9 2faa 2fab 2fac 2fad 2fae 2faf 2fb0 2fb1 2fb2 2fb3 2fb4 2fb5 2fb6 2fb7 2fb8 2fb9 2fba 2fbb 2fbc 2fbd 2fbe 2fbf 2fc0 2fc1 2fc2 2fc3 2fc4 2fc5 2fc6 2fc7 2fc8 2fc9 2fca 2fcb 2fcc 2fcd 2fce 2fcf 2fd0 2fd1 2fd2 2fd3 2fd4 2fd5 2ff0 2ff1 2ff2 2ff3 2ff4 2ff5 2ff6 2ff7 2ff8 2ff9 2ffa 2ffb 3004 3012 3013 3020 3036 3037 303e 303f 309b 309c 3190 3191 3196 3197 3198 3199 319a 319b 319c 319d 319e 319f 31c0 31c1 31c2 31c3 31c4 31c5 31c6 31c7 31c8 31c9 31ca 31cb 31cc 31cd 31ce 31cf 31d0 31d1 31d2 31d3 31d4 31d5 31d6 31d7 31d8 31d9 31da 31db 31dc 31dd 31de 31df 31e0 31e1 31e2 31e3 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 320a 320b 320c 320d 320e 320f 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 321a 321b 321c 321d 321e 322a 322b 322c 322d 322e 322f 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 323a 323b 323c 323d 323e 323f 3240 3241 3242 3243 3244 3245 3246 3247 3250 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 326a 326b 326c 326d 326e 326f 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 327a 327b 327c 327d 327e 327f 328a 328b 328c 328d 328e 328f 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 329a 329b 329c 329d 329e 329f 32a0 32a1 32a2 32a3 32a4 32a5 32a6 32a7 32a8 32a9 32aa 32ab 32ac 32ad 32ae 32af 32b0 32c0 32c1 32c2 32c3 32c4 32c5 32c6 32c7 32c8 32c9 32ca 32cb 32cc 32cd 32ce 32cf 32d0 32d1 32d2 32d3 32d4 32d5 32d6 32d7 32d8 32d9 32da 32db 32dc 32dd 32de 32df 32e0 32e1 32e2 32e3 32e4 32e5 32e6 32e7 32e8 32e9 32ea 32eb 32ec 32ed 32ee 32ef 32f0 32f1 32f2 32f3 32f4 32f5 32f6 32f7 32f8 32f9 32fa 32fb 32fc 32fd 32fe 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 330a 330b 330c 330d 330e 330f 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 331a 331b 331c 331d 331e 331f 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 332a 332b 332c 332d 332e 332f 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 333a 333b 333c 333d 333e 333f 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 334a 334b 334c 334d 334e 334f 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 335a 335b 335c 335d 335e 335f 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 336a 336b 336c 336d 336e 336f 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 337a 337b 337c 337d 337e 337f 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 338a 338b 338c 338d 338e 338f 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 339a 339b 339c 339d 339e 339f 33a0 33a1 33a2 33a3 33a4 33a5 33a6 33a7 33a8 33a9 33aa 33ab 33ac 33ad 33ae 33af 33b0 33b1 33b2 33b3 33b4 33b5 33b6 33b7 33b8 33b9 33ba 33bb 33bc 33bd 33be 33bf 33c0 33c1 33c2 33c3 33c4 33c5 33c6 33c7 33c8 33c9 33ca 33cb 33cc 33cd 33ce 33cf 33d0 33d1 33d2 33d3 33d4 33d5 33d6 33d7 33d8 33d9 33da 33db 33dc 33dd 33de 33df 33e0 33e1 33e2 33e3 33e4 33e5 33e6 33e7 33e8 33e9 33ea 33eb 33ec 33ed 33ee 33ef 33f0 33f1 33f2 33f3 33f4 33f5 33f6 33f7 33f8 33f9 33fa 33fb 33fc 33fd 33fe 33ff 4dc0 4dc1 4dc2 4dc3 4dc4 4dc5 4dc6 4dc7 4dc8 4dc9 4dca 4dcb 4dcc 4dcd 4dce 4dcf 4dd0 4dd1 4dd2 4dd3 4dd4 4dd5 4dd6 4dd7 4dd8 4dd9 4dda 4ddb 4ddc 4ddd 4dde 4ddf 4de0 4de1 4de2 4de3 4de4 4de5 4de6 4de7 4de8 4de9 4dea 4deb 4dec 4ded 4dee 4def 4df0 4df1 4df2 4df3 4df4 4df5 4df6 4df7 4df8 4df9 4dfa 4dfb 4dfc 4dfd 4dfe 4dff a490 a491 a492 a493 a494 a495 a496 a497 a498 a499 a49a a49b a49c a49d a49e a49f a4a0 a4a1 a4a2 a4a3 a4a4 a4a5 a4a6 a4a7 a4a8 a4a9 a4aa a4ab a4ac a4ad a4ae a4af a4b0 a4b1 a4b2 a4b3 a4b4 a4b5 a4b6 a4b7 a4b8 a4b9 a4ba a4bb a4bc a4bd a4be a4bf a4c0 a4c1 a4c2 a4c3 a4c4 a4c5 a4c6 a700 a701 a702 a703 a704 a705 a706 a707 a708 a709 a70a a70b a70c a70d a70e a70f a710 a711 a712 a713 a714 a715 a716 a720 a721 a789 a78a a828 a829 a82a a82b a836 a837 a838 a839 aa77 aa78 aa79 ab5b fb29 fbb2 fbb3 fbb4 fbb5 fbb6 fbb7 fbb8 fbb9 fbba fbbb fbbc fbbd fbbe fbbf fbc0 fbc1 fdfc fdfd fe62 fe64 fe65 fe66 fe69 ff04 ff0b ff1c ff1d ff1e ff3e ff40 ff5c ff5e ffe0 ffe1 ffe2 ffe3 ffe4 ffe5 ffe6 ffe8 ffe9 ffea ffeb ffec ffed ffee fffc fffd found 3815 chars."; - string upperChars = "41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf d0 d1 d2 d3 d4 d5 d6 d8 d9 da db dc dd de 100 102 104 106 108 10a 10c 10e 110 112 114 116 118 11a 11c 11e 120 122 124 126 128 12a 12c 12e 130 132 134 136 139 13b 13d 13f 141 143 145 147 14a 14c 14e 150 152 154 156 158 15a 15c 15e 160 162 164 166 168 16a 16c 16e 170 172 174 176 178 179 17b 17d 181 182 184 186 187 189 18a 18b 18e 18f 190 191 193 194 196 197 198 19c 19d 19f 1a0 1a2 1a4 1a6 1a7 1a9 1ac 1ae 1af 1b1 1b2 1b3 1b5 1b7 1b8 1bc 1c4 1c7 1ca 1cd 1cf 1d1 1d3 1d5 1d7 1d9 1db 1de 1e0 1e2 1e4 1e6 1e8 1ea 1ec 1ee 1f1 1f4 1f6 1f7 1f8 1fa 1fc 1fe 200 202 204 206 208 20a 20c 20e 210 212 214 216 218 21a 21c 21e 220 222 224 226 228 22a 22c 22e 230 232 23a 23b 23d 23e 241 243 244 245 246 248 24a 24c 24e 370 372 376 386 388 389 38a 38c 38e 38f 391 392 393 394 395 396 397 398 399 39a 39b 39c 39d 39e 39f 3a0 3a1 3a3 3a4 3a5 3a6 3a7 3a8 3a9 3aa 3ab 3cf 3d2 3d3 3d4 3d8 3da 3dc 3de 3e0 3e2 3e4 3e6 3e8 3ea 3ec 3ee 3f4 3f7 3f9 3fa 3fd 3fe 3ff 400 401 402 403 404 405 406 407 408 409 40a 40b 40c 40d 40e 40f 410 411 412 413 414 415 416 417 418 419 41a 41b 41c 41d 41e 41f 420 421 422 423 424 425 426 427 428 429 42a 42b 42c 42d 42e 42f 460 462 464 466 468 46a 46c 46e 470 472 474 476 478 47a 47c 47e 480 48a 48c 48e 490 492 494 496 498 49a 49c 49e 4a0 4a2 4a4 4a6 4a8 4aa 4ac 4ae 4b0 4b2 4b4 4b6 4b8 4ba 4bc 4be 4c0 4c1 4c3 4c5 4c7 4c9 4cb 4cd 4d0 4d2 4d4 4d6 4d8 4da 4dc 4de 4e0 4e2 4e4 4e6 4e8 4ea 4ec 4ee 4f0 4f2 4f4 4f6 4f8 4fa 4fc 4fe 500 502 504 506 508 50a 50c 50e 510 512 514 516 518 51a 51c 51e 520 522 524 526 531 532 533 534 535 536 537 538 539 53a 53b 53c 53d 53e 53f 540 541 542 543 544 545 546 547 548 549 54a 54b 54c 54d 54e 54f 550 551 552 553 554 555 556 10a0 10a1 10a2 10a3 10a4 10a5 10a6 10a7 10a8 10a9 10aa 10ab 10ac 10ad 10ae 10af 10b0 10b1 10b2 10b3 10b4 10b5 10b6 10b7 10b8 10b9 10ba 10bb 10bc 10bd 10be 10bf 10c0 10c1 10c2 10c3 10c4 10c5 10c7 10cd 1e00 1e02 1e04 1e06 1e08 1e0a 1e0c 1e0e 1e10 1e12 1e14 1e16 1e18 1e1a 1e1c 1e1e 1e20 1e22 1e24 1e26 1e28 1e2a 1e2c 1e2e 1e30 1e32 1e34 1e36 1e38 1e3a 1e3c 1e3e 1e40 1e42 1e44 1e46 1e48 1e4a 1e4c 1e4e 1e50 1e52 1e54 1e56 1e58 1e5a 1e5c 1e5e 1e60 1e62 1e64 1e66 1e68 1e6a 1e6c 1e6e 1e70 1e72 1e74 1e76 1e78 1e7a 1e7c 1e7e 1e80 1e82 1e84 1e86 1e88 1e8a 1e8c 1e8e 1e90 1e92 1e94 1e9e 1ea0 1ea2 1ea4 1ea6 1ea8 1eaa 1eac 1eae 1eb0 1eb2 1eb4 1eb6 1eb8 1eba 1ebc 1ebe 1ec0 1ec2 1ec4 1ec6 1ec8 1eca 1ecc 1ece 1ed0 1ed2 1ed4 1ed6 1ed8 1eda 1edc 1ede 1ee0 1ee2 1ee4 1ee6 1ee8 1eea 1eec 1eee 1ef0 1ef2 1ef4 1ef6 1ef8 1efa 1efc 1efe 1f08 1f09 1f0a 1f0b 1f0c 1f0d 1f0e 1f0f 1f18 1f19 1f1a 1f1b 1f1c 1f1d 1f28 1f29 1f2a 1f2b 1f2c 1f2d 1f2e 1f2f 1f38 1f39 1f3a 1f3b 1f3c 1f3d 1f3e 1f3f 1f48 1f49 1f4a 1f4b 1f4c 1f4d 1f59 1f5b 1f5d 1f5f 1f68 1f69 1f6a 1f6b 1f6c 1f6d 1f6e 1f6f 1fb8 1fb9 1fba 1fbb 1fc8 1fc9 1fca 1fcb 1fd8 1fd9 1fda 1fdb 1fe8 1fe9 1fea 1feb 1fec 1ff8 1ff9 1ffa 1ffb 2102 2107 210b 210c 210d 2110 2111 2112 2115 2119 211a 211b 211c 211d 2124 2126 2128 212a 212b 212c 212d 2130 2131 2132 2133 213e 213f 2145 2183 2c00 2c01 2c02 2c03 2c04 2c05 2c06 2c07 2c08 2c09 2c0a 2c0b 2c0c 2c0d 2c0e 2c0f 2c10 2c11 2c12 2c13 2c14 2c15 2c16 2c17 2c18 2c19 2c1a 2c1b 2c1c 2c1d 2c1e 2c1f 2c20 2c21 2c22 2c23 2c24 2c25 2c26 2c27 2c28 2c29 2c2a 2c2b 2c2c 2c2d 2c2e 2c60 2c62 2c63 2c64 2c67 2c69 2c6b 2c6d 2c6e 2c6f 2c70 2c72 2c75 2c7e 2c7f 2c80 2c82 2c84 2c86 2c88 2c8a 2c8c 2c8e 2c90 2c92 2c94 2c96 2c98 2c9a 2c9c 2c9e 2ca0 2ca2 2ca4 2ca6 2ca8 2caa 2cac 2cae 2cb0 2cb2 2cb4 2cb6 2cb8 2cba 2cbc 2cbe 2cc0 2cc2 2cc4 2cc6 2cc8 2cca 2ccc 2cce 2cd0 2cd2 2cd4 2cd6 2cd8 2cda 2cdc 2cde 2ce0 2ce2 2ceb 2ced 2cf2 a640 a642 a644 a646 a648 a64a a64c a64e a650 a652 a654 a656 a658 a65a a65c a65e a660 a662 a664 a666 a668 a66a a66c a680 a682 a684 a686 a688 a68a a68c a68e a690 a692 a694 a696 a722 a724 a726 a728 a72a a72c a72e a732 a734 a736 a738 a73a a73c a73e a740 a742 a744 a746 a748 a74a a74c a74e a750 a752 a754 a756 a758 a75a a75c a75e a760 a762 a764 a766 a768 a76a a76c a76e a779 a77b a77d a77e a780 a782 a784 a786 a78b a78d a790 a792 a7a0 a7a2 a7a4 a7a6 a7a8 a7aa ff21 ff22 ff23 ff24 ff25 ff26 ff27 ff28 ff29 ff2a ff2b ff2c ff2d ff2e ff2f ff30 ff31 ff32 ff33 ff34 ff35 ff36 ff37 ff38 ff39 ff3a found 957 chars."; + string upperChars = "41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf d0 d1 d2 d3 d4 d5 d6 d8 d9 da db dc dd de 100 102 104 106 108 10a 10c 10e 110 112 114 116 118 11a 11c 11e 120 122 124 126 128 12a 12c 12e 130 132 134 136 139 13b 13d 13f 141 143 145 147 14a 14c 14e 150 152 154 156 158 15a 15c 15e 160 162 164 166 168 16a 16c 16e 170 172 174 176 178 179 17b 17d 181 182 184 186 187 189 18a 18b 18e 18f 190 191 193 194 196 197 198 19c 19d 19f 1a0 1a2 1a4 1a6 1a7 1a9 1ac 1ae 1af 1b1 1b2 1b3 1b5 1b7 1b8 1bc 1c4 1c7 1ca 1cd 1cf 1d1 1d3 1d5 1d7 1d9 1db 1de 1e0 1e2 1e4 1e6 1e8 1ea 1ec 1ee 1f1 1f4 1f6 1f7 1f8 1fa 1fc 1fe 200 202 204 206 208 20a 20c 20e 210 212 214 216 218 21a 21c 21e 220 222 224 226 228 22a 22c 22e 230 232 23a 23b 23d 23e 241 243 244 245 246 248 24a 24c 24e 370 372 376 37f 386 388 389 38a 38c 38e 38f 391 392 393 394 395 396 397 398 399 39a 39b 39c 39d 39e 39f 3a0 3a1 3a3 3a4 3a5 3a6 3a7 3a8 3a9 3aa 3ab 3cf 3d2 3d3 3d4 3d8 3da 3dc 3de 3e0 3e2 3e4 3e6 3e8 3ea 3ec 3ee 3f4 3f7 3f9 3fa 3fd 3fe 3ff 400 401 402 403 404 405 406 407 408 409 40a 40b 40c 40d 40e 40f 410 411 412 413 414 415 416 417 418 419 41a 41b 41c 41d 41e 41f 420 421 422 423 424 425 426 427 428 429 42a 42b 42c 42d 42e 42f 460 462 464 466 468 46a 46c 46e 470 472 474 476 478 47a 47c 47e 480 48a 48c 48e 490 492 494 496 498 49a 49c 49e 4a0 4a2 4a4 4a6 4a8 4aa 4ac 4ae 4b0 4b2 4b4 4b6 4b8 4ba 4bc 4be 4c0 4c1 4c3 4c5 4c7 4c9 4cb 4cd 4d0 4d2 4d4 4d6 4d8 4da 4dc 4de 4e0 4e2 4e4 4e6 4e8 4ea 4ec 4ee 4f0 4f2 4f4 4f6 4f8 4fa 4fc 4fe 500 502 504 506 508 50a 50c 50e 510 512 514 516 518 51a 51c 51e 520 522 524 526 528 52a 52c 52e 531 532 533 534 535 536 537 538 539 53a 53b 53c 53d 53e 53f 540 541 542 543 544 545 546 547 548 549 54a 54b 54c 54d 54e 54f 550 551 552 553 554 555 556 10a0 10a1 10a2 10a3 10a4 10a5 10a6 10a7 10a8 10a9 10aa 10ab 10ac 10ad 10ae 10af 10b0 10b1 10b2 10b3 10b4 10b5 10b6 10b7 10b8 10b9 10ba 10bb 10bc 10bd 10be 10bf 10c0 10c1 10c2 10c3 10c4 10c5 10c7 10cd 13a0 13a1 13a2 13a3 13a4 13a5 13a6 13a7 13a8 13a9 13aa 13ab 13ac 13ad 13ae 13af 13b0 13b1 13b2 13b3 13b4 13b5 13b6 13b7 13b8 13b9 13ba 13bb 13bc 13bd 13be 13bf 13c0 13c1 13c2 13c3 13c4 13c5 13c6 13c7 13c8 13c9 13ca 13cb 13cc 13cd 13ce 13cf 13d0 13d1 13d2 13d3 13d4 13d5 13d6 13d7 13d8 13d9 13da 13db 13dc 13dd 13de 13df 13e0 13e1 13e2 13e3 13e4 13e5 13e6 13e7 13e8 13e9 13ea 13eb 13ec 13ed 13ee 13ef 13f0 13f1 13f2 13f3 13f4 13f5 1c90 1c91 1c92 1c93 1c94 1c95 1c96 1c97 1c98 1c99 1c9a 1c9b 1c9c 1c9d 1c9e 1c9f 1ca0 1ca1 1ca2 1ca3 1ca4 1ca5 1ca6 1ca7 1ca8 1ca9 1caa 1cab 1cac 1cad 1cae 1caf 1cb0 1cb1 1cb2 1cb3 1cb4 1cb5 1cb6 1cb7 1cb8 1cb9 1cba 1cbd 1cbe 1cbf 1e00 1e02 1e04 1e06 1e08 1e0a 1e0c 1e0e 1e10 1e12 1e14 1e16 1e18 1e1a 1e1c 1e1e 1e20 1e22 1e24 1e26 1e28 1e2a 1e2c 1e2e 1e30 1e32 1e34 1e36 1e38 1e3a 1e3c 1e3e 1e40 1e42 1e44 1e46 1e48 1e4a 1e4c 1e4e 1e50 1e52 1e54 1e56 1e58 1e5a 1e5c 1e5e 1e60 1e62 1e64 1e66 1e68 1e6a 1e6c 1e6e 1e70 1e72 1e74 1e76 1e78 1e7a 1e7c 1e7e 1e80 1e82 1e84 1e86 1e88 1e8a 1e8c 1e8e 1e90 1e92 1e94 1e9e 1ea0 1ea2 1ea4 1ea6 1ea8 1eaa 1eac 1eae 1eb0 1eb2 1eb4 1eb6 1eb8 1eba 1ebc 1ebe 1ec0 1ec2 1ec4 1ec6 1ec8 1eca 1ecc 1ece 1ed0 1ed2 1ed4 1ed6 1ed8 1eda 1edc 1ede 1ee0 1ee2 1ee4 1ee6 1ee8 1eea 1eec 1eee 1ef0 1ef2 1ef4 1ef6 1ef8 1efa 1efc 1efe 1f08 1f09 1f0a 1f0b 1f0c 1f0d 1f0e 1f0f 1f18 1f19 1f1a 1f1b 1f1c 1f1d 1f28 1f29 1f2a 1f2b 1f2c 1f2d 1f2e 1f2f 1f38 1f39 1f3a 1f3b 1f3c 1f3d 1f3e 1f3f 1f48 1f49 1f4a 1f4b 1f4c 1f4d 1f59 1f5b 1f5d 1f5f 1f68 1f69 1f6a 1f6b 1f6c 1f6d 1f6e 1f6f 1fb8 1fb9 1fba 1fbb 1fc8 1fc9 1fca 1fcb 1fd8 1fd9 1fda 1fdb 1fe8 1fe9 1fea 1feb 1fec 1ff8 1ff9 1ffa 1ffb 2102 2107 210b 210c 210d 2110 2111 2112 2115 2119 211a 211b 211c 211d 2124 2126 2128 212a 212b 212c 212d 2130 2131 2132 2133 213e 213f 2145 2183 2c00 2c01 2c02 2c03 2c04 2c05 2c06 2c07 2c08 2c09 2c0a 2c0b 2c0c 2c0d 2c0e 2c0f 2c10 2c11 2c12 2c13 2c14 2c15 2c16 2c17 2c18 2c19 2c1a 2c1b 2c1c 2c1d 2c1e 2c1f 2c20 2c21 2c22 2c23 2c24 2c25 2c26 2c27 2c28 2c29 2c2a 2c2b 2c2c 2c2d 2c2e 2c60 2c62 2c63 2c64 2c67 2c69 2c6b 2c6d 2c6e 2c6f 2c70 2c72 2c75 2c7e 2c7f 2c80 2c82 2c84 2c86 2c88 2c8a 2c8c 2c8e 2c90 2c92 2c94 2c96 2c98 2c9a 2c9c 2c9e 2ca0 2ca2 2ca4 2ca6 2ca8 2caa 2cac 2cae 2cb0 2cb2 2cb4 2cb6 2cb8 2cba 2cbc 2cbe 2cc0 2cc2 2cc4 2cc6 2cc8 2cca 2ccc 2cce 2cd0 2cd2 2cd4 2cd6 2cd8 2cda 2cdc 2cde 2ce0 2ce2 2ceb 2ced 2cf2 a640 a642 a644 a646 a648 a64a a64c a64e a650 a652 a654 a656 a658 a65a a65c a65e a660 a662 a664 a666 a668 a66a a66c a680 a682 a684 a686 a688 a68a a68c a68e a690 a692 a694 a696 a698 a69a a722 a724 a726 a728 a72a a72c a72e a732 a734 a736 a738 a73a a73c a73e a740 a742 a744 a746 a748 a74a a74c a74e a750 a752 a754 a756 a758 a75a a75c a75e a760 a762 a764 a766 a768 a76a a76c a76e a779 a77b a77d a77e a780 a782 a784 a786 a78b a78d a790 a792 a796 a798 a79a a79c a79e a7a0 a7a2 a7a4 a7a6 a7a8 a7aa a7ab a7ac a7ad a7ae a7b0 a7b1 a7b2 a7b3 a7b4 a7b6 a7b8 ff21 ff22 ff23 ff24 ff25 ff26 ff27 ff28 ff29 ff2a ff2b ff2c ff2d ff2e ff2f ff30 ff31 ff32 ff33 ff34 ff35 ff36 ff37 ff38 ff39 ff3a found 1112 chars."; string whitespaceChars = "9 a b c d 20 85 a0 1680 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 200a 2028 2029 202f 205f 3000 found 25 chars."; diff --git a/mcs/class/corlib/corlib.dll.sources.REMOVED.git-id b/mcs/class/corlib/corlib.dll.sources.REMOVED.git-id index 4546cd1ac0..9646bc2305 100644 --- a/mcs/class/corlib/corlib.dll.sources.REMOVED.git-id +++ b/mcs/class/corlib/corlib.dll.sources.REMOVED.git-id @@ -1 +1 @@ -d8d8021a5ca1bc353a5abb4cc17334448231e895 \ No newline at end of file +85ce092a17302d8295982b34ada18ebd6ca4d14e \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/System.Collections.Concurrent.dll b/mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/System.Collections.Concurrent.dll similarity index 100% rename from mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/System.Collections.Concurrent.dll rename to mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/System.Collections.Concurrent.dll diff --git a/mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/System.Collections.dll b/mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/System.Collections.dll similarity index 100% rename from mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/System.Collections.dll rename to mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/System.Collections.dll diff --git a/mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/System.Diagnostics.Debug.dll b/mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/System.Diagnostics.Debug.dll similarity index 100% rename from mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/System.Diagnostics.Debug.dll rename to mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/System.Diagnostics.Debug.dll diff --git a/mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/System.Diagnostics.FileVersionInfo.dll b/mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/System.Diagnostics.FileVersionInfo.dll similarity index 100% rename from mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/System.Diagnostics.FileVersionInfo.dll rename to mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/System.Diagnostics.FileVersionInfo.dll diff --git a/mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/System.Diagnostics.Tools.dll b/mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/System.Diagnostics.Tools.dll similarity index 100% rename from mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/System.Diagnostics.Tools.dll rename to mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/System.Diagnostics.Tools.dll diff --git a/mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/System.Dynamic.Runtime.dll b/mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/System.Dynamic.Runtime.dll similarity index 100% rename from mcs/class/lib/monolite-linux/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/System.Dynamic.Runtime.dll rename to mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/System.Dynamic.Runtime.dll diff --git a/mcs/class/lib/monolite-win32/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/System.Globalization.dll b/mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/System.Globalization.dll similarity index 52% rename from mcs/class/lib/monolite-win32/97b07b51-46d8-4084-b48e-77aa5c192654/Facades/System.Globalization.dll rename to mcs/class/lib/monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789/Facades/System.Globalization.dll index 7907ae100d258f77e60e4cf234f2d399d84e178a..3c73904e9e32609de8bd7078fff75df4cae3ef2d 100644 GIT binary patch delta 391 zcmZqBXwaC@!Lo~G@`H&zGK^dkSB5k0n9Rti&N@e(fk9?+Ag9jcNJe!=fys@G^}26> zVj$oF#7qpV3;_xZ3}@IF7#Klnt!Ca-03R^|t?7#PwSA$G7aoMlL6Vq>sk z1d%EX0ZjZ1&69=I0T51>H>GV_=EC9RtG>AbkPE4lXIm z%u6o@DKB9KngFDgLxUMAfNTK}+db6N1xR;HUd!aHEC^&VFr+g=>|kR!%TUV1#$d$= zB2^fYnD`l{P8Mc%wvAz8WDsPC0g6fjNiGIWASu9L2qrDTq$8O01e1YaG7?NCGQ>=t z%skr=Y!QPA(1m;uCXfWV8N^cni(FuAU<5i6%G)s6nZ=q>YjQn{v8)>tvWyZ6Z~x}= zEVfJnp?R6f`6;O`i6x01sfj76leyRvI9)Q+GfTn}b4n+tv#Sg2lL-#5%kguZz&uy8 xmPbot^8$7WCLsxEsDqqf1Y#>pR1{-U(b)Wm^9$o zVj$oF#7qpV3;_xZ3}@IF7#Klnt!Ca-03R^|t?7#PwSA$G7aoMlL6Vq>sk z1d%EX0ZjZ1&69=I0T51>H>GV_=EC9RtG>AbkPE4lXIm z%u6o@DKB9KngFDgLxUMAfNTK}+db6N1xR;HUd!aHEC^&VFr+g=>|kR!%TUV1#$d$= zB2^fYnD`l{P8Mc%wvAz8WDsPC0g6fjNiGIWASu9L2qrDTq$8O01e1YaG7?NCGQ>=t z%skr=Y!QPA(1m;uCXfWV8N^cni(FuAU<5i6%G)s6nZ=q>YjQn{v8)>tvWyZ6Z~x}= zEVfJnp?R6f`6;O`i6x01sfj76leyRvI9)Q+GfTn}b4n+tv#Sg2lL-#5%kguZz&uy8 xmPbot^8$7WCLsxEsDqqf1Y#>pR1{-U(b)Wm^9$o zVj$oF#7qpV3;_xZ3}@IF7#Klnt!Ca-03R^|t?7#PwSA$G7aoMlL6Vq>sk z1d%EX0ZjZ1&69=I0T51>H>GV_=EC9RtG>AbkPE4lXIm z%u6o@DKB9KngFDgLxUMAfNTK}+db6N1xR;HUd!aHEC^&VFr+g=>|kR!%TUV1#$d$= zB2^fYnD`l{P8Mc%wvAz8WDsPC0g6fjNiGIWASu9L2qrDTq$8O01e1YaG7?NCGQ>=t z%skr=Y!QPA(1m;uCXfWV8N^cni(FuAU<5i6%G)s6nZ=q>YjQn{v8)>tvWyZ6Z~x}= zEVfJnp?R6f`6;O`i6x01sfj76leyRvI9)Q+GfTn}b4n+tv#Sg2lL-#5%kguZz&uy8 xmPbot^8$7WCLsxEsDqqf1Y#>pR1{-U(b)Wm^9$o zVj$oF#7qpV3;_xZ3}@IF7#Klnt!Ca-03R^|t?7#PwSA$G7aoMlL6Vq>sk z1d%EX0ZjZ1&69=I0T51>H>GV_=EC9RtG>AbkPE4lXIm z%u6o@DKB9KngFDgLxUMAfNTK}+db6N1xR;HUd!aHEC^&VFr+g=>|kR!%TUV1#$d$= zB2^fYnD`l{P8Mc%wvAz8WDsPC0g6fjNiGIWASu9L2qrDTq$8O01e1YaG7?NCGQ>=t z%skr=Y!QPA(1m;uCXfWV8N^cni(FuAU<5i6%G)s6nZ=q>YjQn{v8)>tvWyZ6Z~x}= zEVfJnp?R6f`6;O`i6x01sfj76leyRvI9)Q+GfTn}b4n+tv#Sg2lL-#5%kguZz&uy8 xmPbot^8$7WCLsxEsDqqf1Y#>pR1{-U(b)Wm^9$o -// Copyright © Microsoft Corporation. All Rights Reserved. +// +// Copyright © Microsoft Corporation. All Rights Reserved. // //------------------------------------------------------------- // @owner=alexgor, deliant @@ -161,7 +161,7 @@ namespace System.Web.UI.DataVisualization.Charting.ChartTypes virtual public bool ZeroCrossing { get{ return false;} } /// - /// True if palette colors should be applied for each data paoint. + /// True if palette colors should be applied for each data point. /// Otherwise the color is applied to the series. /// virtual public bool ApplyPaletteColorsToPoints { get { return false; } } @@ -351,7 +351,7 @@ namespace System.Web.UI.DataVisualization.Charting.ChartTypes double yValue1 = vAxis.GetLogValue( point.YValues[1] ); xValue = hAxis.GetLogValue(xValue); - // Check if chart is completly out of the data scaleView + // Check if chart is completely out of the data scaleView if(xValue < hAxis.ViewMinimum || xValue > hAxis.ViewMaximum || (yValue0 < vAxis.ViewMinimum && yValue1 < vAxis.ViewMinimum) || @@ -386,13 +386,13 @@ namespace System.Web.UI.DataVisualization.Charting.ChartTypes } low = vAxis.GetLinearPosition(low); - // Remeber pre-calculated point position + // Remember pre-calculated point position point.positionRel = new PointF((float)xPosition, (float)Math.Min(high, low)); if( common.ProcessModePaint ) { - // Check if chart is partialy in the data scaleView + // Check if chart is partially in the data scaleView bool clipRegionSet = false; if(xValue == hAxis.ViewMinimum || xValue == hAxis.ViewMaximum ) { @@ -613,7 +613,7 @@ namespace System.Web.UI.DataVisualization.Charting.ChartTypes double yValue1 = vAxis.GetLogValue( point.YValues[1] ); xValue = hAxis.GetLogValue(xValue); - // Check if chart is completly out of the data scaleView + // Check if chart is completely out of the data scaleView if(xValue < hAxis.ViewMinimum || xValue > hAxis.ViewMaximum || (yValue0 < vAxis.ViewMinimum && yValue1 < vAxis.ViewMinimum) || @@ -908,7 +908,7 @@ namespace System.Web.UI.DataVisualization.Charting.ChartTypes text = point.ReplaceKeywords(point.Label); } - // Adjust label positio to the marker size + // Adjust label position to the marker size SizeF markerSizes = new SizeF(0f, 0f); if (point.MarkerStyle != MarkerStyle.None) { @@ -1131,7 +1131,7 @@ namespace System.Web.UI.DataVisualization.Charting.ChartTypes double yValue1 = vAxis.GetLogValue( point.YValues[1] ); xValue = hAxis.GetLogValue(xValue); - // Check if chart is completly out of the data scaleView + // Check if chart is completely out of the data scaleView if(xValue < hAxis.ViewMinimum || xValue > hAxis.ViewMaximum || (yValue0 < vAxis.ViewMinimum && yValue1 < vAxis.ViewMinimum) || @@ -1165,7 +1165,7 @@ namespace System.Web.UI.DataVisualization.Charting.ChartTypes } low = vAxis.GetLinearPosition(low); - // Remeber pre-calculated point position + // Remember pre-calculated point position point.positionRel = new PointF((float)xPosition, (float)Math.Min(high, low)); // 3D Transform coordinates @@ -1180,7 +1180,7 @@ namespace System.Web.UI.DataVisualization.Charting.ChartTypes if( common.ProcessModePaint ) { - // Check if chart is partialy in the data scaleView + // Check if chart is partially in the data scaleView bool clipRegionSet = false; if(xValue == hAxis.ViewMinimum || xValue == hAxis.ViewMaximum ) { @@ -1402,7 +1402,7 @@ namespace System.Web.UI.DataVisualization.Charting.ChartTypes double yValue1 = vAxis.GetLogValue( point.YValues[1] ); xValue = hAxis.GetLogValue(xValue); - // Check if chart is completly out of the data scaleView + // Check if chart is completely out of the data scaleView if(xValue < hAxis.ViewMinimum || xValue > hAxis.ViewMaximum || (yValue0 < vAxis.ViewMinimum && yValue1 < vAxis.ViewMinimum) || @@ -1521,7 +1521,7 @@ namespace System.Web.UI.DataVisualization.Charting.ChartTypes /// /// Chart common elements. /// Chart area the series belongs to. - /// Sereis of the point. + /// Series of the point. /// Point object. /// Index of the point. /// Index of the Y value to get. @@ -1589,7 +1589,7 @@ namespace System.Web.UI.DataVisualization.Charting.ChartTypes Chart control = boxPlotSeries.Chart; if(control != null) { - // Get linked series and check existance + // Get linked series and check existence if(control.Series.IndexOf(linkedSeriesName) == -1) { throw(new InvalidOperationException(SR.ExceptionCustomAttributeSeriesNameNotFound("BoxPlotSeries", linkedSeriesName) )); @@ -1692,7 +1692,7 @@ namespace System.Web.UI.DataVisualization.Charting.ChartTypes requiredPercentile[1] = 100.0 - requiredPercentile[0]; } - // Calculate 5 recured percentile values + // Calculate 5 recurred percentile values double[] percentileValues = CalculatePercentileValues(yValues, requiredPercentile); // Set data points values @@ -1753,7 +1753,7 @@ namespace System.Web.UI.DataVisualization.Charting.ChartTypes // Update point's values if(unusualValuesList.Count > 0) { - // Create new arry of values for the data pont + // Create new array of values for the data pont double[] newYValues = new double[6 + unusualValuesList.Count]; // Copy original data diff --git a/mcs/class/referencesource/System.Web.DataVisualization/Common/ChartTypes/ErrorBarChart.cs b/mcs/class/referencesource/System.Web.DataVisualization/Common/ChartTypes/ErrorBarChart.cs index 77f6d6ebce..4494199f42 100644 --- a/mcs/class/referencesource/System.Web.DataVisualization/Common/ChartTypes/ErrorBarChart.cs +++ b/mcs/class/referencesource/System.Web.DataVisualization/Common/ChartTypes/ErrorBarChart.cs @@ -1,6 +1,6 @@ //------------------------------------------------------------- -// -// Copyright © Microsoft Corporation. All Rights Reserved. +// +// Copyright © Microsoft Corporation. All Rights Reserved. // //------------------------------------------------------------- // @owner=alexgor, deliant @@ -209,7 +209,7 @@ using System.Collections.Generic; virtual public bool ZeroCrossing { get{ return false;} } /// - /// True if palette colors should be applied for each data paoint. + /// True if palette colors should be applied for each data point. /// Otherwise the color is applied to the series. /// virtual public bool ApplyPaletteColorsToPoints { get { return false; } } @@ -479,7 +479,7 @@ using System.Collections.Generic; double yValue1 = vAxis.GetLogValue( point.YValues[2] ); xValue = hAxis.GetLogValue(xValue); - // Check if chart is completly out of the data scaleView + // Check if chart is completely out of the data scaleView if(xValue < hAxis.ViewMinimum || xValue > hAxis.ViewMaximum || (yValue0 < vAxis.ViewMinimum && yValue1 < vAxis.ViewMinimum) || @@ -546,13 +546,13 @@ using System.Collections.Generic; } low = vAxis.GetLinearPosition(low); - // Remeber pre-calculated point position + // Remember pre-calculated point position point.positionRel = new PointF((float)xPosition, (float)Math.Min(high, low)); if( common.ProcessModePaint ) { - // Check if chart is partialy in the data scaleView + // Check if chart is partially in the data scaleView bool clipRegionSet = false; if(xValue == hAxis.ViewMinimum || xValue == hAxis.ViewMaximum ) { @@ -631,7 +631,7 @@ using System.Collections.Generic; double yValue1 = vAxis.GetLogValue( point.YValues[2] ); xValue = hAxis.GetLogValue(xValue); - // Check if chart is completly out of the data scaleView + // Check if chart is completely out of the data scaleView if(xValue < hAxis.ViewMinimum || xValue > hAxis.ViewMaximum || (yValue0 < vAxis.ViewMinimum && yValue1 < vAxis.ViewMinimum) || @@ -965,7 +965,7 @@ using System.Collections.Generic; text = point.ReplaceKeywords(point.Label); } - // Adjust label positio to the marker size + // Adjust label position to the marker size SizeF markerSizes = new SizeF(0f, 0f); if (point.MarkerStyle != MarkerStyle.None) { @@ -1232,7 +1232,7 @@ using System.Collections.Generic; double yValue1 = vAxis.GetLogValue( point.YValues[2] ); xValue = hAxis.GetLogValue(xValue); - // Check if chart is completly out of the data scaleView + // Check if chart is completely out of the data scaleView if(xValue < hAxis.ViewMinimum || xValue > hAxis.ViewMaximum || (yValue0 < vAxis.ViewMinimum && yValue1 < vAxis.ViewMinimum) || @@ -1297,7 +1297,7 @@ using System.Collections.Generic; } low = vAxis.GetLinearPosition(low); - // Remeber pre-calculated point position + // Remember pre-calculated point position point.positionRel = new PointF((float)xPosition, (float)Math.Min(high, low)); // 3D Transform coordinates @@ -1309,7 +1309,7 @@ using System.Collections.Generic; if( common.ProcessModePaint ) { - // Check if chart is partialy in the data scaleView + // Check if chart is partially in the data scaleView bool clipRegionSet = false; if(xValue == hAxis.ViewMinimum || xValue == hAxis.ViewMaximum ) { @@ -1401,7 +1401,7 @@ using System.Collections.Generic; double yValue1 = vAxis.GetLogValue( point.YValues[2] ); xValue = hAxis.GetLogValue(xValue); - // Check if chart is completly out of the data scaleView + // Check if chart is completely out of the data scaleView if(xValue < hAxis.ViewMinimum || xValue > hAxis.ViewMaximum || (yValue0 < vAxis.ViewMinimum && yValue1 < vAxis.ViewMinimum) || @@ -1576,7 +1576,7 @@ using System.Collections.Generic; /// /// Chart common elements. /// Chart area the series belongs to. - /// Sereis of the point. + /// Series of the point. /// Point object. /// Index of the point. /// Index of the Y value to get. @@ -1615,7 +1615,7 @@ using System.Collections.Generic; return; } - // Parase the value of the ErrorBarType attribute. + // Parse the value of the ErrorBarType attribute. double param = double.NaN; ErrorBarType errorBarType = ErrorBarType.StandardError; if(errorBarSeries.IsCustomPropertySet(CustomPropertyName.ErrorBarType)) @@ -1681,7 +1681,7 @@ using System.Collections.Generic; } } - // Number of poist without empty points + // Number of point without empty points pointNumber -= numberOfEmptyPoints; if (double.IsNaN(param)) @@ -1823,7 +1823,7 @@ using System.Collections.Generic; Chart control = errorBarSeries.Chart; if(control != null) { - // Get linked series and check existance + // Get linked series and check existence if(control.Series.IndexOf(linkedSeriesName) == -1) { throw (new InvalidOperationException(SR.ExceptionDataSeriesNameNotFound(linkedSeriesName))); @@ -1834,7 +1834,7 @@ using System.Collections.Generic; errorBarSeries.XAxisType = linkedSeries.XAxisType; errorBarSeries.YAxisType = linkedSeries.YAxisType; - // Get cennter values from the linked series + // Get center values from the linked series errorBarSeries.Points.Clear(); foreach(DataPoint point in linkedSeries.Points) { diff --git a/mcs/class/referencesource/System/net/System/Net/NetworkInformation/NetworkInterface.cs b/mcs/class/referencesource/System/net/System/Net/NetworkInformation/NetworkInterface.cs index c6dd34f86d..c2d6c8c0ad 100644 --- a/mcs/class/referencesource/System/net/System/Net/NetworkInformation/NetworkInterface.cs +++ b/mcs/class/referencesource/System/net/System/Net/NetworkInformation/NetworkInterface.cs @@ -8,19 +8,31 @@ namespace System.Net.NetworkInformation { /// Returns objects that describe the network interfaces on the local computer. public static NetworkInterface[] GetAllNetworkInterfaces(){ +#if WASM + throw new PlatformNotSupportedException (); +#else #if MONO_FEATURE_CAS (new NetworkInformationPermission(NetworkInformationAccess.Read)).Demand(); #endif return SystemNetworkInterface.GetNetworkInterfaces(); +#endif } public static bool GetIsNetworkAvailable(){ +#if WASM + throw new PlatformNotSupportedException (); +#else return SystemNetworkInterface.InternalGetIsNetworkAvailable(); +#endif } public static int LoopbackInterfaceIndex{ get{ +#if WASM + throw new PlatformNotSupportedException (); +#else return SystemNetworkInterface.InternalLoopbackInterfaceIndex; +#endif } } diff --git a/mcs/class/referencesource/System/net/System/Net/SocketException.cs b/mcs/class/referencesource/System/net/System/Net/SocketException.cs index abf4ad53e4..677147403c 100644 --- a/mcs/class/referencesource/System/net/System/Net/SocketException.cs +++ b/mcs/class/referencesource/System/net/System/Net/SocketException.cs @@ -23,9 +23,9 @@ namespace System.Net.Sockets { #if MONO [System.Runtime.CompilerServices.MethodImplAttribute (System.Runtime.CompilerServices.MethodImplOptions.InternalCall)] - static extern int WSAGetLastError_internal (); + static extern int WSAGetLastError_icall (); - public SocketException () : base (WSAGetLastError_internal ()) + public SocketException () : base (WSAGetLastError_icall ()) { } diff --git a/mcs/class/referencesource/System/net/System/Net/Sockets/Socket.cs.REMOVED.git-id b/mcs/class/referencesource/System/net/System/Net/Sockets/Socket.cs.REMOVED.git-id index be183c0d0b..931f95d822 100644 --- a/mcs/class/referencesource/System/net/System/Net/Sockets/Socket.cs.REMOVED.git-id +++ b/mcs/class/referencesource/System/net/System/Net/Sockets/Socket.cs.REMOVED.git-id @@ -1 +1 @@ -be9e666ae292ad56ce00e255ef9b47967f79d9f1 \ No newline at end of file +e7e7b13def5ec90335235c5a8676767c5f744e0b \ No newline at end of file diff --git a/mcs/class/referencesource/System/net/System/Net/WebRequestMethods.cs b/mcs/class/referencesource/System/net/System/Net/WebRequestMethods.cs index 7ffedbd56e..505b6f76e2 100644 --- a/mcs/class/referencesource/System/net/System/Net/WebRequestMethods.cs +++ b/mcs/class/referencesource/System/net/System/Net/WebRequestMethods.cs @@ -7,7 +7,7 @@ namespace System.Net { public const string UploadFile = "STOR"; // uploads a file public const string DeleteFile = "DELE"; // deletes a file public const string AppendFile = "APPE"; // append a file - public const string GetFileSize = "SIZE"; // determines if a file is in existance + public const string GetFileSize = "SIZE"; // determines if a file is in existence public const string UploadFileWithUniqueName = "STOU"; public const string MakeDirectory = "MKD"; public const string RemoveDirectory = "RMD"; diff --git a/mcs/class/referencesource/mscorlib/system/globalization/charunicodeinfo.cs b/mcs/class/referencesource/mscorlib/system/globalization/charunicodeinfo.cs index 59fb10a152..a5e237868d 100644 --- a/mcs/class/referencesource/mscorlib/system/globalization/charunicodeinfo.cs +++ b/mcs/class/referencesource/mscorlib/system/globalization/charunicodeinfo.cs @@ -1,3 +1,4 @@ +#if __MonoCS__ // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. @@ -596,3 +597,4 @@ namespace System.Globalization { } } } +#endif \ No newline at end of file diff --git a/mcs/class/referencesource/mscorlib/system/globalization/numberformatinfo.cs b/mcs/class/referencesource/mscorlib/system/globalization/numberformatinfo.cs index 9ee2657cc8..528814f5b0 100644 --- a/mcs/class/referencesource/mscorlib/system/globalization/numberformatinfo.cs +++ b/mcs/class/referencesource/mscorlib/system/globalization/numberformatinfo.cs @@ -241,6 +241,13 @@ namespace System.Globalization { [System.Security.SecuritySafeCritical] // auto-generated internal NumberFormatInfo(CultureData cultureData) { +#if MONO + if (GlobalizationMode.Invariant) { + this.m_isInvariant = true; + return; + } +#endif + if (cultureData != null) { // We directly use fields here since these data is coming from data table or Win32, so we diff --git a/mcs/errors/cs1013-3.cs b/mcs/errors/cs1013-3.cs new file mode 100644 index 0000000000..3145b1ba59 --- /dev/null +++ b/mcs/errors/cs1013-3.cs @@ -0,0 +1,7 @@ +// CS1013: Invalid number +// Line : 6 + +class X +{ + static int i = 1_; +} \ No newline at end of file diff --git a/mcs/errors/cs1013-4.cs b/mcs/errors/cs1013-4.cs new file mode 100644 index 0000000000..3a5e744ff4 --- /dev/null +++ b/mcs/errors/cs1013-4.cs @@ -0,0 +1,7 @@ +// CS1013: Invalid number +// Line : 6 + +class X +{ + static double i = 1_.2; +} \ No newline at end of file diff --git a/mcs/errors/cs1013-5.cs b/mcs/errors/cs1013-5.cs new file mode 100644 index 0000000000..8082743c0b --- /dev/null +++ b/mcs/errors/cs1013-5.cs @@ -0,0 +1,7 @@ +// CS1013: Invalid number +// Line : 6 + +class X +{ + static int i = 1_e1; +} \ No newline at end of file diff --git a/mcs/errors/cs1013-6.cs b/mcs/errors/cs1013-6.cs new file mode 100644 index 0000000000..d2cea2c72d --- /dev/null +++ b/mcs/errors/cs1013-6.cs @@ -0,0 +1,7 @@ +// CS1013: Invalid number +// Line : 6 + +class X +{ + static float i = 1_f; +} \ No newline at end of file diff --git a/mcs/errors/cs1013-7.cs b/mcs/errors/cs1013-7.cs new file mode 100644 index 0000000000..8030d6ed09 --- /dev/null +++ b/mcs/errors/cs1013-7.cs @@ -0,0 +1,7 @@ +// CS1013: Invalid number +// Line : 6 + +class X +{ + static int i = 0x_1; +} \ No newline at end of file diff --git a/mcs/errors/cs1013-8.cs b/mcs/errors/cs1013-8.cs new file mode 100644 index 0000000000..d26c7acacb --- /dev/null +++ b/mcs/errors/cs1013-8.cs @@ -0,0 +1,7 @@ +// CS1013: Invalid number +// Line : 6 + +class X +{ + static int i = 0b_1; +} \ No newline at end of file diff --git a/mcs/mcs/cs-tokenizer.cs.REMOVED.git-id b/mcs/mcs/cs-tokenizer.cs.REMOVED.git-id index 2ea6caec35..a690f7420e 100644 --- a/mcs/mcs/cs-tokenizer.cs.REMOVED.git-id +++ b/mcs/mcs/cs-tokenizer.cs.REMOVED.git-id @@ -1 +1 @@ -a746fd067a0c412f9d3e0f61b1ae4d71968cd1e0 \ No newline at end of file +db5ba1f1f1bc102c7a60c480359f049f18a78ce8 \ No newline at end of file diff --git a/mcs/tests/test-950.cs b/mcs/tests/test-950.cs index 6ac11babea..fef764c85c 100644 --- a/mcs/tests/test-950.cs +++ b/mcs/tests/test-950.cs @@ -6,7 +6,7 @@ public class B { int a = 1_0_3; double b = 0__0e+1_1; - int c = 0b__1_0; - int d = 0x__F_0; + int c = 0b0__1_0; + int d = 0x0__F_0; } } \ No newline at end of file diff --git a/mcs/tests/ver-il-net_4_x.xml.REMOVED.git-id b/mcs/tests/ver-il-net_4_x.xml.REMOVED.git-id index bcb4765286..d05ccbede5 100644 --- a/mcs/tests/ver-il-net_4_x.xml.REMOVED.git-id +++ b/mcs/tests/ver-il-net_4_x.xml.REMOVED.git-id @@ -1 +1 @@ -60cfdfef724a63bab7c1ef051e3ac74af6df9d32 \ No newline at end of file +bd756ae94803fdf9ccce2919af36b20747675a4a \ No newline at end of file diff --git a/mcs/tools/aprofutil/Program.cs b/mcs/tools/aprofutil/Program.cs index 43d0b987e3..f6fb58b1aa 100644 --- a/mcs/tools/aprofutil/Program.cs +++ b/mcs/tools/aprofutil/Program.cs @@ -11,7 +11,7 @@ using static System.Console; namespace aotprofiletool { class MainClass { - static readonly string Name = "aotprofile-tool"; + static readonly string Name = "aprofutil"; static bool AdbForward; static bool Methods; diff --git a/mcs/tools/linker/Makefile b/mcs/tools/linker/Makefile index d46432a549..70539f621c 100644 --- a/mcs/tools/linker/Makefile +++ b/mcs/tools/linker/Makefile @@ -110,7 +110,8 @@ BINARY_TEST_CASES = \ endif ifeq ($(PROFILE),wasm) -LINKER_PROFILE_OPTIONS += --exclude-feature remoting --exclude-feature com --exclude-feature etw -d ../../../external/binary-reference-assemblies/build/monowasm +LINKER_PROFILE_OPTIONS += --exclude-feature remoting --exclude-feature com --exclude-feature etw -d $(topdir)/../external/binary-reference-assemblies/build/monowasm \ +--substitutions $(topdir)/../sdks/wasm/src/linker-subs.xml BINARY_TEST_CASES_ROOT:=../../../external/illinker-test-assets/wasm/ @@ -123,7 +124,7 @@ endif LINKER_OUTPUT := illink-output-$(PROFILE_DIRECTORY) PROFILE_PATH = $(topdir)/class/lib/$(PROFILE_DIRECTORY) -LINKER = MONO_PATH=$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE) $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/monolinker.exe -c link -out $(LINKER_OUTPUT) -b true -d $(PROFILE_PATH) +LINKER = MONO_PATH=$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE) $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/monolinker.exe -c link -o $(LINKER_OUTPUT) -b true -d $(PROFILE_PATH) LINKER_DEFAULT = $(LINKER) -l none $(LINKER_PROFILE_OPTIONS) TEST_EXEC = MONO_PATH=$(LINKER_OUTPUT) $(RUNTIME) $(RUNTIME_FLAGS) --debug -O=-aot diff --git a/mcs/tools/linker/monolinker.exe.sources b/mcs/tools/linker/monolinker.exe.sources index 0eb2620556..d3880d6d96 100644 --- a/mcs/tools/linker/monolinker.exe.sources +++ b/mcs/tools/linker/monolinker.exe.sources @@ -8,12 +8,15 @@ ../../../external/linker/src/linker/Linker/ConsoleLogger.cs ../../../external/linker/src/linker/Linker/DirectoryAssemblyResolver.cs ../../../external/linker/src/linker/Linker/Driver.cs +../../../external/linker/src/linker/Linker/IDependencyRecorder.cs ../../../external/linker/src/linker/Linker/I18nAssemblies.cs ../../../external/linker/src/linker/Linker/ILogger.cs +../../../external/linker/src/linker/Linker/IReflectionPatternRecorder.cs ../../../external/linker/src/linker/Linker/IXApiVisitor.cs ../../../external/linker/src/linker/Linker/KnownMembers.cs ../../../external/linker/src/linker/Linker/LinkContext.cs ../../../external/linker/src/linker/Linker/LoadException.cs +../../../external/linker/src/linker/Linker/LoggingReflectionPatternRecorder.cs ../../../external/linker/src/linker/Linker/MarkException.cs ../../../external/linker/src/linker/Linker/MarkingHelpers.cs ../../../external/linker/src/linker/Linker/MethodAction.cs @@ -29,6 +32,7 @@ ../../../external/linker/src/linker/Linker/TypePreserve.cs ../../../external/linker/src/linker/Linker/TypeReferenceExtensions.cs ../../../external/linker/src/linker/Linker/XApiReader.cs +../../../external/linker/src/linker/Linker/XmlDependencyRecorder.cs ../../../external/linker/src/linker/Linker.Steps/BaseStep.cs ../../../external/linker/src/linker/Linker.Steps/ClearInitLocals.cs ../../../external/linker/src/linker/Linker.Steps/LoadReferencesStep.cs @@ -52,4 +56,6 @@ ../../../external/linker/src/linker/Linker.Steps/CodeRewriterStep.cs ../../../external/linker/src/linker/Linker.Steps/RemoveFeaturesStep.cs ../../../external/linker/src/linker/Linker.Steps/ReflectionBlockedStep.cs +../../../external/linker/src/linker/Linker.Steps/BodySubstituterStep.cs +../../../external/linker/src/linker/Linker.Steps/RemoveUnreachableBlocksStep.cs diff --git a/mk/Makefile.am b/mk/Makefile.am deleted file mode 100644 index bae42f25b5..0000000000 --- a/mk/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST=common.mk diff --git a/mk/common.mk b/mk/common.mk deleted file mode 100644 index 763e180ddc..0000000000 --- a/mk/common.mk +++ /dev/null @@ -1,2 +0,0 @@ - -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules diff --git a/mono/Makefile.am b/mono/Makefile.am index e2f372654b..226b8cab86 100644 --- a/mono/Makefile.am +++ b/mono/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules if SUPPORT_SGEN sgen_dirs = sgen diff --git a/mono/Makefile.in b/mono/Makefile.in index 75fe51c684..4c73e3a60d 100644 --- a/mono/Makefile.in +++ b/mono/Makefile.in @@ -164,8 +164,7 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -485,7 +484,7 @@ DIST_SUBDIRS = btls native eglib arch utils cil zlib $(sgen_dirs) metadata mini all: all-recursive .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -505,7 +504,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/arch/Makefile.am b/mono/arch/Makefile.am index 61f5522ee1..8d4b288371 100644 --- a/mono/arch/Makefile.am +++ b/mono/arch/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules DIST_SUBDIRS = x86 ppc sparc arm arm64 s390x amd64 mips riscv diff --git a/mono/arch/Makefile.in b/mono/arch/Makefile.in index 4c6d5562fa..053d04bfd4 100644 --- a/mono/arch/Makefile.in +++ b/mono/arch/Makefile.in @@ -164,8 +164,7 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -482,7 +481,7 @@ AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) all: all-recursive .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -502,7 +501,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/arch/amd64/Makefile.am b/mono/arch/amd64/Makefile.am index 15142b9ec0..e59611801c 100644 --- a/mono/arch/amd64/Makefile.am +++ b/mono/arch/amd64/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules EXTRA_DIST = amd64-codegen.h diff --git a/mono/arch/amd64/Makefile.in b/mono/arch/amd64/Makefile.in index 2afecbc3e9..47951a31da 100644 --- a/mono/arch/amd64/Makefile.in +++ b/mono/arch/amd64/Makefile.in @@ -130,8 +130,7 @@ am__can_run_installinfo = \ esac am__extra_recursive_targets = test-recursive test-bundle-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -418,7 +417,7 @@ EXTRA_DIST = amd64-codegen.h all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -438,7 +437,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/arch/arm/Makefile.am b/mono/arch/arm/Makefile.am index dbe3ca99cd..d5c244cacb 100644 --- a/mono/arch/arm/Makefile.am +++ b/mono/arch/arm/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) diff --git a/mono/arch/arm/Makefile.in b/mono/arch/arm/Makefile.in index 8291f8cbe3..7b6bb563f3 100644 --- a/mono/arch/arm/Makefile.in +++ b/mono/arch/arm/Makefile.in @@ -130,8 +130,7 @@ am__can_run_installinfo = \ esac am__extra_recursive_targets = test-recursive test-bundle-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -422,7 +421,7 @@ EXTRA_DIST = arm-codegen.h dpiops.sh mov_macros.th dpi_macros.th cmp_macros.th \ all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -442,7 +441,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/arch/arm64/Makefile.am b/mono/arch/arm64/Makefile.am index c7cb40bc2f..bdc37622a6 100644 --- a/mono/arch/arm64/Makefile.am +++ b/mono/arch/arm64/Makefile.am @@ -1,3 +1,3 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules EXTRA_DIST = arm64-codegen.h codegen-test.c diff --git a/mono/arch/arm64/Makefile.in b/mono/arch/arm64/Makefile.in index 8718fe7ff6..09624c78b0 100644 --- a/mono/arch/arm64/Makefile.in +++ b/mono/arch/arm64/Makefile.in @@ -130,8 +130,7 @@ am__can_run_installinfo = \ esac am__extra_recursive_targets = test-recursive test-bundle-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -418,7 +417,7 @@ EXTRA_DIST = arm64-codegen.h codegen-test.c all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -438,7 +437,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/arch/mips/Makefile.am b/mono/arch/mips/Makefile.am index 1c027cfb23..6c217265f1 100644 --- a/mono/arch/mips/Makefile.am +++ b/mono/arch/mips/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) diff --git a/mono/arch/mips/Makefile.in b/mono/arch/mips/Makefile.in index 32c41bd1f4..9873748deb 100644 --- a/mono/arch/mips/Makefile.in +++ b/mono/arch/mips/Makefile.in @@ -172,8 +172,7 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -462,7 +461,7 @@ libmonoarch_mips_la_SOURCES = mips-codegen.h all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -482,7 +481,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/arch/ppc/Makefile.am b/mono/arch/ppc/Makefile.am index a03162eee0..ddd90f9a21 100644 --- a/mono/arch/ppc/Makefile.am +++ b/mono/arch/ppc/Makefile.am @@ -1,3 +1,3 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules EXTRA_DIST = ppc-codegen.h \ No newline at end of file diff --git a/mono/arch/ppc/Makefile.in b/mono/arch/ppc/Makefile.in index cb33cc93ae..0533cd8c89 100644 --- a/mono/arch/ppc/Makefile.in +++ b/mono/arch/ppc/Makefile.in @@ -130,8 +130,7 @@ am__can_run_installinfo = \ esac am__extra_recursive_targets = test-recursive test-bundle-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -418,7 +417,7 @@ EXTRA_DIST = ppc-codegen.h all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -438,7 +437,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/arch/s390x/Makefile.am b/mono/arch/s390x/Makefile.am index 0c0efafd2d..b28f582fcc 100644 --- a/mono/arch/s390x/Makefile.am +++ b/mono/arch/s390x/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) diff --git a/mono/arch/s390x/Makefile.in b/mono/arch/s390x/Makefile.in index ae3c565c68..076780bb5b 100644 --- a/mono/arch/s390x/Makefile.in +++ b/mono/arch/s390x/Makefile.in @@ -176,7 +176,7 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ - $(top_srcdir)/mk/common.mk $(top_srcdir)/mkinstalldirs + $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -466,7 +466,7 @@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -486,7 +486,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/arch/sparc/Makefile.am b/mono/arch/sparc/Makefile.am index 910c8c86b4..38b962b878 100644 --- a/mono/arch/sparc/Makefile.am +++ b/mono/arch/sparc/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules EXTRA_DIST = sparc-codegen.h diff --git a/mono/arch/sparc/Makefile.in b/mono/arch/sparc/Makefile.in index e13090ede1..19f7332808 100644 --- a/mono/arch/sparc/Makefile.in +++ b/mono/arch/sparc/Makefile.in @@ -130,8 +130,7 @@ am__can_run_installinfo = \ esac am__extra_recursive_targets = test-recursive test-bundle-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -418,7 +417,7 @@ EXTRA_DIST = sparc-codegen.h all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -438,7 +437,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/arch/x86/Makefile.am b/mono/arch/x86/Makefile.am index 2ce9621ea9..f7bf4484b8 100644 --- a/mono/arch/x86/Makefile.am +++ b/mono/arch/x86/Makefile.am @@ -1,3 +1,3 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules EXTRA_DIST = x86-codegen.h \ No newline at end of file diff --git a/mono/arch/x86/Makefile.in b/mono/arch/x86/Makefile.in index 5440deb0af..51c779ff2d 100644 --- a/mono/arch/x86/Makefile.in +++ b/mono/arch/x86/Makefile.in @@ -130,8 +130,7 @@ am__can_run_installinfo = \ esac am__extra_recursive_targets = test-recursive test-bundle-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -418,7 +417,7 @@ EXTRA_DIST = x86-codegen.h all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -438,7 +437,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/benchmark/Makefile.am b/mono/benchmark/Makefile.am index 05b557b67a..ef6c05bbed 100644 --- a/mono/benchmark/Makefile.am +++ b/mono/benchmark/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules TEST_PROG=../mini/mono RUNTIME_ARGS="-O=all" diff --git a/mono/benchmark/Makefile.in b/mono/benchmark/Makefile.in index 2574b6a757..6718eda33d 100644 --- a/mono/benchmark/Makefile.in +++ b/mono/benchmark/Makefile.in @@ -130,8 +130,7 @@ am__can_run_installinfo = \ esac am__extra_recursive_targets = test-recursive test-bundle-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -465,7 +464,7 @@ EXTRA_DIST = test-driver $(TESTSRC) all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -485,7 +484,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/cil/Makefile.am b/mono/cil/Makefile.am index 8eebfefb38..7888a649df 100644 --- a/mono/cil/Makefile.am +++ b/mono/cil/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules # opcode.def is not built by default -- based on timestamps. # CI does not have the dependencies installed (perl, XML::Parser). diff --git a/mono/cil/Makefile.in b/mono/cil/Makefile.in index b7405364c9..400e33afd4 100644 --- a/mono/cil/Makefile.in +++ b/mono/cil/Makefile.in @@ -160,8 +160,8 @@ am__installdirs = "$(DESTDIR)$(defdir)" "$(DESTDIR)$(xmldir)" DATA = $(def_DATA) $(xml_DATA) am__extra_recursive_targets = test-recursive test-bundle-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs TODO +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs \ + TODO DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -452,7 +452,7 @@ EXTRA_DIST = tables.def opcode.def make-opcodes-def.pl make-opcode-def.xsl $(xml all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -472,7 +472,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/dis/Makefile.am b/mono/dis/Makefile.am index 5cafa749ea..7433e3c877 100644 --- a/mono/dis/Makefile.am +++ b/mono/dis/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules if !ENABLE_MSVC_ONLY diff --git a/mono/dis/Makefile.in b/mono/dis/Makefile.in index 83872ec562..69ef1d1759 100644 --- a/mono/dis/Makefile.in +++ b/mono/dis/Makefile.in @@ -253,7 +253,7 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ - $(top_srcdir)/mk/common.mk $(top_srcdir)/mkinstalldirs + $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -593,7 +593,7 @@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -613,7 +613,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/dis/declsec.c b/mono/dis/declsec.c index 5575ef37aa..c2aa2a6ea3 100755 --- a/mono/dis/declsec.c +++ b/mono/dis/declsec.c @@ -107,10 +107,8 @@ declsec_20_write_value (GString *str, char type, const char *value) g_string_append_printf (str, "%d", (gint32)read32 (value)); return value + 4; case MONO_TYPE_U8: - g_string_append_printf (str, "%lld", (long long)read64 (value)); - return value + 8; case MONO_TYPE_I8: - g_string_append_printf (str, "%lld", (long long)read64 (value)); + g_string_append_printf (str, "%" PRId64, (gint64)read64 (value)); return value + 8; case MONO_TYPE_R4: { float val; diff --git a/mono/dis/dis-cil.c b/mono/dis/dis-cil.c index ec2b518ccc..c2382648df 100755 --- a/mono/dis/dis-cil.c +++ b/mono/dis/dis-cil.c @@ -145,7 +145,7 @@ disassemble_cil (MonoImage *m, MonoMethodHeader *mh, MonoGenericContainer *conta case MonoInlineI8: { gint64 top = read64 (ptr); - fprintf (output, "0x%llx", (long long) top); + fprintf (output, "0x%" PRIx64, (guint64)top); ptr += 8; break; } diff --git a/mono/dis/dump.c b/mono/dis/dump.c index 4160e7733d..3bdaa0a11e 100755 --- a/mono/dis/dump.c +++ b/mono/dis/dump.c @@ -875,7 +875,7 @@ handle_enum: break; case MONO_TYPE_U8: case MONO_TYPE_I8: - g_string_append_printf (res, "%lld", (long long)read64 (p)); + g_string_append_printf (res, "%" PRId64, (gint64)read64 (p)); p += 8; break; case MONO_TYPE_R4: { diff --git a/mono/dis/main.c b/mono/dis/main.c index 056da620ed..1f69815cce 100644 --- a/mono/dis/main.c +++ b/mono/dis/main.c @@ -1951,7 +1951,7 @@ monodis_assembly_search_hook (MonoAssemblyLoadContext *alc, MonoAssembly *reques for (tmp = loaded_assemblies; tmp; tmp = tmp->next) { MonoAssembly *ass = (MonoAssembly *)tmp->data; - if (mono_assembly_names_equal (aname, &ass->aname)) + if (mono_assembly_check_name_match (aname, &ass->aname)) return ass; } return NULL; diff --git a/mono/eglib/Makefile.am b/mono/eglib/Makefile.am index 13b152eee3..dfdcd0e679 100644 --- a/mono/eglib/Makefile.am +++ b/mono/eglib/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules if !ENABLE_MSVC_ONLY diff --git a/mono/eglib/Makefile.in b/mono/eglib/Makefile.in index 93236607fe..e065c0a682 100644 --- a/mono/eglib/Makefile.in +++ b/mono/eglib/Makefile.in @@ -280,8 +280,7 @@ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = . test am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/eglib-config.h.in \ - $(top_srcdir)/depcomp $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs + $(top_srcdir)/depcomp $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -648,7 +647,7 @@ all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -668,7 +667,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/eglib/glib.h b/mono/eglib/glib.h index 898360eb2f..4d84563481 100644 --- a/mono/eglib/glib.h +++ b/mono/eglib/glib.h @@ -247,11 +247,11 @@ typedef guint32 gunichar; #define ABS(a) ((a) > 0 ? (a) : -(a)) #endif -#define ALIGN_TO(val,align) ((((gssize)val) + ((align) - 1)) & ~((align) - 1)) +#define ALIGN_TO(val,align) ((((gssize)val) + (gssize)((align) - 1)) & (~((gssize)(align - 1)))) -#define ALIGN_DOWN_TO(val,align) (((gssize)val) & ~((align) - 1)) +#define ALIGN_DOWN_TO(val,align) (((gssize)val) & (~((gssize)(align - 1)))) -#define ALIGN_PTR_TO(ptr,align) (gpointer)((((gssize)(ptr)) + (align - 1)) & (~(align - 1))) +#define ALIGN_PTR_TO(ptr,align) (gpointer)((((gssize)(ptr)) + (gssize)(align - 1)) & (~((gssize)(align - 1)))) #define G_STRUCT_OFFSET(p_type,field) offsetof(p_type,field) @@ -770,7 +770,7 @@ typedef enum { G_ENUM_FUNCTIONS (GLogLevelFlags) -void g_printv (const gchar *format, va_list args); +gint g_printv (const gchar *format, va_list args); void g_print (const gchar *format, ...); void g_printerr (const gchar *format, ...); GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask); @@ -948,6 +948,14 @@ GUnicodeBreakType g_unichar_break_type (gunichar c); #define g_assert_not_reached() G_STMT_START { mono_assertion_message_unreachable (__FILE__, __LINE__); eg_unreachable(); } G_STMT_END +#if ENABLE_NETCORE +#define g_assert_netcore() /* nothing */ +#define g_assert_not_netcore() g_assert (!"This function should only be called on mono-notnetcore.") +#else +#define g_assert_netcore() g_assert (!"This function should only be called on mono-netcore.") +#define g_assert_not_netcore() /* nothing */ +#endif + /* f is format -- like printf and scanf * Where you might have said: * if (!(expr)) diff --git a/mono/eglib/goutput.c b/mono/eglib/goutput.c index 58ac92e3d3..f9da72dfe5 100644 --- a/mono/eglib/goutput.c +++ b/mono/eglib/goutput.c @@ -57,19 +57,23 @@ g_assert_abort (void) abort (); } -void +gint g_printv (const gchar *format, va_list args) { char *msg; + int ret; - if (g_vasprintf (&msg, format, args) < 0) - return; + ret = g_vasprintf (&msg, format, args); + if (ret < 0) + return -1; if (!stdout_handler) stdout_handler = default_stdout_handler; stdout_handler (msg); g_free (msg); + + return ret; } void @@ -81,6 +85,19 @@ g_print (const gchar *format, ...) va_end (args); } +gint +g_printf (gchar const *format, ...) +{ + va_list args; + gint ret; + + va_start (args, format); + ret = g_printv (format, args); + va_end (args); + + return ret; +} + void g_printerr (const gchar *format, ...) { diff --git a/mono/eglib/gpath.c b/mono/eglib/gpath.c index f6ca10ec58..e6ec47b05f 100644 --- a/mono/eglib/gpath.c +++ b/mono/eglib/gpath.c @@ -337,7 +337,6 @@ g_ensure_directory_exists (const gchar *filename) } while (1) { - gboolean bRet = FALSE; p = wcschr (p, '\\'); if (p) *p = '\0'; diff --git a/mono/eglib/gstr.c b/mono/eglib/gstr.c index 3654372f5a..c549b24189 100644 --- a/mono/eglib/gstr.c +++ b/mono/eglib/gstr.c @@ -610,19 +610,6 @@ g_strchomp (gchar *str) return str; } -gint -g_printf(gchar const *format, ...) -{ - va_list args; - gint ret; - - va_start(args, format); - ret = vprintf(format, args); - va_end(args); - - return ret; -} - gint g_fprintf(FILE *file, gchar const *format, ...) { diff --git a/mono/eglib/test/Makefile.am b/mono/eglib/test/Makefile.am index 9862a77a55..b7dda5f54f 100644 --- a/mono/eglib/test/Makefile.am +++ b/mono/eglib/test/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules EXTRA_DIST = UTF-8.txt UTF-16BE.txt UTF-16LE.txt UTF-32BE.txt UTF-32LE.txt test-eglib.exp diff --git a/mono/eglib/test/Makefile.in b/mono/eglib/test/Makefile.in index 0a7feb1ca4..7e4086db93 100644 --- a/mono/eglib/test/Makefile.in +++ b/mono/eglib/test/Makefile.in @@ -205,7 +205,7 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ - $(top_srcdir)/mk/common.mk $(top_srcdir)/mkinstalldirs README + $(top_srcdir)/mkinstalldirs README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -529,7 +529,7 @@ all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -549,7 +549,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/eglib/test/endian.c b/mono/eglib/test/endian.c index a238ca62e5..d70c7c68c9 100644 --- a/mono/eglib/test/endian.c +++ b/mono/eglib/test/endian.c @@ -17,7 +17,7 @@ test_swap (void) res64 = GUINT64_SWAP_LE_BE(b); if (res64 != b_expect) - return FAILED ("GUINT64_SWAP_LE_BE returned 0x%llx (had=0x%llx)", res64, b); + return FAILED ("GUINT64_SWAP_LE_BE returned 0x%" PRIx64 " (had=0x%" PRIx64 ")", (guint64)res64, (guint64)b); res16 = GUINT16_SWAP_LE_BE(c); if (res16 != 0xcdab) return FAILED ("GUINT16_SWAP_LE_BE returned 0x%x", (guint32) res16); diff --git a/mono/eglib/test/memory.c b/mono/eglib/test/memory.c index 3fed8ced19..4f83e331b3 100644 --- a/mono/eglib/test/memory.c +++ b/mono/eglib/test/memory.c @@ -1,4 +1,3 @@ - #include #include "test.h" @@ -8,31 +7,135 @@ test_memory_zero_size_allocations (void) gpointer p; p = g_malloc (0); - if (p) - return FAILED ("Calling g_malloc with size zero should return NULL."); + if (p) + return FAILED ("Calling g_malloc with size zero should return NULL."); p = g_malloc0 (0); - if (p) - return FAILED ("Calling g_malloc0 with size zero should return NULL."); + if (p) + return FAILED ("Calling g_malloc0 with size zero should return NULL."); p = g_realloc (NULL, 0); - if (p) - return FAILED ("Calling g_realloc with size zero should return NULL."); + if (p) + return FAILED ("Calling g_realloc with size zero should return NULL."); p = g_new (int, 0); - if (p) - return FAILED ("Calling g_new with size zero should return NULL."); + if (p) + return FAILED ("Calling g_new with size zero should return NULL."); p = g_new0 (int, 0); - if (p) - return FAILED ("Calling g_new0 with size zero should return NULL."); + if (p) + return FAILED ("Calling g_new0 with size zero should return NULL."); - return OK; + return OK; +} + +/* + * Test the following macros with alignment value as signed int + * <> ALIGN_TO + * <> ALIGN_DOWN_TO + * <> ALIGN_PTR_TO + */ +static RESULT +test_align_signed_int (void) +{ + gssize orig_value = 67; + gssize result, exp_value; + gpointer orig_ptr = (gpointer)orig_value; + gpointer result_ptr, exp_ptr; + + // test case #1 + int align = 1; + result = ALIGN_TO (orig_value, align); + exp_value = orig_value; + if (result != exp_value) + return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result); + + result = ALIGN_DOWN_TO (orig_value, align); + exp_value = orig_value; + if (result != exp_value) + return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result); + + result_ptr = ALIGN_PTR_TO (orig_ptr,align); + exp_ptr = orig_ptr; + if (result_ptr != exp_ptr) + return FAILED ("Expected address after aligned is %p, however, the actual address is %p", exp_ptr, result_ptr); + + // test case #2 + align = 8; + result = ALIGN_TO (orig_value, align); + exp_value = 72; + if (result != exp_value) + return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result); + + result_ptr = ALIGN_PTR_TO (orig_ptr,align); + exp_ptr= (gpointer)exp_value; + if (result_ptr != exp_ptr) + return FAILED ("Expected address after aligned is %p, however, the actual address is %p", exp_ptr, result_ptr); + + result = ALIGN_DOWN_TO (orig_value, align); + exp_value = 64; + if (result != exp_value) + return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result); + + return OK; +} + +/* + * Test the following macros with alignment value as unsigned int + * <> ALIGN_TO + * <> ALIGN_DOWN_TO + * <> ALIGN_PTR_TO + */ +static RESULT +test_align_unsigned_int (void) +{ + gssize orig_value = 67; + gssize result, exp_value; + gpointer orig_ptr = (gpointer)orig_value; + gpointer result_ptr, exp_ptr; + + // test case #1 + unsigned int align = 1; + result = ALIGN_TO (orig_value, align); + exp_value = orig_value; + if (result != exp_value) + return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result); + + result = ALIGN_DOWN_TO (orig_value, align); + exp_value = orig_value; + if (result != exp_value) + return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result); + + result_ptr = ALIGN_PTR_TO (orig_ptr,align); + exp_ptr = orig_ptr; + if (result_ptr != exp_ptr) + return FAILED ("Expected address after aligned is %p, however, the actual address is %p", exp_ptr, result_ptr); + + // test case #2 + align= 16; + result = ALIGN_TO (orig_value, align); + exp_value = 80; + if (result != exp_value) + return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result); + + result_ptr = ALIGN_PTR_TO (orig_ptr,align); + exp_ptr= (gpointer)exp_value; + if (result_ptr != exp_ptr) + return FAILED ("Expected address after aligned is %p, however, the actual address is %p", exp_ptr, result_ptr); + + result = ALIGN_DOWN_TO (orig_value, align); + exp_value = 64; + if (result != exp_value) + return FAILED ("Expected value after aligned is %d, however, the actual value is %d", exp_value, result); + + return OK; } static Test memory_tests [] = { - { "zero_size_allocations", test_memory_zero_size_allocations}, - {NULL, NULL} + {"zero_size_allocations", test_memory_zero_size_allocations}, + {"align_signed_int", test_align_signed_int}, + {"align_unsigned_int", test_align_unsigned_int}, + {NULL, NULL} }; DEFINE_TEST_GROUP_INIT(memory_tests_init, memory_tests) diff --git a/mono/metadata/Makefile.am b/mono/metadata/Makefile.am index dc3d48b03c..dc9cf2a4d2 100644 --- a/mono/metadata/Makefile.am +++ b/mono/metadata/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules if !ENABLE_MSVC_ONLY diff --git a/mono/metadata/Makefile.in.REMOVED.git-id b/mono/metadata/Makefile.in.REMOVED.git-id index 10a9ab0716..c3a6a0241a 100644 --- a/mono/metadata/Makefile.in.REMOVED.git-id +++ b/mono/metadata/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -3c71e1b499ff288487b6eed27607614303c8540c \ No newline at end of file +3617a83d712089bd5775105e4fd9901de9fefea2 \ No newline at end of file diff --git a/mono/metadata/appdomain.c.REMOVED.git-id b/mono/metadata/appdomain.c.REMOVED.git-id index 68d45a0b2d..88bbc045f5 100644 --- a/mono/metadata/appdomain.c.REMOVED.git-id +++ b/mono/metadata/appdomain.c.REMOVED.git-id @@ -1 +1 @@ -3b5310d2a2f37cfdbbf11327c606ca6045f0b6d2 \ No newline at end of file +724f4ea9a6b4aa6cbe836f60498834d4c553dc27 \ No newline at end of file diff --git a/mono/metadata/assembly-internals.h b/mono/metadata/assembly-internals.h index 7d9a0dab10..55a23c9980 100644 --- a/mono/metadata/assembly-internals.h +++ b/mono/metadata/assembly-internals.h @@ -134,6 +134,9 @@ MonoAssembly* mono_assembly_request_byname (MonoAssemblyName *aname, gboolean mono_assembly_candidate_predicate_sn_same_name (MonoAssembly *candidate, gpointer wanted_name); +gboolean +mono_assembly_check_name_match (MonoAssemblyName *wanted_name, MonoAssemblyName *candidate_name); + MonoAssembly* mono_assembly_binding_applies_to_image (MonoAssemblyLoadContext *alc, MonoImage* image, MonoImageOpenStatus *status); diff --git a/mono/metadata/assembly-load-context.c b/mono/metadata/assembly-load-context.c index 708293c562..133ebb8338 100644 --- a/mono/metadata/assembly-load-context.c +++ b/mono/metadata/assembly-load-context.c @@ -152,16 +152,16 @@ leave: static MonoAssembly* mono_alc_invoke_resolve_using_load (MonoAssemblyLoadContext *alc, MonoAssemblyName *aname, MonoError *error) { - static MonoMethod *resolve; + MONO_STATIC_POINTER_INIT (MonoMethod, resolve) - if (!resolve) { ERROR_DECL (local_error); MonoClass *alc_class = mono_class_get_assembly_load_context_class (); g_assert (alc_class); - MonoMethod *m = mono_class_get_method_from_name_checked (alc_class, "MonoResolveUsingLoad", -1, 0, local_error); + resolve = mono_class_get_method_from_name_checked (alc_class, "MonoResolveUsingLoad", -1, 0, local_error); mono_error_assert_ok (local_error); - resolve = m; - } + + MONO_STATIC_POINTER_INIT_END (MonoMethod, resolve) + g_assert (resolve); return invoke_resolve_method (resolve, alc, aname, error); @@ -185,16 +185,16 @@ mono_alc_invoke_resolve_using_load_nofail (MonoAssemblyLoadContext *alc, MonoAss static MonoAssembly* mono_alc_invoke_resolve_using_resolving_event (MonoAssemblyLoadContext *alc, MonoAssemblyName *aname, MonoError *error) { - static MonoMethod *resolve; + MONO_STATIC_POINTER_INIT (MonoMethod, resolve) - if (!resolve) { ERROR_DECL (local_error); MonoClass *alc_class = mono_class_get_assembly_load_context_class (); g_assert (alc_class); - MonoMethod *m = mono_class_get_method_from_name_checked (alc_class, "MonoResolveUsingResolvingEvent", -1, 0, local_error); + resolve = mono_class_get_method_from_name_checked (alc_class, "MonoResolveUsingResolvingEvent", -1, 0, local_error); mono_error_assert_ok (local_error); - resolve = m; - } + + MONO_STATIC_POINTER_INIT_END (MonoMethod, resolve) + g_assert (resolve); return invoke_resolve_method (resolve, alc, aname, error); @@ -218,16 +218,16 @@ mono_alc_invoke_resolve_using_resolving_event_nofail (MonoAssemblyLoadContext *a static MonoAssembly* mono_alc_invoke_resolve_using_resolve_satellite (MonoAssemblyLoadContext *alc, MonoAssemblyName *aname, MonoError *error) { - static MonoMethod *resolve; + MONO_STATIC_POINTER_INIT (MonoMethod, resolve) - if (!resolve) { ERROR_DECL (local_error); MonoClass *alc_class = mono_class_get_assembly_load_context_class (); g_assert (alc_class); - MonoMethod *m = mono_class_get_method_from_name_checked (alc_class, "MonoResolveUsingResolveSatelliteAssembly", -1, 0, local_error); + resolve = mono_class_get_method_from_name_checked (alc_class, "MonoResolveUsingResolveSatelliteAssembly", -1, 0, local_error); mono_error_assert_ok (local_error); - resolve = m; - } + + MONO_STATIC_POINTER_INIT_END (MonoMethod, resolve) + g_assert (resolve); return invoke_resolve_method (resolve, alc, aname, error); diff --git a/mono/metadata/assembly.c.REMOVED.git-id b/mono/metadata/assembly.c.REMOVED.git-id index d52a161561..ec55164996 100644 --- a/mono/metadata/assembly.c.REMOVED.git-id +++ b/mono/metadata/assembly.c.REMOVED.git-id @@ -1 +1 @@ -0d3df4161fa6e7d6a77f4a828d46e4f62d9ccf08 \ No newline at end of file +c5fc03abc50e6f072fd2e6c810d3b1cbace17abb \ No newline at end of file diff --git a/mono/metadata/boehm-gc.c b/mono/metadata/boehm-gc.c index 74aead5759..1f9fa2cf00 100644 --- a/mono/metadata/boehm-gc.c +++ b/mono/metadata/boehm-gc.c @@ -105,7 +105,9 @@ mono_gc_warning (char *msg, GC_word arg) } static void on_gc_notification (GC_EventType event); -static void on_gc_heap_resize (size_t new_size); + +// GC_word here to precisely match Boehm. Not size_t, not gsize. +static void on_gc_heap_resize (GC_word new_size); void mono_gc_base_init (void) @@ -352,6 +354,18 @@ mono_gc_thread_attach (MonoThreadInfo* info) return info; } +void +mono_gc_thread_detach (MonoThreadInfo *p) +{ + /* Detach without threads lock as Boehm + * will take it's own lock internally. Note in + * on_gc_notification we take threads lock after + * Boehm already has it's own lock. For consistency + * always take lock ordering of Boehm then threads. + */ + GC_unregister_my_thread (); +} + void mono_gc_thread_detach_with_lock (MonoThreadInfo *p) { @@ -476,9 +490,9 @@ on_gc_notification (GC_EventType event) } } - + // GC_word here to precisely match Boehm. Not size_t, not gsize. static void -on_gc_heap_resize (size_t new_size) +on_gc_heap_resize (GC_word new_size) { guint64 heap_size = GC_get_heap_size (); #ifndef DISABLE_PERFCOUNTERS @@ -1229,13 +1243,14 @@ mono_gc_toggleref_register_callback (MonoToggleRefStatus (*proccess_toggleref) ( static MonoToggleRefStatus test_toggleref_callback (MonoObject *obj) { - static MonoClassField *mono_toggleref_test_field; MonoToggleRefStatus status = MONO_TOGGLE_REF_DROP; - if (!mono_toggleref_test_field) { + MONO_STATIC_POINTER_INIT (MonoClassField, mono_toggleref_test_field) + mono_toggleref_test_field = mono_class_get_field_from_name_full (mono_object_class (obj), "__test", NULL); g_assert (mono_toggleref_test_field); - } + + MONO_STATIC_POINTER_INIT_END (MonoClassField*, mono_toggleref_test_field) mono_field_get_value_internal (obj, mono_toggleref_test_field, &status); printf ("toggleref-cb obj %d\n", status); diff --git a/mono/metadata/class-init.c.REMOVED.git-id b/mono/metadata/class-init.c.REMOVED.git-id index 8e89a137a0..a89755c0c6 100644 --- a/mono/metadata/class-init.c.REMOVED.git-id +++ b/mono/metadata/class-init.c.REMOVED.git-id @@ -1 +1 @@ -9dc9519d7a09613d44df4898eeb7d033cc21c72d \ No newline at end of file +6c3664f2c8cb26e6eaab936687e1c10afddf5b09 \ No newline at end of file diff --git a/mono/metadata/class-internals.h b/mono/metadata/class-internals.h index 92bdc67f3e..2a029cae37 100644 --- a/mono/metadata/class-internals.h +++ b/mono/metadata/class-internals.h @@ -15,6 +15,7 @@ #include "mono/utils/mono-error.h" #include "mono/sgen/gc-internal-agnostic.h" #include "mono/utils/mono-error-internals.h" +#include "mono/utils/mono-memory-model.h" #define MONO_CLASS_IS_ARRAY(c) (m_class_get_rank (c)) @@ -45,13 +46,6 @@ typedef enum { MONO_WRAPPER_NUM } MonoWrapperType; -typedef enum { - MONO_TYPE_NAME_FORMAT_IL, - MONO_TYPE_NAME_FORMAT_REFLECTION, - MONO_TYPE_NAME_FORMAT_FULL_NAME, - MONO_TYPE_NAME_FORMAT_ASSEMBLY_QUALIFIED -} MonoTypeNameFormat; - typedef enum { MONO_REMOTING_TARGET_UNKNOWN, MONO_REMOTING_TARGET_APPDOMAIN, @@ -1004,6 +998,10 @@ MonoClass* mono_class_get_##shortname##_class (void); #define GENERATE_TRY_GET_CLASS_WITH_CACHE_DECL(shortname) \ MonoClass* mono_class_try_get_##shortname##_class (void); +// GENERATE_GET_CLASS_WITH_CACHE attempts mono_class_load_from_name whenever +// its cache is null. i.e. potentially repeatedly, though it is expected to succeed +// the first time. +// #define GENERATE_GET_CLASS_WITH_CACHE(shortname,name_space,name) \ MonoClass* \ mono_class_get_##shortname##_class (void) \ @@ -1012,12 +1010,18 @@ mono_class_get_##shortname##_class (void) \ MonoClass *klass = tmp_class; \ if (!klass) { \ klass = mono_class_load_from_name (mono_defaults.corlib, name_space, name); \ - mono_memory_barrier (); \ + mono_memory_barrier (); /* FIXME excessive? */ \ tmp_class = klass; \ } \ return klass; \ } +// GENERATE_TRY_GET_CLASS_WITH_CACHE attempts mono_class_load_from_name approximately +// only once. i.e. if it fails, it will return null and not retry. +// In a race it might try a few times, but not indefinitely. +// +// FIXME This maybe has excessive volatile/barriers. +// #define GENERATE_TRY_GET_CLASS_WITH_CACHE(shortname,name_space,name) \ MonoClass* \ mono_class_try_get_##shortname##_class (void) \ @@ -1139,9 +1143,6 @@ mono_class_get_exception_for_failure (MonoClass *klass); char* mono_identifier_escape_type_name_chars (const char* identifier); -char* -mono_type_get_name_full (MonoType *type, MonoTypeNameFormat format); - char* mono_type_get_full_name (MonoClass *klass); @@ -1507,6 +1508,42 @@ mono_method_is_constructor (MonoMethod *method); gboolean mono_class_has_default_constructor (MonoClass *klass, gboolean public_only); +// There are many ways to do on-demand initialization. +// Some allow multiple concurrent initializations. Some do not. +// Some allow multiple concurrent writes to the global. Some do not. +// +// Booleans or names capturing these factors would be desirable. +// RacyInit? +// +// This form allows both such races, on the understanding that, +// even if the initialization occurs multiple times, every result is equivalent, +// and the goal is not to initialize no more than once, but for the steady state +// to stop rerunning the initialization. +// +// It may be desirable to replace this with mono_lazy_initialize, etc. +// +// These macros cannot be wrapped in do/while as they inject "name" into invoking scope. +// +#define MONO_STATIC_POINTER_INIT(type, name) \ + static type *static_ ## name; \ + type *name; \ + name = static_ ## name; \ + if (!name) { \ + /* Custom code here to initialize name */ +#define MONO_STATIC_POINTER_INIT_END(type, name) \ + if (name) { \ + /* Success, commit to static. */ \ + mono_atomic_store_seq (&static_ ## name, name); \ + } \ + } \ + +static inline gboolean +m_field_get_offset (MonoClassField *field) +{ + g_assert (m_class_is_fields_inited (field->parent)); + return field->offset; +} + // Enum and static storage for JIT icalls. #include "jit-icall-reg.h" diff --git a/mono/metadata/class.h b/mono/metadata/class.h index 9eac22e4f3..8966e029b7 100644 --- a/mono/metadata/class.h +++ b/mono/metadata/class.h @@ -18,6 +18,13 @@ typedef struct _MonoClassField MonoClassField; typedef struct _MonoProperty MonoProperty; typedef struct _MonoEvent MonoEvent; +typedef enum { + MONO_TYPE_NAME_FORMAT_IL, + MONO_TYPE_NAME_FORMAT_REFLECTION, + MONO_TYPE_NAME_FORMAT_FULL_NAME, + MONO_TYPE_NAME_FORMAT_ASSEMBLY_QUALIFIED +} MonoTypeNameFormat; + MONO_API MONO_RT_EXTERNAL_ONLY MonoClass * mono_class_get (MonoImage *image, uint32_t type_token); @@ -130,6 +137,9 @@ MONO_API MONO_RT_EXTERNAL_ONLY void* mono_ldtoken (MonoImage *image, uint32_t token, MonoClass **retclass, MonoGenericContext *context); +MONO_API char * +mono_type_get_name_full (MonoType *type, MonoTypeNameFormat format); + MONO_API char* mono_type_get_name (MonoType *type); diff --git a/mono/metadata/cominterop.c.REMOVED.git-id b/mono/metadata/cominterop.c.REMOVED.git-id index 2a14138c9f..4f86256546 100644 --- a/mono/metadata/cominterop.c.REMOVED.git-id +++ b/mono/metadata/cominterop.c.REMOVED.git-id @@ -1 +1 @@ -37f9553b41bd4b40e156dfe0c19fb8a343840a3b \ No newline at end of file +9ec1d0f10c39f2efa1dca335129413404afd3c8d \ No newline at end of file diff --git a/mono/metadata/culture-info-tables.h.REMOVED.git-id b/mono/metadata/culture-info-tables.h.REMOVED.git-id index eaff95fbf2..f61ad48d2c 100644 --- a/mono/metadata/culture-info-tables.h.REMOVED.git-id +++ b/mono/metadata/culture-info-tables.h.REMOVED.git-id @@ -1 +1 @@ -29f6716094fd96be6962cecb9a2b20d0f12fb746 \ No newline at end of file +47879c790f2d9959a43e039d1a02cc518d58214d \ No newline at end of file diff --git a/mono/metadata/custom-attrs.c b/mono/metadata/custom-attrs.c index 6e6ae90930..e033bd6da8 100644 --- a/mono/metadata/custom-attrs.c +++ b/mono/metadata/custom-attrs.c @@ -617,17 +617,18 @@ load_cattr_value_boxed (MonoDomain *domain, MonoImage *image, MonoType *t, const static MonoObject* create_cattr_typed_arg (MonoType *t, MonoObject *val, MonoError *error) { - static MonoMethod *ctor; MonoObject *retval; void *params [2], *unboxed; error_init (error); - if (!ctor) { + MONO_STATIC_POINTER_INIT (MonoMethod, ctor) + ctor = mono_class_get_method_from_name_checked (mono_class_get_custom_attribute_typed_argument_class (), ".ctor", 2, 0, error); mono_error_assert_ok (error); - } - + + MONO_STATIC_POINTER_INIT_END (MonoMethod, ctor) + params [0] = mono_type_get_object_checked (mono_domain_get (), t, error); return_val_if_nok (error, NULL); @@ -645,16 +646,17 @@ create_cattr_typed_arg (MonoType *t, MonoObject *val, MonoError *error) static MonoObject* create_cattr_named_arg (void *minfo, MonoObject *typedarg, MonoError *error) { - static MonoMethod *ctor; MonoObject *retval; void *unboxed, *params [2]; error_init (error); - if (!ctor) { + MONO_STATIC_POINTER_INIT (MonoMethod, ctor) + ctor = mono_class_get_method_from_name_checked (mono_class_get_custom_attribute_named_argument_class (), ".ctor", 2, 0, error); mono_error_assert_ok (error); - } + + MONO_STATIC_POINTER_INIT_END (MonoMethod, ctor) params [0] = minfo; params [1] = typedarg; @@ -1604,7 +1606,7 @@ mono_custom_attrs_from_index_checked (MonoImage *image, guint32 idx, gboolean ig guint32 cols [MONO_CUSTOM_ATTR_SIZE]; MonoTableInfo *ca; MonoCustomAttrInfo *ainfo; - GList *tmp, *list = NULL; + GArray *attr_array; const char *data; MonoCustomAttrEntry* attr; @@ -1616,20 +1618,24 @@ mono_custom_attrs_from_index_checked (MonoImage *image, guint32 idx, gboolean ig if (!i) return NULL; i --; + // initial size chosen arbitrarily, but default is 16 which is rather small + attr_array = g_array_sized_new (TRUE, TRUE, sizeof (guint32), 128); while (i < ca->rows) { if (mono_metadata_decode_row_col (ca, i, MONO_CUSTOM_ATTR_PARENT) != idx) break; - list = g_list_prepend (list, GUINT_TO_POINTER (i)); + attr_array = g_array_append_val (attr_array, i); ++i; } - len = g_list_length (list); - if (!len) + len = attr_array->len; + if (!len) { + g_array_free (attr_array, TRUE); return NULL; + } ainfo = (MonoCustomAttrInfo *)g_malloc0 (MONO_SIZEOF_CUSTOM_ATTR_INFO + sizeof (MonoCustomAttrEntry) * len); ainfo->num_attrs = len; ainfo->image = image; - for (i = len, tmp = list; i != 0; --i, tmp = tmp->next) { - mono_metadata_decode_row (ca, GPOINTER_TO_UINT (tmp->data), cols, MONO_CUSTOM_ATTR_SIZE); + for (i = 0; i < len; ++i) { + mono_metadata_decode_row (ca, g_array_index (attr_array, guint32, i), cols, MONO_CUSTOM_ATTR_SIZE); mtoken = cols [MONO_CUSTOM_ATTR_TYPE] >> MONO_CUSTOM_ATTR_TYPE_BITS; switch (cols [MONO_CUSTOM_ATTR_TYPE] & MONO_CUSTOM_ATTR_TYPE_MASK) { case MONO_CUSTOM_ATTR_TYPE_METHODDEF: @@ -1642,7 +1648,7 @@ mono_custom_attrs_from_index_checked (MonoImage *image, guint32 idx, gboolean ig g_error ("Unknown table for custom attr type %08x", cols [MONO_CUSTOM_ATTR_TYPE]); break; } - attr = &ainfo->attrs [i - 1]; + attr = &ainfo->attrs [i]; attr->ctor = mono_get_method_checked (image, mtoken, NULL, NULL, error); if (!attr->ctor) { g_warning ("Can't find custom attr constructor image: %s mtoken: 0x%08x due to: %s", image->name, mtoken, mono_error_get_message (error)); @@ -1650,14 +1656,14 @@ mono_custom_attrs_from_index_checked (MonoImage *image, guint32 idx, gboolean ig mono_error_cleanup (error); error_init (error); } else { - g_list_free (list); + g_array_free (attr_array, TRUE); g_free (ainfo); return NULL; } } if (!mono_verifier_verify_cattr_blob (image, cols [MONO_CUSTOM_ATTR_VALUE], error)) { - g_list_free (list); + g_array_free (attr_array, TRUE); g_free (ainfo); return NULL; } @@ -1665,7 +1671,7 @@ mono_custom_attrs_from_index_checked (MonoImage *image, guint32 idx, gboolean ig attr->data_size = mono_metadata_decode_value (data, &data); attr->data = (guchar*)data; } - g_list_free (list); + g_array_free (attr_array, TRUE); return ainfo; } diff --git a/mono/metadata/debug-helpers.c b/mono/metadata/debug-helpers.c index e5fc4e17b0..a86d45fde2 100644 --- a/mono/metadata/debug-helpers.c +++ b/mono/metadata/debug-helpers.c @@ -1108,10 +1108,10 @@ print_field_value (const char *field_ptr, MonoClassField *field, int type_offset g_print ("%u\n", *(guint32*)field_ptr); break; case MONO_TYPE_I8: - g_print ("%lld\n", (long long int)*(gint64*)field_ptr); + g_print ("%" PRId64 "\n", *(gint64*)field_ptr); break; case MONO_TYPE_U8: - g_print ("%llu\n", (long long unsigned int)*(guint64*)field_ptr); + g_print ("%" PRIu64 "\n", *(guint64*)field_ptr); break; case MONO_TYPE_R4: g_print ("%f\n", *(gfloat*)field_ptr); diff --git a/mono/metadata/domain.c b/mono/metadata/domain.c index 061ba2239e..98214f13a6 100644 --- a/mono/metadata/domain.c +++ b/mono/metadata/domain.c @@ -131,6 +131,7 @@ get_runtime_by_version (const char *version); static void mono_domain_alcs_destroy (MonoDomain *domain); +#ifdef ENABLE_NETCORE static void mono_domain_alcs_lock (MonoDomain *domain); @@ -139,6 +140,7 @@ mono_domain_alcs_unlock (MonoDomain *domain); static void mono_domain_create_default_alc (MonoDomain *domain); +#endif static LockFreeMempool* lock_free_mempool_new (void) @@ -731,9 +733,6 @@ mono_init_internal (const char *filename, const char *exe_filename, const char * mono_defaults.exception_class = mono_class_load_from_name ( mono_defaults.corlib, "System", "Exception"); - mono_defaults.threadabortexception_class = mono_class_load_from_name ( - mono_defaults.corlib, "System.Threading", "ThreadAbortException"); - mono_defaults.thread_class = mono_class_load_from_name ( mono_defaults.corlib, "System.Threading", "Thread"); @@ -743,6 +742,9 @@ mono_init_internal (const char *filename, const char *exe_filename, const char * #else mono_defaults.internal_thread_class = mono_class_load_from_name ( mono_defaults.corlib, "System.Threading", "InternalThread"); + + mono_defaults.threadabortexception_class = mono_class_load_from_name ( + mono_defaults.corlib, "System.Threading", "ThreadAbortException"); #endif mono_defaults.appdomain_class = mono_class_get_appdomain_class (); @@ -2080,10 +2082,10 @@ mono_domain_alcs_unlock (MonoDomain *domain) #endif +#ifdef ENABLE_NETCORE static MonoAssemblyLoadContext * create_alc (MonoDomain *domain, gboolean is_default) { -#ifdef ENABLE_NETCORE MonoAssemblyLoadContext *alc = NULL; mono_domain_alcs_lock (domain); @@ -2099,22 +2101,18 @@ create_alc (MonoDomain *domain, gboolean is_default) leave: mono_domain_alcs_unlock (domain); return alc; -#else - return NULL; -#endif } +#endif +#ifdef ENABLE_NETCORE void mono_domain_create_default_alc (MonoDomain *domain) { -#ifdef ENABLE_NETCORE if (domain->default_alc) return; create_alc (domain, TRUE); -#endif } -#ifdef ENABLE_NETCORE MonoAssemblyLoadContext * mono_domain_create_individual_alc (MonoDomain *domain, uint32_t this_gchandle, gboolean collectible, MonoError *error) { @@ -2123,16 +2121,14 @@ mono_domain_create_individual_alc (MonoDomain *domain, uint32_t this_gchandle, g alc->gchandle = this_gchandle; return alc; } -#endif static void mono_alc_free (MonoAssemblyLoadContext *alc) { -#ifdef ENABLE_NETCORE mono_alc_cleanup (alc); g_free (alc); -#endif } +#endif void mono_domain_alcs_destroy (MonoDomain *domain) diff --git a/mono/metadata/gc-internals.h b/mono/metadata/gc-internals.h index fcd57e7cbc..eca830c083 100644 --- a/mono/metadata/gc-internals.h +++ b/mono/metadata/gc-internals.h @@ -403,6 +403,9 @@ gboolean mono_gc_is_critical_method (MonoMethod *method); G_EXTERN_C // due to THREAD_INFO_TYPE varying gpointer mono_gc_thread_attach (THREAD_INFO_TYPE *info); +G_EXTERN_C // due to THREAD_INFO_TYPE varying +void mono_gc_thread_detach (THREAD_INFO_TYPE *info); + G_EXTERN_C // due to THREAD_INFO_TYPE varying void mono_gc_thread_detach_with_lock (THREAD_INFO_TYPE *info); diff --git a/mono/metadata/icall-decl.h b/mono/metadata/icall-decl.h index 116837b1a4..a77fcf3859 100644 --- a/mono/metadata/icall-decl.h +++ b/mono/metadata/icall-decl.h @@ -3,8 +3,8 @@ * Copyright 2018 Microsoft * Licensed under the MIT license. See LICENSE file in the project root for full license information. */ -#ifndef __MONO_METADATA_ICALL_H__ -#define __MONO_METADATA_ICALL_H__ +#ifndef __MONO_METADATA_ICALL_DECL_H__ +#define __MONO_METADATA_ICALL_DECL_H__ #include "appdomain-icalls.h" #include "class.h" @@ -82,6 +82,7 @@ ICALL_EXPORT MonoBoolean ves_icall_System_IO_DriveInfo_GetDiskFreeSpace (const g ICALL_EXPORT MonoBoolean ves_icall_System_Reflection_AssemblyName_ParseAssemblyName (const char*, MonoAssemblyName*, MonoBoolean*, MonoBoolean* is_token_defined_arg); ICALL_EXPORT MonoBoolean ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_SufficientExecutionStack (void); ICALL_EXPORT MonoBoolean ves_icall_System_Threading_Thread_YieldInternal (void); +ICALL_EXPORT void ves_icall_System_Threading_Thread_GetCurrentThread (MonoThread * volatile *); ICALL_EXPORT void ves_icall_System_ArgIterator_Setup (MonoArgIterator*, char*, char*); ICALL_EXPORT MonoType* ves_icall_System_ArgIterator_IntGetNextArgType (MonoArgIterator*); ICALL_EXPORT void ves_icall_System_ArgIterator_IntGetNextArg (MonoArgIterator*, MonoTypedRef*); @@ -175,6 +176,7 @@ ICALL_EXPORT void ves_icall_System_GC_InternalCollect (int generation); ICALL_EXPORT void ves_icall_System_GC_RecordPressure (gint64); ICALL_EXPORT void ves_icall_System_GC_WaitForPendingFinalizers (void); ICALL_EXPORT void ves_icall_System_GC_GetGCMemoryInfo (gint64*, gint64*, gint64*, gint64*, gint64*); + #if !ENABLE_NETCORE ICALL_EXPORT void ves_icall_System_IO_LogcatTextWriter_Log (const char*, gint32, const char*); #endif @@ -192,6 +194,7 @@ ICALL_EXPORT void ves_icall_System_Runtime_RuntimeImports_ZeroMemory (guint8*, s ICALL_EXPORT void ves_icall_System_Runtime_RuntimeImports_ZeroMemory (guint8*, guint); #endif ICALL_EXPORT void ves_icall_System_Runtime_RuntimeImports_ecvt_s(char*, size_t, double, int, int*, int*); + #if defined(ENABLE_MONODROID) || defined(ENABLE_MONOTOUCH) || defined(TARGET_WASM) ICALL_EXPORT gpointer ves_icall_System_IO_Compression_DeflateStreamNative_CreateZStream (gint32 compress, MonoBoolean gzip, gpointer feeder, gpointer data); ICALL_EXPORT gint32 ves_icall_System_IO_Compression_DeflateStreamNative_CloseZStream (gpointer stream); @@ -199,6 +202,7 @@ ICALL_EXPORT gint32 ves_icall_System_IO_Compression_DeflateStreamNative_Flush (g ICALL_EXPORT gint32 ves_icall_System_IO_Compression_DeflateStreamNative_ReadZStream (gpointer stream, gpointer buffer, gint32 length); ICALL_EXPORT gint32 ves_icall_System_IO_Compression_DeflateStreamNative_WriteZStream (gpointer stream, gpointer buffer, gint32 length); #endif + #if defined(ENABLE_MONODROID) ICALL_EXPORT gpointer ves_icall_System_Net_NetworkInformation_LinuxNetworkChange_CreateNLSocket (void); ICALL_EXPORT gint32 ves_icall_System_Net_NetworkInformation_LinuxNetworkChange_ReadEvents (gpointer sock, gpointer buffer, gint32 count, gint32 size); @@ -216,19 +220,60 @@ ICALL_EXPORT MonoBoolean ves_icall_Microsoft_Win32_NativeMethods_SetPriorityClas ICALL_EXPORT MonoBoolean ves_icall_Microsoft_Win32_NativeMethods_SetProcessWorkingSetSize (gpointer handle, gsize min, gsize max); ICALL_EXPORT MonoBoolean ves_icall_Microsoft_Win32_NativeMethods_TerminateProcess (gpointer handle, gint32 exitcode); ICALL_EXPORT gint32 ves_icall_Microsoft_Win32_NativeMethods_WaitForInputIdle (gpointer handle, gint32 milliseconds); + ICALL_EXPORT MonoBoolean ves_icall_Mono_TlsProviderFactory_IsBtlsSupported (void); + ICALL_EXPORT void ves_icall_Mono_Runtime_AnnotateMicrosoftTelemetry (const char *key, const char *value); ICALL_EXPORT void ves_icall_Mono_Runtime_DisableMicrosoftTelemetry (void); ICALL_EXPORT int ves_icall_Mono_Runtime_CheckCrashReportingLog (const char *directory, MonoBoolean clear); ICALL_EXPORT void ves_icall_Mono_Runtime_EnableCrashReportingLog (const char *directory); + ICALL_EXPORT void ves_icall_System_Array_InternalCreate (MonoArray *volatile* result, MonoType* type, gint32 rank, gint32* pLengths, gint32* pLowerBounds); ICALL_EXPORT MonoBoolean ves_icall_System_Array_CanChangePrimitive (MonoReflectionType *volatile* ref_src_type_handle, MonoReflectionType *volatile* ref_dst_type_handle, MonoBoolean reliable); + ICALL_EXPORT MonoBoolean ves_icall_System_Diagnostics_Debugger_IsAttached_internal (void); ICALL_EXPORT MonoBoolean ves_icall_System_Diagnostics_Debugger_IsLogging (void); ICALL_EXPORT void ves_icall_System_Diagnostics_Debugger_Log (int level, MonoString *volatile* category, MonoString *volatile* message); + ICALL_EXPORT void ves_icall_Mono_RuntimeGPtrArrayHandle_GPtrArrayFree (GPtrArray *ptr_array); ICALL_EXPORT void ves_icall_Mono_RuntimeMarshal_FreeAssemblyName (MonoAssemblyName *aname, MonoBoolean free_struct); ICALL_EXPORT void ves_icall_Mono_SafeStringMarshal_GFree (void *c_str); ICALL_EXPORT char* ves_icall_Mono_SafeStringMarshal_StringToUtf8 (MonoString *volatile* s); +ICALL_EXPORT MonoType* ves_icall_Mono_RuntimeClassHandle_GetTypeFromClass (MonoClass *klass); -#endif // __MONO_METADATA_ICALL_H__ +ICALL_EXPORT MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_CanSecure (const gunichar2*); +ICALL_EXPORT MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsMachineProtected (const gunichar2*); +ICALL_EXPORT MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsUserProtected (const gunichar2*); +ICALL_EXPORT MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectMachine (const gunichar2*); +ICALL_EXPORT MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectUser (const gunichar2*); +ICALL_EXPORT void ves_icall_Mono_Interop_ComInteropProxy_AddProxy (gpointer pUnk, MonoComInteropProxy *volatile* proxy_handle); +ICALL_EXPORT void ves_icall_Mono_Interop_ComInteropProxy_FindProxy (gpointer pUnk, MonoComInteropProxy *volatile* proxy_handle); + +ICALL_EXPORT gpointer ves_icall_System_Net_Sockets_Socket_Accept_icall (gsize, gint32*, MonoBoolean); +ICALL_EXPORT gint32 ves_icall_System_Net_Sockets_Socket_Available_icall (gsize, gint32*); +ICALL_EXPORT void ves_icall_System_Net_Sockets_Socket_Blocking_icall (gsize sock, MonoBoolean block, gint32 *werror); +ICALL_EXPORT void ves_icall_System_Net_Sockets_Socket_Close_icall (gsize sock, gint32 *werror); +ICALL_EXPORT void ves_icall_System_Net_Sockets_Socket_Disconnect_icall (gsize sock, MonoBoolean reuse, gint32 *werror); +ICALL_EXPORT MonoBoolean ves_icall_System_Net_Sockets_Socket_Duplicate_icall (gpointer handle, gint32 targetProcessId, gpointer *duplicate_handle, gint32 *werror); +ICALL_EXPORT void ves_icall_System_Net_Sockets_Socket_Listen_icall (gsize sock, guint32 backlog, gint32 *werror); +ICALL_EXPORT MonoBoolean ves_icall_System_Net_Sockets_Socket_Poll_icall (gsize sock, gint mode, gint timeout, gint32 *werror); +ICALL_EXPORT gint32 ves_icall_System_Net_Sockets_Socket_Receive_icall (gsize sock, gchar *buffer, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking); +ICALL_EXPORT gint32 ves_icall_System_Net_Sockets_Socket_Receive_array_icall (gsize sock, WSABUF *buffers, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking); +ICALL_EXPORT gint32 ves_icall_System_Net_Sockets_Socket_Send_icall (gsize sock, gchar *buffer, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking); +ICALL_EXPORT gint32 ves_icall_System_Net_Sockets_Socket_Send_array_icall (gsize sock, WSABUF *buffers, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking); +ICALL_EXPORT void ves_icall_System_Net_Sockets_Socket_Shutdown_icall (gsize sock, gint32 how, gint32 *werror); +ICALL_EXPORT MonoBoolean ves_icall_System_Net_Sockets_Socket_SupportPortReuse_icall (MonoProtocolType proto); + +ICALL_EXPORT gpointer ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem (int); +ICALL_EXPORT gpointer ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMemSize (gsize); +ICALL_EXPORT gpointer ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal (gsize); +ICALL_EXPORT gpointer ves_icall_System_Runtime_InteropServices_Marshal_ReAllocCoTaskMem (gpointer ptr, int size); +ICALL_EXPORT gpointer ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal (gpointer, gsize); +ICALL_EXPORT char* ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (const gunichar2*, int); +ICALL_EXPORT gunichar2* ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni (const gunichar2*, int); + +ICALL_EXPORT gpointer ves_icall_System_Threading_Semaphore_CreateSemaphore_icall (gint32 initialCount, gint32 maximumCount, const gunichar2 *name, gint32 name_length, gint32 *win32error); +ICALL_EXPORT gpointer ves_icall_System_Threading_Semaphore_OpenSemaphore_icall (const gunichar2 *name, gint32 name_length, gint32 rights, gint32 *win32error); +ICALL_EXPORT MonoBoolean ves_icall_System_Threading_Semaphore_ReleaseSemaphore_internal (gpointer handle, gint32 releaseCount, gint32 *prevcount); + +#endif // __MONO_METADATA_ICALL_DECL_H__ diff --git a/mono/metadata/icall-def.h.REMOVED.git-id b/mono/metadata/icall-def.h.REMOVED.git-id index 8d66e759d6..8b54c2d574 100644 --- a/mono/metadata/icall-def.h.REMOVED.git-id +++ b/mono/metadata/icall-def.h.REMOVED.git-id @@ -1 +1 @@ -c2f66dea478c3729b5e75b9bb14f42c78b51491d \ No newline at end of file +0a44729674ba4986ecf9eeaf1ed3afa13409aeff \ No newline at end of file diff --git a/mono/metadata/icall-signatures.h b/mono/metadata/icall-signatures.h index aa15e211bc..876c427c31 100644 --- a/mono/metadata/icall-signatures.h +++ b/mono/metadata/icall-signatures.h @@ -257,6 +257,8 @@ ICALL_SIG (5, (void, object, ptr, int32, int32)) \ ICALL_SIG (5, (void, object, ptr, ptr, ptr)) \ ICALL_SIG (5, (void, ptr, int, int, object)) \ ICALL_SIG (5, (void, ptr, ptr, ptr, ptr)) \ +ICALL_SIG (5, (void, ptr, ptr, int, object)) \ +ICALL_SIG (5, (void, ptr, ptr, int, ptr)) \ ICALL_SIG (5, (ptr, ptr, ptr, ptr, ptr)) \ ICALL_SIG (6, (int, int, int, ptr, ptr, ptr)) \ ICALL_SIG (6, (int, ptr, int, int, ptr, object)) \ diff --git a/mono/metadata/icall.c.REMOVED.git-id b/mono/metadata/icall.c.REMOVED.git-id index e5d1cbd6d4..e8d5434a4b 100644 --- a/mono/metadata/icall.c.REMOVED.git-id +++ b/mono/metadata/icall.c.REMOVED.git-id @@ -1 +1 @@ -06afd4b8cdddfe079f9d8233fb182480494010e6 \ No newline at end of file +b7e13713cd413bd570bd82ade85288ea7ba2e68e \ No newline at end of file diff --git a/mono/metadata/image.c b/mono/metadata/image.c index 8a9f688116..b2ee484acd 100644 --- a/mono/metadata/image.c +++ b/mono/metadata/image.c @@ -2450,10 +2450,6 @@ mono_image_close_except_pools (MonoImage *image) mono_wrapper_caches_free (&image->wrapper_caches); - for (i = 0; i < image->gshared_types_len; ++i) - free_hash (image->gshared_types [i]); - g_free (image->gshared_types); - /* The ownership of signatures is not well defined */ g_hash_table_destroy (image->memberref_signatures); g_hash_table_destroy (image->method_signatures); diff --git a/mono/metadata/marshal-ilgen.c.REMOVED.git-id b/mono/metadata/marshal-ilgen.c.REMOVED.git-id index 719ddbf6b1..d77da0283d 100644 --- a/mono/metadata/marshal-ilgen.c.REMOVED.git-id +++ b/mono/metadata/marshal-ilgen.c.REMOVED.git-id @@ -1 +1 @@ -9cc0188bf315bc6644f1a757608bf19dbbfd36a1 \ No newline at end of file +5472727ef0f18e3cfba528909c3fc2dc47f912b0 \ No newline at end of file diff --git a/mono/metadata/marshal-internals.h b/mono/metadata/marshal-internals.h index c4bc8fc50e..1eb666ec20 100644 --- a/mono/metadata/marshal-internals.h +++ b/mono/metadata/marshal-internals.h @@ -13,10 +13,6 @@ MonoObjectHandle mono_marshal_xdomain_copy_value_handle (MonoObjectHandle val, MonoError *error); -// On Windows platform implementation of bellow methods are hosted in separate source file -// marshal-windows.c or marshal-windows-*.c. On other platforms the implementation is still keept -// in marshal.c still declared as static and in some places even inlined. -#ifdef HOST_WIN32 void* mono_marshal_alloc_co_task_mem (size_t size); @@ -26,16 +22,17 @@ mono_marshal_free_co_task_mem (void *ptr); gpointer mono_marshal_realloc_co_task_mem (gpointer ptr, size_t size); -void* -mono_marshal_alloc_hglobal (size_t size, MonoError *error); +void +mono_marshal_free_hglobal (void *ptr); gpointer mono_marshal_realloc_hglobal (gpointer ptr, size_t size); -void -mono_marshal_free_hglobal (void *ptr); +void* +mono_marshal_alloc_hglobal (size_t size); -#endif // HOST_WIN32 +void* +mono_marshal_alloc_hglobal_error (gsize size, MonoError*); typedef enum { TYPECHECK_OBJECT_ARG_POS = 0, diff --git a/mono/metadata/marshal-windows.c b/mono/metadata/marshal-windows.c index ed42392af6..a61ef60468 100644 --- a/mono/metadata/marshal-windows.c +++ b/mono/metadata/marshal-windows.c @@ -9,6 +9,7 @@ #include #if defined(HOST_WIN32) + #include #include #include @@ -16,13 +17,11 @@ #include "icall-decl.h" #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) + void* -mono_marshal_alloc_hglobal (size_t size, MonoError *error) +mono_marshal_alloc_hglobal (size_t size) { - void* p = GlobalAlloc (GMEM_FIXED, size); - if (!p) - mono_error_set_out_of_memory (error, ""); - return p; + return GlobalAlloc (GMEM_FIXED, size); } gpointer @@ -36,6 +35,7 @@ mono_marshal_free_hglobal (gpointer ptr) { GlobalFree (ptr); } + #endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */ void* @@ -57,25 +57,34 @@ mono_marshal_realloc_co_task_mem (gpointer ptr, size_t size) } char* -ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (const gunichar2 *s, int length, MonoError *error) +ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (const gunichar2 *s, int length); + +char* +ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (const gunichar2 *s, int length) { + g_assert_not_netcore (); + // FIXME pass mono_utf16_to_utf8 an allocator to avoid double alloc/copy. + ERROR_DECL (error); + size_t len = 0; + char* ret = NULL; char* tres = mono_utf16_to_utf8 (s, length, error); - return_val_if_nok (error, NULL); - if (!tres) - return tres; + if (!tres || !is_ok (error)) + goto exit; /* * mono_utf16_to_utf8() returns a memory area at least as large as length, * even if it contains NULL characters. The copy we allocate here has to be equally * large. */ - size_t len = MAX (strlen (tres) + 1, length); - char* ret = (char*)ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal (len, error); + len = MAX (strlen (tres) + 1, length); + ret = (char*)mono_marshal_alloc_hglobal_error (len, error); if (ret) memcpy (ret, tres, len); +exit: g_free (tres); + mono_error_set_pending_exception (error); return ret; } diff --git a/mono/metadata/marshal.c.REMOVED.git-id b/mono/metadata/marshal.c.REMOVED.git-id index 1a2f7e14dc..f2027908dd 100644 --- a/mono/metadata/marshal.c.REMOVED.git-id +++ b/mono/metadata/marshal.c.REMOVED.git-id @@ -1 +1 @@ -59a0c2eb9d288d794af99712d89ec8d5571731b8 \ No newline at end of file +d8411ee8d09e50190a76db6359e5ee06108e7d0c \ No newline at end of file diff --git a/mono/metadata/metadata-internals.h b/mono/metadata/metadata-internals.h index edd6fdf074..9388d69b0f 100644 --- a/mono/metadata/metadata-internals.h +++ b/mono/metadata/metadata-internals.h @@ -567,11 +567,6 @@ struct _MonoImage { GHashTable *pinvoke_scopes; #endif - /* Indexed by MonoGenericParam pointers */ - GHashTable **gshared_types; - /* The length of the above array */ - int gshared_types_len; - /* The loader used to load this image */ MonoImageLoader *loader; @@ -613,6 +608,11 @@ typedef struct { GHashTable *aggregate_modifiers_cache; + /* Indexed by MonoGenericParam pointers */ + GHashTable **gshared_types; + /* The length of the above array */ + int gshared_types_len; + mono_mutex_t lock; /* @@ -897,6 +897,12 @@ mono_image_set_strdup (MonoImageSet *set, const char *s); MonoImageSet * mono_metadata_get_image_set_for_aggregate_modifiers (MonoAggregateModContainer *amods); +MonoImageSet * +mono_metadata_get_image_set_for_type (MonoType *type); + +MonoImageSet * +mono_metadata_merge_image_sets (MonoImageSet *set1, MonoImageSet *set2); + #define mono_image_set_new0(image,type,size) ((type *) mono_image_set_alloc0 (image, sizeof (type)* (size))) gboolean @@ -1145,10 +1151,10 @@ void mono_ginst_get_desc (GString *str, MonoGenericInst *ginst); void -mono_loader_set_strict_strong_names (gboolean enabled); +mono_loader_set_strict_assembly_name_check (gboolean enabled); gboolean -mono_loader_get_strict_strong_names (void); +mono_loader_get_strict_assembly_name_check (void); gboolean mono_type_in_image (MonoType *type, MonoImage *image); diff --git a/mono/metadata/metadata.c.REMOVED.git-id b/mono/metadata/metadata.c.REMOVED.git-id index e13749674a..f768b143a0 100644 --- a/mono/metadata/metadata.c.REMOVED.git-id +++ b/mono/metadata/metadata.c.REMOVED.git-id @@ -1 +1 @@ -a596e6a972952f579f24c9d22ea89616ac1acace \ No newline at end of file +5f6568da9b0c38080ea24398018ba9e87fe85acf \ No newline at end of file diff --git a/mono/metadata/monitor.c b/mono/metadata/monitor.c index 58865e72fa..14d9dcc2d1 100644 --- a/mono/metadata/monitor.c +++ b/mono/metadata/monitor.c @@ -89,6 +89,10 @@ static MonoThreadsSync *monitor_freelist; static MonitorArray *monitor_allocated; static int array_size = 16; +static MonoBoolean +mono_monitor_try_enter_loop_if_interrupted (MonoObject *obj, guint32 ms, + MonoBoolean allow_interruption, MonoBoolean *lockTaken, MonoError* error); + /* MonoThreadsSync status helpers */ static guint32 @@ -1043,37 +1047,12 @@ mono_monitor_try_enter_internal (MonoObject *obj, guint32 ms, gboolean allow_int MonoBoolean mono_monitor_enter_internal (MonoObject *obj) { - gint32 res; - gboolean allow_interruption = TRUE; - if (G_UNLIKELY (!obj)) { - ERROR_DECL (error); - mono_error_set_argument_null (error, "obj", ""); - mono_error_set_pending_exception (error); - return FALSE; - } + const int timeout_milliseconds = MONO_INFINITE_WAIT; + const gboolean allow_interruption = TRUE; + MonoError * const error = NULL; + MonoBoolean lock_taken; - /* - * An inquisitive mind could ask what's the deal with this loop. - * It exists to deal with interrupting a monitor enter that happened within an abort-protected block, like a .cctor. - * - * The thread will be set with a pending abort and the wait might even be interrupted. Either way, once we call mono_thread_interruption_checkpoint, - * it will return NULL meaning we can't be aborted right now. Once that happens we switch to non-alertable. - */ - do { - res = mono_monitor_try_enter_internal (obj, MONO_INFINITE_WAIT, allow_interruption); - /*This means we got interrupted during the wait and didn't got the monitor.*/ - if (res == -1) { - MonoException *exc = mono_thread_interruption_checkpoint (); - if (exc) { - mono_set_pending_exception (exc); - return FALSE; - } else { - //we detected a pending interruption but it turned out to be a false positive, we ignore it from now on (this feels like a hack, right?, threads.c should give us less confusing directions) - allow_interruption = FALSE; - } - } - } while (res == -1); - return TRUE; + return mono_monitor_try_enter_loop_if_interrupted (obj, timeout_milliseconds, allow_interruption, &lock_taken, error); } /** @@ -1186,13 +1165,14 @@ mono_monitor_threads_sync_members_offset (int *status_offset, int *nest_offset) *nest_offset = ENCODE_OFF_SIZE (MONO_STRUCT_OFFSET (MonoThreadsSync, nest), sizeof (ts.nest)); } -static void -mono_monitor_try_enter_with_atomic_var (MonoObject *obj, guint32 ms, MonoBoolean allow_interruption, MonoBoolean *lockTaken, MonoError* error) +static MonoBoolean +mono_monitor_try_enter_loop_if_interrupted (MonoObject *obj, guint32 ms, + MonoBoolean allow_interruption, MonoBoolean *lockTaken, MonoError* error) { - // The use of error here is unusual, but expedient, and easy enough to understand. - // Maybe clean it up later. - - gint32 res; + // Return value and lockTaken are equivalent, except, to preserve prior behavior, + // *lockTaken is not always written to, i.e. in the error paths. + // + // Some callers have lockTaken and only use it, some only have the return value. if (G_UNLIKELY (!obj)) { if (error) { @@ -1202,44 +1182,58 @@ mono_monitor_try_enter_with_atomic_var (MonoObject *obj, guint32 ms, MonoBoolean mono_error_set_argument_null (error, "obj", ""); mono_error_set_pending_exception (error); } - return; + return FALSE; } + gint32 res; + + /* + * An inquisitive mind could ask what's the deal with this loop. + * It exists to deal with interrupting a monitor enter that happened within an abort-protected block, like a .cctor. + * + * The thread will be set with a pending abort and the wait might even be interrupted. Either way, once we call mono_thread_interruption_checkpoint, + * it will return NULL meaning we can't be aborted right now. Once that happens we switch to non-alertable. + */ do { res = mono_monitor_try_enter_internal (obj, ms, allow_interruption); - /*This means we got interrupted during the wait and didn't got the monitor.*/ if (res == -1) { - MonoException *exc = mono_thread_interruption_checkpoint (); + // The wait was interrupted and the monitor was not acquired. + MonoException *exc; + HANDLE_FUNCTION_ENTER (); + exc = mono_thread_interruption_checkpoint (); if (exc) { - if (error) { // implies icall and coop handle frame -- a little gross - MONO_HANDLE_NEW (MonoException, exc); + MONO_HANDLE_NEW (MonoException, exc); + if (error) mono_error_set_exception_instance (error, exc); - } else { + else mono_set_pending_exception (exc); - } - return; - } else { - //we detected a pending interruption but it turned out to be a false positive, we ignore it from now on (this feels like a hack, right?, threads.c should give us less confusing directions) - allow_interruption = FALSE; } + HANDLE_FUNCTION_RETURN (); + if (exc) + return FALSE; + // The interrupt was a false positive. Ignore it from now on. + // This feels like a hack. + // threads.c should give us less confusing directions. + allow_interruption = FALSE; } } while (res == -1); /*It's safe to do it from here since interruption would happen only on the wrapper.*/ *lockTaken = res == 1; + return res; } #ifdef ENABLE_NETCORE void ves_icall_System_Threading_Monitor_Monitor_try_enter_with_atomic_var (MonoObjectHandle obj, guint32 ms, MonoBoolean allow_interruption, MonoBoolean* lockTaken, MonoError* error) { - mono_monitor_try_enter_with_atomic_var (MONO_HANDLE_RAW (obj), ms, allow_interruption, lockTaken, error); + mono_monitor_try_enter_loop_if_interrupted (MONO_HANDLE_RAW (obj), ms, allow_interruption, lockTaken, error); } #else void ves_icall_System_Threading_Monitor_Monitor_try_enter_with_atomic_var (MonoObjectHandle obj, guint32 ms, MonoBoolean* lockTaken, MonoError* error) { - mono_monitor_try_enter_with_atomic_var (MONO_HANDLE_RAW (obj), ms, TRUE, lockTaken, error); + mono_monitor_try_enter_loop_if_interrupted (MONO_HANDLE_RAW (obj), ms, TRUE, lockTaken, error); } #endif @@ -1263,7 +1257,7 @@ mono_monitor_enter_v4_internal (MonoObject *obj, MonoBoolean *lock_taken) mono_error_set_pending_exception (error); return; } - mono_monitor_try_enter_with_atomic_var (obj, MONO_INFINITE_WAIT, FALSE, lock_taken, NULL); + mono_monitor_try_enter_loop_if_interrupted (obj, MONO_INFINITE_WAIT, FALSE, lock_taken, NULL); } /* @@ -1505,7 +1499,6 @@ ves_icall_System_Threading_Monitor_Monitor_wait (MonoObjectHandle obj_handle, gu return mono_monitor_wait (obj_handle, ms, TRUE, error); } #endif - void ves_icall_System_Threading_Monitor_Monitor_Enter (MonoObjectHandle obj, MonoError* error) { diff --git a/mono/metadata/mono-config.c b/mono/metadata/mono-config.c index 30c289b291..d973de53c8 100644 --- a/mono/metadata/mono-config.c +++ b/mono/metadata/mono-config.c @@ -618,7 +618,7 @@ mono_config_for_assembly_internal (MonoImage *assembly) MONO_REQ_GC_UNSAFE_MODE; MonoConfigParseState state = {NULL}; - int got_it = 0, i; + int i; char *aname, *cfg, *cfg_name; const char *bundled_config; @@ -634,6 +634,8 @@ mono_config_for_assembly_internal (MonoImage *assembly) mono_config_parse_file_with_context (&state, cfg_name); g_free (cfg_name); +#ifndef DISABLE_CFGDIR_CONFIG + int got_it = 0; cfg_name = g_strdup_printf ("%s.config", mono_image_get_name (assembly)); const char *cfg_dir = mono_get_config_dir (); if (!cfg_dir) { @@ -657,6 +659,7 @@ mono_config_for_assembly_internal (MonoImage *assembly) break; } g_free (cfg_name); +#endif } /** diff --git a/mono/metadata/mono-route.c b/mono/metadata/mono-route.c index c88ac9ab65..2e0bf02309 100644 --- a/mono/metadata/mono-route.c +++ b/mono/metadata/mono-route.c @@ -36,7 +36,7 @@ gateway_from_rtm (struct rt_msghdr *rtm); #include "icall-decl.h" MonoBoolean -ves_icall_System_Net_NetworkInformation_MacOsIPInterfaceProperties_ParseRouteInfo_internal (MonoStringHandle iface_handle, MonoArrayHandleOut gw_addr_list_handle, MonoError *error) +ves_icall_System_Net_NetworkInformation_MacOsIPInterfaceProperties_ParseRouteInfo (MonoStringHandle iface_handle, MonoArrayHandleOut gw_addr_list_handle, MonoError *error) { MonoString *iface = MONO_HANDLE_RAW (iface_handle); MONO_HANDLE_ASSIGN_RAW (gw_addr_list_handle, NULL); @@ -160,7 +160,7 @@ gateway_from_rtm(struct rt_msghdr *rtm) #include "icall-decl.h" MonoBoolean -ves_icall_System_Net_NetworkInformation_MacOsIPInterfaceProperties_ParseRouteInfo_internal (MonoStringHandle iface_handle, MonoArrayHandleOut gw_addr_list_handle, MonoError *error) +ves_icall_System_Net_NetworkInformation_MacOsIPInterfaceProperties_ParseRouteInfo (MonoStringHandle iface_handle, MonoArrayHandleOut gw_addr_list_handle, MonoError *error) { mono_error_set_not_implemented (error, ""); return FALSE; diff --git a/mono/metadata/mono-security-windows.c b/mono/metadata/mono-security-windows.c index 52348c59f6..553ef60196 100644 --- a/mono/metadata/mono-security-windows.c +++ b/mono/metadata/mono-security-windows.c @@ -443,7 +443,7 @@ mono_security_win_protect_user (const gunichar2 *path, MonoError *error) #endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */ MonoBoolean -ves_icall_Mono_Security_Cryptography_KeyPairPersistence_CanSecure (const gunichar2 *root, MonoError *error) +ves_icall_Mono_Security_Cryptography_KeyPairPersistence_CanSecure (const gunichar2 *root) { DWORD flags = 0; @@ -454,31 +454,44 @@ ves_icall_Mono_Security_Cryptography_KeyPairPersistence_CanSecure (const gunicha } MonoBoolean -ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsMachineProtected (const gunichar2 *path, MonoError *error) +ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsMachineProtected (const gunichar2 *path) { /* no one, but the owner, should have write access to the directory */ - return (MonoBoolean)mono_security_win_is_machine_protected (path, error); + ERROR_DECL (error); + MonoBoolean result = (MonoBoolean)mono_security_win_is_machine_protected (path, error); + mono_error_set_pending_exception (error); + return result; } MonoBoolean -ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsUserProtected (const gunichar2 *path, MonoError *error) +ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsUserProtected (const gunichar2 *path) { /* no one, but the user, should have access to the directory */ - return (MonoBoolean)mono_security_win_is_user_protected (path, error); + ERROR_DECL (error); + MonoBoolean result = (MonoBoolean)mono_security_win_is_user_protected (path, error); + mono_error_set_pending_exception (error); + return result; } MonoBoolean -ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectMachine (const gunichar2 *path, MonoError *error) +ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectMachine (const gunichar2 *path) { /* read/write to owner, read to everyone else */ - return (MonoBoolean)mono_security_win_protect_machine (path, error); + ERROR_DECL (error); + MonoBoolean result = (MonoBoolean)mono_security_win_protect_machine (path, error); + mono_error_set_pending_exception (error); + return result; } MonoBoolean -ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectUser (const gunichar2 *path, MonoError *error) +ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectUser (const gunichar2 *path) { /* read/write to user, no access to everyone else */ - return (MonoBoolean)mono_security_win_protect_user (path, error); + ERROR_DECL (error); + MonoBoolean result = (MonoBoolean)mono_security_win_protect_user (path, error); + mono_error_set_pending_exception (error); + return result; + } #endif /* HOST_WIN32 */ diff --git a/mono/metadata/mono-security.c b/mono/metadata/mono-security.c index b3b8b3059c..f25e94dee8 100644 --- a/mono/metadata/mono-security.c +++ b/mono/metadata/mono-security.c @@ -526,7 +526,7 @@ Protect (const gunichar2 *path, gint32 file_mode, gint32 add_dir_mode) #ifdef HAVE_CHMOD result = (chmod (utf8_name, mode) == 0); #else - result = -1; + result = -1; // FIXME Huh? This must be TRUE or FALSE. #endif } g_free (utf8_name); @@ -535,14 +535,14 @@ Protect (const gunichar2 *path, gint32 file_mode, gint32 add_dir_mode) } MonoBoolean -ves_icall_Mono_Security_Cryptography_KeyPairPersistence_CanSecure (const gunichar2 *path, MonoError *error) +ves_icall_Mono_Security_Cryptography_KeyPairPersistence_CanSecure (const gunichar2 *path) { /* we assume some kind of security is applicable outside Windows */ return TRUE; } MonoBoolean -ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsMachineProtected (const gunichar2 *path, MonoError *error) +ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsMachineProtected (const gunichar2 *path) { gboolean ret = FALSE; @@ -552,7 +552,7 @@ ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsMachineProtected (cons } MonoBoolean -ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsUserProtected (const gunichar2 *path, MonoError *error) +ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsUserProtected (const gunichar2 *path) { gboolean ret = FALSE; @@ -562,7 +562,7 @@ ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsUserProtected (const g } MonoBoolean -ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectMachine (const gunichar2 *path, MonoError *error) +ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectMachine (const gunichar2 *path) { gboolean ret = FALSE; @@ -572,7 +572,7 @@ ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectMachine (const gu } MonoBoolean -ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectUser (const gunichar2 *path, MonoError *error) +ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectUser (const gunichar2 *path) { gboolean ret = FALSE; diff --git a/mono/metadata/native-library.c b/mono/metadata/native-library.c index c82ce662ff..d57252f1b1 100644 --- a/mono/metadata/native-library.c +++ b/mono/metadata/native-library.c @@ -291,6 +291,7 @@ mono_loader_register_module (const char *name, MonoDl *module) mono_global_loader_data_unlock (); } +#ifdef ENABLE_NETCORE static MonoDl * mono_loader_register_module_locking (const char *name, MonoDl *module) { @@ -317,6 +318,7 @@ exit: return result; } +#endif static void remove_cached_module (gpointer key, gpointer value, gpointer user_data) @@ -544,16 +546,15 @@ netcore_resolve_with_dll_import_resolver (MonoAssemblyLoadContext *alc, MonoAsse gpointer lib = NULL; MonoDomain *domain = mono_alc_domain (alc); - static MonoMethod *resolve; + MONO_STATIC_POINTER_INIT (MonoMethod, resolve) - if (!resolve) { ERROR_DECL (local_error); MonoClass *native_lib_class = mono_class_get_native_library_class (); g_assert (native_lib_class); - MonoMethod *m = mono_class_get_method_from_name_checked (native_lib_class, "MonoLoadLibraryCallbackStub", -1, 0, local_error); + resolve = mono_class_get_method_from_name_checked (native_lib_class, "MonoLoadLibraryCallbackStub", -1, 0, local_error); mono_error_assert_ok (local_error); - resolve = m; - } + + MONO_STATIC_POINTER_INIT_END (MonoMethod, resolve) g_assert (resolve); if (mono_runtime_get_no_exec ()) @@ -605,16 +606,15 @@ netcore_resolve_with_load (MonoAssemblyLoadContext *alc, const char *scope, Mono MonoDl *result = NULL; gpointer lib = NULL; - static MonoMethod *resolve; + MONO_STATIC_POINTER_INIT (MonoMethod, resolve) - if (!resolve) { ERROR_DECL (local_error); MonoClass *alc_class = mono_class_get_assembly_load_context_class (); g_assert (alc_class); - MonoMethod *m = mono_class_get_method_from_name_checked (alc_class, "MonoResolveUnmanagedDll", -1, 0, local_error); + resolve = mono_class_get_method_from_name_checked (alc_class, "MonoResolveUnmanagedDll", -1, 0, local_error); mono_error_assert_ok (local_error); - resolve = m; - } + + MONO_STATIC_POINTER_INIT_END (MonoMethod, resolve) g_assert (resolve); if (mono_runtime_get_no_exec ()) @@ -663,16 +663,15 @@ netcore_resolve_with_resolving_event (MonoAssemblyLoadContext *alc, MonoAssembly gpointer lib = NULL; MonoDomain *domain = mono_alc_domain (alc); - static MonoMethod *resolve; + MONO_STATIC_POINTER_INIT (MonoMethod, resolve) - if (!resolve) { ERROR_DECL (local_error); MonoClass *alc_class = mono_class_get_assembly_load_context_class (); g_assert (alc_class); - MonoMethod *m = mono_class_get_method_from_name_checked (alc_class, "MonoResolveUnmanagedDllUsingEvent", -1, 0, local_error); + resolve = mono_class_get_method_from_name_checked (alc_class, "MonoResolveUnmanagedDllUsingEvent", -1, 0, local_error); mono_error_assert_ok (local_error); - resolve = m; - } + + MONO_STATIC_POINTER_INIT_END (MonoMethod, resolve) g_assert (resolve); if (mono_runtime_get_no_exec ()) diff --git a/mono/metadata/null-gc.c b/mono/metadata/null-gc.c index 47477fcb92..52f7101e23 100644 --- a/mono/metadata/null-gc.c +++ b/mono/metadata/null-gc.c @@ -314,6 +314,11 @@ mono_gc_thread_attach (MonoThreadInfo* info) return info; } +void +mono_gc_thread_detach (MonoThreadInfo *p) +{ +} + void mono_gc_thread_detach_with_lock (MonoThreadInfo *p) { diff --git a/mono/metadata/object-internals.h b/mono/metadata/object-internals.h index c4b56704d3..4e4378302b 100644 --- a/mono/metadata/object-internals.h +++ b/mono/metadata/object-internals.h @@ -564,8 +564,7 @@ struct _MonoThreadInfo; typedef struct MonoThreadName { char* volatile chars; // null check outside of lock - gsize volatile generation; // read outside of lock - gint32 free; + gint32 free; // bool gint32 length; } MonoThreadName; diff --git a/mono/metadata/object.c.REMOVED.git-id b/mono/metadata/object.c.REMOVED.git-id index ffcdac693d..8cbf1e7527 100644 --- a/mono/metadata/object.c.REMOVED.git-id +++ b/mono/metadata/object.c.REMOVED.git-id @@ -1 +1 @@ -4ae184e23276fe7635591c2be5d116da1f055085 \ No newline at end of file +a69ff1083a9f00e9a0a470c00f21c6389f806138 \ No newline at end of file diff --git a/mono/metadata/reflection-internals.h b/mono/metadata/reflection-internals.h index b528146bf4..797d1ca383 100644 --- a/mono/metadata/reflection-internals.h +++ b/mono/metadata/reflection-internals.h @@ -20,10 +20,12 @@ TYPED_HANDLE_DECL (MonoReflectionAssembly) TYPED_HANDLE_DECL (MonoReflectionTypeBuilder) MonoReflectionAssemblyHandle -mono_domain_try_type_resolve_name (MonoDomain *domain, MonoStringHandle name, MonoError *error); +mono_domain_try_type_resolve_name (MonoDomain *domain, MonoAssembly *assembly, MonoStringHandle name, MonoError *error); +#ifndef ENABLE_NETCORE MonoReflectionAssemblyHandle mono_domain_try_type_resolve_typebuilder (MonoDomain *domain, MonoReflectionTypeBuilderHandle typebuilder, MonoError *error); +#endif MonoReflectionTypeBuilderHandle mono_class_get_ref_info (MonoClass *klass); diff --git a/mono/metadata/reflection.c.REMOVED.git-id b/mono/metadata/reflection.c.REMOVED.git-id index dd65820748..617a244812 100644 --- a/mono/metadata/reflection.c.REMOVED.git-id +++ b/mono/metadata/reflection.c.REMOVED.git-id @@ -1 +1 @@ -9fd4cd9b935c9c3ce9ea6b84daedf3e640998977 \ No newline at end of file +fe0b6088d7b3ab4e11b712d2f8f64a5b73196dec \ No newline at end of file diff --git a/mono/metadata/remoting.c b/mono/metadata/remoting.c index 4574ae0f74..8e41325222 100644 --- a/mono/metadata/remoting.c +++ b/mono/metadata/remoting.c @@ -1449,7 +1449,6 @@ mono_marshal_get_ldfld_wrapper (MonoType *type) WrapperInfo *info; char *name; int t, pos0, pos1 = 0; - static MonoMethod* tp_load = NULL; type = mono_type_get_underlying_type (type); @@ -1481,12 +1480,16 @@ mono_marshal_get_ldfld_wrapper (MonoType *type) return res; #ifndef DISABLE_REMOTING - if (!tp_load) { + + MONO_STATIC_POINTER_INIT (MonoMethod, tp_load) + ERROR_DECL (error); tp_load = mono_class_get_method_from_name_checked (mono_defaults.transparent_proxy_class, "LoadRemoteFieldNew", -1, 0, error); mono_error_assert_ok (error); g_assert (tp_load != NULL); - } + + MONO_STATIC_POINTER_INIT_END (MonoMethod, tp_load) + #endif /* we add the %p pointer value of klass because class names are not unique */ @@ -1752,7 +1755,6 @@ mono_marshal_get_stfld_wrapper (MonoType *type) WrapperInfo *info; char *name; int t, pos; - static MonoMethod *tp_store = NULL; type = mono_type_get_underlying_type (type); t = type->type; @@ -1783,12 +1785,16 @@ mono_marshal_get_stfld_wrapper (MonoType *type) return res; #ifndef DISABLE_REMOTING - if (!tp_store) { - ERROR_DECL (error); + + MONO_STATIC_POINTER_INIT (MonoMethod, tp_store) + + ERROR_DECL (error); tp_store = mono_class_get_method_from_name_checked (mono_defaults.transparent_proxy_class, "StoreRemoteField", -1, 0, error); mono_error_assert_ok (error); g_assert (tp_store != NULL); - } + + MONO_STATIC_POINTER_INIT_END (MonoMethod, tp_store) + #endif /* we add the %p pointer value of klass because class names are not unique */ diff --git a/mono/metadata/sgen-bridge-internals.h b/mono/metadata/sgen-bridge-internals.h index e66455b16f..763c385370 100644 --- a/mono/metadata/sgen-bridge-internals.h +++ b/mono/metadata/sgen-bridge-internals.h @@ -42,6 +42,9 @@ typedef struct { char *dump_prefix; gboolean accounting; gboolean scc_precise_merge; // Used by Tarjan + // Disables reporting SCCs with no bridge objects on tarjan. Used when comparing outputs + // of two bridge processors, in order to keep consistency. + gboolean disable_non_bridge_scc; } SgenBridgeProcessorConfig; typedef struct { diff --git a/mono/metadata/sgen-bridge.c b/mono/metadata/sgen-bridge.c index 558a073efb..2b4c662c5c 100644 --- a/mono/metadata/sgen-bridge.c +++ b/mono/metadata/sgen-bridge.c @@ -319,7 +319,7 @@ dump_processor_state (SgenBridgeProcessor *p) printf ("\tSCC %d:", i); for (j = 0; j < scc->num_objs; ++j) { MonoObject *obj = scc->objs [j]; - printf (" %p", obj); + printf (" %p(%s)", obj, SGEN_LOAD_VTABLE (obj)->klass->name); } printf ("\n"); } @@ -516,7 +516,8 @@ static const char *bridge_class; static MonoGCBridgeObjectKind bridge_test_bridge_class_kind (MonoClass *klass) { - if (!strcmp (bridge_class, m_class_get_name (klass))) + if (!strcmp (bridge_class, m_class_get_name (klass)) || + (m_class_get_parent (klass) && !strcmp (bridge_class, m_class_get_name (m_class_get_parent (klass))))) return GC_BRIDGE_TRANSPARENT_BRIDGE_CLASS; return GC_BRIDGE_TRANSPARENT_CLASS; } @@ -708,6 +709,7 @@ sgen_bridge_handle_gc_debug (const char *opt) if (selection != BRIDGE_PROCESSOR_INVALID) { // Compare processor doesn't get config init_bridge_processor (&compare_to_bridge_processor, selection); + bridge_processor_config.disable_non_bridge_scc = TRUE; } else { g_warning ("Invalid bridge implementation to compare against - ignoring."); } diff --git a/mono/metadata/sgen-mono.c b/mono/metadata/sgen-mono.c index aebbda0067..d9baf86daf 100644 --- a/mono/metadata/sgen-mono.c +++ b/mono/metadata/sgen-mono.c @@ -634,7 +634,7 @@ sgen_client_clear_unreachable_ephemerons (ScanCopyContext ctx) if (!key || key == tombstone) continue; - SGEN_LOG (5, "[%zd] key %p (%s) value %p (%s)", cur - mono_array_addr_internal (array, Ephemeron, 0), + SGEN_LOG (5, "[%" G_GSIZE_FORMAT "d] key %p (%s) value %p (%s)", cur - mono_array_addr_internal (array, Ephemeron, 0), key, sgen_is_object_alive_for_current_gen (key) ? "reachable" : "unreachable", cur->value, cur->value && sgen_is_object_alive_for_current_gen (cur->value) ? "reachable" : "unreachable"); @@ -686,7 +686,7 @@ sgen_client_mark_ephemerons (ScanCopyContext ctx) if (!key || key == tombstone) continue; - SGEN_LOG (5, "[%zd] key %p (%s) value %p (%s)", cur - mono_array_addr_internal (array, Ephemeron, 0), + SGEN_LOG (5, "[%" G_GSIZE_FORMAT "d] key %p (%s) value %p (%s)", cur - mono_array_addr_internal (array, Ephemeron, 0), key, sgen_is_object_alive_for_current_gen (key) ? "reachable" : "unreachable", cur->value, cur->value && sgen_is_object_alive_for_current_gen (cur->value) ? "reachable" : "unreachable"); @@ -2152,6 +2152,11 @@ sgen_client_thread_attach (SgenThreadInfo* info) info->client_info.info.handle_stack = mono_handle_stack_alloc (); } +void +mono_gc_thread_detach (SgenThreadInfo *info) +{ +} + void mono_gc_thread_detach_with_lock (SgenThreadInfo *info) { @@ -2302,10 +2307,10 @@ sgen_client_scan_thread_data (void *start_nursery, void *end_nursery, gboolean p void *aligned_stack_start; if (info->client_info.skip) { - SGEN_LOG (3, "Skipping dead thread %p, range: %p-%p, size: %zd", info, info->client_info.stack_start, info->client_info.info.stack_end, (char*)info->client_info.info.stack_end - (char*)info->client_info.stack_start); + SGEN_LOG (3, "Skipping dead thread %p, range: %p-%p, size: %" G_GSIZE_FORMAT "d", info, info->client_info.stack_start, info->client_info.info.stack_end, (char*)info->client_info.info.stack_end - (char*)info->client_info.stack_start); skip_reason = 1; } else if (!mono_thread_info_is_live (info)) { - SGEN_LOG (3, "Skipping non-running thread %p, range: %p-%p, size: %zd (state %x)", info, info->client_info.stack_start, info->client_info.info.stack_end, (char*)info->client_info.info.stack_end - (char*)info->client_info.stack_start, info->client_info.info.thread_state.raw); + SGEN_LOG (3, "Skipping non-running thread %p, range: %p-%p, size: %" G_GSIZE_FORMAT "d (state %x)", info, info->client_info.stack_start, info->client_info.info.stack_end, (char*)info->client_info.info.stack_end - (char*)info->client_info.stack_start, info->client_info.info.thread_state.raw); skip_reason = 3; } else if (!info->client_info.stack_start) { SGEN_LOG (3, "Skipping starting or detaching thread %p", info); @@ -2331,7 +2336,7 @@ sgen_client_scan_thread_data (void *start_nursery, void *end_nursery, gboolean p aligned_stack_start = get_aligned_stack_start (info); g_assert (info->client_info.suspend_done); - SGEN_LOG (3, "Scanning thread %p, range: %p-%p, size: %zd, pinned=%zd", info, info->client_info.stack_start, info->client_info.info.stack_end, (char*)info->client_info.info.stack_end - (char*)info->client_info.stack_start, sgen_get_pinned_count ()); + SGEN_LOG (3, "Scanning thread %p, range: %p-%p, size: %" G_GSIZE_FORMAT "d, pinned=%" G_GSIZE_FORMAT "d", info, info->client_info.stack_start, info->client_info.info.stack_end, (char*)info->client_info.info.stack_end - (char*)info->client_info.stack_start, sgen_get_pinned_count ()); if (mono_gc_get_gc_callbacks ()->thread_mark_func && !conservative_stack_mark) { mono_gc_get_gc_callbacks ()->thread_mark_func (info->client_info.runtime_data, (guint8 *)aligned_stack_start, (guint8 *)info->client_info.info.stack_end, precise, &ctx); } else if (!precise) { diff --git a/mono/metadata/sgen-tarjan-bridge.c b/mono/metadata/sgen-tarjan-bridge.c index 36cfbc1cb9..2d26e68798 100644 --- a/mono/metadata/sgen-tarjan-bridge.c +++ b/mono/metadata/sgen-tarjan-bridge.c @@ -138,6 +138,10 @@ typedef struct _ScanData { mword lock_word; ColorData *color; + // If this object isn't the scc root, we still need to store the xref colors on it, after computing + // low index, so we can add them to the scc that this object is part of. + DynPtrArray xrefs; + // Tarjan algorithm index (order visited) int index; // Tarjan index of lowest-index object known reachable from here @@ -150,11 +154,16 @@ typedef struct _ScanData { unsigned obj_state : 2; } ScanData; +// If true, disable an optimization where sometimes SCC nodes don't contain any bridge objects, in order to reduce total xrefs. +static gboolean disable_non_bridge_scc; + /* Should color be made visible to client even though it has no bridges? * True if we predict the number of reduced edges to be enough to justify the extra node. */ static gboolean bridgeless_color_is_heavy (ColorData *data) { + if (disable_non_bridge_scc) + return FALSE; int fanin = data->incoming_colors; int fanout = dyn_array_ptr_size (&data->other_colors); return fanin > HEAVY_REFS_MIN && fanout > HEAVY_REFS_MIN @@ -553,6 +562,18 @@ find_in_cache (int *insert_index) return NULL; } +// Populate other_colors for a give color (other_colors represent the xrefs for this color) +static void +add_other_colors (ColorData *color, DynPtrArray *other_colors) +{ + for (int i = 0; i < dyn_array_ptr_size (other_colors); ++i) { + ColorData *points_to = (ColorData *)dyn_array_ptr_get (other_colors, i); + dyn_array_ptr_add (&color->other_colors, points_to); + // Inform targets + points_to->incoming_colors = MIN (points_to->incoming_colors + 1, INCOMING_COLORS_MAX); + } +} + // A color is needed for an SCC. If the SCC has bridges, the color MUST be newly allocated. // If the SCC lacks bridges, the allocator MAY use the cache to merge it with an existing one. static ColorData* @@ -569,13 +590,8 @@ new_color (gboolean has_bridges) cd = alloc_color_data (); cd->api_index = -1; - dyn_array_ptr_set_all (&cd->other_colors, &color_merge_array); - // Inform targets - for (int i = 0; i < dyn_array_ptr_size (&color_merge_array); ++i) { - ColorData *points_to = (ColorData *)dyn_array_ptr_get (&color_merge_array, i); - points_to->incoming_colors = MIN (points_to->incoming_colors + 1, INCOMING_COLORS_MAX); - } + add_other_colors (cd, &color_merge_array); /* if cacheSlot >= 0, it means we prepared a given slot to receive the new color */ if (cacheSlot >= 0) @@ -683,7 +699,7 @@ compute_low_index (ScanData *data, GCObject *obj) other = find_data (obj); #if DUMP_GRAPH - printf ("\tcompute low %p ->%p (%s) %p (%d / %d)\n", data->obj, obj, safe_name_bridge (obj), other, other ? other->index : -2, other ? other->low_index : -2); + printf ("\tcompute low %p ->%p (%s) %p (%d / %d, color %p)\n", data->obj, obj, safe_name_bridge (obj), other, other ? other->index : -2, other ? other->low_index : -2, other->color); #endif if (!other) return; @@ -698,8 +714,15 @@ compute_low_index (ScanData *data, GCObject *obj) return; cd = other->color; + + // The scc for the referenced object was already created, meaning this is an xref. + // Add it to the color merge array so we can handle it later when creating the scc + // for the current object (data) if (!cd->visited) { color_merge_array_hash += mix_hash ((uintptr_t) other->color); +#if DUMP_GRAPH + printf ("\t\tadd color %p to color_merge_array\n", other->color); +#endif dyn_array_ptr_add (&color_merge_array, other->color); cd->visited = TRUE; } @@ -760,27 +783,21 @@ create_scc (ScanData *data) break; } -#if DUMP_GRAPH - printf ("|SCC rooted in %s (%p) has bridge %d\n", safe_name_bridge (data->obj), data->obj, found_bridge); - printf ("\tpoints-to-colors: "); - for (int i = 0; i < dyn_array_ptr_size (&color_merge_array); ++i) - printf ("%p ", dyn_array_ptr_get (&color_merge_array, i)); - printf ("\n"); - - printf ("loop stack: "); - for (int i = 0; i < dyn_array_ptr_size (&loop_stack); ++i) { - ScanData *other = dyn_array_ptr_get (&loop_stack, i); - printf ("(%d/%d)", other->index, other->low_index); - } - printf ("\n"); -#endif - if (found_bridge) { color_data = new_color (TRUE); ++num_colors_with_bridges; } else { color_data = reduce_color (); } +#if DUMP_GRAPH + printf ("|SCC %p rooted in %s (%p) has bridge %d\n", color_data, safe_name_bridge (data->obj), data->obj, found_bridge); + printf ("\tloop stack: "); + for (int i = 0; i < dyn_array_ptr_size (&loop_stack); ++i) { + ScanData *other = dyn_array_ptr_get (&loop_stack, i); + printf ("(%d/%d)", other->index, other->low_index); + } + printf ("\n"); +#endif while (dyn_array_ptr_size (&loop_stack) > 0) { ScanData *other = (ScanData *)dyn_array_ptr_pop (&loop_stack); @@ -803,6 +820,12 @@ create_scc (ScanData *data) if (other->is_bridge) dyn_array_ptr_add (&color_data->bridges, other->obj); + // Maybe we should make sure we are not adding duplicates here. It is not really a problem + // since we will get rid of duplicates before submitting the SCCs to the client in gather_xrefs + if (color_data) + add_other_colors (color_data, &other->xrefs); + dyn_array_ptr_uninit (&other->xrefs); + if (other == data) { found = TRUE; break; @@ -810,13 +833,12 @@ create_scc (ScanData *data) } g_assert (found); - for (i = 0; i < dyn_array_ptr_size (&color_merge_array); ++i) { - ColorData *cd = (ColorData *)dyn_array_ptr_get (&color_merge_array, i); - g_assert (cd->visited); - cd->visited = FALSE; - } - color_merge_array_empty (); - found_bridge = FALSE; +#if DUMP_GRAPH + printf ("\tpoints-to-colors: "); + for (int i = 0; i < dyn_array_ptr_size (&color_data->other_colors); i++) + printf ("%p ", dyn_array_ptr_get (&color_data->other_colors, i)); + printf ("\n"); +#endif } static void @@ -840,8 +862,8 @@ dfs (void) * We start scanning from A and push C before B. So, after the first iteration, the scan stack will have: A C B. * We then visit B, which will find C in its initial state and push again. * Finally after finish with C and B, the stack will be left with "A C" and at this point C should be ignored. - * - * The above explains FINISHED_ON_STACK, to explain FINISHED_OFF_STACK, consider if the root was D, which pointed + * + * The above explains FINISHED_ON_STACK, to explain FINISHED_OFF_STACK, consider if the root was D, which pointed * to A and C. A is processed first, leaving C on stack after that in the mentioned state. */ if (data->state == FINISHED_ON_STACK || data->state == FINISHED_OFF_STACK) @@ -856,9 +878,6 @@ dfs (void) dyn_array_ptr_push (&scan_stack, data); dyn_array_ptr_push (&loop_stack, data); -#if DUMP_GRAPH - printf ("+scanning %s (%p) index %d color %p\n", safe_name_bridge (data->obj), data->obj, data->index, data->color); -#endif /*push all refs */ push_all (data); } else { @@ -876,8 +895,21 @@ dfs (void) printf ("-finished %s (%p) index %d low-index %d color %p\n", safe_name_bridge (data->obj), data->obj, data->index, data->low_index, data->color); #endif //SCC root - if (data->index == data->low_index) + if (data->index == data->low_index) { create_scc (data); + } else { + // We need to clear colo_merge_array from all xrefs. We flush them to the current color + // and will add them to the scc when we reach the root of the scc. + g_assert (dyn_array_ptr_size (&data->xrefs) == 0); + dyn_array_ptr_set_all (&data->xrefs, &color_merge_array); + } + // We populated color_merge_array while scanning the object with each neighbor color. Clear it now + for (int i = 0; i < dyn_array_ptr_size (&color_merge_array); i++) { + ColorData *cd = (ColorData *)dyn_array_ptr_get (&color_merge_array, i); + g_assert (cd->visited); + cd->visited = FALSE; + } + color_merge_array_empty (); } } } @@ -1213,6 +1245,8 @@ set_config (const SgenBridgeProcessorConfig *config) hash_perturb = 0; scc_precise_merge = TRUE; } + if (config->disable_non_bridge_scc) + disable_non_bridge_scc = TRUE; } void diff --git a/mono/metadata/sgen-toggleref.c b/mono/metadata/sgen-toggleref.c index 3fa53bd333..831d0aaccf 100644 --- a/mono/metadata/sgen-toggleref.c +++ b/mono/metadata/sgen-toggleref.c @@ -213,13 +213,14 @@ mono_gc_toggleref_register_callback (MonoToggleRefStatus (*proccess_toggleref) ( static MonoToggleRefStatus test_toggleref_callback (MonoObject *obj) { - static MonoClassField *mono_toggleref_test_field; MonoToggleRefStatus status = MONO_TOGGLE_REF_DROP; - if (!mono_toggleref_test_field) { + MONO_STATIC_POINTER_INIT (MonoClassField, mono_toggleref_test_field) + mono_toggleref_test_field = mono_class_get_field_from_name_full (mono_object_class (obj), "__test", NULL); g_assert (mono_toggleref_test_field); - } + + MONO_STATIC_POINTER_INIT_END (MonoClassField, mono_toggleref_test_field) /* In coop mode, important to not call a helper that will pin obj! */ mono_field_get_value_internal (obj, mono_toggleref_test_field, &status); diff --git a/mono/metadata/sre.c.REMOVED.git-id b/mono/metadata/sre.c.REMOVED.git-id index ad34863e37..67abe635a7 100644 --- a/mono/metadata/sre.c.REMOVED.git-id +++ b/mono/metadata/sre.c.REMOVED.git-id @@ -1 +1 @@ -ae200dae8330ba68e259652144956fc5e52d0bdf \ No newline at end of file +038f5b407f78028268a9392bb8bb22ab6a3e57d4 \ No newline at end of file diff --git a/mono/metadata/threadpool-worker-default.c b/mono/metadata/threadpool-worker-default.c index a7119f3996..4a49736517 100644 --- a/mono/metadata/threadpool-worker-default.c +++ b/mono/metadata/threadpool-worker-default.c @@ -533,7 +533,7 @@ worker_try_create (void) ERROR_DECL (error); MonoInternalThread *thread; gint64 current_ticks; - gint32 now; + gint32 now = 0; ThreadPoolWorkerCounter counter; if (mono_runtime_is_shutting_down ()) diff --git a/mono/metadata/threadpool.c b/mono/metadata/threadpool.c index 5674da399c..ecbe81abbd 100644 --- a/mono/metadata/threadpool.c +++ b/mono/metadata/threadpool.c @@ -163,8 +163,6 @@ cleanup (void) gboolean mono_threadpool_enqueue_work_item (MonoDomain *domain, MonoObject *work_item, MonoError *error) { - static MonoClass *threadpool_class = NULL; - static MonoMethod *unsafe_queue_custom_work_item_method = NULL; MonoDomain *current_domain; MonoBoolean f; gpointer args [2]; @@ -172,13 +170,19 @@ mono_threadpool_enqueue_work_item (MonoDomain *domain, MonoObject *work_item, Mo error_init (error); g_assert (work_item); - if (!threadpool_class) + MONO_STATIC_POINTER_INIT (MonoClass, threadpool_class) + threadpool_class = mono_class_load_from_name (mono_defaults.corlib, "System.Threading", "ThreadPool"); - if (!unsafe_queue_custom_work_item_method) { + MONO_STATIC_POINTER_INIT_END (MonoClass, threadpool_class) + + MONO_STATIC_POINTER_INIT (MonoMethod, unsafe_queue_custom_work_item_method) + unsafe_queue_custom_work_item_method = mono_class_get_method_from_name_checked (threadpool_class, "UnsafeQueueCustomWorkItem", 2, 0, error); mono_error_assert_ok (error); - } + + MONO_STATIC_POINTER_INIT_END (MonoMethod, unsafe_queue_custom_work_item_method) + g_assert (unsafe_queue_custom_work_item_method); f = FALSE; @@ -289,10 +293,13 @@ try_invoke_perform_wait_callback (MonoObject** exc, MonoError *error) HANDLE_FUNCTION_RETURN_VAL (res); } -static gsize -set_thread_name (MonoInternalThread *thread) +static void +mono_threadpool_set_thread_name (MonoInternalThread *thread) { - return mono_thread_set_name_constant_ignore_error (thread, "Thread Pool Worker", MonoSetThreadNameFlag_Reset); + mono_thread_set_name_constant_ignore_error ( + thread, + "Thread Pool Worker", + MonoSetThreadNameFlag_Reset | MonoSetThreadNameFlag_RepeatedlyButOptimized); } static void @@ -330,10 +337,8 @@ worker_callback (void) */ mono_defaults.threadpool_perform_wait_callback_method->save_lmf = TRUE; - gsize name_generation = thread->name.generation; /* Set the name if this is the first call to worker_callback on this thread */ - if (name_generation == 0) - name_generation = set_thread_name (thread); + mono_threadpool_set_thread_name (thread); domains_lock (); @@ -366,13 +371,7 @@ worker_callback (void) domains_unlock (); - // Any thread can set any other thread name at any time. - // So this is unavoidably racy. - // This only partly fights against that -- i.e. not atomic and not a loop. - // It is reliable against the thread setting its own name, and somewhat - // reliable against other threads setting this thread's name. - if (name_generation != thread->name.generation) - name_generation = set_thread_name (thread); + mono_threadpool_set_thread_name (thread); mono_thread_clear_and_set_state (thread, (MonoThreadState)~ThreadState_Background, @@ -400,8 +399,7 @@ worker_callback (void) mono_thread_pop_appdomain_ref (); /* Reset name after every callback */ - if (name_generation != thread->name.generation) - name_generation = set_thread_name (thread); + mono_threadpool_set_thread_name (thread); domains_lock (); @@ -445,16 +443,18 @@ mono_threadpool_cleanup (void) MonoAsyncResult * mono_threadpool_begin_invoke (MonoDomain *domain, MonoObject *target, MonoMethod *method, gpointer *params, MonoError *error) { - static MonoClass *async_call_klass = NULL; MonoMethodMessage *message; MonoAsyncResult *async_result; MonoAsyncCall *async_call; MonoDelegate *async_callback = NULL; MonoObject *state = NULL; - if (!async_call_klass) + MONO_STATIC_POINTER_INIT (MonoClass, async_call_klass) + async_call_klass = mono_class_load_from_name (mono_defaults.corlib, "System", "MonoAsyncCall"); + MONO_STATIC_POINTER_INIT_END (MonoClass, async_call_klass) + error_init (error); message = mono_method_call_message_new (method, params, mono_get_delegate_invoke_internal (method->klass), (params != NULL) ? (&async_callback) : NULL, (params != NULL) ? (&state) : NULL, error); diff --git a/mono/metadata/threads-types.h b/mono/metadata/threads-types.h index 9f4ddd8557..dc06fb5653 100644 --- a/mono/metadata/threads-types.h +++ b/mono/metadata/threads-types.h @@ -342,12 +342,13 @@ typedef enum { MonoSetThreadNameFlag_Permanent = 0x0001, MonoSetThreadNameFlag_Reset = 0x0002, MonoSetThreadNameFlag_Constant = 0x0004, + MonoSetThreadNameFlag_RepeatedlyButOptimized = 0x0008, } MonoSetThreadNameFlags; G_ENUM_FUNCTIONS (MonoSetThreadNameFlags) MONO_PROFILER_API -gsize +void mono_thread_set_name (MonoInternalThread *thread, const char* name8, size_t name8_length, const gunichar2* name16, MonoSetThreadNameFlags flags, MonoError *error); diff --git a/mono/metadata/threads.c.REMOVED.git-id b/mono/metadata/threads.c.REMOVED.git-id index ad40dd99fc..23bbfbe14c 100644 --- a/mono/metadata/threads.c.REMOVED.git-id +++ b/mono/metadata/threads.c.REMOVED.git-id @@ -1 +1 @@ -470e7fcdfb8553803d57a5b6b3a4e4508e7e6b40 \ No newline at end of file +147dacf05d5808f1f916d4275c477b704319e94b \ No newline at end of file diff --git a/mono/metadata/verify.c.REMOVED.git-id b/mono/metadata/verify.c.REMOVED.git-id index 1a2bcf9ed5..8c8e138715 100644 --- a/mono/metadata/verify.c.REMOVED.git-id +++ b/mono/metadata/verify.c.REMOVED.git-id @@ -1 +1 @@ -ca70680463d28942bf67e0cc50d99724f40fd208 \ No newline at end of file +0214e6f458a1793f60a2d74dee2b4a509cf9be1d \ No newline at end of file diff --git a/mono/metadata/w32handle.c b/mono/metadata/w32handle.c index c7077aac85..5f064b5aa5 100644 --- a/mono/metadata/w32handle.c +++ b/mono/metadata/w32handle.c @@ -1004,7 +1004,7 @@ mono_w32handle_wait_multiple (gpointer *handles, gsize nhandles, gboolean waital alerted = FALSE; if (nhandles > MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS) { - mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_HANDLE, "%s: too many handles: %zd", + mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_HANDLE, "%s: too many handles: %" G_GSIZE_FORMAT "d", __func__, nhandles); return MONO_W32HANDLE_WAIT_RET_FAILED; diff --git a/mono/metadata/w32process-unix.c.REMOVED.git-id b/mono/metadata/w32process-unix.c.REMOVED.git-id index ed6d438bd1..95fc6dea33 100644 --- a/mono/metadata/w32process-unix.c.REMOVED.git-id +++ b/mono/metadata/w32process-unix.c.REMOVED.git-id @@ -1 +1 @@ -e279b9b26abb99e01279366fec176eb40e2e4fb6 \ No newline at end of file +b4fcc3016fee8e441091f490bd08e9f1e7994361 \ No newline at end of file diff --git a/mono/metadata/w32semaphore-unix.c b/mono/metadata/w32semaphore-unix.c index 6a851fc77b..fd1138b2b0 100644 --- a/mono/metadata/w32semaphore-unix.c +++ b/mono/metadata/w32semaphore-unix.c @@ -238,7 +238,7 @@ exit: gpointer ves_icall_System_Threading_Semaphore_CreateSemaphore_icall (gint32 initialCount, gint32 maximumCount, - const gunichar2 *name, gint32 name_length, gint32 *win32error, MonoError *error) + const gunichar2 *name, gint32 name_length, gint32 *win32error) { if (maximumCount <= 0) { mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_SEMAPHORE, "%s: maximumCount <= 0", __func__); @@ -258,14 +258,17 @@ invalid_parameter: */ mono_w32error_set_last (ERROR_SUCCESS); + ERROR_DECL (error); + gpointer sem = name ? namedsem_create (initialCount, maximumCount, name, name_length, error) : sem_create (initialCount, maximumCount); *win32error = mono_w32error_get_last (); + mono_error_set_pending_exception (error); \ return sem; } MonoBoolean -ves_icall_System_Threading_Semaphore_ReleaseSemaphore_internal (gpointer handle, gint32 releaseCount, gint32 *prevcount, MonoError *error) +ves_icall_System_Threading_Semaphore_ReleaseSemaphore_internal (gpointer handle, gint32 releaseCount, gint32 *prevcount) { MonoW32Handle *handle_data = NULL; MonoW32HandleSemaphore *sem_handle; @@ -319,10 +322,11 @@ exit: gpointer ves_icall_System_Threading_Semaphore_OpenSemaphore_icall (const gunichar2 *name, gint32 name_length, - gint32 rights, gint32 *win32error, MonoError *error) + gint32 rights, gint32 *win32error) { g_assert (name); gpointer handle = NULL; + ERROR_DECL (error); *win32error = ERROR_SUCCESS; @@ -352,6 +356,7 @@ ves_icall_System_Threading_Semaphore_OpenSemaphore_icall (const gunichar2 *name, exit: g_free (utf8_name); + mono_error_set_pending_exception (error); \ return handle; } diff --git a/mono/metadata/w32semaphore-win32.c b/mono/metadata/w32semaphore-win32.c index a6d3f2be09..4e26b38c6d 100644 --- a/mono/metadata/w32semaphore-win32.c +++ b/mono/metadata/w32semaphore-win32.c @@ -23,7 +23,7 @@ mono_w32semaphore_init (void) #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT | HAVE_UWP_WINAPI_SUPPORT) gpointer ves_icall_System_Threading_Semaphore_CreateSemaphore_icall (gint32 initialCount, gint32 maximumCount, - const gunichar2 *name, gint32 name_length, gint32 *win32error, MonoError *error) + const gunichar2 *name, gint32 name_length, gint32 *win32error) { HANDLE sem; MONO_ENTER_GC_SAFE; @@ -35,14 +35,14 @@ ves_icall_System_Threading_Semaphore_CreateSemaphore_icall (gint32 initialCount, #endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT | HAVE_UWP_WINAPI_SUPPORT) */ MonoBoolean -ves_icall_System_Threading_Semaphore_ReleaseSemaphore_internal (gpointer handle, gint32 releaseCount, gint32 *prevcount, MonoError *error) +ves_icall_System_Threading_Semaphore_ReleaseSemaphore_internal (gpointer handle, gint32 releaseCount, gint32 *prevcount) { return ReleaseSemaphore (handle, releaseCount, (PLONG)prevcount); } gpointer ves_icall_System_Threading_Semaphore_OpenSemaphore_icall (const gunichar2 *name, gint32 name_length, - gint32 rights, gint32 *win32error, MonoError *error) + gint32 rights, gint32 *win32error) { HANDLE sem; MONO_ENTER_GC_SAFE; diff --git a/mono/metadata/w32socket-unix.c b/mono/metadata/w32socket-unix.c index 5822ee7f65..ac3bd0f85f 100644 --- a/mono/metadata/w32socket-unix.c +++ b/mono/metadata/w32socket-unix.c @@ -1555,9 +1555,8 @@ mono_w32socket_convert_error (gint error) #ifndef ENABLE_NETCORE MonoBoolean -ves_icall_System_Net_Sockets_Socket_SupportPortReuse (MonoProtocolType proto, MonoError *error) +ves_icall_System_Net_Sockets_Socket_SupportPortReuse_icall (MonoProtocolType proto) { - error_init (error); #if defined (SO_REUSEPORT) return TRUE; #else diff --git a/mono/metadata/w32socket-win32.c b/mono/metadata/w32socket-win32.c index 44147f6c68..513e5bb739 100644 --- a/mono/metadata/w32socket-win32.c +++ b/mono/metadata/w32socket-win32.c @@ -274,9 +274,8 @@ mono_w32socket_convert_error (gint error) } MonoBoolean -ves_icall_System_Net_Sockets_Socket_SupportPortReuse (MonoProtocolType proto, MonoError *error) +ves_icall_System_Net_Sockets_Socket_SupportPortReuse_icall (MonoProtocolType proto) { - error_init (error); return TRUE; } diff --git a/mono/metadata/w32socket.c b/mono/metadata/w32socket.c index 4ff70667fe..477a25d43b 100644 --- a/mono/metadata/w32socket.c +++ b/mono/metadata/w32socket.c @@ -743,7 +743,7 @@ get_socket_assembly (void) } gpointer -ves_icall_System_Net_Sockets_Socket_Socket_internal (MonoObjectHandle this_obj, gint32 family, gint32 type, gint32 proto, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Socket_icall (gint32 family, gint32 type, gint32 proto, gint32 *werror, MonoError *error) { SOCKET sock; gint32 sock_family; @@ -785,11 +785,10 @@ ves_icall_System_Net_Sockets_Socket_Socket_internal (MonoObjectHandle this_obj, * file) is really an IntPtr which needs to be converted to a guint32. */ void -ves_icall_System_Net_Sockets_Socket_Close_internal (gsize sock, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Close_icall (gsize sock, gint32 *werror) { LOGDEBUG (g_message ("%s: closing 0x%x", __func__, sock)); - error_init (error); *werror = 0; /* Clear any pending work item from this socket if the underlying @@ -800,7 +799,7 @@ ves_icall_System_Net_Sockets_Socket_Close_internal (gsize sock, gint32 *werror, } gint32 -ves_icall_System_Net_Sockets_SocketException_WSAGetLastError_internal (void) +ves_icall_System_Net_Sockets_SocketException_WSAGetLastError_icall (void) { LOGDEBUG (g_message("%s: returning %d", __func__, mono_w32socket_get_last_error ())); @@ -808,12 +807,11 @@ ves_icall_System_Net_Sockets_SocketException_WSAGetLastError_internal (void) } gint32 -ves_icall_System_Net_Sockets_Socket_Available_internal (gsize sock, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Available_icall (gsize sock, gint32 *werror) { int ret; guint64 amount; - - error_init (error); + *werror = 0; /* FIXME: this might require amount to be unsigned long. */ @@ -827,11 +825,10 @@ ves_icall_System_Net_Sockets_Socket_Available_internal (gsize sock, gint32 *werr } void -ves_icall_System_Net_Sockets_Socket_Blocking_internal (gsize sock, MonoBoolean block, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Blocking_icall (gsize sock, MonoBoolean block, gint32 *werror) { int ret; - error_init (error); *werror = 0; ret = mono_w32socket_set_blocking (sock, block); @@ -840,11 +837,10 @@ ves_icall_System_Net_Sockets_Socket_Blocking_internal (gsize sock, MonoBoolean b } gpointer -ves_icall_System_Net_Sockets_Socket_Accept_internal (gsize sock, gint32 *werror, MonoBoolean blocking, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Accept_icall (gsize sock, gint32 *werror, MonoBoolean blocking) { SOCKET newsock; - error_init (error); *werror = 0; newsock = mono_w32socket_accept (sock, NULL, 0, blocking); @@ -857,11 +853,10 @@ ves_icall_System_Net_Sockets_Socket_Accept_internal (gsize sock, gint32 *werror, } void -ves_icall_System_Net_Sockets_Socket_Listen_internal(gsize sock, guint32 backlog, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Listen_icall (gsize sock, guint32 backlog, gint32 *werror) { int ret; - error_init (error); *werror = 0; ret = mono_w32socket_listen (sock, backlog); @@ -1083,13 +1078,13 @@ exit: } MonoObjectHandle -ves_icall_System_Net_Sockets_Socket_LocalEndPoint_internal (gsize sock, gint32 af, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_LocalEndPoint_icall (gsize sock, gint32 af, gint32 *werror, MonoError *error) { return mono_w32socket_getname (sock, af, TRUE, werror, error); } MonoObjectHandle -ves_icall_System_Net_Sockets_Socket_RemoteEndPoint_internal (gsize sock, gint32 af, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_RemoteEndPoint_icall (gsize sock, gint32 af, gint32 *werror, MonoError *error) { return mono_w32socket_getname (sock, af, FALSE, werror, error); } @@ -1220,7 +1215,7 @@ create_sockaddr_from_handle (MonoObjectHandle saddr_obj, socklen_t *sa_size, gin } void -ves_icall_System_Net_Sockets_Socket_Bind_internal (gsize sock, MonoObjectHandle sockaddr, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Bind_icall (gsize sock, MonoObjectHandle sockaddr, gint32 *werror, MonoError *error) { struct sockaddr *sa; socklen_t sa_size; @@ -1251,8 +1246,7 @@ enum { }; MonoBoolean -ves_icall_System_Net_Sockets_Socket_Poll_internal (gsize sock, gint mode, - gint timeout, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Poll_icall (gsize sock, gint mode, gint timeout, gint32 *werror) { MonoInternalThread *thread = mono_thread_internal_current (); mono_pollfd *pfds; @@ -1260,7 +1254,6 @@ ves_icall_System_Net_Sockets_Socket_Poll_internal (gsize sock, gint mode, time_t start; gint rtimeout; - error_init (error); *werror = 0; pfds = g_new0 (mono_pollfd, 1); @@ -1325,7 +1318,7 @@ ves_icall_System_Net_Sockets_Socket_Poll_internal (gsize sock, gint mode, } void -ves_icall_System_Net_Sockets_Socket_Connect_internal (gsize sock, MonoObjectHandle sockaddr, gint32 *werror, MonoBoolean blocking, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Connect_icall (gsize sock, MonoObjectHandle sockaddr, gint32 *werror, MonoBoolean blocking, MonoError *error) { struct sockaddr *sa; socklen_t sa_size; @@ -1351,21 +1344,18 @@ ves_icall_System_Net_Sockets_Socket_Connect_internal (gsize sock, MonoObjectHand #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT | HAVE_UWP_WINAPI_SUPPORT) void -ves_icall_System_Net_Sockets_Socket_Disconnect_internal (gsize sock, MonoBoolean reuse, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Disconnect_icall (gsize sock, MonoBoolean reuse, gint32 *werror) { - error_init (error); - LOGDEBUG (g_message("%s: disconnecting from socket %p (reuse %d)", __func__, sock, reuse)); *werror = mono_w32socket_disconnect (sock, reuse); } + #endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT | HAVE_UWP_WINAPI_SUPPORT) */ MonoBoolean -ves_icall_System_Net_Sockets_Socket_Duplicate_internal (gpointer handle, gint32 targetProcessId, gpointer *duplicate_handle, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Duplicate_icall (gpointer handle, gint32 targetProcessId, gpointer *duplicate_handle, gint32 *werror) { - error_init (error); - *werror = 0; if (!mono_w32socket_duplicate (handle, targetProcessId, duplicate_handle)) { *werror = mono_w32error_get_last (); @@ -1376,12 +1366,11 @@ ves_icall_System_Net_Sockets_Socket_Duplicate_internal (gpointer handle, gint32 } gint32 -ves_icall_System_Net_Sockets_Socket_Receive_internal (gsize sock, gchar *buffer, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Receive_icall (gsize sock, gchar *buffer, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking) { int ret; int recvflags = 0; - error_init (error); *werror = 0; recvflags = convert_socketflags (flags); @@ -1400,13 +1389,12 @@ ves_icall_System_Net_Sockets_Socket_Receive_internal (gsize sock, gchar *buffer, } gint32 -ves_icall_System_Net_Sockets_Socket_Receive_array_internal (gsize sock, WSABUF *buffers, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Receive_array_icall (gsize sock, WSABUF *buffers, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking) { int ret; guint32 recv; guint32 recvflags = 0; - error_init (error); *werror = 0; recvflags = convert_socketflags (flags); @@ -1425,7 +1413,7 @@ ves_icall_System_Net_Sockets_Socket_Receive_array_internal (gsize sock, WSABUF * } gint32 -ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal (gsize sock, gchar *buffer, gint32 count, gint32 flags, MonoObjectHandleInOut sockaddr, gint32 *werror, MonoBoolean blocking, MonoError *error) +ves_icall_System_Net_Sockets_Socket_ReceiveFrom_icall (gsize sock, gchar *buffer, gint32 count, gint32 flags, MonoObjectHandleInOut sockaddr, gint32 *werror, MonoBoolean blocking, MonoError *error) { int ret; int recvflags = 0; @@ -1474,12 +1462,11 @@ ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal (gsize sock, gchar *buf } gint32 -ves_icall_System_Net_Sockets_Socket_Send_internal (gsize sock, gchar *buffer, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Send_icall (gsize sock, gchar *buffer, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking) { int ret; int sendflags = 0; - error_init (error); *werror = 0; LOGDEBUG (g_message("%s: Sending %d bytes", __func__, count)); @@ -1500,13 +1487,12 @@ ves_icall_System_Net_Sockets_Socket_Send_internal (gsize sock, gchar *buffer, gi } gint32 -ves_icall_System_Net_Sockets_Socket_Send_array_internal (gsize sock, WSABUF *buffers, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Send_array_icall (gsize sock, WSABUF *buffers, gint32 count, gint32 flags, gint32 *werror, MonoBoolean blocking) { int ret; guint32 sent; guint32 sendflags = 0; - error_init (error); *werror = 0; sendflags = convert_socketflags (flags); @@ -1525,7 +1511,7 @@ ves_icall_System_Net_Sockets_Socket_Send_array_internal (gsize sock, WSABUF *buf } gint32 -ves_icall_System_Net_Sockets_Socket_SendTo_internal (gsize sock, gchar *buffer, gint32 count, gint32 flags, MonoObjectHandle sockaddr, gint32 *werror, MonoBoolean blocking, MonoError *error) +ves_icall_System_Net_Sockets_Socket_SendTo_icall (gsize sock, gchar *buffer, gint32 count, gint32 flags, MonoObjectHandle sockaddr, gint32 *werror, MonoBoolean blocking, MonoError *error) { int ret; int sendflags = 0; @@ -1628,7 +1614,7 @@ leave: } void -ves_icall_System_Net_Sockets_Socket_Select_internal (MonoArrayHandleOut sockets, gint32 timeout, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Select_icall (MonoArrayHandleOut sockets, gint32 timeout, gint32 *werror, MonoError *error) { MonoInternalThread *thread = mono_thread_internal_current (); mono_pollfd *pfds; @@ -1728,7 +1714,7 @@ int_to_object_handle (MonoDomain *domain, int val, MonoError *error) } void -ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal (gsize sock, gint32 level, gint32 name, MonoObjectHandleOut obj_val, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_icall (gsize sock, gint32 level, gint32 name, MonoObjectHandleOut obj_val, gint32 *werror, MonoError *error) { int system_level = 0; int system_name = 0; @@ -1894,7 +1880,7 @@ ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal (gsize sock, gi } } void -ves_icall_System_Net_Sockets_Socket_GetSocketOption_arr_internal (gsize sock, gint32 level, gint32 name, MonoArrayHandle byte_val, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_GetSocketOption_arr_icall (gsize sock, gint32 level, gint32 name, MonoArrayHandle byte_val, gint32 *werror, MonoError *error) { int system_level = 0; int system_name = 0; @@ -2011,7 +1997,7 @@ get_local_interface_id (int family) #endif /* HAVE_STRUCT_SOCKADDR_IN6 */ void -ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal (gsize sock, gint32 level, gint32 name, MonoObjectHandle obj_val, MonoArrayHandle byte_val, gint32 int_val, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_SetSocketOption_icall (gsize sock, gint32 level, gint32 name, MonoObjectHandle obj_val, MonoArrayHandle byte_val, gint32 int_val, gint32 *werror, MonoError *error) { struct linger linger; int system_level = 0; @@ -2246,11 +2232,10 @@ ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal (gsize sock, gint32 } void -ves_icall_System_Net_Sockets_Socket_Shutdown_internal (gsize sock, gint32 how, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_Shutdown_icall (gsize sock, gint32 how, gint32 *werror) { int ret; - error_init (error); *werror = 0; /* Currently, the values for how (recv=0, send=1, both=2) match the BSD API */ @@ -2260,7 +2245,7 @@ ves_icall_System_Net_Sockets_Socket_Shutdown_internal (gsize sock, gint32 how, g } gint -ves_icall_System_Net_Sockets_Socket_IOControl_internal (gsize sock, gint32 code, MonoArrayHandle input, MonoArrayHandle output, gint32 *werror, MonoError *error) +ves_icall_System_Net_Sockets_Socket_IOControl_icall (gsize sock, gint32 code, MonoArrayHandle input, MonoArrayHandle output, gint32 *werror, MonoError *error) { #ifdef HOST_WIN32 DWORD output_bytes = 0; @@ -2444,7 +2429,7 @@ leave: } MonoBoolean -ves_icall_System_Net_Dns_GetHostByName_internal (MonoStringHandle host, MonoStringHandleOut h_name, MonoArrayHandleOut h_aliases, MonoArrayHandleOut h_addr_list, gint32 hint, MonoError *error) +ves_icall_System_Net_Dns_GetHostByName (MonoStringHandle host, MonoStringHandleOut h_name, MonoArrayHandleOut h_aliases, MonoArrayHandleOut h_addr_list, gint32 hint, MonoError *error) { gboolean add_local_ips = FALSE, add_info_ok = TRUE; gchar this_hostname [256]; @@ -2488,7 +2473,7 @@ ves_icall_System_Net_Dns_GetHostByName_internal (MonoStringHandle host, MonoStri } MonoBoolean -ves_icall_System_Net_Dns_GetHostByAddr_internal (MonoStringHandle addr, MonoStringHandleOut h_name, MonoArrayHandleOut h_aliases, MonoArrayHandleOut h_addr_list, gint32 hint, MonoError *error) +ves_icall_System_Net_Dns_GetHostByAddr (MonoStringHandle addr, MonoStringHandleOut h_name, MonoArrayHandleOut h_aliases, MonoArrayHandleOut h_addr_list, gint32 hint, MonoError *error) { char *address; struct sockaddr_in saddr; @@ -2558,7 +2543,7 @@ ves_icall_System_Net_Dns_GetHostByAddr_internal (MonoStringHandle addr, MonoStri } MonoBoolean -ves_icall_System_Net_Dns_GetHostName_internal (MonoStringHandleOut h_name, MonoError *error) +ves_icall_System_Net_Dns_GetHostName (MonoStringHandleOut h_name, MonoError *error) { gchar hostname [NI_MAXHOST] = { 0 }; int ret; @@ -2575,8 +2560,9 @@ ves_icall_System_Net_Dns_GetHostName_internal (MonoStringHandleOut h_name, MonoE } #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT | HAVE_UWP_WINAPI_SUPPORT) + MonoBoolean -ves_icall_System_Net_Sockets_Socket_SendFile_internal (gsize sock, MonoStringHandle filename, MonoArrayHandle pre_buffer, MonoArrayHandle post_buffer, gint flags, gint32 *werror, MonoBoolean blocking, MonoError *error) +ves_icall_System_Net_Sockets_Socket_SendFile_icall (gsize sock, MonoStringHandle filename, MonoArrayHandle pre_buffer, MonoArrayHandle post_buffer, gint flags, gint32 *werror, MonoBoolean blocking, MonoError *error) { HANDLE file; gboolean ret; @@ -2628,6 +2614,7 @@ ves_icall_System_Net_Sockets_Socket_SendFile_internal (gsize sock, MonoStringHan return ret; } + #endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT | HAVE_UWP_WINAPI_SUPPORT) */ void diff --git a/mono/metadata/w32socket.h b/mono/metadata/w32socket.h index d6cc03e0c8..99ede9a063 100644 --- a/mono/metadata/w32socket.h +++ b/mono/metadata/w32socket.h @@ -176,7 +176,7 @@ TYPED_HANDLE_DECL (MonoPeerCredData); ICALL_EXPORT gint32 -ves_icall_System_Net_Sockets_SocketException_WSAGetLastError_internal (void); +ves_icall_System_Net_Sockets_SocketException_WSAGetLastError_icall (void); void mono_network_init(void); diff --git a/mono/mini/Makefile.am b/mono/mini/Makefile.am index 972a09df21..c193c9c683 100644 --- a/mono/mini/Makefile.am +++ b/mono/mini/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules ## Set the C++ linker based on configure settings, see comment in configure.ac ## about why we need to do this. @@ -446,6 +446,7 @@ interp_sources = \ interp/mintops.h \ interp/mintops.def \ interp/mintops.c \ + interp/transform.h \ interp/transform.c interp_libs = libmono-ee-interp.la @@ -779,6 +780,20 @@ libmonosgen_2_0_la_CFLAGS = $(mono_sgen_CFLAGS) @CXX_ADD_CFLAGS@ libmonosgen_2_0_la_LIBADD = libmini.la $(interp_libs_with_mini) $(dbg_libs_with_mini) $(sgen_libs) $(LIBMONO_DTRACE_OBJECT) $(LLVMMONOF) libmonosgen_2_0_la_LDFLAGS = $(libmonoldflags) $(monobin_platform_ldflags) +noinst_LIBRARIES += libmaintest.a + +libmaintest_a_SOURCES = interp/whitebox.c +libmaintest_a_CFLAGS = $(AM_CFLAGS) @CXX_ADD_CFLAGS@ + +WHITEBOX_ASSEMBLY=interp/whitebox-snippets.exe +test_mono_interp_whitebox_SOURCES = +test_mono_interp_whitebox_CFLAGS = $(AM_CFLAGS) @CXX_REMOVE_CFLAGS@ +test_mono_interp_whitebox_LDADD = interp/libmaintest_a-whitebox.$(OBJEXT) libmini.la $(interp_libs_with_mini) $(dbg_libs_with_mini) $(sgen_libs) +test_mono_interp_whitebox_LDFLAGS = $(libmonoldflags) $(monobin_platform_ldflags) +test_mono_interp_whitebox_DEPENDENCIES = $(WHITEBOX_ASSEMBLY) + +check_PROGRAMS = test-mono-interp-whitebox + endif # !ENABLE_MSVC_ONLY libmonoincludedir = $(includedir)/mono-$(API_VER)/mono/jit @@ -900,6 +915,9 @@ rcheck: mono $(regtests) richeck: mono $(regtests) $(INTERP_RUNTIME) --regression $(regtests) +interp-whitebox: test-mono-interp-whitebox + MONO_PATH=$(CLASS) ./$< $(WHITEBOX_ASSEMBLY) + mixedcheck: mono mixed.exe $(MINI_RUNTIME) --interp=jit=JitClass mixed.exe @@ -1086,8 +1104,13 @@ EXTRA_DIST = TestDriver.cs \ $(posix_sources) \ test_op_il_seq_point.sh \ test_op_il_seq_point_headerfooter.sh \ + interp/whitebox-snippets.il \ Makefile.am.in +if ENABLE_NETCORE +version.h: Makefile + echo "#define FULL_VERSION \"netcore\"" > version.h +else version.h: Makefile if test -e $(top_srcdir)/.git; then \ (cd $(top_srcdir); \ @@ -1107,6 +1130,7 @@ version.h: Makefile echo "#define FULL_VERSION \"$$MONO_BRANCH/$$MONO_BUILD_REVISION\""; \ fi \ fi > version.h +endif # Utility target for patching libtool to speed up linking patch-libtool: diff --git a/mono/mini/Makefile.am.in b/mono/mini/Makefile.am.in index 972a09df21..c193c9c683 100755 --- a/mono/mini/Makefile.am.in +++ b/mono/mini/Makefile.am.in @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules ## Set the C++ linker based on configure settings, see comment in configure.ac ## about why we need to do this. @@ -446,6 +446,7 @@ interp_sources = \ interp/mintops.h \ interp/mintops.def \ interp/mintops.c \ + interp/transform.h \ interp/transform.c interp_libs = libmono-ee-interp.la @@ -779,6 +780,20 @@ libmonosgen_2_0_la_CFLAGS = $(mono_sgen_CFLAGS) @CXX_ADD_CFLAGS@ libmonosgen_2_0_la_LIBADD = libmini.la $(interp_libs_with_mini) $(dbg_libs_with_mini) $(sgen_libs) $(LIBMONO_DTRACE_OBJECT) $(LLVMMONOF) libmonosgen_2_0_la_LDFLAGS = $(libmonoldflags) $(monobin_platform_ldflags) +noinst_LIBRARIES += libmaintest.a + +libmaintest_a_SOURCES = interp/whitebox.c +libmaintest_a_CFLAGS = $(AM_CFLAGS) @CXX_ADD_CFLAGS@ + +WHITEBOX_ASSEMBLY=interp/whitebox-snippets.exe +test_mono_interp_whitebox_SOURCES = +test_mono_interp_whitebox_CFLAGS = $(AM_CFLAGS) @CXX_REMOVE_CFLAGS@ +test_mono_interp_whitebox_LDADD = interp/libmaintest_a-whitebox.$(OBJEXT) libmini.la $(interp_libs_with_mini) $(dbg_libs_with_mini) $(sgen_libs) +test_mono_interp_whitebox_LDFLAGS = $(libmonoldflags) $(monobin_platform_ldflags) +test_mono_interp_whitebox_DEPENDENCIES = $(WHITEBOX_ASSEMBLY) + +check_PROGRAMS = test-mono-interp-whitebox + endif # !ENABLE_MSVC_ONLY libmonoincludedir = $(includedir)/mono-$(API_VER)/mono/jit @@ -900,6 +915,9 @@ rcheck: mono $(regtests) richeck: mono $(regtests) $(INTERP_RUNTIME) --regression $(regtests) +interp-whitebox: test-mono-interp-whitebox + MONO_PATH=$(CLASS) ./$< $(WHITEBOX_ASSEMBLY) + mixedcheck: mono mixed.exe $(MINI_RUNTIME) --interp=jit=JitClass mixed.exe @@ -1086,8 +1104,13 @@ EXTRA_DIST = TestDriver.cs \ $(posix_sources) \ test_op_il_seq_point.sh \ test_op_il_seq_point_headerfooter.sh \ + interp/whitebox-snippets.il \ Makefile.am.in +if ENABLE_NETCORE +version.h: Makefile + echo "#define FULL_VERSION \"netcore\"" > version.h +else version.h: Makefile if test -e $(top_srcdir)/.git; then \ (cd $(top_srcdir); \ @@ -1107,6 +1130,7 @@ version.h: Makefile echo "#define FULL_VERSION \"$$MONO_BRANCH/$$MONO_BUILD_REVISION\""; \ fi \ fi > version.h +endif # Utility target for patching libtool to speed up linking patch-libtool: diff --git a/mono/mini/Makefile.in.REMOVED.git-id b/mono/mini/Makefile.in.REMOVED.git-id index 146981cbb7..949fa24aad 100644 --- a/mono/mini/Makefile.in.REMOVED.git-id +++ b/mono/mini/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -3a59b6e7859ef70595cb15d099441a77f6d068a7 \ No newline at end of file +5cb728c747eaec3818190a92afef0977e3a93102 \ No newline at end of file diff --git a/mono/mini/alias-analysis.c b/mono/mini/alias-analysis.c index b473fe27b7..ea596ffb00 100644 --- a/mono/mini/alias-analysis.c +++ b/mono/mini/alias-analysis.c @@ -255,9 +255,16 @@ handle_instruction: #endif case OP_STORER8_MEMBASE_REG: case OP_STOREV_MEMBASE: + tmp = NULL; + if (ins->opcode == OP_STOREV_MEMBASE) { + tmp = (MonoInst *)g_hash_table_lookup (addr_loads, GINT_TO_POINTER (ins->dreg)); + if (tmp) + ins->flags |= MONO_INST_STACK_STORE; + } if (ins->inst_offset != 0) continue; - tmp = (MonoInst *)g_hash_table_lookup (addr_loads, GINT_TO_POINTER (ins->dreg)); + if (!tmp) + tmp = (MonoInst *)g_hash_table_lookup (addr_loads, GINT_TO_POINTER (ins->dreg)); if (tmp) { if (cfg->verbose_level > 2) { printf ("Found candidate store:"); mono_print_ins (ins); } if (lower_store (cfg, ins, tmp)) { diff --git a/mono/mini/aot-compiler.c.REMOVED.git-id b/mono/mini/aot-compiler.c.REMOVED.git-id index f7733d2009..666aead363 100644 --- a/mono/mini/aot-compiler.c.REMOVED.git-id +++ b/mono/mini/aot-compiler.c.REMOVED.git-id @@ -1 +1 @@ -07cf0c9126b5c7b533ceeef281dea37138e99402 \ No newline at end of file +a30b0ef35936991c4bc5f8fb89b17aa223d52f47 \ No newline at end of file diff --git a/mono/mini/aot-compiler.h b/mono/mini/aot-compiler.h index 2b789a6542..69090e695f 100644 --- a/mono/mini/aot-compiler.h +++ b/mono/mini/aot-compiler.h @@ -17,6 +17,7 @@ MONO_LLVM_INTERNAL guint32 mono_aot_get_got_offset (MonoJumpInfo *ji MONO_LLVM_INTERNAL char* mono_aot_get_method_name (MonoCompile *cfg); MONO_LLVM_INTERNAL char* mono_aot_get_mangled_method_name (MonoMethod *method); MONO_LLVM_INTERNAL gboolean mono_aot_is_direct_callable (MonoJumpInfo *patch_info); +MONO_LLVM_INTERNAL gboolean mono_aot_is_externally_callable (MonoMethod *cmethod); MONO_LLVM_INTERNAL void mono_aot_mark_unused_llvm_plt_entry(MonoJumpInfo *patch_info); MONO_LLVM_INTERNAL char* mono_aot_get_plt_symbol (MonoJumpInfoType type, gconstpointer data); MONO_LLVM_INTERNAL char* mono_aot_get_direct_call_symbol (MonoJumpInfoType type, gconstpointer data); diff --git a/mono/mini/aot-runtime.c.REMOVED.git-id b/mono/mini/aot-runtime.c.REMOVED.git-id index a0a5302ca7..9d535f1988 100644 --- a/mono/mini/aot-runtime.c.REMOVED.git-id +++ b/mono/mini/aot-runtime.c.REMOVED.git-id @@ -1 +1 @@ -74ae3053f77fe84950e759c97a1b1854c11dcfce \ No newline at end of file +5e6fc01242837d0480813838f590c5415abf354f \ No newline at end of file diff --git a/mono/mini/aot-runtime.h b/mono/mini/aot-runtime.h index 31940084c2..93e8eb5cc0 100644 --- a/mono/mini/aot-runtime.h +++ b/mono/mini/aot-runtime.h @@ -11,7 +11,7 @@ #include "mini.h" /* Version number of the AOT file format */ -#define MONO_AOT_FILE_VERSION 171 +#define MONO_AOT_FILE_VERSION 172 #define MONO_AOT_TRAMP_PAGE_SIZE 16384 @@ -247,7 +247,7 @@ MonoJitInfo* mono_aot_find_jit_info (MonoDomain *domain, MonoImage *imag 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, host_mgreg_t *regs, guint8 *addr); 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_create_specific_trampoline (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); gpointer mono_aot_get_unbox_trampoline (MonoMethod *method, gpointer addr); diff --git a/mono/mini/branch-opts.c b/mono/mini/branch-opts.c index 15c2a76d67..67eabd7c08 100644 --- a/mono/mini/branch-opts.c +++ b/mono/mini/branch-opts.c @@ -304,6 +304,16 @@ mono_if_conversion (MonoCompile *cfg) MonoBasicBlock *bb1, *bb2; restart: + if (!(bb->out_count == 2 && !bb->extended)) + continue; + + bb1 = bb->out_bb [0]; + bb2 = bb->out_bb [1]; + + /* If either bb1 or bb2 is a try block, abort the optimization attempt. */ + if (bb1->try_start || bb2->try_start) + continue; + /* Look for the IR code generated from cond ? a : b * which is: * BB: @@ -315,12 +325,6 @@ mono_if_conversion (MonoCompile *cfg) * <- * br BB3 */ - if (!(bb->out_count == 2 && !bb->extended)) - continue; - - bb1 = bb->out_bb [0]; - bb2 = bb->out_bb [1]; - if (bb1->in_count == 1 && bb2->in_count == 1 && bb1->out_count == 1 && bb2->out_count == 1 && bb1->out_bb [0] == bb2->out_bb [0]) { MonoInst *compare, *branch, *ins1, *ins2, *cmov, *move, *tmp; MonoBasicBlock *true_bb, *false_bb; diff --git a/mono/mini/cfold.c b/mono/mini/cfold.c index 737f5ab5cf..19f2a376fb 100644 --- a/mono/mini/cfold.c +++ b/mono/mini/cfold.c @@ -259,9 +259,9 @@ mono_constant_fold_ins (MonoCompile *cfg, MonoInst *ins, MonoInst *arg1, MonoIns break; case OP_SEXT_I4: if (arg1->opcode == OP_ICONST && arg1->inst_c0 >= 0 && arg1->inst_c0 < (1 << 16) && overwrite) { - dest->opcode = OP_ICONST; + dest->opcode = OP_I8CONST; dest->sreg1 = -1; - dest->inst_c0 = arg1->inst_c0; + dest->inst_l = arg1->inst_c0; } break; case OP_MOVE: diff --git a/mono/mini/debugger-agent.c.REMOVED.git-id b/mono/mini/debugger-agent.c.REMOVED.git-id index 80d251d509..59632f37b5 100644 --- a/mono/mini/debugger-agent.c.REMOVED.git-id +++ b/mono/mini/debugger-agent.c.REMOVED.git-id @@ -1 +1 @@ -8bfd9404dac1e5d99cfafe05aec5bd4c59335a94 \ No newline at end of file +c94750657f16e7dfa586332cf185cebea00dd1d8 \ No newline at end of file diff --git a/mono/mini/debugger-engine.c b/mono/mini/debugger-engine.c index fc5624c70d..53726f0502 100644 --- a/mono/mini/debugger-engine.c +++ b/mono/mini/debugger-engine.c @@ -378,6 +378,9 @@ collect_domain_bp (gpointer key, gpointer value, gpointer user_data) CollectDomainData *ud = (CollectDomainData*)user_data; MonoMethod *m; + if (mono_domain_is_unloading (domain)) + return; + mono_domain_lock (domain); g_hash_table_iter_init (&iter, domain_jit_info (domain)->seq_points); while (g_hash_table_iter_next (&iter, (void**)&m, (void**)&seq_points)) { @@ -591,8 +594,26 @@ mono_de_clear_breakpoints_for_domain (MonoDomain *domain) /* Number of single stepping operations in progress */ static int ss_count; -/* The single step request instance */ -static SingleStepReq *the_ss_req; +/* The single step request instances */ +static GPtrArray *the_ss_reqs; + +static void +ss_req_init (void) +{ + the_ss_reqs = g_ptr_array_new (); +} + +static void +ss_req_cleanup (void) +{ + dbg_lock (); + + g_ptr_array_free (the_ss_reqs, TRUE); + + the_ss_reqs = NULL; + + dbg_unlock (); +} /* * mono_de_start_single_stepping: @@ -717,18 +738,28 @@ ss_destroy (SingleStepReq *req) } static SingleStepReq* -ss_req_acquire (void) +ss_req_acquire (MonoInternalThread *thread) { - SingleStepReq *req; - + SingleStepReq *req = NULL; dbg_lock (); - req = the_ss_req; - if (req) - req->refcount ++; + int i; + for (i = 0; i < the_ss_reqs->len; ++i) { + SingleStepReq *current_req = (SingleStepReq *)g_ptr_array_index (the_ss_reqs, i); + if (current_req->thread == thread) { + current_req->refcount ++; + req = current_req; + } + } dbg_unlock (); return req; } +static int +ss_req_count () +{ + return the_ss_reqs->len; +} + static void mono_de_ss_req_release (SingleStepReq *req) { @@ -739,24 +770,31 @@ mono_de_ss_req_release (SingleStepReq *req) req->refcount --; if (req->refcount == 0) free = TRUE; - dbg_unlock (); if (free) { - if (req == the_ss_req) - the_ss_req = NULL; + g_ptr_array_remove (the_ss_reqs, req); ss_destroy (req); } + dbg_unlock (); +} + +void +mono_de_cancel_ss (SingleStepReq *req) +{ + if (the_ss_reqs) { + mono_de_ss_req_release (req); + } } void -mono_de_cancel_ss (void) +mono_de_cancel_all_ss () { - if (the_ss_req) { - mono_de_ss_req_release (the_ss_req); - the_ss_req = NULL; + int i; + for (i = 0; i < the_ss_reqs->len; ++i) { + SingleStepReq *current_req = (SingleStepReq *)g_ptr_array_index (the_ss_reqs, i); + mono_de_ss_req_release (current_req); } } - void mono_de_process_single_step (void *tls, gboolean from_signal) { @@ -774,21 +812,17 @@ mono_de_process_single_step (void *tls, gboolean from_signal) /* Skip the instruction causing the single step */ rt_callbacks.begin_single_step_processing (ctx, from_signal); - if (rt_callbacks.try_process_suspend (tls, ctx)) + if (rt_callbacks.try_process_suspend (tls, ctx, FALSE)) return; /* * This can run concurrently with a clear_event_request () call, so needs locking/reference counts. */ - ss_req = ss_req_acquire (); + ss_req = ss_req_acquire (mono_thread_internal_current ()); if (!ss_req) // FIXME: A suspend race return; - - if (mono_thread_internal_current () != ss_req->thread) - goto exit; - ip = (guint8 *)MONO_CONTEXT_GET_IP (ctx); ji = get_top_method_ji (ip, &domain, (gpointer*)&ip); @@ -1022,7 +1056,7 @@ mono_de_process_breakpoint (void *void_tls, gboolean from_signal) SeqPoint sp; gboolean found_sp; - if (rt_callbacks.try_process_suspend (tls, ctx)) + if (rt_callbacks.try_process_suspend (tls, ctx, TRUE)) return; ip = (guint8 *)MONO_CONTEXT_GET_IP (ctx); @@ -1488,9 +1522,13 @@ mono_de_ss_create (MonoInternalThread *thread, StepSize size, StepDepth depth, S return err; // FIXME: Multiple requests - if (the_ss_req) { - DEBUG_PRINTF (0, "Received a single step request while the previous one was still active.\n"); - return DE_ERR_NOT_IMPLEMENTED; + if (ss_req_count () > 1) { + err = rt_callbacks.handle_multiple_ss_requests (); + + if (err == DE_ERR_NOT_IMPLEMENTED) { + DEBUG_PRINTF (0, "Received a single step request while the previous one was still active.\n"); + return DE_ERR_NOT_IMPLEMENTED; + } } DEBUG_PRINTF (1, "[dbg] Starting single step of thread %p (depth=%s).\n", thread, ss_depth_to_string (depth)); @@ -1515,8 +1553,7 @@ mono_de_ss_create (MonoInternalThread *thread, StepSize size, StepDepth depth, S err = rt_callbacks.ss_create_init_args (ss_req, &args); if (err) return err; - - the_ss_req = ss_req; + g_ptr_array_add (the_ss_reqs, ss_req); mono_de_ss_start (ss_req, &args); @@ -1548,7 +1585,7 @@ mono_de_init (DebuggerEngineCallbacks *cbs) domains_init (); breakpoints_init (); - + ss_req_init (); mono_debugger_log_init (); } @@ -1557,6 +1594,7 @@ mono_de_cleanup (void) { breakpoints_cleanup (); domains_cleanup (); + ss_req_cleanup (); } void diff --git a/mono/mini/debugger-engine.h b/mono/mini/debugger-engine.h index bd9fd62ab7..fd61af20ac 100644 --- a/mono/mini/debugger-engine.h +++ b/mono/mini/debugger-engine.h @@ -232,7 +232,7 @@ mono_debugger_get_thread_state (DebuggerTlsData *ref); typedef struct { MonoContext *(*tls_get_restore_state) (void *tls); - gboolean (*try_process_suspend) (void *tls, MonoContext *ctx); + gboolean (*try_process_suspend) (void *tls, MonoContext *ctx, gboolean from_breakpoint); gboolean (*begin_breakpoint_processing) (void *tls, MonoContext *ctx, MonoJitInfo *ji, gboolean from_signal); void (*begin_single_step_processing) (MonoContext *ctx, gboolean from_signal); @@ -251,6 +251,7 @@ typedef struct { int (*ss_create_init_args) (SingleStepReq *ss_req, SingleStepArgs *args); void (*ss_args_destroy) (SingleStepArgs *ss_args); + int (*handle_multiple_ss_requests)(void); } DebuggerEngineCallbacks; @@ -283,6 +284,7 @@ void mono_de_stop_single_stepping (void); void mono_de_process_breakpoint (void *tls, gboolean from_signal); void mono_de_process_single_step (void *tls, gboolean from_signal); DbgEngineErrorCode mono_de_ss_create (MonoInternalThread *thread, StepSize size, StepDepth depth, StepFilter filter, EventRequest *req); -void mono_de_cancel_ss (void); +void mono_de_cancel_ss (SingleStepReq *req); +void mono_de_cancel_all_ss (void); #endif diff --git a/mono/mini/decompose.c b/mono/mini/decompose.c index a448e21818..bb1916d3b8 100644 --- a/mono/mini/decompose.c +++ b/mono/mini/decompose.c @@ -1287,7 +1287,7 @@ mono_decompose_vtype_opts (MonoCompile *cfg) dreg = alloc_preg (cfg); EMIT_NEW_BIALU_IMM (cfg, dest, OP_ADD_IMM, dreg, ins->inst_destbasereg, ins->inst_offset); - mini_emit_memory_copy (cfg, dest, src, src_var->klass, src_var->backend.is_pinvoke, 0); + mini_emit_memory_copy (cfg, dest, src, src_var->klass, src_var->backend.is_pinvoke, ins->flags); break; } case OP_LOADV_MEMBASE: { diff --git a/mono/mini/driver.c b/mono/mini/driver.c index 9b5c3b9cf9..cd458629a3 100644 --- a/mono/mini/driver.c +++ b/mono/mini/driver.c @@ -280,15 +280,16 @@ mono_parse_default_optimizations (const char* p) char* mono_opt_descr (guint32 flags) { GString *str = g_string_new (""); - int i, need_comma; + int i; + gboolean need_comma; - need_comma = 0; + need_comma = FALSE; for (i = 0; i < G_N_ELEMENTS (opt_names); ++i) { if (flags & (1 << i) && optflag_get_name (i)) { if (need_comma) g_string_append_c (str, ','); g_string_append (str, optflag_get_name (i)); - need_comma = 1; + need_comma = TRUE; } } return g_string_free (str, FALSE); @@ -326,6 +327,51 @@ opt_sets [] = { DEFAULT_OPTIMIZATIONS, }; +static const guint32 +interp_opt_sets [] = { + INTERP_OPT_NONE, + INTERP_OPT_INLINE, + INTERP_OPT_CPROP, + INTERP_OPT_SUPER_INSTRUCTIONS, + INTERP_OPT_INLINE | INTERP_OPT_CPROP, + INTERP_OPT_INLINE | INTERP_OPT_SUPER_INSTRUCTIONS, + INTERP_OPT_CPROP | INTERP_OPT_SUPER_INSTRUCTIONS, + INTERP_OPT_INLINE | INTERP_OPT_CPROP | INTERP_OPT_SUPER_INSTRUCTIONS, +}; + +static const char* const +interp_opflags_names [] = { + "inline", + "cprop", + "super-insn" +}; + +static const char* +interp_optflag_get_name (guint32 i) +{ + g_assert (i < G_N_ELEMENTS (interp_opflags_names)); + return interp_opflags_names [i]; +} + +static char* +interp_opt_descr (guint32 flags) +{ + GString *str = g_string_new (""); + int i; + gboolean need_comma; + + need_comma = FALSE; + for (i = 0; i < G_N_ELEMENTS (interp_opflags_names); ++i) { + if (flags & (1 << i) && interp_optflag_get_name (i)) { + if (need_comma) + g_string_append_c (str, ','); + g_string_append (str, interp_optflag_get_name (i)); + need_comma = TRUE; + } + } + return g_string_free (str, FALSE); +} + typedef int (*TestMethod) (void); #if 0 @@ -685,7 +731,7 @@ mini_regression_list (int verbose, int count, char *images []) } static void -interp_regression_step (MonoImage *image, int verbose, int *total_run, int *total, GTimer *timer, MonoDomain *domain) +interp_regression_step (MonoImage *image, int verbose, int *total_run, int *total, const guint32 *opt_flags, GTimer *timer, MonoDomain *domain) { int result, expected, failed, cfailed, run; double elapsed, transform_time; @@ -693,10 +739,20 @@ interp_regression_step (MonoImage *image, int verbose, int *total_run, int *tota MonoObject *result_obj; int local_skip_index = 0; - g_print ("Test run: image=%s\n", mono_image_get_filename (image)); + const char *n = NULL; + if (opt_flags) { + mini_get_interp_callbacks ()->set_optimizations (*opt_flags); + n = interp_opt_descr (*opt_flags); + } else { + n = mono_interp_opts_string; + } + g_print ("Test run: image=%s, opts=%s\n", mono_image_get_filename (image), n); + cfailed = failed = run = 0; transform_time = elapsed = 0.0; + mini_get_interp_callbacks ()->invalidate_transformed (domain); + g_timer_start (timer); for (i = 0; i < mono_image_get_table_rows (image, MONO_TABLE_METHOD); ++i) { ERROR_DECL (error); @@ -723,7 +779,7 @@ interp_regression_step (MonoImage *image, int verbose, int *total_run, int *tota cfailed++; g_print ("Test '%s' execution failed.\n", method->name); } else if (exc != NULL) { - g_print ("Exception in Test '%s' occured:\n", method->name); + g_print ("Exception in Test '%s' occurred:\n", method->name); mono_object_describe (exc); run++; failed++; @@ -776,7 +832,14 @@ interp_regression (MonoImage *image, int verbose, int *total_run) total = 0; *total_run = 0; - interp_regression_step (image, verbose, total_run, &total, timer, domain); + + if (mono_interp_opts_string) { + /* explicit option requested*/ + interp_regression_step (image, verbose, total_run, &total, NULL, timer, domain); + } else { + for (int opt = 0; opt < G_N_ELEMENTS (interp_opt_sets); ++opt) + interp_regression_step (image, verbose, total_run, &total, &interp_opt_sets [opt], timer, domain); + } g_timer_destroy (timer); return total; @@ -1689,6 +1752,29 @@ mono_get_version_info (void) static gboolean enable_debugging; +static void +enable_runtime_stats (void) +{ + mono_counters_enable (-1); + mono_atomic_store_bool (&mono_stats.enabled, TRUE); + mono_atomic_store_bool (&mono_jit_stats.enabled, TRUE); +} + +static MonoMethodDesc * +parse_qualified_method_name (char *method_name) +{ + if (strlen (method_name) == 0) { + g_printerr ("Couldn't parse empty method name."); + exit (1); + } + MonoMethodDesc *result = mono_method_desc_new (method_name, TRUE); + if (!result) { + g_printerr ("Couldn't parse method name: %s\n", method_name); + exit (1); + } + return result; +} + /** * mono_jit_parse_options: * @@ -1714,7 +1800,7 @@ mono_jit_parse_options (int argc, char * argv[]) for (i = 0; i < argc; ++i) { if (argv [i] [0] != '-') break; - if (strncmp (argv [i], "--debugger-agent=", 17) == 0) { + if (strncmp (argv [i], "--debugger-agent=", 17) == 0) { MonoDebugOptions *opt = mini_get_debug_options (); sdb_options = g_strdup (argv [i] + 17); @@ -1742,9 +1828,12 @@ mono_jit_parse_options (int argc, char * argv[]) opt->break_on_exc = TRUE; } else if (strcmp (argv [i], "--stats") == 0) { - mono_counters_enable (-1); - mono_atomic_store_bool (&mono_stats.enabled, TRUE); - mono_atomic_store_bool (&mono_jit_stats.enabled, TRUE); + enable_runtime_stats (); + } else if (strncmp (argv [i], "--stats=", 8) == 0) { + enable_runtime_stats (); + if (mono_stats_method_desc) + g_free (mono_stats_method_desc); + mono_stats_method_desc = parse_qualified_method_name (argv [i] + 8); } else if (strcmp (argv [i], "--break") == 0) { if (i+1 >= argc){ fprintf (stderr, "Missing method name in --break command line option\n"); @@ -2187,9 +2276,12 @@ mono_main (int argc, char* argv[]) } else if (strcmp (argv [i], "--print-vtable") == 0) { mono_print_vtable = TRUE; } else if (strcmp (argv [i], "--stats") == 0) { - mono_counters_enable (-1); - mono_atomic_store_bool (&mono_stats.enabled, TRUE); - mono_atomic_store_bool (&mono_jit_stats.enabled, TRUE); + enable_runtime_stats (); + } else if (strncmp (argv [i], "--stats=", 8) == 0) { + enable_runtime_stats (); + if (mono_stats_method_desc) + g_free (mono_stats_method_desc); + mono_stats_method_desc = parse_qualified_method_name (argv [i] + 8); #ifndef DISABLE_AOT } else if (strcmp (argv [i], "--aot") == 0) { error_if_aot_unsupported (); @@ -2362,9 +2454,9 @@ mono_main (int argc, char* argv[]) } else if (strncmp (argv [i], "--assembly-loader=", strlen("--assembly-loader=")) == 0) { gchar *arg = argv [i] + strlen ("--assembly-loader="); if (strcmp (arg, "strict") == 0) - mono_loader_set_strict_strong_names (TRUE); + mono_loader_set_strict_assembly_name_check (TRUE); else if (strcmp (arg, "legacy") == 0) - mono_loader_set_strict_strong_names (FALSE); + mono_loader_set_strict_assembly_name_check (FALSE); else fprintf (stderr, "Warning: unknown argument to --assembly-loader. Should be \"strict\" or \"legacy\"\n"); } else if (strncmp (argv [i], MONO_HANDLERS_ARGUMENT, MONO_HANDLERS_ARGUMENT_LEN) == 0) { diff --git a/mono/mini/ee.h b/mono/mini/ee.h index d2a6f20590..1eb31f3224 100644 --- a/mono/mini/ee.h +++ b/mono/mini/ee.h @@ -60,6 +60,8 @@ typedef gpointer MonoInterpFrameHandle; MONO_EE_CALLBACK (void, start_single_stepping, (void)) \ MONO_EE_CALLBACK (void, stop_single_stepping, (void)) \ MONO_EE_CALLBACK (void, free_context, (gpointer)) \ + MONO_EE_CALLBACK (void, set_optimizations, (guint32)) \ + MONO_EE_CALLBACK (void, invalidate_transformed, (MonoDomain *domain)) \ MONO_EE_CALLBACK (void, cleanup, (void)) \ MONO_EE_CALLBACK (void, mark_stack, (gpointer thread_info, GcScanFunc func, gpointer gc_data, gboolean precise)) \ diff --git a/mono/mini/exceptions-amd64.c b/mono/mini/exceptions-amd64.c index d5fb237bf8..fa144e5d57 100644 --- a/mono/mini/exceptions-amd64.c +++ b/mono/mini/exceptions-amd64.c @@ -66,7 +66,7 @@ static LONG CALLBACK seh_unhandled_exception_filter(EXCEPTION_POINTERS* ep) #endif if (mono_dump_start ()) - mono_handle_native_crash (mono_get_signame (SIGSEGV), NULL, NULL); + mono_handle_native_crash (mono_get_signame (SIGSEGV), NULL, NULL, NULL); return EXCEPTION_CONTINUE_SEARCH; } @@ -876,7 +876,7 @@ altstack_handle_and_restore (MonoContext *ctx, MonoObject *obj, guint32 flags) if (!ji || (!stack_ovf && !nullref)) { if (mono_dump_start ()) - mono_handle_native_crash (mono_get_signame (SIGSEGV), ctx, NULL); + mono_handle_native_crash (mono_get_signame (SIGSEGV), ctx, NULL, NULL); // if couldn't dump or if mono_handle_native_crash returns, abort abort (); } @@ -1105,7 +1105,7 @@ mono_arch_unwindinfo_add_alloc_stack (PUNWIND_INFO unwindinfo, MonoUnwindOp *unw if (codesneeded == 3) { /*the unscaled size of the allocation is recorded in the next two slots in little-endian format. - NOTE, unwind codes are allocated from end to begining of list so + NOTE, unwind codes are allocated from end to beginning of list so unwind code will have right execution order. List is sorted on CodeOffset using descending sort order.*/ unwindcode->UnwindOp = UWOP_ALLOC_LARGE; @@ -1115,7 +1115,7 @@ mono_arch_unwindinfo_add_alloc_stack (PUNWIND_INFO unwindinfo, MonoUnwindOp *unw else { /*the size of the allocation divided by 8 is recorded in the next slot. - NOTE, unwind codes are allocated from end to begining of list so + NOTE, unwind codes are allocated from end to beginning of list so unwind code will have right execution order. List is sorted on CodeOffset using descending sort order.*/ unwindcode->UnwindOp = UWOP_ALLOC_LARGE; diff --git a/mono/mini/exceptions-arm.c b/mono/mini/exceptions-arm.c index 1492e1c426..4433324103 100644 --- a/mono/mini/exceptions-arm.c +++ b/mono/mini/exceptions-arm.c @@ -392,7 +392,7 @@ mono_arm_get_exception_trampolines (gboolean aot) MonoTrampInfo *info; GSList *tramps = NULL; - // FIXME Macro to make one line per trampoline and less repitition of names. + // FIXME Macro to make one line per trampoline and less repetition of names. /* LLVM uses the normal trampolines, but with a different name */ get_throw_trampoline (168, TRUE, FALSE, FALSE, FALSE, "llvm_throw_corlib_exception_trampoline", &info, aot, FALSE); diff --git a/mono/mini/exceptions-arm64.c b/mono/mini/exceptions-arm64.c index 51a20fc97b..11cb6ccdd9 100644 --- a/mono/mini/exceptions-arm64.c +++ b/mono/mini/exceptions-arm64.c @@ -139,7 +139,7 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot) /* Load ctx */ arm_ldrx (code, ARMREG_IP0, ARMREG_FP, ctx_offset); /* Save registers back to ctx */ - /* This isn't strictly neccessary since we don't allocate variables used in eh clauses to registers */ + /* This isn't strictly necessary since we don't allocate variables used in eh clauses to registers */ code = mono_arm_emit_store_regarray (code, MONO_ARCH_CALLEE_SAVED_REGS, ARMREG_IP0, MONO_STRUCT_OFFSET (MonoContext, regs)); /* Restore regs */ diff --git a/mono/mini/exceptions-ppc.c b/mono/mini/exceptions-ppc.c index ffab436ef6..0769a255ad 100644 --- a/mono/mini/exceptions-ppc.c +++ b/mono/mini/exceptions-ppc.c @@ -676,7 +676,7 @@ mono_arch_handle_altstack_exception (void *sigctx, MONO_SIG_HANDLER_INFO_TYPE *s } if (!ji) if (mono_dump_start ()) - mono_handle_native_crash (mono_get_signame (SIGSEGV), (MonoContext*)sigctx, siginfo); + mono_handle_native_crash (mono_get_signame (SIGSEGV), (MonoContext*)sigctx, siginfo, sigctx); /* setup a call frame on the real stack so that control is returned there * and exception handling can continue. * The frame looks like: @@ -692,10 +692,7 @@ mono_arch_handle_altstack_exception (void *sigctx, MONO_SIG_HANDLER_INFO_TYPE *s /* may need to adjust pointers in the new struct copy, depending on the OS */ uc_copy = (MonoContext*)(sp + 16); mono_sigctx_to_monoctx (uc, uc_copy); -#if defined(__linux__) && !defined(__mono_ppc64__) - uc_copy->uc_mcontext.uc_regs = (gpointer)((char*)uc_copy + ((char*)uc->uc_mcontext.uc_regs - (char*)uc)); -#endif - g_assert (mono_arch_ip_from_context (uc) == mono_arch_ip_from_context (uc_copy)); + g_assert (mono_arch_ip_from_context (uc) == MONO_CONTEXT_GET_IP (uc_copy)); /* at the return form the signal handler execution starts in altstack_handle_and_restore() */ UCONTEXT_REG_LNK(uc) = UCONTEXT_REG_NIP(uc); #ifdef PPC_USES_FUNCTION_DESCRIPTOR diff --git a/mono/mini/exceptions-x86.c b/mono/mini/exceptions-x86.c index 22e54bc925..adaa6680f9 100644 --- a/mono/mini/exceptions-x86.c +++ b/mono/mini/exceptions-x86.c @@ -67,7 +67,7 @@ static LONG CALLBACK seh_unhandled_exception_filter(EXCEPTION_POINTERS* ep) } #endif if (mono_dump_start ()) - mono_handle_native_crash (mono_get_signame (SIGSEGV), NULL, NULL); + mono_handle_native_crash (mono_get_signame (SIGSEGV), NULL, NULL, NULL); return EXCEPTION_CONTINUE_SEARCH; } @@ -1140,7 +1140,7 @@ mono_arch_handle_altstack_exception (void *sigctx, MONO_SIG_HANDLER_INFO_TYPE *s MonoContext mctx; mono_sigctx_to_monoctx (sigctx, &mctx); if (mono_dump_start ()) - mono_handle_native_crash (mono_get_signame (SIGSEGV), &mctx, siginfo); + mono_handle_native_crash (mono_get_signame (SIGSEGV), &mctx, siginfo, sigctx); else abort (); } diff --git a/mono/mini/generics.cs b/mono/mini/generics.cs index 857ad44f3e..0c6346c63d 100644 --- a/mono/mini/generics.cs +++ b/mono/mini/generics.cs @@ -1462,6 +1462,28 @@ class Tests var t = FromResult>(new OneThing {Item1 = 42}); return t.Item1; } + + class ThreadLocalClass { + [ThreadStatic] + static T v; + + public T Value { + [MethodImpl (MethodImplOptions.NoInlining)] + get { + return v; + } + [MethodImpl (MethodImplOptions.NoInlining)] + set { + v = value; + } + } + } + + public static int test_0_tls_gshared () { + var c = new ThreadLocalClass (); + c.Value = "FOO"; + return c.Value == "FOO" ? 0 : 1; + } } #if !__MOBILE__ diff --git a/mono/mini/iltests.il b/mono/mini/iltests.il index e361af3eed..9a683e4ae3 100644 --- a/mono/mini/iltests.il +++ b/mono/mini/iltests.il @@ -138,6 +138,7 @@ FAIL1: } .method static public int32 test_0_i8_ptr_arithm() cil managed { + .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00) // ...!INTERPRETER. .maxstack 2 sizeof [mscorlib]System.IntPtr @@ -3358,6 +3359,97 @@ wrong: ret } + .class nested private auto ansi beforefieldinit R1_class + { + .field public int32 test_field + + .method public hidebysig specialname rtspecialname instance default void '.ctor' () cil managed + { + ret + } + } + + .method public hidebysig static int32 test_3_ldstloc_opt () cil managed + { + .locals init ( + class Tests/R1_class v_0, + int32 v_1, + class Tests/R1_class v_2 + ) + + /* allocate first object */ + newobj instance void class Tests/R1_class::.ctor () + stloc.0 + ldloc.0 + stloc.2 + + br L3 + /* dead code for interp opt barrier */ + ldc.i4.1 + ldc.i4.1 + add + pop +L3: + /* load first object on the stack */ + ldloc.0 + + ldc.i4.3 + stloc.1 + ldloc.1 + + /* allocate second object */ + newobj instance void class Tests/R1_class::.ctor () + /* overwrite first object at loc0 with second object */ + stloc.0 + + /* should store '3' into first object. + * in the buggy case it stores '3' into the second object because it delays the load from loc.0 */ + stfld int32 Tests/R1_class::test_field + + /* load first object on the stack */ + ldloc.2 + /* should read '3' */ + ldfld int32 Tests/R1_class::test_field + ret + } + + .method public hidebysig static void ldstarg_opt_helper (Tests/R1_class a) cil managed + { + ldarg.0 + + /* allocate second object */ + newobj instance void class Tests/R1_class::.ctor () + dup + ldc.i4.1 + /* stores '1' in the field */ + stfld int32 Tests/R1_class::test_field + /* overwrite first argument */ + starg 0 + + ldc.i4.3 + /* stores '3' in the field */ + stfld int32 Tests/R1_class::test_field /* might get fused with ldarg.0 at start of method */ + ret + } + + .method public hidebysig static int32 test_3_ldstarg_opt () cil managed + { + /* allocate first object */ + newobj instance void class Tests/R1_class::.ctor () + dup + ldc.i4.s 0x1337 + /* stores '0x1337' in the field */ + stfld int32 Tests/R1_class::test_field + + dup + /* passing first object */ + call void class Tests::ldstarg_opt_helper (Tests/R1_class) + /* should read '3' from first object */ + ldfld int32 Tests/R1_class::test_field + ret + } + + .method public hidebysig static int32 test_10_rconv_to_u8_ovf_un() cil managed { // Code size 20 (0x14) @@ -3399,4 +3491,95 @@ wrong: ret } */ + + .method public hidebysig static string cmov_try_block_helper (string s) cil managed noinlining + { + // Code size 43 (0x2b) + .maxstack 2 + .locals init (bool V_0, string V_1) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0007: ldc.i4.0 + IL_0008: ceq + IL_000a: stloc.0 + IL_000b: ldloc.0 + IL_000c: brfalse.s IL_0016 + + IL_000e: ldstr "Empty" + IL_0013: stloc.1 + IL_0014: br.s IL_0029 + + IL_0016: nop + .try + { + IL_0017: nop + IL_0018: ldarg.0 + IL_0019: stloc.1 + IL_001a: leave.s IL_0029 + } // end .try + catch [mscorlib]System.Exception + { + IL_001c: pop + IL_001d: nop + IL_001e: nop + IL_001f: leave.s IL_0021 + } // end handler + IL_0021: ldstr "Should not happen" + IL_0026: stloc.1 + IL_0027: br.s IL_0029 + + IL_0029: ldloc.1 + IL_002a: ret + } + + .method public hidebysig static int32 test_1_cmov_try_block() cil managed + { + // Code size 37 (0x25) + .maxstack 2 + .locals init (string V_0, bool V_1, int32 V_2) + IL_0000: nop + IL_0001: ldstr "abc" + IL_0006: call string Tests::cmov_try_block_helper(string) + IL_000d: ldstr "abc" + IL_0012: call bool [mscorlib]System.String::op_Equality(string,string) + IL_0019: brfalse.s IL_001f + + IL_001b: ldc.i4.1 + IL_001c: stloc.2 + IL_001d: br.s IL_0023 + + IL_001f: ldc.i4.0 + IL_0020: stloc.2 + IL_0021: br.s IL_0023 + + IL_0023: ldloc.2 + IL_0024: ret + } + + .method public hidebysig static !!T createinstance_intrins_primitive<.ctor T>() cil managed noinlining + { + .maxstack 8 + call !!0 [mscorlib]System.Activator::CreateInstance() + ret + } + + .method public static int32 test_0_createinstance_intrins_primitive () cil managed + { + .maxstack 8 + call !!0 Tests::createinstance_intrins_primitive() + ldc.i4.0 + beq L1 + ldc.i4.1 + ret + L1: + call !!0 Tests::createinstance_intrins_primitive() + ldc.i8 0 + beq L2 + ldc.i4.2 + ret + L2: + ldc.i4.0 + ret + } } diff --git a/mono/mini/interp-stubs.c b/mono/mini/interp-stubs.c index 922b671c2f..042ab6005a 100644 --- a/mono/mini/interp-stubs.c +++ b/mono/mini/interp-stubs.c @@ -88,6 +88,16 @@ stub_stop_single_stepping (void) { } +static void +stub_set_optimizations (guint32 i) +{ +} + +static void +stub_invalidate_transformed (MonoDomain *domain) +{ +} + static void stub_cleanup (void) { diff --git a/mono/mini/interp/interp-internals.h b/mono/mini/interp/interp-internals.h index 181d3067d9..9149591791 100644 --- a/mono/mini/interp/interp-internals.h +++ b/mono/mini/interp/interp-internals.h @@ -40,14 +40,6 @@ enum { VAL_OBJ = 3 + VAL_POINTER }; -enum { - INTERP_OPT_NONE = 0, - INTERP_OPT_INLINE = 1, - INTERP_OPT_CPROP = 2, - INTERP_OPT_SUPER_INSTRUCTIONS = 4, - INTERP_OPT_DEFAULT = INTERP_OPT_INLINE | INTERP_OPT_CPROP | INTERP_OPT_SUPER_INSTRUCTIONS -}; - #if SIZEOF_VOID_P == 4 typedef guint32 mono_u; typedef gint32 mono_i; @@ -131,6 +123,13 @@ typedef struct _InterpFrame InterpFrame; typedef void (*MonoFuncV) (void); typedef void (*MonoPIFunc) (void *callme, void *margs); + +typedef enum { + IMETHOD_CODE_INTERP, + IMETHOD_CODE_COMPILED, + IMETHOD_CODE_UNKNOWN +} InterpMethodCodeType; + /* * Structure representing a method transformed for the interpreter * This is domain specific @@ -171,6 +170,7 @@ typedef struct _InterpMethod MonoJitInfo *jinfo; MonoDomain *domain; MonoProfilerCallInstrumentationFlags prof_flags; + InterpMethodCodeType code_type; #ifdef ENABLE_EXPERIMENT_TIERED MiniTieredCounter tiered_counter; #endif @@ -189,13 +189,17 @@ typedef struct { int inited; } FrameStack; + +/* Arguments that are passed when invoking only a finally/filter clause from the frame */ +typedef struct FrameClauseArgs FrameClauseArgs; + /* State of the interpreter main loop */ typedef struct { stackval *sp; unsigned char *vt_sp; const unsigned short *ip; GSList *finally_ips; - gpointer clause_args; + FrameClauseArgs *clause_args; } InterpState; struct _InterpFrame { @@ -269,6 +273,9 @@ mono_interp_get_imethod (MonoDomain *domain, MonoMethod *method, MonoError *erro void mono_interp_print_code (InterpMethod *imethod); +gboolean +mono_interp_jit_call_supported (MonoMethod *method, MonoMethodSignature *sig); + static inline int mint_type(MonoType *type_) { diff --git a/mono/mini/interp/interp.c.REMOVED.git-id b/mono/mini/interp/interp.c.REMOVED.git-id index eba731f883..84744e4516 100644 --- a/mono/mini/interp/interp.c.REMOVED.git-id +++ b/mono/mini/interp/interp.c.REMOVED.git-id @@ -1 +1 @@ -2b09f3bffd92c39c68014aee77fecf5ed9b140d5 \ No newline at end of file +f9cdc1688985ebc805b0c33f132bdd201a1d112f \ No newline at end of file diff --git a/mono/mini/interp/interp.h b/mono/mini/interp/interp.h index c64d3334b9..40c9e96829 100644 --- a/mono/mini/interp/interp.h +++ b/mono/mini/interp/interp.h @@ -26,6 +26,14 @@ struct _InterpMethodArguments { #endif }; +enum { + INTERP_OPT_NONE = 0, + INTERP_OPT_INLINE = 1, + INTERP_OPT_CPROP = 2, + INTERP_OPT_SUPER_INSTRUCTIONS = 4, + INTERP_OPT_DEFAULT = INTERP_OPT_INLINE | INTERP_OPT_CPROP | INTERP_OPT_SUPER_INSTRUCTIONS +}; + typedef struct _InterpMethodArguments InterpMethodArguments; /* must be called either diff --git a/mono/mini/interp/mintops.c b/mono/mini/interp/mintops.c index 9b6eb7dff6..4d50657e13 100644 --- a/mono/mini/interp/mintops.c +++ b/mono/mini/interp/mintops.c @@ -126,7 +126,7 @@ mono_interp_dis_mintop (gint32 ins_offset, gboolean native_offset, const guint16 g_string_append_printf (str, " %d", (gint32)READ32 (ip)); break; case MintOpLongInt: - g_string_append_printf (str, " %lld", (long long)READ64 (ip)); + g_string_append_printf (str, " %" PRId64, (gint64)READ64 (ip)); break; case MintOpFloat: { gint32 tmp = READ32 (ip); diff --git a/mono/mini/interp/mintops.h b/mono/mini/interp/mintops.h index 9e3c3b6fa4..41647338c0 100644 --- a/mono/mini/interp/mintops.h +++ b/mono/mini/interp/mintops.h @@ -58,6 +58,8 @@ typedef enum { #define MINT_IS_STLOC(op) ((op) >= MINT_STLOC_I1 && (op) <= MINT_STLOC_VT) #define MINT_IS_MOVLOC(op) ((op) >= MINT_MOVLOC_1 && (op) <= MINT_MOVLOC_VT) #define MINT_IS_STLOC_NP(op) ((op) >= MINT_STLOC_NP_I4 && (op) <= MINT_STLOC_NP_O) +#define MINT_IS_LDARG(op) ((op) >= MINT_LDARG_I1 && (op) <= MINT_LDARG_VT) +#define MINT_IS_STARG(op) ((op) >= MINT_STARG_I1 && (op) <= MINT_STARG_VT) #define MINT_IS_CONDITIONAL_BRANCH(op) ((op) >= MINT_BRFALSE_I4 && (op) <= MINT_BLT_UN_R8_S) #define MINT_IS_CALL(op) ((op) >= MINT_CALL && (op) <= MINT_JIT_CALL) #define MINT_IS_PATCHABLE_CALL(op) ((op) >= MINT_CALL && (op) <= MINT_VCALL) diff --git a/mono/mini/interp/transform.c.REMOVED.git-id b/mono/mini/interp/transform.c.REMOVED.git-id index 6dc6dcfec9..b0898c9260 100644 --- a/mono/mini/interp/transform.c.REMOVED.git-id +++ b/mono/mini/interp/transform.c.REMOVED.git-id @@ -1 +1 @@ -999fc2687c670ee49e004d9ea032b00247d1eb12 \ No newline at end of file +7438255c6a1ccd78e09ab8c9dfce8bf0cb89be70 \ No newline at end of file diff --git a/mono/mini/interp/transform.h b/mono/mini/interp/transform.h new file mode 100644 index 0000000000..ae5f8b9723 --- /dev/null +++ b/mono/mini/interp/transform.h @@ -0,0 +1,173 @@ +#ifndef __MONO_MINI_INTERP_TRANSFORM_H__ +#define __MONO_MINI_INTERP_TRANSFORM_H__ +#include +#include +#include "interp-internals.h" + +#define INTERP_INST_FLAG_SEQ_POINT_NONEMPTY_STACK 1 +#define INTERP_INST_FLAG_SEQ_POINT_METHOD_ENTRY 2 +#define INTERP_INST_FLAG_SEQ_POINT_METHOD_EXIT 4 +#define INTERP_INST_FLAG_SEQ_POINT_NESTED_CALL 8 +#define INTERP_INST_FLAG_RECORD_CALL_PATCH 16 + +#define INTERP_LOCAL_FLAG_INDIRECT 1 +#define INTERP_LOCAL_FLAG_DEAD 2 + +typedef struct InterpInst InterpInst; + +typedef struct +{ + MonoClass *klass; + unsigned char type; + unsigned char flags; +} StackInfo; + +#define STACK_VALUE_NONE 0 +#define STACK_VALUE_LOCAL 1 +#define STACK_VALUE_ARG 2 +#define STACK_VALUE_I4 3 +#define STACK_VALUE_I8 4 + +// StackValue contains data to construct an InterpInst that is equivalent with the contents +// of the stack slot / local / argument. +typedef struct { + // Indicates the type of the stored information. It can be a local, argument or a constant + int type; + // Holds the local index or the actual constant value + union { + int local; + int arg; + gint32 i; + gint64 l; + }; +} StackValue; + +typedef struct +{ + // This indicates what is currently stored in this stack slot. This can be a constant + // or the copy of a local / argument. + StackValue val; + // The instruction that pushed this stack slot. If ins is null, we can't remove the usage + // of the stack slot, because we can't clear the instruction that set it. + InterpInst *ins; +} StackContentInfo; + +struct InterpInst { + guint16 opcode; + InterpInst *next, *prev; + // If this is -1, this instruction is not logically associated with an IL offset, it is + // part of the IL instruction associated with the previous interp instruction. + int il_offset; + guint32 flags; + guint16 data [MONO_ZERO_LEN_ARRAY]; +}; + +typedef struct { + guint8 *ip; + GSList *preds; + GSList *seq_points; + SeqPoint *last_seq_point; + + // This will hold a list of last sequence points of incoming basic blocks + SeqPoint **pred_seq_points; + guint num_pred_seq_points; +} InterpBasicBlock; + +typedef enum { + RELOC_SHORT_BRANCH, + RELOC_LONG_BRANCH, + RELOC_SWITCH +} RelocType; + +typedef struct { + RelocType type; + /* In the interpreter IR */ + int offset; + /* In the IL code */ + int target; +} Reloc; + +typedef struct { + MonoType *type; + int mt; + int flags; + int offset; +} InterpLocal; + +typedef struct +{ + MonoMethod *method; + MonoMethod *inlined_method; + MonoMethodHeader *header; + InterpMethod *rtm; + const unsigned char *il_code; + const unsigned char *ip; + const unsigned char *in_start; + InterpInst *last_ins, *first_ins; + int code_size; + int *in_offsets; + int current_il_offset; + StackInfo **stack_state; + int *stack_height; + int *vt_stack_size; + unsigned char *is_bb_start; + unsigned short *new_code; + unsigned short *new_code_end; + unsigned int max_code_size; + StackInfo *stack; + StackInfo *sp; + unsigned int max_stack_height; + unsigned int stack_capacity; + unsigned int vt_sp; + unsigned int max_vt_sp; + unsigned int total_locals_size; + InterpLocal *locals; + unsigned int locals_size; + unsigned int locals_capacity; + int n_data_items; + int max_data_items; + void **data_items; + GHashTable *data_hash; +#ifdef ENABLE_EXPERIMENT_TIERED + GHashTable *patchsite_hash; +#endif + int *clause_indexes; + gboolean gen_sdb_seq_points; + GPtrArray *seq_points; + InterpBasicBlock **offset_to_bb; + InterpBasicBlock *entry_bb; + MonoMemPool *mempool; + GList *basic_blocks; + GPtrArray *relocs; + gboolean verbose_level; + GArray *line_numbers; +} TransformData; + +#define STACK_TYPE_I4 0 +#define STACK_TYPE_I8 1 +#define STACK_TYPE_R4 2 +#define STACK_TYPE_R8 3 +#define STACK_TYPE_O 4 +#define STACK_TYPE_VT 5 +#define STACK_TYPE_MP 6 +#define STACK_TYPE_F 7 + +#if SIZEOF_VOID_P == 8 +#define STACK_TYPE_I STACK_TYPE_I8 +#else +#define STACK_TYPE_I STACK_TYPE_I4 +#endif + +/* test exports for white box testing */ +void +mono_test_interp_cprop (TransformData *td); +gboolean +mono_test_interp_generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header, MonoGenericContext *generic_context, MonoError *error); +void +mono_test_interp_method_compute_offsets (TransformData *td, InterpMethod *imethod, MonoMethodSignature *signature, MonoMethodHeader *header); + +/* debugging aid */ +void +mono_interp_print_td_code (TransformData *td); + +#endif /* __MONO_MINI_INTERP_TRANSFORM_H__ */ diff --git a/mono/mini/interp/whitebox-snippets.il b/mono/mini/interp/whitebox-snippets.il new file mode 100644 index 0000000000..554c28e2fb --- /dev/null +++ b/mono/mini/interp/whitebox-snippets.il @@ -0,0 +1,36 @@ +.assembly snippets {} +.assembly extern mscorlib {} + +.class public auto ansi sealed beforefieldinit Snippets { + + .method static public int32 Main(string[] args) il managed { + .entrypoint + ldc.i4.s 0x1337 + ret + } + + .method public hidebysig static int32 no_inline_int32 () cil managed noinlining { + .maxstack 0 + ldc.i4 0x1337 + ret + } + + .method public hidebysig static int32 test_cprop_add_consts () cil managed { + ldc.i4 0x1122 + ldc.i4 0x3344 + add + ret + } + + .method public hidebysig static int32 test_cprop_ldloc_stloc () cil managed { + .locals init ( + int32 i + ) + call int32 class Snippets::no_inline_int32 () + stloc 0 + ldloc 0 + ldloc 0 + add + ret + } +} diff --git a/mono/mini/interp/whitebox.c b/mono/mini/interp/whitebox.c new file mode 100644 index 0000000000..24db2dc277 --- /dev/null +++ b/mono/mini/interp/whitebox.c @@ -0,0 +1,236 @@ +#include +#include +#include "transform.h" +#include "mintops.h" +#include +#include +#include + +/* return value of "0" equals success */ +typedef int (*TestVerifier)(TransformData *td); + +typedef struct +{ + const char *test_name; + /* function pointer to result verifier */ + TestVerifier verify_td; +} TestItem; + +static MonoMemPool *mp = NULL; +static GList *test_list = NULL; +static const char *verbose_method_name = NULL; + +static void +print_td (TransformData *td) +{ + if (!td->verbose_level) + return; + + mono_interp_print_td_code (td); +} + +static int +expect (InterpInst **ins, InterpInst **current, guint16 opcode) +{ + g_assert (ins); + + if (!*ins) + return 1; + + while ((*ins)->opcode == MINT_NOP) + *ins = (*ins)->next; + + if ((*ins)->opcode == opcode) { + if (current) + *current = *ins; + + *ins = (*ins)->next; + return 0; + } + return 2; +} + +static int +verify_cprop_add_consts (TransformData *td) +{ + mono_test_interp_cprop (td); + print_td (td); + + InterpInst *ins = td->first_ins, *current; + if (expect (&ins, ¤t, MINT_LDC_I4)) + return 1; + if (READ32 (¤t->data [0]) != 0x4466) + return 2; + if (expect (&ins, NULL, MINT_RET)) + return 3; + + return 0; +} + +static int +verify_cprop_ldloc_stloc (TransformData *td) +{ + mono_test_interp_cprop (td); + print_td (td); + + InterpInst *ins = td->first_ins; + if (expect (&ins, NULL, MINT_INITLOCALS)) + return 1; + if (expect (&ins, NULL, MINT_CALL)) + return 2; + if (expect (&ins, NULL, MINT_STLOC_NP_I4)) + return 3; + if (expect (&ins, NULL, MINT_LDLOC_I4)) + return 4; + if (expect (&ins, NULL, MINT_ADD_I4)) + return 5; + if (expect (&ins, NULL, MINT_RET)) + return 6; + + return 0; +} + +static void +new_test (const char *name, TestVerifier verifier) +{ + TestItem *ti = g_malloc (sizeof (TestItem)); + ti->test_name = name; + ti->verify_td = verifier; + + test_list = g_list_append_mempool (mp, test_list, ti); +} + +static MonoImage * +load_assembly (const char *path, MonoDomain *root_domain) +{ + MonoAssemblyOpenRequest req; + mono_assembly_request_prepare_open (&req, MONO_ASMCTX_DEFAULT, mono_domain_default_alc (root_domain)); + MonoAssembly *ass = mono_assembly_request_open (path, &req, NULL); + if (!ass) + g_error ("failed to load assembly: %s", path); + return mono_assembly_get_image_internal (ass); +} + +static MonoMethod * +lookup_method_from_image (MonoImage *image, const char *name) +{ + for (int i = 0; i < mono_image_get_table_rows (image, MONO_TABLE_METHOD); i++) { + ERROR_DECL (error); + MonoMethod *method = mono_get_method_checked (image, MONO_TOKEN_METHOD_DEF | (i + 1), NULL, NULL, error); + if (strcmp (method->name, name) == 0) { + mono_class_init_internal (method->klass); + return method; + } + } + g_error ("method \"%s\" does not exist in assembly \"%s\\n", name, image->assembly_name); +} + +static int +determine_verbose_level (TransformData *td) +{ + if (!verbose_method_name) + return 0; + + if (!strcmp ("ALL", verbose_method_name)) + return 4; + + MonoMethod *method = td->method; + const char *name = verbose_method_name; + + if ((strchr (name, '.') > name) || strchr (name, ':')) { + MonoMethodDesc *desc = mono_method_desc_new (name, TRUE); + int match = mono_method_desc_full_match (desc, method); + mono_method_desc_free (desc); + if (match) + return 4; + } else { + if (strcmp (method->name, name) == 0) + return 4; + } + + return 0; +} + +static TransformData * +transform_method (MonoDomain *domain, MonoImage *image, TestItem *ti) +{ + ERROR_DECL (error); + MonoMethod *method = lookup_method_from_image (image, ti->test_name); + MonoMethodHeader *header = mono_method_get_header_checked (method, error);;; + MonoMethodSignature *signature = mono_method_signature_internal (method); + + InterpMethod *rtm = g_new0 (InterpMethod, 1); + rtm->method = method; + rtm->domain = domain; + /* TODO: init more fields of `rtm` */ + + TransformData *td = g_new0 (TransformData, 1); + td->method = method; + td->verbose_level = determine_verbose_level (td); + td->mempool = mp; + td->rtm = rtm; + td->stack_height = (int*)g_malloc(header->code_size * sizeof(int)); + td->clause_indexes = (int*)g_malloc (header->code_size * sizeof (int)); + td->is_bb_start = (guint8*)g_malloc0(header->code_size); + td->data_items = NULL; + td->data_hash = g_hash_table_new (NULL, NULL); + /* TODO: init more fields of `td` */ + + mono_test_interp_method_compute_offsets (td, rtm, signature, header); + + td->stack = (StackInfo*)g_malloc0 ((header->max_stack + 1) * sizeof (td->stack [0])); + td->stack_capacity = header->max_stack + 1; + td->sp = td->stack; + td->max_stack_height = 0; + + mono_test_interp_generate_code (td, method, header, NULL, error); + + mono_metadata_free_mh (header); + return td; +} + +int +main (int argc, char* argv[]) +{ + if (argc < 2) + g_error ("need to pass whitebox assembly"); + + int test_failed = 0, test_success = 0; + char *whitebox_assembly = argv [1]; + mp = mono_mempool_new (); + + /* test list */ + new_test ("test_cprop_add_consts", verify_cprop_add_consts); + new_test ("test_cprop_ldloc_stloc", verify_cprop_ldloc_stloc); + + /* init mono runtime */ + g_set_prgname (argv [0]); + mono_set_rootdir (); + mono_config_parse (NULL); + MonoDomain *root_domain = mini_init ("whitebox", NULL); + mono_gc_set_stack_end (&root_domain); + + verbose_method_name = g_getenv ("MONO_VERBOSE_METHOD"); + + g_print ("interp opt white box testing suite with %s, running %d tests\n", whitebox_assembly, g_list_length (test_list)); + + MonoImage *image = load_assembly (whitebox_assembly, root_domain); + + for (GList *iter = test_list; iter; iter = iter->next) { + TestItem *ti = (TestItem *) iter->data; + TransformData *td = transform_method (root_domain, image, ti); + int result = ti->verify_td (td); + g_print ("test \"%s\": %d\n", ti->test_name, result); + free (td); + + if (!!result) + test_failed++; + else + test_success++; + } + + g_print ("\nSUMMARY: %d / %d passed\n", test_success, test_success + test_failed); + + /* TODO: shut runtime down, release resources, etc. */ + return test_failed; +} diff --git a/mono/mini/intrinsics.c b/mono/mini/intrinsics.c index 2737b7f051..f0a7b69404 100644 --- a/mono/mini/intrinsics.c +++ b/mono/mini/intrinsics.c @@ -295,6 +295,13 @@ llvm_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign if (in_corlib && !strcmp (m_class_get_name (cmethod->klass), "Buffer")) { if (!strcmp (cmethod->name, "Memmove") && fsig->param_count == 3 && fsig->params [0]->type == MONO_TYPE_PTR && fsig->params [1]->type == MONO_TYPE_PTR) { + MonoBasicBlock *end_bb; + NEW_BBLOCK (cfg, end_bb); + + // do nothing if len == 0 (even if src or dst are nulls) + MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, args [2]->dreg, 0); + MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, end_bb); + // throw NRE if src or dst are nulls MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, args [0]->dreg, 0); MONO_EMIT_NEW_COND_EXC (cfg, EQ, "NullReferenceException"); @@ -306,6 +313,7 @@ llvm_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign ins->sreg2 = args [1]->dreg; // i1* src ins->sreg3 = args [2]->dreg; // i32/i64 len MONO_ADD_INS (cfg->cbb, ins); + MONO_START_BB (cfg, end_bb); } } @@ -1036,7 +1044,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign ins->type = STACK_R8; break; default: - g_assert (mini_type_is_reference (fsig->params [0])); + g_assert (is_ref); ins->dreg = mono_alloc_ireg_ref (cfg); ins->type = STACK_OBJ; break; @@ -1859,13 +1867,20 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign method_context->method_inst->type_argc == 1 && cmethod->is_inflated && !mini_method_check_context_used (cfg, cmethod)) { - MonoClass *arg0 = mono_class_from_mono_type_internal (method_context->method_inst->type_argv [0]); + MonoType *t = method_context->method_inst->type_argv [0]; + MonoClass *arg0 = mono_class_from_mono_type_internal (t); if (m_class_is_valuetype (arg0) && !mono_class_has_default_constructor (arg0, FALSE)) { - MONO_INST_NEW (cfg, ins, MONO_CLASS_IS_SIMD (cfg, arg0) ? OP_XZERO : OP_VZERO); - ins->dreg = mono_alloc_dreg (cfg, STACK_VTYPE); - ins->type = STACK_VTYPE; - ins->klass = arg0; - MONO_ADD_INS (cfg->cbb, ins); + if (m_class_is_primitive (arg0)) { + int dreg = alloc_dreg (cfg, mini_type_to_stack_type (cfg, t)); + mini_emit_init_rvar (cfg, dreg, t); + ins = cfg->cbb->last_ins; + } else { + MONO_INST_NEW (cfg, ins, MONO_CLASS_IS_SIMD (cfg, arg0) ? OP_XZERO : OP_VZERO); + ins->dreg = mono_alloc_dreg (cfg, STACK_VTYPE); + ins->type = STACK_VTYPE; + ins->klass = arg0; + MONO_ADD_INS (cfg->cbb, ins); + } return ins; } } diff --git a/mono/mini/jit-icalls.c b/mono/mini/jit-icalls.c index 27c56aad5f..2f3c0f293d 100644 --- a/mono/mini/jit-icalls.c +++ b/mono/mini/jit-icalls.c @@ -358,7 +358,7 @@ mono_lshl (guint64 a, gint32 shamt) { const guint64 res = a << (shamt & 0x7f); - /*printf ("TESTL %lld << %d = %lld\n", a, shamt, res);*/ + /*printf ("TESTL %" PRId64 " << %d = %" PRId64 "\n", a, shamt, (guint64)res);*/ return res; } @@ -368,7 +368,7 @@ mono_lshr_un (guint64 a, gint32 shamt) { const guint64 res = a >> (shamt & 0x7f); - /*printf ("TESTR %lld >> %d = %lld\n", a, shamt, res);*/ + /*printf ("TESTR %" PRId64 " >> %d = %" PRId64 "\n", a, shamt, (guint64)res);*/ return res; } @@ -378,7 +378,7 @@ mono_lshr (gint64 a, gint32 shamt) { const gint64 res = a >> (shamt & 0x7f); - /*printf ("TESTR %lld >> %d = %lld\n", a, shamt, res);*/ + /*printf ("TESTR %" PRId64 " >> %d = %" PRId64 "\n", a, shamt, (guint64)res);*/ return res; } diff --git a/mono/mini/jit-icalls.h b/mono/mini/jit-icalls.h index 7a0a949f7b..8e781ec8d3 100644 --- a/mono/mini/jit-icalls.h +++ b/mono/mini/jit-icalls.h @@ -9,196 +9,196 @@ #include "mini.h" #include -G_EXTERN_C void* mono_ldftn (MonoMethod *method); +ICALL_EXTERN_C void* mono_ldftn (MonoMethod *method); -G_EXTERN_C void* mono_ldvirtfn (MonoObject *obj, MonoMethod *method); +ICALL_EXTERN_C void* mono_ldvirtfn (MonoObject *obj, MonoMethod *method); -G_EXTERN_C void* mono_ldvirtfn_gshared (MonoObject *obj, MonoMethod *method); +ICALL_EXTERN_C void* mono_ldvirtfn_gshared (MonoObject *obj, MonoMethod *method); -G_EXTERN_C void mono_helper_stelem_ref_check (MonoArray *array, MonoObject *val); +ICALL_EXTERN_C void mono_helper_stelem_ref_check (MonoArray *array, MonoObject *val); -G_EXTERN_C gint64 mono_llmult (gint64 a, gint64 b); +ICALL_EXTERN_C gint64 mono_llmult (gint64 a, gint64 b); -G_EXTERN_C guint64 mono_llmult_ovf_un (guint64 a, guint64 b); +ICALL_EXTERN_C guint64 mono_llmult_ovf_un (guint64 a, guint64 b); -G_EXTERN_C guint64 mono_llmult_ovf (gint64 a, gint64 b); +ICALL_EXTERN_C guint64 mono_llmult_ovf (gint64 a, gint64 b); -G_EXTERN_C gint32 mono_idiv (gint32 a, gint32 b); +ICALL_EXTERN_C gint32 mono_idiv (gint32 a, gint32 b); -G_EXTERN_C guint32 mono_idiv_un (guint32 a, guint32 b); +ICALL_EXTERN_C guint32 mono_idiv_un (guint32 a, guint32 b); -G_EXTERN_C gint32 mono_irem (gint32 a, gint32 b); +ICALL_EXTERN_C gint32 mono_irem (gint32 a, gint32 b); -G_EXTERN_C guint32 mono_irem_un (guint32 a, guint32 b); +ICALL_EXTERN_C guint32 mono_irem_un (guint32 a, guint32 b); -G_EXTERN_C gint32 mono_imul (gint32 a, gint32 b); +ICALL_EXTERN_C gint32 mono_imul (gint32 a, gint32 b); -G_EXTERN_C gint32 mono_imul_ovf (gint32 a, gint32 b); +ICALL_EXTERN_C gint32 mono_imul_ovf (gint32 a, gint32 b); -G_EXTERN_C gint32 mono_imul_ovf_un (guint32 a, guint32 b); +ICALL_EXTERN_C gint32 mono_imul_ovf_un (guint32 a, guint32 b); -G_EXTERN_C double mono_fdiv (double a, double b); +ICALL_EXTERN_C double mono_fdiv (double a, double b); -G_EXTERN_C gint64 mono_lldiv (gint64 a, gint64 b); +ICALL_EXTERN_C gint64 mono_lldiv (gint64 a, gint64 b); -G_EXTERN_C gint64 mono_llrem (gint64 a, gint64 b); +ICALL_EXTERN_C gint64 mono_llrem (gint64 a, gint64 b); -G_EXTERN_C guint64 mono_lldiv_un (guint64 a, guint64 b); +ICALL_EXTERN_C guint64 mono_lldiv_un (guint64 a, guint64 b); -G_EXTERN_C guint64 mono_llrem_un (guint64 a, guint64 b); +ICALL_EXTERN_C guint64 mono_llrem_un (guint64 a, guint64 b); -G_EXTERN_C guint64 mono_lshl (guint64 a, gint32 shamt); +ICALL_EXTERN_C guint64 mono_lshl (guint64 a, gint32 shamt); -G_EXTERN_C guint64 mono_lshr_un (guint64 a, gint32 shamt); +ICALL_EXTERN_C guint64 mono_lshr_un (guint64 a, gint32 shamt); -G_EXTERN_C gint64 mono_lshr (gint64 a, gint32 shamt); +ICALL_EXTERN_C gint64 mono_lshr (gint64 a, gint32 shamt); // For param_count > 4. -G_EXTERN_C MonoArray *mono_array_new_n_icall (MonoMethod *cm, gint32 param_count, intptr_t *params); +ICALL_EXTERN_C MonoArray *mono_array_new_n_icall (MonoMethod *cm, gint32 param_count, intptr_t *params); -G_EXTERN_C MonoArray *mono_array_new_1 (MonoMethod *cm, guint32 length); +ICALL_EXTERN_C MonoArray *mono_array_new_1 (MonoMethod *cm, guint32 length); -G_EXTERN_C MonoArray *mono_array_new_2 (MonoMethod *cm, guint32 length1, guint32 length2); +ICALL_EXTERN_C MonoArray *mono_array_new_2 (MonoMethod *cm, guint32 length1, guint32 length2); -G_EXTERN_C MonoArray *mono_array_new_3 (MonoMethod *cm, guint32 length1, guint32 length2, guint32 length3); +ICALL_EXTERN_C MonoArray *mono_array_new_3 (MonoMethod *cm, guint32 length1, guint32 length2, guint32 length3); -G_EXTERN_C MonoArray *mono_array_new_4 (MonoMethod *cm, guint32 length1, guint32 length2, guint32 length3, guint32 length4); +ICALL_EXTERN_C MonoArray *mono_array_new_4 (MonoMethod *cm, guint32 length1, guint32 length2, guint32 length3, guint32 length4); -G_EXTERN_C gpointer mono_class_static_field_address (MonoDomain *domain, MonoClassField *field); +ICALL_EXTERN_C gpointer mono_class_static_field_address (MonoDomain *domain, MonoClassField *field); -G_EXTERN_C gpointer mono_ldtoken_wrapper (MonoImage *image, int token, MonoGenericContext *context); +ICALL_EXTERN_C gpointer mono_ldtoken_wrapper (MonoImage *image, int token, MonoGenericContext *context); -G_EXTERN_C gpointer mono_ldtoken_wrapper_generic_shared (MonoImage *image, int token, MonoMethod *method); +ICALL_EXTERN_C gpointer mono_ldtoken_wrapper_generic_shared (MonoImage *image, int token, MonoMethod *method); -G_EXTERN_C guint64 mono_fconv_u8 (double v); -G_EXTERN_C guint64 mono_fconv_u8_2 (double v); +ICALL_EXTERN_C guint64 mono_fconv_u8 (double v); +ICALL_EXTERN_C guint64 mono_fconv_u8_2 (double v); -G_EXTERN_C guint64 mono_rconv_u8 (float v); +ICALL_EXTERN_C guint64 mono_rconv_u8 (float v); -G_EXTERN_C gint64 mono_fconv_i8 (double v); +ICALL_EXTERN_C gint64 mono_fconv_i8 (double v); -G_EXTERN_C guint32 mono_fconv_u4 (double v); -G_EXTERN_C guint32 mono_fconv_u4_2 (double v); +ICALL_EXTERN_C guint32 mono_fconv_u4 (double v); +ICALL_EXTERN_C guint32 mono_fconv_u4_2 (double v); -G_EXTERN_C guint32 mono_rconv_u4 (float v); +ICALL_EXTERN_C guint32 mono_rconv_u4 (float v); -G_EXTERN_C gint64 mono_fconv_ovf_i8 (double v); +ICALL_EXTERN_C gint64 mono_fconv_ovf_i8 (double v); -G_EXTERN_C guint64 mono_fconv_ovf_u8 (double v); +ICALL_EXTERN_C guint64 mono_fconv_ovf_u8 (double v); -G_EXTERN_C guint64 mono_fconv_ovf_u8_un (double v); +ICALL_EXTERN_C guint64 mono_fconv_ovf_u8_un (double v); -G_EXTERN_C gint64 mono_rconv_i8 (float v); +ICALL_EXTERN_C gint64 mono_rconv_i8 (float v); -G_EXTERN_C gint64 mono_rconv_ovf_i8 (float v); +ICALL_EXTERN_C gint64 mono_rconv_ovf_i8 (float v); -G_EXTERN_C guint64 mono_rconv_ovf_u8 (float v); +ICALL_EXTERN_C guint64 mono_rconv_ovf_u8 (float v); -G_EXTERN_C guint64 mono_rconv_ovf_u8_un (float v); +ICALL_EXTERN_C guint64 mono_rconv_ovf_u8_un (float v); -G_EXTERN_C double mono_lconv_to_r8 (gint64 a); +ICALL_EXTERN_C double mono_lconv_to_r8 (gint64 a); -G_EXTERN_C double mono_conv_to_r8 (gint32 a); +ICALL_EXTERN_C double mono_conv_to_r8 (gint32 a); -G_EXTERN_C double mono_conv_to_r4 (gint32 a); +ICALL_EXTERN_C double mono_conv_to_r4 (gint32 a); -G_EXTERN_C float mono_lconv_to_r4 (gint64 a); +ICALL_EXTERN_C float mono_lconv_to_r4 (gint64 a); -G_EXTERN_C double mono_conv_to_r8_un (guint32 a); +ICALL_EXTERN_C double mono_conv_to_r8_un (guint32 a); -G_EXTERN_C double mono_lconv_to_r8_un (guint64 a); +ICALL_EXTERN_C double mono_lconv_to_r8_un (guint64 a); -G_EXTERN_C gpointer mono_helper_compile_generic_method (MonoObject *obj, MonoMethod *method, gpointer *this_arg); +ICALL_EXTERN_C gpointer mono_helper_compile_generic_method (MonoObject *obj, MonoMethod *method, gpointer *this_arg); ICALL_EXPORT MonoString* ves_icall_mono_ldstr (MonoDomain *domain, MonoImage *image, guint32 idx); -G_EXTERN_C MonoString *mono_helper_ldstr (MonoImage *image, guint32 idx); +ICALL_EXTERN_C MonoString *mono_helper_ldstr (MonoImage *image, guint32 idx); -G_EXTERN_C MonoString *mono_helper_ldstr_mscorlib (guint32 idx); +ICALL_EXTERN_C MonoString *mono_helper_ldstr_mscorlib (guint32 idx); -G_EXTERN_C MonoObject *mono_helper_newobj_mscorlib (guint32 idx); +ICALL_EXTERN_C MonoObject *mono_helper_newobj_mscorlib (guint32 idx); -G_EXTERN_C double mono_fsub (double a, double b); +ICALL_EXTERN_C double mono_fsub (double a, double b); -G_EXTERN_C double mono_fadd (double a, double b); +ICALL_EXTERN_C double mono_fadd (double a, double b); -G_EXTERN_C double mono_fmul (double a, double b); +ICALL_EXTERN_C double mono_fmul (double a, double b); -G_EXTERN_C double mono_fneg (double a); +ICALL_EXTERN_C double mono_fneg (double a); -G_EXTERN_C double mono_fconv_r4 (double a); +ICALL_EXTERN_C double mono_fconv_r4 (double a); -G_EXTERN_C gint8 mono_fconv_i1 (double a); +ICALL_EXTERN_C gint8 mono_fconv_i1 (double a); -G_EXTERN_C gint16 mono_fconv_i2 (double a); +ICALL_EXTERN_C gint16 mono_fconv_i2 (double a); -G_EXTERN_C gint32 mono_fconv_i4 (double a); +ICALL_EXTERN_C gint32 mono_fconv_i4 (double a); -G_EXTERN_C guint8 mono_fconv_u1 (double a); +ICALL_EXTERN_C guint8 mono_fconv_u1 (double a); -G_EXTERN_C guint16 mono_fconv_u2 (double a); +ICALL_EXTERN_C guint16 mono_fconv_u2 (double a); -G_EXTERN_C gboolean mono_fcmp_eq (double a, double b); +ICALL_EXTERN_C gboolean mono_fcmp_eq (double a, double b); -G_EXTERN_C gboolean mono_fcmp_ge (double a, double b); +ICALL_EXTERN_C gboolean mono_fcmp_ge (double a, double b); -G_EXTERN_C gboolean mono_fcmp_gt (double a, double b); +ICALL_EXTERN_C gboolean mono_fcmp_gt (double a, double b); -G_EXTERN_C gboolean mono_fcmp_le (double a, double b); +ICALL_EXTERN_C gboolean mono_fcmp_le (double a, double b); -G_EXTERN_C gboolean mono_fcmp_lt (double a, double b); +ICALL_EXTERN_C gboolean mono_fcmp_lt (double a, double b); -G_EXTERN_C gboolean mono_fcmp_ne_un (double a, double b); +ICALL_EXTERN_C gboolean mono_fcmp_ne_un (double a, double b); -G_EXTERN_C gboolean mono_fcmp_ge_un (double a, double b); +ICALL_EXTERN_C gboolean mono_fcmp_ge_un (double a, double b); -G_EXTERN_C gboolean mono_fcmp_gt_un (double a, double b); +ICALL_EXTERN_C gboolean mono_fcmp_gt_un (double a, double b); -G_EXTERN_C gboolean mono_fcmp_le_un (double a, double b); +ICALL_EXTERN_C gboolean mono_fcmp_le_un (double a, double b); -G_EXTERN_C gboolean mono_fcmp_lt_un (double a, double b); +ICALL_EXTERN_C gboolean mono_fcmp_lt_un (double a, double b); -G_EXTERN_C gboolean mono_fceq (double a, double b); +ICALL_EXTERN_C gboolean mono_fceq (double a, double b); -G_EXTERN_C gboolean mono_fcgt (double a, double b); +ICALL_EXTERN_C gboolean mono_fcgt (double a, double b); -G_EXTERN_C gboolean mono_fcgt_un (double a, double b); +ICALL_EXTERN_C gboolean mono_fcgt_un (double a, double b); -G_EXTERN_C gboolean mono_fclt (double a, double b); +ICALL_EXTERN_C gboolean mono_fclt (double a, double b); -G_EXTERN_C gboolean mono_fclt_un (double a, double b); +ICALL_EXTERN_C gboolean mono_fclt_un (double a, double b); -G_EXTERN_C double mono_fload_r4 (float *ptr); +ICALL_EXTERN_C double mono_fload_r4 (float *ptr); -G_EXTERN_C void mono_fstore_r4 (double val, float *ptr); +ICALL_EXTERN_C void mono_fstore_r4 (double val, float *ptr); -G_EXTERN_C guint32 mono_fload_r4_arg (double val); +ICALL_EXTERN_C guint32 mono_fload_r4_arg (double val); -G_EXTERN_C double mono_fmod (double a, double b); +ICALL_EXTERN_C double mono_fmod (double a, double b); -G_EXTERN_C void mono_break (void); +ICALL_EXTERN_C void mono_break (void); -G_EXTERN_C MonoException *mono_create_corlib_exception_0 (guint32 token); +ICALL_EXTERN_C MonoException *mono_create_corlib_exception_0 (guint32 token); -G_EXTERN_C MonoException *mono_create_corlib_exception_1 (guint32 token, MonoString *arg); +ICALL_EXTERN_C MonoException *mono_create_corlib_exception_1 (guint32 token, MonoString *arg); -G_EXTERN_C MonoException *mono_create_corlib_exception_2 (guint32 token, MonoString *arg1, MonoString *arg2); +ICALL_EXTERN_C MonoException *mono_create_corlib_exception_2 (guint32 token, MonoString *arg1, MonoString *arg2); -G_EXTERN_C MonoObject* mono_object_castclass_unbox (MonoObject *obj, MonoClass *klass); +ICALL_EXTERN_C MonoObject* mono_object_castclass_unbox (MonoObject *obj, MonoClass *klass); -G_EXTERN_C gpointer mono_get_native_calli_wrapper (MonoImage *image, MonoMethodSignature *sig, gpointer func); +ICALL_EXTERN_C gpointer mono_get_native_calli_wrapper (MonoImage *image, MonoMethodSignature *sig, gpointer func); -G_EXTERN_C MonoObject* mono_object_isinst_with_cache (MonoObject *obj, MonoClass *klass, gpointer *cache); +ICALL_EXTERN_C MonoObject* mono_object_isinst_with_cache (MonoObject *obj, MonoClass *klass, gpointer *cache); -G_EXTERN_C MonoObject* mono_object_castclass_with_cache (MonoObject *obj, MonoClass *klass, gpointer *cache); +ICALL_EXTERN_C MonoObject* mono_object_castclass_with_cache (MonoObject *obj, MonoClass *klass, gpointer *cache); ICALL_EXPORT void ves_icall_runtime_class_init (MonoVTable *vtable); -G_EXTERN_C void +ICALL_EXTERN_C void mono_generic_class_init (MonoVTable *vtable); ICALL_EXPORT @@ -209,24 +209,24 @@ ICALL_EXPORT void ves_icall_mono_delegate_ctor_interp (MonoObject *this_obj, MonoObject *target, gpointer addr); -G_EXTERN_C MonoObject* mono_gsharedvt_constrained_call (gpointer mp, MonoMethod *cmethod, MonoClass *klass, gboolean deref_arg, gpointer *args); +ICALL_EXTERN_C MonoObject* mono_gsharedvt_constrained_call (gpointer mp, MonoMethod *cmethod, MonoClass *klass, gboolean deref_arg, gpointer *args); -G_EXTERN_C void mono_gsharedvt_value_copy (gpointer dest, gpointer src, MonoClass *klass); +ICALL_EXTERN_C void mono_gsharedvt_value_copy (gpointer dest, gpointer src, MonoClass *klass); -G_EXTERN_C gpointer mono_fill_class_rgctx (MonoVTable *vtable, int index); +ICALL_EXTERN_C gpointer mono_fill_class_rgctx (MonoVTable *vtable, int index); -G_EXTERN_C gpointer mono_fill_method_rgctx (MonoMethodRuntimeGenericContext *mrgctx, int index); +ICALL_EXTERN_C gpointer mono_fill_method_rgctx (MonoMethodRuntimeGenericContext *mrgctx, int index); -G_EXTERN_C MonoObject* mono_get_assembly_object (MonoImage *image); +ICALL_EXTERN_C MonoObject* mono_get_assembly_object (MonoImage *image); -G_EXTERN_C MonoObject* mono_get_method_object (MonoMethod *method); +ICALL_EXTERN_C MonoObject* mono_get_method_object (MonoMethod *method); -G_EXTERN_C double mono_ckfinite (double d); +ICALL_EXTERN_C double mono_ckfinite (double d); -G_EXTERN_C void mono_throw_method_access (MonoMethod *caller, MonoMethod *callee); +ICALL_EXTERN_C void mono_throw_method_access (MonoMethod *caller, MonoMethod *callee); -G_EXTERN_C void mono_throw_bad_image (void); +ICALL_EXTERN_C void mono_throw_bad_image (void); -G_EXTERN_C void mono_dummy_jit_icall (void); +ICALL_EXTERN_C void mono_dummy_jit_icall (void); #endif /* __MONO_JIT_ICALLS_H__ */ diff --git a/mono/mini/lldb.c b/mono/mini/lldb.c index b37daf8b41..3201c65b31 100644 --- a/mono/mini/lldb.c +++ b/mono/mini/lldb.c @@ -184,15 +184,6 @@ buffer_add_byte (Buffer *buf, guint8 val) buf->p++; } -static void -buffer_add_short (Buffer *buf, guint32 val) -{ - buffer_make_room (buf, 2); - buf->p [0] = (val >> 8) & 0xff; - buf->p [1] = (val >> 0) & 0xff; - buf->p += 2; -} - static void buffer_add_int (Buffer *buf, guint32 val) { @@ -204,19 +195,6 @@ buffer_add_int (Buffer *buf, guint32 val) buf->p += 4; } -static void -buffer_add_long (Buffer *buf, guint64 l) -{ - buffer_add_int (buf, (l >> 32) & 0xffffffff); - buffer_add_int (buf, (l >> 0) & 0xffffffff); -} - -static void -buffer_add_id (Buffer *buf, int id) -{ - buffer_add_int (buf, (guint64)id); -} - static void buffer_add_data (Buffer *buf, guint8 *data, int len) { @@ -239,12 +217,6 @@ buffer_add_string (Buffer *buf, const char *str) } } -static void -buffer_add_buffer (Buffer *buf, Buffer *data) -{ - buffer_add_data (buf, data->buf, buffer_len (data)); -} - static void buffer_free (Buffer *buf) { diff --git a/mono/mini/llvm-jit.cpp b/mono/mini/llvm-jit.cpp index 85c9ee9210..9f4d4d2cb8 100644 --- a/mono/mini/llvm-jit.cpp +++ b/mono/mini/llvm-jit.cpp @@ -102,13 +102,10 @@ MonoJitMemoryManager::allocateDataSection(uintptr_t Size, uint8_t *res; // FIXME: Use a mempool - if (Alignment == 32) { - /* Used for SIMD */ - res = (uint8_t*)malloc (Size + 32); - res += (GPOINTER_TO_UINT (res) % 32); - } else { - res = (uint8_t*)malloc (Size); - } + if (Alignment == 0) + Alignment = 16; + res = (uint8_t*)malloc (Size + Alignment); + res = (uint8_t*)ALIGN_PTR_TO(res, Alignment); assert (res); g_assert (GPOINTER_TO_UINT (res) % Alignment == 0); memset (res, 0, Size); @@ -303,7 +300,7 @@ public: // FIXME: find optimal mono specific order of passes // see https://llvm.org/docs/Frontend/PerformanceTips.html#pass-ordering // the following order is based on a stripped version of "OPT -O2" - const char *default_opts = " -simplifycfg -sroa -lower-expect -instcombine -loop-rotate -licm -simplifycfg -lcssa -loop-idiom -indvars -loop-deletion -gvn -memcpyopt -sccp -bdce -instcombine -dse -simplifycfg -enable-implicit-null-checks"; + const char *default_opts = " -simplifycfg -sroa -lower-expect -instcombine -jump-threading -loop-rotate -licm -simplifycfg -lcssa -loop-idiom -indvars -loop-deletion -gvn -memcpyopt -sccp -bdce -instcombine -dse -simplifycfg -enable-implicit-null-checks"; const char *opts = g_getenv ("MONO_LLVM_OPT"); if (opts == NULL) opts = default_opts; diff --git a/mono/mini/llvmonly-runtime.c b/mono/mini/llvmonly-runtime.c index c9fbb25358..39fcb2d288 100644 --- a/mono/mini/llvmonly-runtime.c +++ b/mono/mini/llvmonly-runtime.c @@ -790,7 +790,7 @@ init_llvmonly_method (MonoAotModule *amodule, guint32 method_index, MonoClass *i /* Called from generated code to initialize a method */ void -mini_llvm_init_method (gpointer aot_module, guint32 method_index) +mini_llvm_init_method (MonoAotFileInfo *info, gpointer aot_module, guint32 method_index) { MonoAotModule *amodule = (MonoAotModule *)aot_module; @@ -799,7 +799,7 @@ mini_llvm_init_method (gpointer aot_module, guint32 method_index) /* Same for gshared methods with a this pointer */ void -mini_llvm_init_gshared_method_this (gpointer aot_module, guint32 method_index, MonoObject *this_obj) +mini_llvm_init_gshared_method_this (MonoAotFileInfo *info, gpointer aot_module, guint32 method_index, MonoObject *this_obj) { MonoAotModule *amodule = (MonoAotModule *)aot_module; MonoClass *klass; @@ -813,7 +813,7 @@ mini_llvm_init_gshared_method_this (gpointer aot_module, guint32 method_index, M /* Same for gshared methods with an mrgctx arg */ void -mini_llvm_init_gshared_method_mrgctx (gpointer aot_module, guint32 method_index, MonoMethodRuntimeGenericContext *rgctx) +mini_llvm_init_gshared_method_mrgctx (MonoAotFileInfo *info, gpointer aot_module, guint32 method_index, MonoMethodRuntimeGenericContext *rgctx) { MonoAotModule *amodule = (MonoAotModule *)aot_module; @@ -822,7 +822,7 @@ mini_llvm_init_gshared_method_mrgctx (gpointer aot_module, guint32 method_index, /* Same for gshared methods with a vtable arg */ void -mini_llvm_init_gshared_method_vtable (gpointer aot_module, guint32 method_index, MonoVTable *vtable) +mini_llvm_init_gshared_method_vtable (MonoAotFileInfo *info, gpointer aot_module, guint32 method_index, MonoVTable *vtable) { MonoAotModule *amodule = (MonoAotModule *)aot_module; MonoClass *klass; diff --git a/mono/mini/llvmonly-runtime.h b/mono/mini/llvmonly-runtime.h index d6e38cbba7..55c4ed464e 100644 --- a/mono/mini/llvmonly-runtime.h +++ b/mono/mini/llvmonly-runtime.h @@ -9,6 +9,7 @@ #define __MONO_LLVMONLY_RUNTIME_H__ #include "mini-runtime.h" +#include "aot-runtime.h" gpointer mini_llvmonly_load_method (MonoMethod *method, gboolean caller_gsharedvt, gboolean need_unbox, gpointer *out_arg, MonoError *error); MonoFtnDesc* mini_llvmonly_load_method_ftndesc (MonoMethod *method, gboolean caller_gsharedvt, gboolean need_unbox, MonoError *error); @@ -27,10 +28,10 @@ G_EXTERN_C MonoFtnDesc* mini_llvmonly_resolve_generic_virtual_iface_call (MonoVT G_EXTERN_C void mini_llvmonly_init_delegate (MonoDelegate *del); G_EXTERN_C void mini_llvmonly_init_delegate_virtual (MonoDelegate *del, MonoObject *target, MonoMethod *method); -G_EXTERN_C void mini_llvm_init_method (gpointer aot_module, guint32 method_index); -G_EXTERN_C void mini_llvm_init_gshared_method_this (gpointer aot_module, guint32 method_index, MonoObject *this_ins); -G_EXTERN_C void mini_llvm_init_gshared_method_mrgctx (gpointer aot_module, guint32 method_index, MonoMethodRuntimeGenericContext *rgctx); -G_EXTERN_C void mini_llvm_init_gshared_method_vtable (gpointer aot_module, guint32 method_index, MonoVTable *vtable); +G_EXTERN_C void mini_llvm_init_method (MonoAotFileInfo *info, gpointer aot_module, guint32 method_index); +G_EXTERN_C void mini_llvm_init_gshared_method_this (MonoAotFileInfo *info, gpointer aot_module, guint32 method_index, MonoObject *this_ins); +G_EXTERN_C void mini_llvm_init_gshared_method_mrgctx (MonoAotFileInfo *info, gpointer aot_module, guint32 method_index, MonoMethodRuntimeGenericContext *rgctx); +G_EXTERN_C void mini_llvm_init_gshared_method_vtable (MonoAotFileInfo *info, gpointer aot_module, guint32 method_index, MonoVTable *vtable); G_EXTERN_C void mini_llvmonly_throw_nullref_exception (void); diff --git a/mono/mini/main-core.c b/mono/mini/main-core.c index a478f1ab4d..0b303a386e 100644 --- a/mono/mini/main-core.c +++ b/mono/mini/main-core.c @@ -162,9 +162,9 @@ mono_core_preload_hook (MonoAssemblyLoadContext *alc, MonoAssemblyName *aname, c g_free (basename); if (!result) { - mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY, "netcore preload hook: did not find '%s'.\n", aname->name); + mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY, "netcore preload hook: did not find '%s'.", aname->name); } else { - mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "netcore preload hook: loading '%s' from '%s'.\n", aname->name, result->image->name); + mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "netcore preload hook: loading '%s' from '%s'.", aname->name, result->image->name); } return result; } @@ -232,9 +232,9 @@ int STDAPICALLTYPE coreclr_initialize (const char* exePath, const char* appDomai /* * Don't use Mono's legacy assembly name matching behavior - respect - * the requested version and public key token. + * the requested version and culture. */ - mono_loader_set_strict_strong_names (TRUE); + mono_loader_set_strict_assembly_name_check (TRUE); return 0; } diff --git a/mono/mini/memory-access.c b/mono/mini/memory-access.c index c5d5cd5f5a..02088f15cb 100644 --- a/mono/mini/memory-access.c +++ b/mono/mini/memory-access.c @@ -349,7 +349,8 @@ mini_emit_wb_aware_memcpy (MonoCompile *cfg, MonoClass *klass, MonoInst *iargs[4 } static void -mini_emit_memory_copy_internal (MonoCompile *cfg, MonoInst *dest, MonoInst *src, MonoClass *klass, int explicit_align, gboolean native) +mini_emit_memory_copy_internal (MonoCompile *cfg, MonoInst *dest, MonoInst *src, MonoClass *klass, int explicit_align, gboolean native, + gboolean stack_store) { MonoInst *iargs [4]; int size; @@ -404,8 +405,8 @@ mini_emit_memory_copy_internal (MonoCompile *cfg, MonoInst *dest, MonoInst *src, mini_emit_write_barrier (cfg, dest, load); return; - - } else if (cfg->gen_write_barriers && (m_class_has_references (klass) || size_ins) && !native) { /* if native is true there should be no references in the struct */ + } else if (cfg->gen_write_barriers && (m_class_has_references (klass) || size_ins) && + !native && !stack_store) { /* if native is true there should be no references in the struct */ /* Avoid barriers when storing to the stack */ if (!((dest->opcode == OP_ADD_IMM && dest->sreg1 == cfg->frame_reg) || (dest->opcode == OP_LDADDR))) { @@ -504,7 +505,7 @@ mini_emit_memory_store (MonoCompile *cfg, MonoType *type, MonoInst *dest, MonoIn tmp_var = mono_compile_create_var (cfg, type, OP_LOCAL); EMIT_NEW_TEMPSTORE (cfg, mov, tmp_var->inst_c0, value); EMIT_NEW_VARLOADA (cfg, addr, tmp_var, tmp_var->inst_vtype); - mini_emit_memory_copy_internal (cfg, dest, addr, mono_class_from_mono_type_internal (type), 1, FALSE); + mini_emit_memory_copy_internal (cfg, dest, addr, mono_class_from_mono_type_internal (type), 1, FALSE, (ins_flag & MONO_INST_STACK_STORE) != 0); } else { MonoInst *ins; @@ -594,7 +595,7 @@ mini_emit_memory_copy (MonoCompile *cfg, MonoInst *dest, MonoInst *src, MonoClas mini_emit_memory_barrier (cfg, MONO_MEMORY_BARRIER_SEQ); } - mini_emit_memory_copy_internal (cfg, dest, src, klass, explicit_align, native); + mini_emit_memory_copy_internal (cfg, dest, src, klass, explicit_align, native, (ins_flag & MONO_INST_STACK_STORE) != 0); if (ins_flag & MONO_INST_VOLATILE) { /* Volatile loads have acquire semantics, see 12.6.7 in Ecma 335 */ diff --git a/mono/mini/method-to-ir.c.REMOVED.git-id b/mono/mini/method-to-ir.c.REMOVED.git-id index 87bbd85618..dadf01a49d 100644 --- a/mono/mini/method-to-ir.c.REMOVED.git-id +++ b/mono/mini/method-to-ir.c.REMOVED.git-id @@ -1 +1 @@ -f35ba71f466fa63e6f810ae9312fbb64b2d93471 \ No newline at end of file +a2639dc7431ae4b2e90247c546e67f82fdf04bfd \ No newline at end of file diff --git a/mono/mini/mini-arm64.c.REMOVED.git-id b/mono/mini/mini-arm64.c.REMOVED.git-id index 05035f5006..a7326808e8 100644 --- a/mono/mini/mini-arm64.c.REMOVED.git-id +++ b/mono/mini/mini-arm64.c.REMOVED.git-id @@ -1 +1 @@ -2ca8a2139d202db055c61768ec89bd173cfa58c1 \ No newline at end of file +8452d6073f9b71e0210b6b8f3dbd337b21cf1241 \ No newline at end of file diff --git a/mono/mini/mini-codegen.c b/mono/mini/mini-codegen.c index b5dc536d46..f6745409d9 100644 --- a/mono/mini/mini-codegen.c +++ b/mono/mini/mini-codegen.c @@ -576,7 +576,7 @@ mono_print_ins_index_strbuf (int i, MonoInst *ins) g_string_append_printf (sbuf, " [%d]", (int)(gssize)ins->inst_p1); break; case OP_I8CONST: - g_string_append_printf (sbuf, " [%lld]", (long long)ins->inst_l); + g_string_append_printf (sbuf, " [%" PRId64 "]", (gint64)ins->inst_l); break; case OP_R8CONST: g_string_append_printf (sbuf, " [%f]", *(double*)ins->inst_p0); @@ -854,7 +854,7 @@ get_register_spilling (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst **last, Mo g_assert (bank < MONO_NUM_REGBANKS); - DEBUG (printf ("\tstart regmask to assign R%d: 0x%08llu (R%d <- R%d R%d R%d)\n", reg, (unsigned long long)regmask, ins->dreg, ins->sreg1, ins->sreg2, ins->sreg3)); + DEBUG (printf ("\tstart regmask to assign R%d: 0x%08" PRIu64 " (R%d <- R%d R%d R%d)\n", reg, (guint64)regmask, ins->dreg, ins->sreg1, ins->sreg2, ins->sreg3)); /* exclude the registers in the current instruction */ num_sregs = mono_inst_get_src_registers (ins, sregs); for (i = 0; i < num_sregs; ++i) { @@ -871,7 +871,7 @@ get_register_spilling (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst **last, Mo DEBUG (printf ("\t\texcluding dreg %s\n", mono_regname_full (ins->dreg, bank))); } - DEBUG (printf ("\t\tavailable regmask: 0x%08llu\n", (unsigned long long)regmask)); + DEBUG (printf ("\t\tavailable regmask: 0x%08" PRIu64 "\n", (guint64)regmask)); g_assert (regmask); /* need at least a register we can free */ sel = 0; /* we should track prev_use and spill the register that's farther */ diff --git a/mono/mini/mini-exceptions.c.REMOVED.git-id b/mono/mini/mini-exceptions.c.REMOVED.git-id index 684f3125aa..804746b8ca 100644 --- a/mono/mini/mini-exceptions.c.REMOVED.git-id +++ b/mono/mini/mini-exceptions.c.REMOVED.git-id @@ -1 +1 @@ -a686f7a4ae24433b85ee99f254cc1c0bbb896f08 \ No newline at end of file +14b6fbba5598582c2816d525f9fe58752803561f \ No newline at end of file diff --git a/mono/mini/mini-generic-sharing.c.REMOVED.git-id b/mono/mini/mini-generic-sharing.c.REMOVED.git-id index 1e2fdadd2f..32a18e1fae 100644 --- a/mono/mini/mini-generic-sharing.c.REMOVED.git-id +++ b/mono/mini/mini-generic-sharing.c.REMOVED.git-id @@ -1 +1 @@ -26d0c01fe91413648c0c53a906ba8b3e495a730f \ No newline at end of file +2eba1e575ba0037977cd0bb85a67a46548cad662 \ No newline at end of file diff --git a/mono/mini/mini-llvm-cpp.cpp b/mono/mini/mini-llvm-cpp.cpp index 3c95c3e5c7..86fca1c8ee 100644 --- a/mono/mini/mini-llvm-cpp.cpp +++ b/mono/mini/mini-llvm-cpp.cpp @@ -409,6 +409,17 @@ mono_llvm_set_call_noalias_ret (LLVMValueRef wrapped_calli) dyn_cast(calli)->addAttribute (AttributeList::ReturnIndex, Attribute::NoAlias); } +void +mono_llvm_set_alignment_ret (LLVMValueRef call, int alignment) +{ + Instruction *ins = unwrap (call); + auto &ctx = ins->getContext (); + if (isa (ins)) + dyn_cast(ins)->addAttribute (AttributeList::ReturnIndex, Attribute::getWithAlignment(ctx, alignment)); + else + dyn_cast(ins)->addAttribute (AttributeList::ReturnIndex, Attribute::getWithAlignment(ctx, alignment)); +} + static Attribute::AttrKind convert_attr (AttrKind kind) { @@ -443,6 +454,14 @@ mono_llvm_add_func_attr (LLVMValueRef func, AttrKind kind) unwrap (func)->addAttribute (AttributeList::FunctionIndex, convert_attr (kind)); } +void +mono_llvm_add_func_attr_nv (LLVMValueRef func, const char *attr_name, const char *attr_value) +{ + AttrBuilder NewAttrs; + NewAttrs.addAttribute (attr_name, attr_value); + unwrap (func)->addAttributes (AttributeList::FunctionIndex, NewAttrs); +} + void mono_llvm_add_param_attr (LLVMValueRef param, AttrKind kind) { diff --git a/mono/mini/mini-llvm-cpp.h b/mono/mini/mini-llvm-cpp.h index ef56a6f379..9c2e6d060e 100644 --- a/mono/mini/mini-llvm-cpp.h +++ b/mono/mini/mini-llvm-cpp.h @@ -134,9 +134,15 @@ mono_llvm_set_call_notailcall (LLVMValueRef call); void mono_llvm_set_call_noalias_ret (LLVMValueRef wrapped_calli); +void +mono_llvm_set_alignment_ret (LLVMValueRef val, int alignment); + void mono_llvm_add_func_attr (LLVMValueRef func, AttrKind kind); +void +mono_llvm_add_func_attr_nv (LLVMValueRef func, const char *attr_name, const char *attr_value); + void mono_llvm_add_param_attr (LLVMValueRef param, AttrKind kind); diff --git a/mono/mini/mini-llvm.c.REMOVED.git-id b/mono/mini/mini-llvm.c.REMOVED.git-id index 6e5dc371ba..d6676dc9eb 100644 --- a/mono/mini/mini-llvm.c.REMOVED.git-id +++ b/mono/mini/mini-llvm.c.REMOVED.git-id @@ -1 +1 @@ -e9d350da6fd6d0f1709d0b2bc17c0bca060d18df \ No newline at end of file +9287d5656e39f7e584cd7292025e945476b6b3dc \ No newline at end of file diff --git a/mono/mini/mini-ops.h b/mono/mini/mini-ops.h index 4bc8669561..74500e554a 100644 --- a/mono/mini/mini-ops.h +++ b/mono/mini/mini-ops.h @@ -1004,11 +1004,41 @@ MINI_OP(OP_CVTTPS2DQ, "cvttps2dq", XREG, XREG, NONE) /* multiply all 4 single precision float elements, add them together, and store the result to the lowest element */ MINI_OP(OP_DPPS, "dpps", XREG, XREG, XREG) -/* sse 4.1 */ +/* sse 1 */ +/* inst_c1 is target type */ +MINI_OP(OP_SSE_LOADU, "sse_loadu", XREG, XREG, NONE) +MINI_OP(OP_SSE_MOVMSK, "sse_movmsk", IREG, XREG, NONE) +MINI_OP(OP_SSE_STORE, "sse_store", NONE, XREG, XREG) +MINI_OP(OP_SSE_STORES, "sse_stores", NONE, XREG, XREG) +MINI_OP(OP_SSE_MOVS, "sse_movs", XREG, XREG, NONE) +MINI_OP(OP_SSE_MOVS2, "sse_movs2", XREG, XREG, XREG) +MINI_OP(OP_SSE_MOVEHL, "sse_movehl", XREG, XREG, XREG) +MINI_OP(OP_SSE_MOVELH, "sse_movelh", XREG, XREG, XREG) +MINI_OP(OP_SSE_UNPACKLO, "sse_unpacklo", XREG, XREG, XREG) +MINI_OP(OP_SSE_UNPACKHI, "sse_unpackhi", XREG, XREG, XREG) +MINI_OP(OP_SSE_SHUFFLE, "sse_shuffle", XREG, XREG, XREG) +MINI_OP(OP_SSE_AND, "sse_and", XREG, XREG, XREG) +MINI_OP(OP_SSE_OR, "sse_or", XREG, XREG, XREG) +MINI_OP(OP_SSE_XOR, "sse_xor", XREG, XREG, XREG) +MINI_OP(OP_SSE_ANDN, "sse_andn", XREG, XREG, XREG) +/* sse 2 */ +MINI_OP(OP_SSE2_PACKUS, "sse2_packus", XREG, XREG, XREG) +MINI_OP(OP_SSE2_SRLI, "sse2_srli", XREG, XREG, XREG) +MINI_OP(OP_SSE2_SHUFFLE, "sse2_shuffle", XREG, XREG, XREG) + +/* sse 3 */ +MINI_OP(OP_SSE3_MOVDDUP, "sse3_movddup", XREG, XREG, NONE) + +/* ssse 3 */ +MINI_OP(OP_SSSE3_SHUFFLE, "ssse3_shuffle", XREG, XREG, XREG) + +/* sse 4.1 */ /* inst_c0 is the rounding mode: 0 = round, 1 = floor, 2 = ceiling */ MINI_OP(OP_SSE41_ROUNDPD, "roundpd", XREG, XREG, NONE) MINI_OP(OP_SSE41_ROUNDSS, "roundss", XREG, XREG, NONE) +MINI_OP3(OP_SSE41_INSERT, "sse41_insert", XREG, XREG, XREG, IREG) +MINI_OP(OP_SSE41_PTESTZ, "sse41_ptestz", IREG, XREG, XREG) /* Intel BMI1 */ /* Count trailing zeroes, return 32/64 if the input is 0 */ @@ -1031,6 +1061,8 @@ MINI_OP3(OP_MULX_HL64, "mulxhl64", LREG, LREG, LREG, LREG) #endif +MINI_OP(OP_CREATE_SCALAR_UNSAFE, "create_scalar_unsafe", XREG, XREG, NONE) + MINI_OP(OP_XMOVE, "xmove", XREG, XREG, NONE) MINI_OP(OP_XZERO, "xzero", XREG, NONE, NONE) MINI_OP(OP_XONES, "xones", XREG, NONE, NONE) diff --git a/mono/mini/mini-posix.c b/mono/mini/mini-posix.c index 7f9537423d..89c890a01c 100644 --- a/mono/mini/mini-posix.c +++ b/mono/mini/mini-posix.c @@ -231,7 +231,7 @@ MONO_SIG_HANDLER_FUNC (static, sigabrt_signal_handler) return; mono_sigctx_to_monoctx (ctx, &mctx); if (mono_dump_start ()) - mono_handle_native_crash (mono_get_signame (info->si_signo), &mctx, info); + mono_handle_native_crash (mono_get_signame (info->si_signo), &mctx, info, ctx); else abort (); } @@ -253,7 +253,7 @@ MONO_SIG_HANDLER_FUNC (static, sigterm_signal_handler) // running. Returns FALSE on unrecoverable error. if (mono_dump_start ()) { // Process was killed from outside since crash reporting wasn't running yet. - mono_handle_native_crash (mono_get_signame (info->si_signo), &mctx, NULL); + mono_handle_native_crash (mono_get_signame (info->si_signo), &mctx, NULL, ctx); } else { // Crash reporting already running and we got a second SIGTERM from as part of thread-summarizing if (!mono_threads_summarize_execute (&mctx, &output, &hashes, FALSE, NULL, 0)) @@ -1158,7 +1158,7 @@ mono_dump_native_crash_info (const char *signal, MonoContext *mctx, MONO_SIG_HAN } void -mono_post_native_crash_handler (const char *signal, MonoContext *mctx, MONO_SIG_HANDLER_INFO_TYPE *info, gboolean crash_chaining) +mono_post_native_crash_handler (const char *signal, MonoContext *mctx, MONO_SIG_HANDLER_INFO_TYPE *info, gboolean crash_chaining, void *context) { if (!crash_chaining) { /*Android abort is a fluke, it doesn't abort, it triggers another segv. */ @@ -1168,6 +1168,11 @@ mono_post_native_crash_handler (const char *signal, MonoContext *mctx, MONO_SIG_ abort (); #endif } + mono_chain_signal (info->si_signo, info, context); + + // we remove Mono's signal handlers from crashing signals in mono_handle_native_crash(), so re-raising will now allow the OS to handle the crash + // TODO: perhaps we can always use this to abort, instead of explicit exit()/abort() as we do above + raise (info->si_signo); } #endif /* !MONO_CROSS_COMPILE */ diff --git a/mono/mini/mini-runtime.c.REMOVED.git-id b/mono/mini/mini-runtime.c.REMOVED.git-id index a4e5727352..051386fcdc 100644 --- a/mono/mini/mini-runtime.c.REMOVED.git-id +++ b/mono/mini/mini-runtime.c.REMOVED.git-id @@ -1 +1 @@ -bc19fe6eeacb6dcc60e54645dd371523a6f2c8b2 \ No newline at end of file +f027be730c1ae5f36033d268867fc09427cdcf49 \ No newline at end of file diff --git a/mono/mini/mini-runtime.h b/mono/mini/mini-runtime.h index 57ee1d9201..9c429cbc44 100644 --- a/mono/mini/mini-runtime.h +++ b/mono/mini/mini-runtime.h @@ -256,8 +256,13 @@ typedef struct MonoDebugOptions { */ gboolean aot_skip_set; int aot_skip; -} MonoDebugOptions; + /* + * Treat exceptions which reach the topmost runtime invoke as unhandled when + * embedding. + */ + gboolean top_runtime_invoke_unhandled; +} MonoDebugOptions; /* * We need to store the image which the token refers to along with the token, @@ -380,6 +385,7 @@ extern GList* mono_aot_paths; extern MonoDebugOptions mini_debug_options; extern GSList *mono_interp_only_classes; extern char *sdb_options; +extern MonoMethodDesc *mono_stats_method_desc; /* This struct describes what execution engine feature to use. @@ -422,6 +428,7 @@ MONO_API void mono_parse_env_options (int *ref_argc, char **ref_a MONO_API char *mono_parse_options_from (const char *options, int *ref_argc, char **ref_argv []); MONO_API int mono_regression_test_step (int verbose_level, const char *image, const char *method_name); +void mono_runtime_print_stats (void); void mono_interp_stub_init (void); void mini_install_interp_callbacks (const MonoEECallbacks *cbs); @@ -549,7 +556,7 @@ void mono_dump_native_crash_info (const char *signal, MonoContext *mctx, MONO_SIG_HANDLER_INFO_TYPE *info); void -mono_post_native_crash_handler (const char *signal, MonoContext *mctx, MONO_SIG_HANDLER_INFO_TYPE *info, gboolean crash_chaining); +mono_post_native_crash_handler (const char *signal, MonoContext *mctx, MONO_SIG_HANDLER_INFO_TYPE *info, gboolean crash_chaining, void *context); gboolean mono_is_addr_implicit_null_check (void *addr); diff --git a/mono/mini/mini-trampolines.c b/mono/mini/mini-trampolines.c index 0b17c84063..e5bb1cea2a 100644 --- a/mono/mini/mini-trampolines.c +++ b/mono/mini/mini-trampolines.c @@ -1142,7 +1142,7 @@ mono_delegate_trampoline (host_mgreg_t *regs, guint8 *code, gpointer *arg, guint } } - if (tramp_info->method == NULL && delegate->target != NULL && method->flags & METHOD_ATTRIBUTE_VIRTUAL) { + if (delegate->method_ptr == NULL && tramp_info->method == NULL && delegate->target != NULL && method->flags & METHOD_ATTRIBUTE_VIRTUAL) { /* tramp_info->method == NULL happens when someone asks us to JIT some delegate's * Invoke method (see compile_special). In that case if method is virtual, the target * could be some derived class, so we need to find the correct override. @@ -1326,7 +1326,7 @@ mono_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_type, M guint32 len; if (mono_aot_only) - code = mono_aot_create_specific_trampoline (mono_defaults.corlib, arg1, tramp_type, domain, &len); + code = mono_aot_create_specific_trampoline (arg1, tramp_type, domain, &len); else code = mono_arch_create_specific_trampoline (arg1, tramp_type, domain, &len); mono_lldb_save_specific_trampoline_info (arg1, tramp_type, domain, code, len); diff --git a/mono/mini/mini-wasm-debugger.c b/mono/mini/mini-wasm-debugger.c index f1e4707c94..4fa4dc15a1 100644 --- a/mono/mini/mini-wasm-debugger.c +++ b/mono/mini/mini-wasm-debugger.c @@ -153,7 +153,7 @@ tls_get_restore_state (void *tls) } static gboolean -try_process_suspend (void *tls, MonoContext *ctx) +try_process_suspend (void *tls, MonoContext *ctx, gboolean from_breakpoint) { return FALSE; } @@ -239,7 +239,7 @@ process_breakpoint_events (void *_evts, MonoMethod *method, MonoContext *ctx, in BpEvents *evts = (BpEvents*)_evts; if (evts) { if (evts->is_ss) - mono_de_cancel_ss (); + mono_de_cancel_all_ss (); mono_wasm_fire_bp (); g_free (evts); } @@ -291,6 +291,12 @@ ss_args_destroy (SingleStepArgs *ss_args) //nothing to do } +static int +handle_multiple_ss_requests (void) { + mono_de_cancel_all_ss (); + return 1; +} + void mono_wasm_debugger_init (void) { @@ -313,6 +319,7 @@ mono_wasm_debugger_init (void) .process_breakpoint_events = process_breakpoint_events, .ss_create_init_args = ss_create_init_args, .ss_args_destroy = ss_args_destroy, + .handle_multiple_ss_requests = handle_multiple_ss_requests, }; mono_debug_init (MONO_DEBUG_FORMAT_MONO); @@ -371,14 +378,14 @@ mono_wasm_setup_single_step (int kind) depth = STEP_DEPTH_OVER; break; default: - g_error ("dunno step kind %d", kind); + g_error ("[dbg] unknown step kind %d", kind); } DbgEngineErrorCode err = mono_de_ss_create (THREAD_TO_INTERNAL (mono_thread_current ()), size, depth, filter, req); if (err != DE_ERR_NONE) { DEBUG_PRINTF (1, "[dbg] Failed to setup single step request"); } - printf ("ss is in place, now ahat?\n"); + DEBUG_PRINTF (1, "[dbg] single step is in place, now what?\n"); } EMSCRIPTEN_KEEPALIVE void @@ -648,11 +655,11 @@ static gboolean describe_value(MonoType * type, gpointer addr) } else { GString *class_name; class_name = g_string_new (""); - if (*(obj->vtable->klass->name_space)) { - g_string_append (class_name, obj->vtable->klass->name_space); + if (*(m_class_get_name_space (obj->vtable->klass))) { + g_string_append (class_name, m_class_get_name_space (obj->vtable->klass)); g_string_append_c (class_name, '.'); } - g_string_append (class_name, obj->vtable->klass->name); + g_string_append (class_name, m_class_get_name (obj->vtable->klass)); if (m_class_get_byval_arg (obj->vtable->klass)->type == MONO_TYPE_SZARRAY || m_class_get_byval_arg (obj->vtable->klass)->type == MONO_TYPE_ARRAY) mono_wasm_add_array_var (class_name->str, get_object_id(obj)); else @@ -814,11 +821,11 @@ describe_this (MonoStackFrameInfo *info, MonoContext *ctx, gpointer ud) mono_wasm_add_properties_var("this"); GString *class_name; class_name = g_string_new (""); - if (*(obj->vtable->klass->name_space)) { - g_string_append (class_name, obj->vtable->klass->name_space); + if (*(m_class_get_name_space (obj->vtable->klass))) { + g_string_append (class_name, m_class_get_name_space (obj->vtable->klass)); g_string_append_c (class_name, '.'); } - g_string_append (class_name, obj->vtable->klass->name); + g_string_append (class_name, m_class_get_name (obj->vtable->klass)); mono_wasm_add_obj_var (class_name->str, get_object_id(obj)); g_string_free(class_name, FALSE); } diff --git a/mono/mini/mini-windows.c b/mono/mini/mini-windows.c index 673aeefeee..f78caaeee1 100644 --- a/mono/mini/mini-windows.c +++ b/mono/mini/mini-windows.c @@ -281,7 +281,7 @@ mono_dump_native_crash_info (const char *signal, MonoContext *mctx, MONO_SIG_HAN } void -mono_post_native_crash_handler (const char *signal, MonoContext *mctx, MONO_SIG_HANDLER_INFO_TYPE *info, gboolean crash_chaining) +mono_post_native_crash_handler (const char *signal, MonoContext *mctx, MONO_SIG_HANDLER_INFO_TYPE *info, gboolean crash_chaining, void *context) { if (!crash_chaining) abort (); diff --git a/mono/mini/mini.c.REMOVED.git-id b/mono/mini/mini.c.REMOVED.git-id index efab765074..6200da2100 100644 --- a/mono/mini/mini.c.REMOVED.git-id +++ b/mono/mini/mini.c.REMOVED.git-id @@ -1 +1 @@ -75c3eef0312e4e1f8a13468c1926654bc27784bb \ No newline at end of file +9b5b2cba220be5f436d8c7d16144e52eb1a65d70 \ No newline at end of file diff --git a/mono/mini/mini.h.REMOVED.git-id b/mono/mini/mini.h.REMOVED.git-id index b12f730c1b..8aeeae5f7c 100644 --- a/mono/mini/mini.h.REMOVED.git-id +++ b/mono/mini/mini.h.REMOVED.git-id @@ -1 +1 @@ -134adb7a215a94e6b85ffbcde80a8f2fe4137684 \ No newline at end of file +bf70f4e805a8e3e58a746dfacca58f5e9f2395b9 \ No newline at end of file diff --git a/mono/mini/simd-intrinsics-netcore.c b/mono/mini/simd-intrinsics-netcore.c index 24cbae63e3..8d86cc4dcc 100644 --- a/mono/mini/simd-intrinsics-netcore.c +++ b/mono/mini/simd-intrinsics-netcore.c @@ -181,8 +181,6 @@ emit_simd_ins (MonoCompile *cfg, MonoClass *klass, int opcode, int sreg1, int sr } else if (spec [MONO_INST_DEST] == 'i') { ins->dreg = alloc_ireg (cfg); ins->type = STACK_I4; - } else { - g_assert_not_reached (); } ins->sreg1 = sreg1; ins->sreg2 = sreg2; @@ -192,14 +190,55 @@ emit_simd_ins (MonoCompile *cfg, MonoClass *klass, int opcode, int sreg1, int sr } static MonoInst* -emit_xcompare (MonoCompile *cfg, MonoClass *klass, MonoType *etype, MonoInst *arg1, MonoInst *arg2) +emit_simd_ins_for_sig (MonoCompile *cfg, MonoClass *klass, int opcode, int instc0, int instc1, MonoMethodSignature *fsig, MonoInst **args) +{ + g_assert (fsig->param_count <= 3); + MonoInst* ins = emit_simd_ins (cfg, klass, opcode, + fsig->param_count > 0 ? args [0]->dreg : -1, + fsig->param_count > 1 ? args [1]->dreg : -1); + if (instc0 != -1) + ins->inst_c0 = instc0; + if (instc1 != -1) + ins->inst_c1 = instc1; + if (fsig->param_count == 3) + ins->sreg3 = args [2]->dreg; + return ins; +} + +static gboolean +is_hw_intrinsics_class (MonoClass *klass, const char *name, gboolean *is_64bit) +{ + const char *class_name = m_class_get_name (klass); + if ((!strcmp (class_name, "X64") || !strcmp (class_name, "Arm64")) && m_class_get_nested_in (klass)) { + *is_64bit = TRUE; + return !strcmp (m_class_get_name (m_class_get_nested_in (klass)), name); + } else { + *is_64bit = FALSE; + return !strcmp (class_name, name); + } +} + +static MonoTypeEnum +get_underlying_type (MonoType* type) +{ + MonoClass* klass = mono_class_from_mono_type_internal (type); + if (type->type == MONO_TYPE_PTR) // e.g. int* => MONO_TYPE_I4 + return m_class_get_byval_arg (m_class_get_element_class (klass))->type; + else if (type->type == MONO_TYPE_GENERICINST) // e.g. Vector128 => MONO_TYPE_I4 + return mono_class_get_context (klass)->class_inst->type_argv [0]->type; + else + return type->type; +} + +static MonoInst* +emit_xcompare (MonoCompile *cfg, MonoClass *klass, MonoTypeEnum etype, MonoInst *arg1, MonoInst *arg2) { MonoInst *ins; - gboolean is_fp = etype->type == MONO_TYPE_R4 || etype->type == MONO_TYPE_R8; + gboolean is_fp = etype == MONO_TYPE_R4 || etype == MONO_TYPE_R8; ins = emit_simd_ins (cfg, klass, is_fp ? OP_XCOMPARE_FP : OP_XCOMPARE, arg1->dreg, arg2->dreg); ins->inst_c0 = CMP_EQ; - ins->inst_c1 = etype->type; + ins->inst_c1 = etype; return ins; } @@ -211,7 +250,10 @@ get_vector_t_elem_type (MonoType *vector_type) g_assert (vector_type->type == MONO_TYPE_GENERICINST); klass = mono_class_from_mono_type_internal (vector_type); - g_assert (!strcmp (m_class_get_name (klass), "Vector`1")); + g_assert ( + !strcmp (m_class_get_name (klass), "Vector`1") || + !strcmp (m_class_get_name (klass), "Vector128`1") || + !strcmp (m_class_get_name (klass), "Vector256`1")); etype = mono_class_get_context (klass)->class_inst->type_argv [0]; return etype; } @@ -350,7 +392,7 @@ emit_sys_numerics_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSig case SN_get_AllOnes: { /* Compare a zero vector with itself */ ins = emit_simd_ins (cfg, klass, OP_XZERO, -1, -1); - return emit_xcompare (cfg, klass, etype, ins, ins); + return emit_xcompare (cfg, klass, etype->type, ins, ins); } case SN_get_Item: { if (!COMPILE_LLVM (cfg)) @@ -471,7 +513,7 @@ emit_sys_numerics_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSig return emit_simd_ins (cfg, klass, OP_XEQUAL, sreg1, args [1]->dreg); } else if (fsig->param_count == 2 && mono_metadata_type_equal (fsig->ret, type) && mono_metadata_type_equal (fsig->params [0], type) && mono_metadata_type_equal (fsig->params [1], type)) { /* Per element equality */ - return emit_xcompare (cfg, klass, etype, args [0], args [1]); + return emit_xcompare (cfg, klass, etype->type, args [0], args [1]); } break; case SN_op_Equality: @@ -493,7 +535,7 @@ emit_sys_numerics_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSig case SN_LessThanOrEqual: g_assert (fsig->param_count == 2 && mono_metadata_type_equal (fsig->ret, type) && mono_metadata_type_equal (fsig->params [0], type) && mono_metadata_type_equal (fsig->params [1], type)); is_unsigned = etype->type == MONO_TYPE_U1 || etype->type == MONO_TYPE_U2 || etype->type == MONO_TYPE_U4 || etype->type == MONO_TYPE_U8; - ins = emit_xcompare (cfg, klass, etype, args [0], args [1]); + ins = emit_xcompare (cfg, klass, etype->type, args [0], args [1]); switch (id) { case SN_GreaterThan: ins->inst_c0 = is_unsigned ? CMP_GT_UN : CMP_GT; @@ -597,6 +639,75 @@ emit_sys_numerics_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSig #ifdef TARGET_AMD64 +static guint16 sse_methods [] = { + SN_Add, + SN_And, + SN_AndNot, + SN_CompareEqual, + SN_CompareNotEqual, + SN_Divide, + SN_LoadAlignedVector128, + SN_LoadVector128, + SN_MoveHighToLow, + SN_MoveLowToHigh, + SN_MoveMask, + SN_MoveScalar, + SN_Multiply, + SN_Or, + SN_Shuffle, + SN_Store, + SN_StoreAligned, + SN_Subtract, + SN_UnpackHigh, + SN_UnpackLow, + SN_Xor, + SN_get_IsSupported +}; + +static guint16 sse2_methods [] = { + SN_Add, + SN_And, + SN_AndNot, + SN_CompareEqual, + SN_CompareGreaterThan, + SN_CompareLessThan, + SN_CompareNotEqual, + SN_LoadAlignedVector128, + SN_LoadVector128, + SN_MoveMask, + SN_MoveScalar, + SN_Or, + SN_PackUnsignedSaturate, + SN_ShiftRightLogical, + SN_Shuffle, + SN_Store, + SN_StoreAligned, + SN_StoreScalar, + SN_Subtract, + SN_UnpackHigh, + SN_UnpackLow, + SN_Xor, + SN_get_IsSupported +}; + +static guint16 ssse3_methods [] = { + SN_Shuffle, + SN_get_IsSupported +}; + +static guint16 sse3_methods [] = { + SN_MoveAndDuplicate, + SN_get_IsSupported +}; + +static guint16 sse41_methods [] = { + SN_Insert, + SN_Max, + SN_Min, + SN_TestZ, + SN_get_IsSupported +}; + static guint16 popcnt_methods [] = { SN_PopCount, SN_get_IsSupported @@ -628,22 +739,250 @@ static guint16 bmi2_methods [] = { static MonoInst* emit_x86_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **args) { - const char *class_name; - const char *class_ns; MonoInst *ins; int id; gboolean supported, is_64bit; MonoClass *klass = cmethod->klass; + MonoTypeEnum arg0_type = fsig->param_count > 0 ? get_underlying_type (fsig->params [0]) : MONO_TYPE_VOID; - class_ns = m_class_get_name_space (klass); - class_name = m_class_get_name (klass); - if (!strcmp (class_name, "Popcnt") || (!strcmp (class_name, "X64") && cmethod->klass->nested_in && !strcmp (m_class_get_name (cmethod->klass->nested_in), "Popcnt"))) { + if (is_hw_intrinsics_class (klass, "Sse", &is_64bit)) { + if (!COMPILE_LLVM (cfg)) + return NULL; + id = lookup_intrins (sse_methods, sizeof (sse_methods), cmethod); + if (id == -1) + return NULL; + + supported = (mini_get_cpu_features (cfg) & MONO_CPU_X86_SSE) != 0 && + m_class_get_image (cfg->method->klass) == mono_get_corlib (); // We only support the subset used by corelib + + switch (id) { + case SN_get_IsSupported: + EMIT_NEW_ICONST (cfg, ins, supported ? 1 : 0); + ins->type = STACK_I4; + return ins; + case SN_LoadAlignedVector128: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_LOADU, 16 /*alignment*/, arg0_type, fsig, args); + case SN_LoadVector128: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_LOADU, 1 /*alignment*/, arg0_type, fsig, args); + case SN_MoveMask: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_MOVMSK, -1, arg0_type, fsig, args); + case SN_MoveScalar: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_MOVS2, -1, arg0_type, fsig, args); + case SN_CompareNotEqual: + return emit_simd_ins_for_sig (cfg, klass, OP_XCOMPARE_FP, CMP_NE, arg0_type, fsig, args); + case SN_CompareEqual: + return emit_simd_ins_for_sig (cfg, klass, OP_XCOMPARE_FP, CMP_EQ, arg0_type, fsig, args); + case SN_And: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_AND, -1, arg0_type, fsig, args); + case SN_AndNot: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_ANDN, -1, arg0_type, fsig, args); + case SN_Or: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_OR, -1, arg0_type, fsig, args); + case SN_Xor: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_XOR, -1, arg0_type, fsig, args); + case SN_Multiply: + return emit_simd_ins_for_sig (cfg, klass, OP_XBINOP, OP_FMUL, arg0_type, fsig, args); + case SN_Divide: + return emit_simd_ins_for_sig (cfg, klass, OP_XBINOP, OP_FDIV, arg0_type, fsig, args); + case SN_Add: + return emit_simd_ins_for_sig (cfg, klass, OP_XBINOP, OP_FADD, arg0_type, fsig, args); + case SN_Subtract: + return emit_simd_ins_for_sig (cfg, klass, OP_XBINOP, OP_FSUB, arg0_type, fsig, args); + case SN_Shuffle: { + if (args [2]->opcode != OP_ICONST) { + mono_cfg_set_exception (cfg, MONO_EXCEPTION_MONO_ERROR); + mono_error_set_generic_error (cfg->error, "System", + "InvalidOperationException", "mask in Sse.Shuffle must be constant."); + return NULL; + } + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_SHUFFLE, args [2]->inst_c0 /*mask*/, arg0_type, fsig, args); + } + case SN_MoveHighToLow: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_MOVEHL, -1, arg0_type, fsig, args); + case SN_MoveLowToHigh: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_MOVELH, -1, arg0_type, fsig, args); + case SN_UnpackLow: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_UNPACKLO, -1, arg0_type, fsig, args); + case SN_UnpackHigh: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_UNPACKHI, -1, arg0_type, fsig, args); + case SN_Store: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_STORE, 1 /*alignment*/, arg0_type, fsig, args); + case SN_StoreAligned: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_STORE, 16 /*alignment*/, arg0_type, fsig, args); + default: + return NULL; + } + } + + if (is_hw_intrinsics_class (klass, "Sse2", &is_64bit)) { + if (!COMPILE_LLVM (cfg)) + return NULL; + id = lookup_intrins (sse2_methods, sizeof (sse2_methods), cmethod); + if (id == -1) + return NULL; + + supported = (mini_get_cpu_features (cfg) & MONO_CPU_X86_SSE2) != 0 && + m_class_get_image (cfg->method->klass) == mono_get_corlib (); // We only support the subset used by corelib + + switch (id) { + case SN_get_IsSupported: { + EMIT_NEW_ICONST (cfg, ins, supported ? 1 : 0); + ins->type = STACK_I4; + return ins; + } + case SN_Subtract: + return emit_simd_ins_for_sig (cfg, klass, OP_XBINOP, arg0_type == MONO_TYPE_R8 ? OP_FSUB : OP_ISUB, arg0_type, fsig, args); + case SN_Add: + return emit_simd_ins_for_sig (cfg, klass, OP_XBINOP, arg0_type == MONO_TYPE_R8 ? OP_FADD : OP_IADD, arg0_type, fsig, args); + case SN_And: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_AND, -1, arg0_type, fsig, args); + case SN_AndNot: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_ANDN, -1, arg0_type, fsig, args); + case SN_CompareNotEqual: + return emit_simd_ins_for_sig (cfg, klass, arg0_type == MONO_TYPE_R8 ? OP_XCOMPARE_FP : OP_XCOMPARE, CMP_NE, arg0_type, fsig, args); + case SN_CompareEqual: + return emit_simd_ins_for_sig (cfg, klass, arg0_type == MONO_TYPE_R8 ? OP_XCOMPARE_FP : OP_XCOMPARE, CMP_EQ, arg0_type, fsig, args); + case SN_CompareGreaterThan: + return emit_simd_ins_for_sig (cfg, klass, arg0_type == MONO_TYPE_R8 ? OP_XCOMPARE_FP : OP_XCOMPARE, CMP_GT, arg0_type, fsig, args); + case SN_CompareLessThan: + return emit_simd_ins_for_sig (cfg, klass, arg0_type == MONO_TYPE_R8 ? OP_XCOMPARE_FP : OP_XCOMPARE, CMP_LT, arg0_type, fsig, args); + case SN_LoadAlignedVector128: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_LOADU, 16 /*alignment*/, arg0_type, fsig, args); + case SN_LoadVector128: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_LOADU, 1 /*alignment*/, arg0_type, fsig, args); + case SN_MoveMask: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_MOVMSK, -1, arg0_type, fsig, args); + case SN_MoveScalar: + return emit_simd_ins_for_sig (cfg, klass, fsig->param_count == 2 ? OP_SSE_MOVS2 : OP_SSE_MOVS, -1, arg0_type, fsig, args); + case SN_PackUnsignedSaturate: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE2_PACKUS, -1, arg0_type, fsig, args); + case SN_ShiftRightLogical: { + if (arg0_type != MONO_TYPE_U2 || fsig->params [1]->type != MONO_TYPE_U1) + return NULL; // TODO: implement other overloads + return emit_simd_ins_for_sig (cfg, klass, OP_SSE2_SRLI, -1, arg0_type, fsig, args); + } + case SN_Shuffle: { + if ((arg0_type == MONO_TYPE_R8 && args [2]->opcode != OP_ICONST) || + (arg0_type != MONO_TYPE_R8 && args [1]->opcode != OP_ICONST)) { + mono_cfg_set_exception (cfg, MONO_EXCEPTION_MONO_ERROR); + mono_error_set_generic_error (cfg->error, "System", "InvalidOperationException", + "mask in Sse2.Shuffle must be constant."); + return NULL; + } + ins = emit_simd_ins_for_sig (cfg, klass, OP_SSE2_SHUFFLE, -1, arg0_type, fsig, args); + ins->sreg3 = -1; // last arg is always a constant mask + if (arg0_type == MONO_TYPE_R8) { // "double" overload accepts two vectors + ins->sreg2 = args [1]->dreg; + ins->inst_c0 = args [2]->inst_c0; // mask + } else { + ins->sreg2 = args [0]->dreg; + ins->inst_c0 = args [1]->inst_c0; // mask + } + return ins; + } + case SN_Store: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_STORE, 1 /*alignment*/, arg0_type, fsig, args); + case SN_StoreAligned: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_STORE, 16 /*alignment*/, arg0_type, fsig, args); + case SN_StoreScalar: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_STORES, -1, arg0_type, fsig, args); + case SN_UnpackLow: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_UNPACKLO, -1, arg0_type, fsig, args); + case SN_UnpackHigh: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_UNPACKHI, -1, arg0_type, fsig, args); + case SN_Or: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_OR, -1, arg0_type, fsig, args); + case SN_Xor: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE_XOR, -1, arg0_type, fsig, args); + default: + return NULL; + } + } + + if (is_hw_intrinsics_class (klass, "Sse3", &is_64bit)) { + if (!COMPILE_LLVM (cfg)) + return NULL; + id = lookup_intrins (sse3_methods, sizeof (sse3_methods), cmethod); + if (id == -1) + return NULL; + + supported = (mini_get_cpu_features (cfg) & MONO_CPU_X86_SSE3) != 0 && + m_class_get_image (cfg->method->klass) == mono_get_corlib (); // We only support the subset used by corelib + + switch (id) { + case SN_get_IsSupported: + EMIT_NEW_ICONST (cfg, ins, supported ? 1 : 0); + ins->type = STACK_I4; + return ins; + case SN_MoveAndDuplicate: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE3_MOVDDUP, -1, arg0_type, fsig, args); + default: + return NULL; + } + } + + if (is_hw_intrinsics_class (klass, "Ssse3", &is_64bit)) { + if (!COMPILE_LLVM (cfg)) + return NULL; + id = lookup_intrins (ssse3_methods, sizeof (ssse3_methods), cmethod); + if (id == -1) + return NULL; + + supported = (mini_get_cpu_features (cfg) & MONO_CPU_X86_SSSE3) != 0 && + m_class_get_image (cfg->method->klass) == mono_get_corlib (); // We only support the subset used by corelib + + switch (id) { + case SN_get_IsSupported: + EMIT_NEW_ICONST (cfg, ins, supported ? 1 : 0); + ins->type = STACK_I4; + return ins; + case SN_Shuffle: + return emit_simd_ins_for_sig (cfg, klass, OP_SSSE3_SHUFFLE, -1, arg0_type, fsig, args); + default: + return NULL; + } + } + + if (is_hw_intrinsics_class (klass, "Sse41", &is_64bit)) { + if (!COMPILE_LLVM (cfg)) + return NULL; + id = lookup_intrins (sse41_methods, sizeof (sse41_methods), cmethod); + if (id == -1) + return NULL; + + supported = COMPILE_LLVM (cfg) && (mini_get_cpu_features (cfg) & MONO_CPU_X86_SSE41) != 0 && + m_class_get_image (cfg->method->klass) == mono_get_corlib (); // We only support the subset used by corelib + + switch (id) { + case SN_get_IsSupported: + EMIT_NEW_ICONST (cfg, ins, supported ? 1 : 0); + ins->type = STACK_I4; + return ins; + case SN_Insert: + if (args [2]->opcode != OP_ICONST) { + mono_cfg_set_exception (cfg, MONO_EXCEPTION_MONO_ERROR); + mono_error_set_generic_error (cfg->error, "System", + "InvalidOperationException", "index in Sse41.Insert must be constant."); + return NULL; + } + return emit_simd_ins_for_sig (cfg, klass, OP_SSE41_INSERT, -1, arg0_type, fsig, args); + case SN_Max: + return emit_simd_ins_for_sig (cfg, klass, OP_XBINOP, OP_IMAX, arg0_type, fsig, args); + case SN_Min: + return emit_simd_ins_for_sig (cfg, klass, OP_XBINOP, OP_IMIN, arg0_type, fsig, args); + case SN_TestZ: + return emit_simd_ins_for_sig (cfg, klass, OP_SSE41_PTESTZ, -1, arg0_type, fsig, args); + default: + return NULL; + } + } + + if (is_hw_intrinsics_class (klass, "Popcnt", &is_64bit)) { id = lookup_intrins (popcnt_methods, sizeof (popcnt_methods), cmethod); if (id == -1) return NULL; supported = (mini_get_cpu_features (cfg) & MONO_CPU_X86_POPCNT) != 0; - is_64bit = !strcmp (class_name, "X64"); switch (id) { case SN_get_IsSupported: @@ -663,13 +1002,12 @@ emit_x86_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature return NULL; } } - if (!strcmp (class_name, "Lzcnt") || (!strcmp (class_name, "X64") && cmethod->klass->nested_in && !strcmp (m_class_get_name (cmethod->klass->nested_in), "Lzcnt"))) { + if (is_hw_intrinsics_class (klass, "Lzcnt", &is_64bit)) { id = lookup_intrins (lzcnt_methods, sizeof (lzcnt_methods), cmethod); if (id == -1) return NULL; supported = (mini_get_cpu_features (cfg) & MONO_CPU_X86_LZCNT) != 0; - is_64bit = !strcmp (class_name, "X64"); switch (id) { case SN_get_IsSupported: @@ -689,14 +1027,13 @@ emit_x86_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature return NULL; } } - if (!strcmp (class_name, "Bmi1") || (!strcmp (class_name, "X64") && cmethod->klass->nested_in && !strcmp (m_class_get_name (cmethod->klass->nested_in), "Bmi1"))) { + if (is_hw_intrinsics_class (klass, "Bmi1", &is_64bit)) { if (!COMPILE_LLVM (cfg)) return NULL; id = lookup_intrins (bmi1_methods, sizeof (bmi1_methods), cmethod); g_assert (id != -1); supported = (mini_get_cpu_features (cfg) & MONO_CPU_X86_BMI1) != 0; - is_64bit = !strcmp (class_name, "X64"); switch (id) { case SN_get_IsSupported: @@ -763,13 +1100,12 @@ emit_x86_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature g_assert_not_reached (); } } - if (!strcmp (class_name, "Bmi2") || (!strcmp (class_name, "X64") && cmethod->klass->nested_in && !strcmp (m_class_get_name (cmethod->klass->nested_in), "Bmi2"))) { + if (is_hw_intrinsics_class (klass, "Bmi2", &is_64bit)) { if (!COMPILE_LLVM (cfg)) return NULL; id = lookup_intrins (bmi2_methods, sizeof (bmi2_methods), cmethod); g_assert (id != -1); supported = (mini_get_cpu_features (cfg) & MONO_CPU_X86_BMI2) != 0; - is_64bit = !strcmp (class_name, "X64"); switch (id) { case SN_get_IsSupported: @@ -829,10 +1165,75 @@ emit_x86_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature } #endif +static guint16 vector_128_methods [] = { + SN_AsByte, + SN_AsDouble, + SN_AsInt16, + SN_AsInt32, + SN_AsInt64, + SN_AsSByte, + SN_AsSingle, + SN_AsUInt16, + SN_AsUInt32, + SN_AsUInt64, + SN_Create, + SN_CreateScalarUnsafe, +}; + static guint16 vector_128_t_methods [] = { SN_get_Count, + SN_get_Zero, }; +static MonoInst* +emit_vector128 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **args) +{ + MonoClass *klass; + int id; + + if (!COMPILE_LLVM (cfg)) + return NULL; + + klass = cmethod->klass; + id = lookup_intrins (vector_128_methods, sizeof (vector_128_methods), cmethod); + if (id == -1) + return NULL; + + if (!strcmp (m_class_get_name (cfg->method->klass), "Vector256")) + return NULL; // TODO: Fix Vector256.WithUpper/WithLower + + MonoTypeEnum arg0_type = fsig->param_count > 0 ? get_underlying_type (fsig->params [0]) : MONO_TYPE_VOID; + + switch (id) { + case SN_AsByte: + case SN_AsDouble: + case SN_AsInt16: + case SN_AsInt32: + case SN_AsInt64: + case SN_AsSByte: + case SN_AsSingle: + case SN_AsUInt16: + case SN_AsUInt32: + case SN_AsUInt64: + return emit_simd_ins (cfg, klass, OP_XCAST, args [0]->dreg, -1); + case SN_Create: { + MonoType *etype = get_vector_t_elem_type (fsig->ret); + if (fsig->param_count == 1 && mono_metadata_type_equal (fsig->params [0], etype)) { + return emit_simd_ins (cfg, klass, type_to_expand_op (etype), args [0]->dreg, -1); + } else { + // TODO: Optimize Create(a1, a2, a3 ...) overloads + break; + } + } + case SN_CreateScalarUnsafe: + return emit_simd_ins_for_sig (cfg, klass, OP_CREATE_SCALAR_UNSAFE, -1, arg0_type, fsig, args); + default: + break; + } + + return NULL; +} + static MonoInst* emit_vector128_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **args) { @@ -867,6 +1268,9 @@ emit_vector128_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fs break; EMIT_NEW_ICONST (cfg, ins, len); return ins; + case SN_get_Zero: { + return emit_simd_ins (cfg, klass, OP_XZERO, -1, -1); + } default: break; } @@ -932,8 +1336,9 @@ mono_emit_simd_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign class_ns = m_class_get_name_space (cmethod->klass); class_name = m_class_get_name (cmethod->klass); - if (cmethod->klass->nested_in) - class_ns = m_class_get_name_space (cmethod->klass->nested_in), class_name, cmethod->klass->nested_in; + // If cmethod->klass is nested, the namespace is on the enclosing class. + if (m_class_get_nested_in (cmethod->klass)) + class_ns = m_class_get_name_space (m_class_get_nested_in (cmethod->klass)); #ifdef TARGET_AMD64 // TODO: test and enable for x86 too if (!strcmp (class_ns, "System.Runtime.Intrinsics.X86")) { @@ -944,6 +1349,8 @@ mono_emit_simd_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign if (!strcmp (class_ns, "System.Runtime.Intrinsics")) { if (!strcmp (class_name, "Vector128`1")) return emit_vector128_t (cfg, cmethod, fsig, args); + if (!strcmp (class_name, "Vector128")) + return emit_vector128 (cfg, cmethod, fsig, args); if (!strcmp (class_name, "Vector256`1")) return emit_vector256_t (cfg, cmethod, fsig, args); } diff --git a/mono/mini/simd-methods-netcore.h b/mono/mini/simd-methods-netcore.h index efabc55fb1..577f54dc36 100644 --- a/mono/mini/simd-methods-netcore.h +++ b/mono/mini/simd-methods-netcore.h @@ -35,15 +35,60 @@ METHOD(ConvertToSingle) METHOD(ConvertToDouble) METHOD(Narrow) METHOD(Widen) -// BMI1 +// Vector128 +METHOD(AsByte) +METHOD(AsDouble) +METHOD(AsInt16) +METHOD(AsInt32) +METHOD(AsInt64) +METHOD(AsSByte) +METHOD(AsSingle) +METHOD(AsUInt16) +METHOD(AsUInt32) +METHOD(AsUInt64) +METHOD(Create) +METHOD(CreateScalarUnsafe) +// Bmi1 METHOD(AndNot) METHOD(BitFieldExtract) METHOD(ExtractLowestSetBit) METHOD(GetMaskUpToLowestSetBit) METHOD(ResetLowestSetBit) METHOD(TrailingZeroCount) -// BMI2 +// Bmi2 METHOD(ZeroHighBits) METHOD(MultiplyNoFlags) METHOD(ParallelBitDeposit) METHOD(ParallelBitExtract) +// Sse +METHOD(Add) +METHOD(CompareNotEqual) +METHOD(Divide) +METHOD(Store) +METHOD(Subtract) +METHOD(CompareEqual) +METHOD(LoadVector128) +METHOD(MoveHighToLow) +METHOD(MoveLowToHigh) +METHOD(MoveMask) +METHOD(MoveScalar) +METHOD(Multiply) +METHOD(Shuffle) +METHOD(UnpackHigh) +METHOD(UnpackLow) +// Sse2 +METHOD(And) +METHOD(Or) +METHOD(LoadAlignedVector128) +METHOD(Xor) +METHOD(CompareGreaterThan) +METHOD(PackUnsignedSaturate) +METHOD(StoreScalar) +METHOD(StoreAligned) +METHOD(ShiftRightLogical) +METHOD(CompareLessThan) +// Sse3 +METHOD(MoveAndDuplicate) +// Sse41 +METHOD(Insert) +METHOD(TestZ) \ No newline at end of file diff --git a/mono/mini/trace.c b/mono/mini/trace.c index 8c26dc79d7..d9bca2f144 100644 --- a/mono/mini/trace.c +++ b/mono/mini/trace.c @@ -282,7 +282,7 @@ mono_trace_enter_method (MonoMethod *method, MonoJitInfo *ji, MonoProfilerCallCo break; case MONO_TYPE_I8: case MONO_TYPE_U8: - printf ("0x%016llx", (long long)*arg_in_stack_slot(buf, gint64)); + printf ("0x%016" PRIx64, (gint64)*arg_in_stack_slot(buf, gint64)); break; case MONO_TYPE_R4: printf ("%f", *arg_in_stack_slot(buf, float)); @@ -387,7 +387,7 @@ mono_trace_leave_method (MonoMethod *method, MonoJitInfo *ji, MonoProfilerCallCo } else if (o->vtable->klass == mono_defaults.int32_class) { printf ("[INT32:%p:%d]", o, *(gint32 *)data); } else if (o->vtable->klass == mono_defaults.int64_class) { - printf ("[INT64:%p:%lld]", o, (long long)*(gint64 *)data); + printf ("[INT64:%p:%" PRId64 "]", o, *(gint64 *)data); } else if (o->vtable->klass == mono_defaults.string_class) { char *as; as = string_to_utf8 ((MonoString*)o); @@ -402,12 +402,12 @@ mono_trace_leave_method (MonoMethod *method, MonoJitInfo *ji, MonoProfilerCallCo } case MONO_TYPE_I8: { gint64 l = *arg_in_stack_slot (buf, gint64); - printf ("lresult=0x%16llx", (long long)l); + printf ("lresult=0x%16" PRIx64, l); break; } case MONO_TYPE_U8: { gint64 l = *arg_in_stack_slot (buf, gint64); - printf ("lresult=0x%16llx", (long long)l); + printf ("lresult=0x%16" PRIx64, l); break; } case MONO_TYPE_R4: diff --git a/mono/mini/tramp-amd64.c b/mono/mini/tramp-amd64.c index be804370b0..b3a8c7df19 100644 --- a/mono/mini/tramp-amd64.c +++ b/mono/mini/tramp-amd64.c @@ -239,7 +239,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf { const char *tramp_name; guint8 *buf, *code, *tramp, *br [2], *r11_save_code, *after_r11_save_code, *br_ex_check; - int i, lmf_offset, offset, res_offset, arg_offset, rax_offset, ex_offset, tramp_offset, ctx_offset, saved_regs_offset; + int i, lmf_offset, offset, res_offset, arg_offset, rax_offset, tramp_offset, ctx_offset, saved_regs_offset; int r11_save_offset, saved_fpregs_offset, rbp_offset, framesize, orig_rsp_to_rbp_offset, cfa_offset; gboolean has_caller; GSList *unwind_ops = NULL; @@ -260,8 +260,8 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf offset += sizeof (target_mgreg_t); rax_offset = -offset; + /* ex_offset */ offset += sizeof (target_mgreg_t); - ex_offset = -offset; offset += sizeof (target_mgreg_t); r11_save_offset = -offset; diff --git a/mono/mini/tramp-arm64.c b/mono/mini/tramp-arm64.c index 882a4e26b0..04eda906c4 100644 --- a/mono/mini/tramp-arm64.c +++ b/mono/mini/tramp-arm64.c @@ -72,20 +72,12 @@ mono_arch_patch_plt_entry (guint8 *code, gpointer *got, host_mgreg_t *regs, guin guint8* mono_arch_get_call_target (guint8 *code) { - guint32 imm; - int disp; - code -= 4; - - imm = *(guint32*)code; + guint32 ins = *(guint32 *)code; /* Should be a b/bl */ - g_assert (((imm >> 26) & 0x7) == 0x5); - - disp = (imm & 0x3ffffff); - if ((disp >> 25) != 0) - /* Negative, sing extend to 32 bits */ - disp = disp | 0xfc000000; - + if (((ins >> 26) & 0x1f) != 0x5) + return NULL; + gint32 disp = ((gint32)((ins & 0x3ffffff) << 6)) >> 6; return code + (disp * 4); } diff --git a/mono/mini/version.h b/mono/mini/version.h index 6c8dbd1092..97c127b8da 100644 --- a/mono/mini/version.h +++ b/mono/mini/version.h @@ -1 +1 @@ -#define FULL_VERSION "explicit/df7816d" +#define FULL_VERSION "explicit/20bb4f9" diff --git a/mono/mini/wasm_m2n_invoke.g.h b/mono/mini/wasm_m2n_invoke.g.h index e5542fed69..aea7e9698a 100644 --- a/mono/mini/wasm_m2n_invoke.g.h +++ b/mono/mini/wasm_m2n_invoke.g.h @@ -287,6 +287,26 @@ wasm_invoke_iiliiii (void *target_func, InterpMethodArguments *margs) } +static void +wasm_invoke_if (void *target_func, InterpMethodArguments *margs) +{ + typedef int (*T)(float arg_0); + T func = (T)target_func; + int res = func (*(float*)&margs->fargs [FIDX (0)]); + *(int*)margs->retval = res; + +} + +static void +wasm_invoke_id (void *target_func, InterpMethodArguments *margs) +{ + typedef int (*T)(double arg_0); + T func = (T)target_func; + int res = func (margs->fargs [FIDX (0)]); + *(int*)margs->retval = res; + +} + static void wasm_invoke_iif (void *target_func, InterpMethodArguments *margs) { @@ -727,6 +747,16 @@ wasm_invoke_ddd (void *target_func, InterpMethodArguments *margs) } +static void +wasm_invoke_dddd (void *target_func, InterpMethodArguments *margs) +{ + typedef double (*T)(double arg_0, double arg_1, double arg_2); + T func = (T)target_func; + double res = func (margs->fargs [FIDX (0)], margs->fargs [FIDX (1)], margs->fargs [FIDX (2)]); + *(double*)margs->retval = res; + +} + static void wasm_invoke_vif (void *target_func, InterpMethodArguments *margs) { @@ -800,6 +830,16 @@ wasm_invoke_ff (void *target_func, InterpMethodArguments *margs) } +static void +wasm_invoke_ffi (void *target_func, InterpMethodArguments *margs) +{ + typedef float (*T)(float arg_0, int arg_1); + T func = (T)target_func; + float res = func (*(float*)&margs->fargs [FIDX (0)], (int)(gssize)margs->iargs [0]); + *(float*)margs->retval = res; + +} + static void wasm_invoke_fff (void *target_func, InterpMethodArguments *margs) { @@ -810,6 +850,16 @@ wasm_invoke_fff (void *target_func, InterpMethodArguments *margs) } +static void +wasm_invoke_ffff (void *target_func, InterpMethodArguments *margs) +{ + typedef float (*T)(float arg_0, float arg_1, float arg_2); + T func = (T)target_func; + float res = func (*(float*)&margs->fargs [FIDX (0)], *(float*)&margs->fargs [FIDX (1)], *(float*)&margs->fargs [FIDX (2)]); + *(float*)margs->retval = res; + +} + static void wasm_invoke_di (void *target_func, InterpMethodArguments *margs) { @@ -1573,6 +1623,11 @@ icall_trampoline_dispatch (const char *cookie, void *target_func, InterpMethodAr } } } + else if (cookie[2] == '\0') { + // found: IF depth 6 + wasm_invoke_if (target_func, margs); + return; + } } else if (cookie[1] == 'D') { if (cookie[2] == 'I') { @@ -1586,6 +1641,11 @@ icall_trampoline_dispatch (const char *cookie, void *target_func, InterpMethodAr } } } + else if (cookie[2] == '\0') { + // found: ID depth 7 + wasm_invoke_id (target_func, margs); + return; + } } else if (cookie[1] == 'L') { if (cookie[2] == 'I') { @@ -1659,30 +1719,16 @@ icall_trampoline_dispatch (const char *cookie, void *target_func, InterpMethodAr } } else if (cookie[0] == 'D') { - if (cookie[1] == 'I') { + if (cookie[1] == 'D') { if (cookie[2] == 'D') { if (cookie[3] == 'D') { if (cookie[4] == '\0') { - // found: DIDD depth 8 - wasm_invoke_didd (target_func, margs); + // found: DDDD depth 8 + wasm_invoke_dddd (target_func, margs); return; } } else if (cookie[3] == '\0') { - // found: DID depth 8 - wasm_invoke_did (target_func, margs); - return; - } - } - else if (cookie[2] == '\0') { - // found: DI depth 7 - wasm_invoke_di (target_func, margs); - return; - } - } - else if (cookie[1] == 'D') { - if (cookie[2] == 'D') { - if (cookie[3] == '\0') { // found: DDD depth 8 wasm_invoke_ddd (target_func, margs); return; @@ -1690,45 +1736,59 @@ icall_trampoline_dispatch (const char *cookie, void *target_func, InterpMethodAr } else if (cookie[2] == 'I') { if (cookie[3] == '\0') { - // found: DDI depth 9 + // found: DDI depth 8 wasm_invoke_ddi (target_func, margs); return; } } else if (cookie[2] == '\0') { - // found: DD depth 9 + // found: DD depth 8 wasm_invoke_dd (target_func, margs); return; } } + else if (cookie[1] == 'I') { + if (cookie[2] == 'D') { + if (cookie[3] == 'D') { + if (cookie[4] == '\0') { + // found: DIDD depth 9 + wasm_invoke_didd (target_func, margs); + return; + } + } + else if (cookie[3] == '\0') { + // found: DID depth 9 + wasm_invoke_did (target_func, margs); + return; + } + } + else if (cookie[2] == '\0') { + // found: DI depth 8 + wasm_invoke_di (target_func, margs); + return; + } + } } else if (cookie[0] == 'F') { - if (cookie[1] == 'I') { + if (cookie[1] == 'F') { if (cookie[2] == 'F') { if (cookie[3] == 'F') { if (cookie[4] == '\0') { - // found: FIFF depth 9 - wasm_invoke_fiff (target_func, margs); + // found: FFFF depth 9 + wasm_invoke_ffff (target_func, margs); return; } } else if (cookie[3] == '\0') { - // found: FIF depth 9 - wasm_invoke_fif (target_func, margs); + // found: FFF depth 9 + wasm_invoke_fff (target_func, margs); return; } } - else if (cookie[2] == '\0') { - // found: FI depth 8 - wasm_invoke_fi (target_func, margs); - return; - } - } - else if (cookie[1] == 'F') { - if (cookie[2] == 'F') { + else if (cookie[2] == 'I') { if (cookie[3] == '\0') { - // found: FFF depth 9 - wasm_invoke_fff (target_func, margs); + // found: FFI depth 9 + wasm_invoke_ffi (target_func, margs); return; } } @@ -1738,6 +1798,27 @@ icall_trampoline_dispatch (const char *cookie, void *target_func, InterpMethodAr return; } } + else if (cookie[1] == 'I') { + if (cookie[2] == 'F') { + if (cookie[3] == 'F') { + if (cookie[4] == '\0') { + // found: FIFF depth 10 + wasm_invoke_fiff (target_func, margs); + return; + } + } + else if (cookie[3] == '\0') { + // found: FIF depth 10 + wasm_invoke_fif (target_func, margs); + return; + } + } + else if (cookie[2] == '\0') { + // found: FI depth 9 + wasm_invoke_fi (target_func, margs); + return; + } + } } g_error ("CANNOT HANDLE COOKIE %s\n", cookie); } diff --git a/mono/profiler/Makefile.am b/mono/profiler/Makefile.am index bf7e879468..4d8acff174 100644 --- a/mono/profiler/Makefile.am +++ b/mono/profiler/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules AM_CPPFLAGS = \ -DSUPPRESSION_DIR=\""$(datadir)/mono-$(API_VER)/mono/profiler"\" \ diff --git a/mono/profiler/Makefile.in b/mono/profiler/Makefile.in index dc10a8d03e..48bcfad2df 100644 --- a/mono/profiler/Makefile.in +++ b/mono/profiler/Makefile.in @@ -336,7 +336,7 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ - $(top_srcdir)/mk/common.mk $(top_srcdir)/mkinstalldirs + $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -746,7 +746,7 @@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -766,7 +766,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/profiler/mprof-report.c.REMOVED.git-id b/mono/profiler/mprof-report.c.REMOVED.git-id index 5b9ce35d8e..5ce3c58fc9 100644 --- a/mono/profiler/mprof-report.c.REMOVED.git-id +++ b/mono/profiler/mprof-report.c.REMOVED.git-id @@ -1 +1 @@ -48f89ca59555527d21d782cb4a475055ed041a88 \ No newline at end of file +a02c7086ead249798dc83640e288cfc64c24c761 \ No newline at end of file diff --git a/mono/sgen/Makefile.am b/mono/sgen/Makefile.am index ab65207c09..875f29be99 100644 --- a/mono/sgen/Makefile.am +++ b/mono/sgen/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules if !ENABLE_MSVC_ONLY diff --git a/mono/sgen/Makefile.in b/mono/sgen/Makefile.in index a6b75fbb99..754d656acc 100644 --- a/mono/sgen/Makefile.in +++ b/mono/sgen/Makefile.in @@ -223,7 +223,7 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ - $(top_srcdir)/mk/common.mk $(top_srcdir)/mkinstalldirs + $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -568,7 +568,7 @@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -588,7 +588,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/sgen/sgen-alloc.c b/mono/sgen/sgen-alloc.c index 84e5456eac..3e7959b85c 100644 --- a/mono/sgen/sgen-alloc.c +++ b/mono/sgen/sgen-alloc.c @@ -197,7 +197,7 @@ sgen_alloc_obj_nolock (GCVTable vtable, size_t size) /* Fast path */ CANARIFY_ALLOC(p,real_size); - SGEN_LOG (6, "Allocated object %p, vtable: %p (%s), size: %zd", p, vtable, sgen_client_vtable_get_name (vtable), size); + SGEN_LOG (6, "Allocated object %p, vtable: %p (%s), size: %" G_GSIZE_FORMAT "d", p, vtable, sgen_client_vtable_get_name (vtable), size); sgen_binary_protocol_alloc (p , vtable, size, sgen_client_get_provenance ()); g_assert (*p == NULL); mono_atomic_store_seq (p, vtable); @@ -311,7 +311,7 @@ sgen_alloc_obj_nolock (GCVTable vtable, size_t size) } if (G_LIKELY (p)) { - SGEN_LOG (6, "Allocated object %p, vtable: %p (%s), size: %zd", p, vtable, sgen_client_vtable_get_name (vtable), size); + SGEN_LOG (6, "Allocated object %p, vtable: %p (%s), size: %" G_GSIZE_FORMAT "d", p, vtable, sgen_client_vtable_get_name (vtable), size); sgen_binary_protocol_alloc (p, vtable, size, sgen_client_get_provenance ()); mono_atomic_store_seq (p, vtable); } @@ -404,7 +404,7 @@ sgen_try_alloc_obj_nolock (GCVTable vtable, size_t size) HEAVY_STAT (stat_bytes_alloced += size); CANARIFY_ALLOC(p,real_size); - SGEN_LOG (6, "Allocated object %p, vtable: %p (%s), size: %zd", p, vtable, sgen_client_vtable_get_name (vtable), size); + SGEN_LOG (6, "Allocated object %p, vtable: %p (%s), size: %" G_GSIZE_FORMAT "d", p, vtable, sgen_client_vtable_get_name (vtable), size); sgen_binary_protocol_alloc (p, vtable, size, sgen_client_get_provenance ()); g_assert (*p == NULL); /* FIXME disable this in non debug builds */ @@ -481,7 +481,7 @@ sgen_alloc_obj_pinned (GCVTable vtable, size_t size) p = sgen_major_collector.alloc_small_pinned_obj (vtable, size, SGEN_VTABLE_HAS_REFERENCES (vtable)); } if (G_LIKELY (p)) { - SGEN_LOG (6, "Allocated pinned object %p, vtable: %p (%s), size: %zd", p, vtable, sgen_client_vtable_get_name (vtable), size); + SGEN_LOG (6, "Allocated pinned object %p, vtable: %p (%s), size: %" G_GSIZE_FORMAT "d", p, vtable, sgen_client_vtable_get_name (vtable), size); increment_thread_allocation_counter (size); sgen_binary_protocol_alloc_pinned (p, vtable, size, sgen_client_get_provenance ()); } diff --git a/mono/sgen/sgen-gc.c.REMOVED.git-id b/mono/sgen/sgen-gc.c.REMOVED.git-id index ca1dc6b39c..4eec99d01a 100644 --- a/mono/sgen/sgen-gc.c.REMOVED.git-id +++ b/mono/sgen/sgen-gc.c.REMOVED.git-id @@ -1 +1 @@ -e3179233bdd9d3cb778771e7068000cc01e20527 \ No newline at end of file +9071837fbc5a6dae2edd31724f6c4c91a7267a54 \ No newline at end of file diff --git a/mono/sgen/sgen-gc.h b/mono/sgen/sgen-gc.h index 823345221a..2bf292940b 100644 --- a/mono/sgen/sgen-gc.h +++ b/mono/sgen/sgen-gc.h @@ -551,7 +551,7 @@ sgen_nursery_is_to_space (void *object) size_t bit = idx & 0x7; SGEN_ASSERT (4, sgen_ptr_in_nursery (object), "object %p is not in nursery [%p - %p]", object, sgen_get_nursery_start (), sgen_get_nursery_end ()); - SGEN_ASSERT (4, byte < sgen_space_bitmap_size, "byte index %zd out of range (%zd)", byte, sgen_space_bitmap_size); + SGEN_ASSERT (4, byte < sgen_space_bitmap_size, "byte index %" G_GSIZE_FORMAT "d out of range (%" G_GSIZE_FORMAT "d)", byte, sgen_space_bitmap_size); return (sgen_space_bitmap [byte] & (1 << bit)) != 0; } diff --git a/mono/sgen/sgen-internal.c b/mono/sgen/sgen-internal.c index 8676f85366..ee1db30072 100644 --- a/mono/sgen/sgen-internal.c +++ b/mono/sgen/sgen-internal.c @@ -252,8 +252,8 @@ sgen_dump_internal_mem_usage (FILE *heap_dump_file) /* int i; - fprintf (heap_dump_file, "\n", large_internal_bytes_alloced); - fprintf (heap_dump_file, "\n", pinned_chunk_bytes_alloced); + fprintf (heap_dump_file, "\n", large_internal_bytes_alloced); + fprintf (heap_dump_file, "\n", pinned_chunk_bytes_alloced); for (i = 0; i < INTERNAL_MEM_MAX; ++i) { fprintf (heap_dump_file, "\n", description_for_type (i), unmanaged_allocator.small_internal_mem_bytes [i]); diff --git a/mono/sgen/sgen-los.c b/mono/sgen/sgen-los.c index d2c4b20203..a581a5183d 100644 --- a/mono/sgen/sgen-los.c +++ b/mono/sgen/sgen-los.c @@ -479,7 +479,7 @@ sgen_los_alloc_large_inner (GCVTable vtable, size_t size) sgen_array_list_add (&sgen_los_object_array_list, LOS_OBJECT_TAG (obj), 0, FALSE); sgen_los_memory_usage += size; los_num_objects++; - SGEN_LOG (4, "Allocated large object %p, vtable: %p (%s), size: %zd", obj->data, vtable, sgen_client_vtable_get_name (vtable), size); + SGEN_LOG (4, "Allocated large object %p, vtable: %p (%s), size: %" G_GSIZE_FORMAT "d", obj->data, vtable, sgen_client_vtable_get_name (vtable), size); sgen_binary_protocol_alloc (obj->data, vtable, size, sgen_client_get_provenance ()); #ifdef LOS_CONSISTENCY_CHECK @@ -659,7 +659,7 @@ mono_sgen_los_describe_pointer (char *ptr) if ((char*)obj->data == ptr) { SGEN_LOG (0, "%s (size %d pin %d)\n", los_kind, (int)size, pinned ? 1 : 0); } else { - SGEN_LOG (0, "%s (interior-ptr offset %zd size %d pin %d)", + SGEN_LOG (0, "%s (interior-ptr offset %" G_GSIZE_FORMAT "d size %d pin %d)", los_kind, ptr - (char*)obj->data, (int)size, pinned ? 1 : 0); } diff --git a/mono/sgen/sgen-marksweep.c b/mono/sgen/sgen-marksweep.c index eb107d9f68..5fbd780144 100644 --- a/mono/sgen/sgen-marksweep.c +++ b/mono/sgen/sgen-marksweep.c @@ -310,11 +310,11 @@ static int ms_find_block_obj_size_index (size_t size) { int i; - SGEN_ASSERT (9, size <= SGEN_MAX_SMALL_OBJ_SIZE, "size %zd is bigger than max small object size %d", size, SGEN_MAX_SMALL_OBJ_SIZE); + SGEN_ASSERT (9, size <= SGEN_MAX_SMALL_OBJ_SIZE, "size %" G_GSIZE_FORMAT "d is bigger than max small object size %d", size, SGEN_MAX_SMALL_OBJ_SIZE); for (i = 0; i < num_block_obj_sizes; ++i) if (block_obj_sizes [i] >= size) return i; - g_error ("no object of size %zd\n", size); + g_error ("no object of size %" G_GSIZE_FORMAT "d\n", size); return -1; } @@ -1037,9 +1037,9 @@ major_describe_pointer (char *ptr) SGEN_LOG (0, "dead-object"); } else { if (live) - SGEN_LOG (0, "interior-ptr offset %zd", ptr - obj); + SGEN_LOG (0, "interior-ptr offset %" G_GSIZE_FORMAT "d", ptr - obj); else - SGEN_LOG (0, "dead-interior-ptr offset %zd", ptr - obj); + SGEN_LOG (0, "dead-interior-ptr offset %" G_GSIZE_FORMAT "d", ptr - obj); } SGEN_LOG (0, " marked %d)\n", marked ? 1 : 0); @@ -1089,7 +1089,7 @@ major_dump_heap (FILE *heap_dump_file) int i; int start = -1; - fprintf (heap_dump_file, "
\n", "old", (size_t)MS_BLOCK_FREE); + fprintf (heap_dump_file, "
\n", "old", (size_t)MS_BLOCK_FREE); for (i = 0; i <= count; ++i) { if ((i < count) && MS_OBJ_ALLOCED (MS_BLOCK_OBJ (block, i), block)) { diff --git a/mono/sgen/sgen-memory-governor.c b/mono/sgen/sgen-memory-governor.c index 85167e5361..1397a20bdc 100644 --- a/mono/sgen/sgen-memory-governor.c +++ b/mono/sgen/sgen-memory-governor.c @@ -391,7 +391,7 @@ sgen_assert_memory_alloc (void *ptr, size_t requested_size, const char *assert_d { if (ptr || !assert_description) return; - fprintf (stderr, "Error: Garbage collector could not allocate %zu bytes of memory for %s.\n", requested_size, assert_description); + fprintf (stderr, "Error: Garbage collector could not allocate %" G_GSIZE_FORMAT "u bytes of memory for %s.\n", requested_size, assert_description); exit (1); } diff --git a/mono/sgen/sgen-nursery-allocator.c b/mono/sgen/sgen-nursery-allocator.c index f45e061aa1..eb26dd36eb 100644 --- a/mono/sgen/sgen-nursery-allocator.c +++ b/mono/sgen/sgen-nursery-allocator.c @@ -209,7 +209,7 @@ verify_alloc_records (void) hole_size = rec->address - rec_end (prev); max_hole = MAX (max_hole, hole_size); } - printf ("obj [%p, %p] size %d hole to prev %d reason %s seq %d tid %zx\n", rec->address, rec_end (rec), (int)rec->size, hole_size, get_reason_name (rec), rec->seq, (size_t)rec->tid); + printf ("obj [%p, %p] size %d hole to prev %d reason %s seq %d tid %" G_GSIZE_FORMAT "x\n", rec->address, rec_end (rec), (int)rec->size, hole_size, get_reason_name (rec), rec->seq, (size_t)rec->tid); prev = rec; } printf ("SUMMARY total alloc'd %d holes %d max_hole %d\n", total, holes, max_hole); @@ -650,7 +650,7 @@ static mword fragment_total = 0; static void add_nursery_frag (SgenFragmentAllocator *allocator, size_t frag_size, char* frag_start, char* frag_end) { - SGEN_LOG (4, "Found empty fragment: %p-%p, size: %zd", frag_start, frag_end, frag_size); + SGEN_LOG (4, "Found empty fragment: %p-%p, size: %" G_GSIZE_FORMAT "d", frag_start, frag_end, frag_size); sgen_binary_protocol_empty (frag_start, frag_size); /* Not worth dealing with smaller fragments: need to tune */ if (frag_size >= SGEN_MAX_NURSERY_WASTE) { @@ -662,7 +662,7 @@ add_nursery_frag (SgenFragmentAllocator *allocator, size_t frag_size, char* frag #ifdef NALLOC_DEBUG /* XXX convert this into a flight record entry - printf ("\tfragment [%p %p] size %zd\n", frag_start, frag_end, frag_size); + printf ("\tfragment [%p %p] size %" G_GSIZE_FORMAT "d\n", frag_start, frag_end, frag_size); */ #endif sgen_fragment_allocator_add (allocator, frag_start, frag_end); @@ -828,7 +828,7 @@ sgen_nursery_alloc (size_t size) { SGEN_ASSERT (1, size >= (SGEN_CLIENT_MINIMUM_OBJECT_SIZE + CANARY_SIZE) && size <= (SGEN_MAX_SMALL_OBJ_SIZE + CANARY_SIZE), "Invalid nursery object size"); - SGEN_LOG (4, "Searching nursery for size: %zd", size); + SGEN_LOG (4, "Searching nursery for size: %" G_GSIZE_FORMAT "d", size); size = SGEN_ALIGN_UP (size); HEAVY_STAT (++stat_nursery_alloc_requests); @@ -839,7 +839,7 @@ sgen_nursery_alloc (size_t size) void* sgen_nursery_alloc_range (size_t desired_size, size_t minimum_size, size_t *out_alloc_size) { - SGEN_LOG (4, "Searching for byte range desired size: %zd minimum size %zd", desired_size, minimum_size); + SGEN_LOG (4, "Searching for byte range desired size: %" G_GSIZE_FORMAT "d minimum size %" G_GSIZE_FORMAT "d", desired_size, minimum_size); HEAVY_STAT (++stat_nursery_alloc_range_requests); diff --git a/mono/sgen/sgen-pinning.c b/mono/sgen/sgen-pinning.c index ebcffaf498..6776c57637 100644 --- a/mono/sgen/sgen-pinning.c +++ b/mono/sgen/sgen-pinning.c @@ -125,7 +125,7 @@ sgen_find_section_pin_queue_start_end (GCMemSection *section) sgen_find_optimized_pin_queue_area (section->data, section->end_data, §ion->pin_queue_first_entry, §ion->pin_queue_last_entry); - SGEN_LOG (6, "Found %zd pinning addresses in section %p", + SGEN_LOG (6, "Found %" G_GSIZE_FORMAT "d pinning addresses in section %p", section->pin_queue_last_entry - section->pin_queue_first_entry, section); } diff --git a/mono/sgen/sgen-protocol-def.h b/mono/sgen/sgen-protocol-def.h index cc1a860c25..98e426786a 100644 --- a/mono/sgen/sgen-protocol-def.h +++ b/mono/sgen/sgen-protocol-def.h @@ -30,7 +30,7 @@ IS_VTABLE_MATCH (FALSE) END_PROTOCOL_ENTRY_FLUSH BEGIN_PROTOCOL_ENTRY4 (binary_protocol_collection_end, TYPE_INT, index, TYPE_INT, generation, TYPE_LONGLONG, num_scanned_objects, TYPE_LONGLONG, num_unique_scanned_objects) -CUSTOM_PRINT (printf ("%d generation %d scanned %lld unique %lld %0.2f%%", entry->index, entry->generation, entry->num_scanned_objects, entry->num_unique_scanned_objects, entry->num_unique_scanned_objects ? (100.0 * (double) entry->num_scanned_objects / (double) entry->num_unique_scanned_objects) : 0.0)) +CUSTOM_PRINT (printf ("%d generation %d scanned %" PRId64 " unique %" PRId64 " %0.2f%%", entry->index, entry->generation, entry->num_scanned_objects, entry->num_unique_scanned_objects, entry->num_unique_scanned_objects ? (100.0 * (double) entry->num_scanned_objects / (double) entry->num_unique_scanned_objects) : 0.0)) IS_ALWAYS_MATCH (TRUE) MATCH_INDEX (BINARY_PROTOCOL_MATCH) IS_VTABLE_MATCH (FALSE) @@ -79,14 +79,14 @@ IS_VTABLE_MATCH (FALSE) END_PROTOCOL_ENTRY BEGIN_PROTOCOL_ENTRY6 (binary_protocol_world_stopped, TYPE_INT, generation, TYPE_LONGLONG, timestamp, TYPE_LONGLONG, total_major_cards, TYPE_LONGLONG, marked_major_cards, TYPE_LONGLONG, total_los_cards, TYPE_LONGLONG, marked_los_cards) -CUSTOM_PRINT (printf ("generation %d timestamp %lld total %lld marked %lld %0.2f%%", entry->generation, entry->timestamp, entry->total_major_cards + entry->total_los_cards, entry->marked_major_cards + entry->marked_los_cards, 100.0 * (double) (entry->marked_major_cards + entry->marked_los_cards) / (double) (entry->total_major_cards + entry->total_los_cards))) +CUSTOM_PRINT (printf ("generation %d timestamp %" PRId64 " total %" PRId64 " marked %" PRId64 " %0.2f%%", entry->generation, entry->timestamp, entry->total_major_cards + entry->total_los_cards, entry->marked_major_cards + entry->marked_los_cards, 100.0 * (double) (entry->marked_major_cards + entry->marked_los_cards) / (double) (entry->total_major_cards + entry->total_los_cards))) IS_ALWAYS_MATCH (TRUE) MATCH_INDEX (BINARY_PROTOCOL_MATCH) IS_VTABLE_MATCH (FALSE) END_PROTOCOL_ENTRY BEGIN_PROTOCOL_ENTRY6 (binary_protocol_world_restarting, TYPE_INT, generation, TYPE_LONGLONG, timestamp, TYPE_LONGLONG, total_major_cards, TYPE_LONGLONG, marked_major_cards, TYPE_LONGLONG, total_los_cards, TYPE_LONGLONG, marked_los_cards) -CUSTOM_PRINT (printf ("generation %d timestamp %lld total %lld marked %lld %0.2f%%", entry->generation, entry->timestamp, entry->total_major_cards + entry->total_los_cards, entry->marked_major_cards + entry->marked_los_cards, 100.0 * (double) (entry->marked_major_cards + entry->marked_los_cards) / (double) (entry->total_major_cards + entry->total_los_cards))) +CUSTOM_PRINT (printf ("generation %d timestamp %" PRId64 " total %" PRId64 " marked %" PRId64 " %0.2f%%", entry->generation, entry->timestamp, entry->total_major_cards + entry->total_los_cards, entry->marked_major_cards + entry->marked_los_cards, 100.0 * (double) (entry->marked_major_cards + entry->marked_los_cards) / (double) (entry->total_major_cards + entry->total_los_cards))) IS_ALWAYS_MATCH (TRUE) MATCH_INDEX (BINARY_PROTOCOL_MATCH) IS_VTABLE_MATCH (FALSE) diff --git a/mono/sgen/sgen-protocol.c b/mono/sgen/sgen-protocol.c index c1261020a1..4afaf87e20 100644 --- a/mono/sgen/sgen-protocol.c +++ b/mono/sgen/sgen-protocol.c @@ -218,7 +218,6 @@ unlock_recursive (void) static void binary_protocol_flush_buffer (BinaryProtocolBuffer *buffer) { - ssize_t ret; size_t to_write = buffer->index; size_t written = 0; g_assert (buffer->index > 0); @@ -229,7 +228,7 @@ binary_protocol_flush_buffer (BinaryProtocolBuffer *buffer) if (WriteFile (binary_protocol_file, buffer->buffer + written, to_write - written, &tmp_written, NULL)) written += tmp_written; #elif defined(HAVE_UNISTD_H) - ret = write (binary_protocol_file, buffer->buffer + written, to_write - written); + ssize_t ret = write (binary_protocol_file, buffer->buffer + written, to_write - written); if (ret >= 0) written += ret; else if (errno == EINTR) diff --git a/mono/tests/Makefile.am.REMOVED.git-id b/mono/tests/Makefile.am.REMOVED.git-id index f68f00265e..cf4e865826 100644 --- a/mono/tests/Makefile.am.REMOVED.git-id +++ b/mono/tests/Makefile.am.REMOVED.git-id @@ -1 +1 @@ -54947b9ffc112a39386da6a5fcb2109c9b00ecab \ No newline at end of file +929e9db71c5c6039cf9c1bc5a66ef0d27b90594b \ No newline at end of file diff --git a/mono/tests/Makefile.in.REMOVED.git-id b/mono/tests/Makefile.in.REMOVED.git-id index 051a327d03..c43c8d16ed 100644 --- a/mono/tests/Makefile.in.REMOVED.git-id +++ b/mono/tests/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -9382d1d592112b4e49a47b3417746ed2825afe37 \ No newline at end of file +b16a4fffdcd5f108af2144fa7b65b1217807b729 \ No newline at end of file diff --git a/mono/tests/TestingReferenceAssembly.cs b/mono/tests/TestingReferenceAssembly.cs new file mode 100644 index 0000000000..e68a2c8dd1 --- /dev/null +++ b/mono/tests/TestingReferenceAssembly.cs @@ -0,0 +1,7 @@ +using System.Runtime.CompilerServices; + +[assembly: ReferenceAssemblyAttribute] + +public class X { + public int Y; +} diff --git a/mono/tests/TestingReferenceReferenceAssembly.cs b/mono/tests/TestingReferenceReferenceAssembly.cs new file mode 100644 index 0000000000..b81013fa28 --- /dev/null +++ b/mono/tests/TestingReferenceReferenceAssembly.cs @@ -0,0 +1,11 @@ +// An assembly that refereces the TestingReferenceAssembly + +class Z : X { + public Z () { + Y = 1; + } +} + +class HasFieldFromReferenceAssembly { + public X Fld; +} diff --git a/mono/tests/assembly-load-reference/Makefile.am b/mono/tests/assembly-load-reference/Makefile.am index 8cbd257e73..a1b1f827a2 100644 --- a/mono/tests/assembly-load-reference/Makefile.am +++ b/mono/tests/assembly-load-reference/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules ### buildtree stuff @@ -81,6 +81,11 @@ TESTS_CS = \ mainanddep/LoadFromMain.cs \ mainanddep/LoadFileMain.cs +LIBRARIES_CS = src/Dep.cs \ + src/Mid.cs + +EXTRA_DIST += $(TESTS_CS) $(LIBRARIES_CS) + TESTS_EXE = $(TESTS_CS:.cs=.exe) TESTS_EXE_AOT = $(TESTS_EXE:.exe=.exe$(PLATFORM_AOT_SUFFIX)) diff --git a/mono/tests/assembly-load-reference/Makefile.in b/mono/tests/assembly-load-reference/Makefile.in index bbff5fd698..7ce3cb656b 100644 --- a/mono/tests/assembly-load-reference/Makefile.in +++ b/mono/tests/assembly-load-reference/Makefile.in @@ -141,8 +141,8 @@ am__can_run_installinfo = \ esac am__extra_recursive_targets = test-recursive test-bundle-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs README +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs \ + README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -448,7 +448,8 @@ SN = $(mcs_topdir)/class/lib/build/sn.exe MCS = $(TOOLS_RUNTIME) $(CSC) -noconfig -nologo -debug:portable -target:library $(PROFILE_MCS_FLAGS) ### testcase stuff -EXTRA_DIST = README $(SIGNING_KEY) $(GACTESTLIB_SRCS) +EXTRA_DIST = README $(SIGNING_KEY) $(GACTESTLIB_SRCS) $(TESTS_CS) \ + $(LIBRARIES_CS) TESTS_CS = \ samedir/LoadFromMain.cs \ samedir/LoadFileMain.cs \ @@ -457,6 +458,9 @@ TESTS_CS = \ mainanddep/LoadFromMain.cs \ mainanddep/LoadFileMain.cs +LIBRARIES_CS = src/Dep.cs \ + src/Mid.cs + TESTS_EXE = $(TESTS_CS:.cs=.exe) TESTS_EXE_AOT = $(TESTS_EXE:.exe=.exe$(PLATFORM_AOT_SUFFIX)) REFERENCED_ASMS = \ @@ -478,7 +482,7 @@ DISABLED_TESTS = $(am__append_5) all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -498,7 +502,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/tests/assembly-load-reference/mainanddep/LoadFileMain.cs b/mono/tests/assembly-load-reference/mainanddep/LoadFileMain.cs new file mode 100644 index 0000000000..6e0bd9b9f7 --- /dev/null +++ b/mono/tests/assembly-load-reference/mainanddep/LoadFileMain.cs @@ -0,0 +1,14 @@ +using System; +using System.IO; +using System.Reflection; + +public class Test { + public static int Main () + { + var p = Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "middle", "Mid.dll"); + var a = Assembly.LoadFile (p); + var t = a.GetType ("MyType"); + Activator.CreateInstance (t); + return 0; + } +} diff --git a/mono/tests/assembly-load-reference/mainanddep/LoadFromMain.cs b/mono/tests/assembly-load-reference/mainanddep/LoadFromMain.cs new file mode 100644 index 0000000000..38f45dd0a4 --- /dev/null +++ b/mono/tests/assembly-load-reference/mainanddep/LoadFromMain.cs @@ -0,0 +1,14 @@ +using System; +using System.IO; +using System.Reflection; + +public class Test { + public static int Main () + { + var p = Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "middle", "Mid.dll"); + var a = Assembly.LoadFrom (p); + var t = a.GetType ("MyType"); + Activator.CreateInstance (t); + return 0; + } +} diff --git a/mono/tests/assembly-load-reference/samedir/LoadFileMain.cs b/mono/tests/assembly-load-reference/samedir/LoadFileMain.cs new file mode 100644 index 0000000000..32a5468217 --- /dev/null +++ b/mono/tests/assembly-load-reference/samedir/LoadFileMain.cs @@ -0,0 +1,14 @@ +using System; +using System.IO; +using System.Reflection; + +public class Test { + public static int Main () + { + var p = Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "Mid.dll"); + var a = Assembly.LoadFile (p); + var t = a.GetType ("MyType"); + Activator.CreateInstance (t); + return 0; + } +} diff --git a/mono/tests/assembly-load-reference/samedir/LoadFromMain.cs b/mono/tests/assembly-load-reference/samedir/LoadFromMain.cs new file mode 100644 index 0000000000..8f9a3dd84d --- /dev/null +++ b/mono/tests/assembly-load-reference/samedir/LoadFromMain.cs @@ -0,0 +1,14 @@ +using System; +using System.IO; +using System.Reflection; + +public class Test { + public static int Main () + { + var p = Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "Mid.dll"); + var a = Assembly.LoadFrom (p); + var t = a.GetType ("MyType"); + Activator.CreateInstance (t); + return 0; + } +} diff --git a/mono/tests/assembly-load-reference/separatedir/LoadFileMain.cs b/mono/tests/assembly-load-reference/separatedir/LoadFileMain.cs new file mode 100644 index 0000000000..8015384662 --- /dev/null +++ b/mono/tests/assembly-load-reference/separatedir/LoadFileMain.cs @@ -0,0 +1,32 @@ +using System; +using System.IO; +using System.Reflection; + +public class Test { + public static int Main () + { + var p = Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "middle", "Mid.dll"); + var a = Assembly.LoadFile (p); + var t = a.GetType ("MyType"); + bool caught = false; + try { + Activator.CreateInstance (t); + } catch (TargetInvocationException tie) { + if (tie.InnerException is FileNotFoundException) { + /* reference assembly loading throws FNFE */ + caught = true; + } else { + Console.Error.WriteLine ($"Expected tie.InnerException to be FileNotFoundException, but got {tie.InnerException}"); + return 1; + } + } catch (Exception e) { + Console.Error.WriteLine ($"Expected TargetInvocationException, but got {e}"); + return 2; + } + if (!caught) { + Console.Error.WriteLine ($"Expected an exception, but got none"); + return 3; + } + return 0; + } +} diff --git a/mono/tests/assembly-load-reference/separatedir/LoadFromMain.cs b/mono/tests/assembly-load-reference/separatedir/LoadFromMain.cs new file mode 100644 index 0000000000..38f45dd0a4 --- /dev/null +++ b/mono/tests/assembly-load-reference/separatedir/LoadFromMain.cs @@ -0,0 +1,14 @@ +using System; +using System.IO; +using System.Reflection; + +public class Test { + public static int Main () + { + var p = Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "middle", "Mid.dll"); + var a = Assembly.LoadFrom (p); + var t = a.GetType ("MyType"); + Activator.CreateInstance (t); + return 0; + } +} diff --git a/mono/tests/assembly-load-reference/src/Dep.cs b/mono/tests/assembly-load-reference/src/Dep.cs new file mode 100644 index 0000000000..4b50d62356 --- /dev/null +++ b/mono/tests/assembly-load-reference/src/Dep.cs @@ -0,0 +1,6 @@ +using System; + +public class OtherType { + public OtherType () { + } +} diff --git a/mono/tests/assembly-load-reference/src/Mid.cs b/mono/tests/assembly-load-reference/src/Mid.cs new file mode 100644 index 0000000000..32a3ab7978 --- /dev/null +++ b/mono/tests/assembly-load-reference/src/Mid.cs @@ -0,0 +1,14 @@ +using System; +using System.Runtime.CompilerServices; + +public class MyType { + public MyType () { + Method (); + } + + [MethodImpl (MethodImplOptions.NoInlining)] + public void Method () { + var a = new OtherType (); + } + +} diff --git a/mono/tests/delegate17.cs b/mono/tests/delegate17.cs index 09818514ec..235e168ebc 100644 --- a/mono/tests/delegate17.cs +++ b/mono/tests/delegate17.cs @@ -1,6 +1,33 @@ using System; using System.Reflection; +public enum WasCalled { + BaseWasCalled, + DerivedWasCalled +} + +public delegate WasCalled Del1 (string s); +public delegate WasCalled Del2 (string s); + +public class Base +{ + public virtual WasCalled Foo (string s) + { + Console.WriteLine ("Base.Foo called. Expected {0}", s); + return WasCalled.BaseWasCalled; + } +} + +public class Derived : Base +{ + public override WasCalled Foo (string s) + { + Console.WriteLine ("Derived.Foo called. Expected {0}", s); + return WasCalled.DerivedWasCalled; + } +} + + internal class Program { public static int Main (string[] args) @@ -14,29 +41,15 @@ internal class Program // newobj Del2::.ctor Del2 f = new Del2 (b.Invoke); // should call Derived.Foo not Base.Foo - var r = f ("abcd"); - return r; - } -} - - -public delegate int Del1 (string s); -public delegate int Del2 (string s); - -public class Base -{ - public virtual int Foo (string s) - { - Console.WriteLine ("Base.Foo called. Bad"); - return 1; - } -} - -public class Derived : Base -{ - public override int Foo (string s) - { - Console.WriteLine ("Derived.Foo called. Good"); + var r = f ("Derived.Foo"); + if (r != WasCalled.DerivedWasCalled) + return 1; + // should call Base.Foo not Derived.Foo + var boundDelegate = (Del2)Activator.CreateInstance (typeof (Del2), b, typeof (Base).GetMethod (nameof (Base.Foo)).MethodHandle.GetFunctionPointer()); + r = boundDelegate ("Base.Foo"); + if (r != WasCalled.BaseWasCalled) + return 2; return 0; } } + diff --git a/mono/tests/dim-issue-18917.cs b/mono/tests/dim-issue-18917.cs new file mode 100644 index 0000000000..68bab80829 --- /dev/null +++ b/mono/tests/dim-issue-18917.cs @@ -0,0 +1,38 @@ +using System; + +public interface IInterface +{ + int getRet() { return -10; } +} + +public interface IInterface2 : IInterface +{ + int IInterface.getRet() { return -1; } +} + + +public class AbstractClass : IInterface2 +{ + int IInterface.getRet() { return 0; } +} + + +public class FinalClass : AbstractClass +{ +} + +public class Test +{ + public static int test_0_dim_18917() + { + var var0 = new FinalClass(); + var var4 = (IInterface2)var0; + var var5 = var4.getRet(); + return var5; + + } + + public static int Main (string[] args) { + return TestDriver.RunTests (typeof (Test), args); + } +} \ No newline at end of file diff --git a/mono/tests/event-il.il b/mono/tests/event-il.il new file mode 100644 index 0000000000..b9a7be209d --- /dev/null +++ b/mono/tests/event-il.il @@ -0,0 +1,136 @@ +.assembly extern mscorlib +{ + .ver 1:0:5000:0 + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. +} +.assembly 'event' +{ + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module event.exe // GUID = {7A082A08-017B-4BB9-BDD9-105E86FCC135} + + + .class public auto ansi beforefieldinit T + extends [mscorlib]System.Object + { + .field private static class T/Do MyDo + + // method line 1 + .method public hidebysig specialname rtspecialname + instance default void .ctor () cil managed + { + // Method begins at RVA 0x20ec + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void object::.ctor() + IL_0006: ret + } // end of method T::.ctor + + // method line 2 + .method public static hidebysig specialname + default void add_MyDo (class T/Do 'value') cil managed synchronized + { + // Method begins at RVA 0x20f4 + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldsfld class T/Do T::MyDo + IL_0005: ldarg.0 + IL_0006: call class [mscorlib]System.Delegate class [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate, class [mscorlib]System.Delegate) + IL_000b: castclass T/Do + IL_0010: stsfld class T/Do T::MyDo + IL_0015: ret + } // end of method T::add_MyDo + + // method line 3 + .method public static hidebysig specialname + default void remove_MyDo (class T/Do 'value') cil managed synchronized + { + // Method begins at RVA 0x210c + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldsfld class T/Do T::MyDo + IL_0005: ldarg.0 + IL_0006: call class [mscorlib]System.Delegate class [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate, class [mscorlib]System.Delegate) + IL_000b: castclass T/Do + IL_0010: stsfld class T/Do T::MyDo + IL_0015: ret + } // end of method T::remove_MyDo + + .method public static hidebysig specialname + default void other1_MyDo (class T/Do 'value') cil managed synchronized + { + // Method begins at RVA 0x210c + // Code size 22 (0x16) + .maxstack 8 + IL_0015: ret + } // end of method T::other1_MyDo + + .method private static hidebysig specialname + default void other2_MyDo (class T/Do 'value') cil managed synchronized + { + // Method begins at RVA 0x210c + // Code size 22 (0x16) + .maxstack 8 + IL_0015: ret + } // end of method T::other2_MyDo + + // method line 4 + .method public static hidebysig + default void Main () cil managed + { + // Method begins at RVA 0x2124 + .entrypoint + // Code size 1 (0x1) + .maxstack 8 + IL_0000: ret + } // end of method T::Main + + .event T/Do MyDo + { + .addon default void T::add_MyDo (class T/Do 'value') + .removeon default void T::remove_MyDo (class T/Do 'value') + .other default void T::other1_MyDo (class T/Do 'value') + .other default void T::other2_MyDo (class T/Do 'value') + } + .class nested public auto ansi sealed Do + extends [mscorlib]System.MulticastDelegate + { + + // method line 5 + .method public hidebysig specialname rtspecialname + instance default void .ctor (object 'object', native int 'method') runtime managed + { + // Method begins at RVA 0x0 + // Disassembly of native methods is not supported + } // end of method Do::.ctor + + // method line 6 + .method public virtual hidebysig newslot + instance default void Invoke () runtime managed + { + // Method begins at RVA 0x0 + // Disassembly of native methods is not supported + } // end of method Do::Invoke + + // method line 7 + .method public virtual hidebysig newslot + instance default class [mscorlib]System.IAsyncResult BeginInvoke (class [mscorlib]System.AsyncCallback callback, object 'object') runtime managed + { + // Method begins at RVA 0x0 + // Disassembly of native methods is not supported + } // end of method Do::BeginInvoke + + // method line 8 + .method public virtual hidebysig newslot + instance default void EndInvoke (class [mscorlib]System.IAsyncResult result) runtime managed + { + // Method begins at RVA 0x0 + // Disassembly of native methods is not supported + } // end of method Do::EndInvoke + + } // end of class Do + + } // end of class T + diff --git a/mono/tests/gc-descriptors/Makefile.am b/mono/tests/gc-descriptors/Makefile.am index 84d07c2bdc..ea5dc66416 100755 --- a/mono/tests/gc-descriptors/Makefile.am +++ b/mono/tests/gc-descriptors/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE) diff --git a/mono/tests/gc-descriptors/Makefile.in b/mono/tests/gc-descriptors/Makefile.in index 81e1c2ec14..e5da089db6 100644 --- a/mono/tests/gc-descriptors/Makefile.in +++ b/mono/tests/gc-descriptors/Makefile.in @@ -130,8 +130,7 @@ am__can_run_installinfo = \ esac am__extra_recursive_targets = test-recursive test-bundle-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -421,7 +420,7 @@ EXTRA_DIST = descriptor-tests-driver.cs descriptor-tests-prefix.cs gen-descripto all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -441,7 +440,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/tests/libtest.c.REMOVED.git-id b/mono/tests/libtest.c.REMOVED.git-id index d5019a4467..49b9c87750 100644 --- a/mono/tests/libtest.c.REMOVED.git-id +++ b/mono/tests/libtest.c.REMOVED.git-id @@ -1 +1 @@ -c3283a615baa063ea2f7d78b78dfea515617079c \ No newline at end of file +3f14636bb2500ede4c8b99e52a02143dda078a9d \ No newline at end of file diff --git a/mono/tests/merp-crash-test.cs b/mono/tests/merp-crash-test.cs index b5e255b46e..d534a64fae 100644 --- a/mono/tests/merp-crash-test.cs +++ b/mono/tests/merp-crash-test.cs @@ -59,6 +59,13 @@ class C Crashers.Add(new Crasher ("MerpCrashSnprintf", MerpCrashSnprintf)); Crashers.Add(new Crasher ("MerpCrashDomainUnload", MerpCrashDomainUnload)); Crashers.Add(new Crasher ("MerpCrashUnbalancedGCSafe", MerpCrashUnbalancedGCSafe)); + Crashers.Add(new Crasher ("MerpCrashSignalTerm", MerpCrashSignalTerm)); + Crashers.Add(new Crasher ("MerpCrashSignalTerm", MerpCrashSignalAbrt)); + Crashers.Add(new Crasher ("MerpCrashSignalKill", MerpCrashSignalFpe)); + Crashers.Add(new Crasher ("MerpCrashSignalKill", MerpCrashSignalBus)); + Crashers.Add(new Crasher ("MerpCrashSignalSegv", MerpCrashSignalSegv)); + Crashers.Add(new Crasher ("MerpCrashSignalIll", MerpCrashSignalIll)); + Crashers.Add(new Crasher ("MerpCrashTestBreadcrumbs", MerpCrashTestBreadcrumbs, validator: ValidateBreadcrumbs)); } public static void @@ -82,6 +89,22 @@ class C throw new ValidationException (String.Format ("incorrect fail fast message (expected: {0}, got: {1})", failfastMsg, s)); } + public static void ValidateBreadcrumbs (object json) + { + var monoType = Type.GetType ("Mono.Runtime", false); + var m = monoType.GetMethod ("CheckCrashReportReason", BindingFlags.NonPublic | BindingFlags.Static); + var m_params = new object [] { "./", false }; + string o = (string)m.Invoke(null, m_params); + if (o != "segv") + throw new Exception ("Crash report reason should be 'segv'"); + + m = monoType.GetMethod ("CheckCrashReportHash", BindingFlags.NonPublic | BindingFlags.Static); + long hash = (long)m.Invoke (null, m_params); + + if (hash == 0) + throw new Exception ("Crash hash should not be zero"); + } + [DllImport("libtest")] public static extern void mono_test_MerpCrashSnprintf (); @@ -149,6 +172,60 @@ class C [DllImport("libtest")] public static extern void mono_test_MerpCrashUnhandledExceptionHook (); + [DllImport("libtest")] + public static extern void mono_test_MerpCrashSignalTerm (); + + public static void + MerpCrashSignalTerm () + { + mono_test_MerpCrashSignalTerm (); + } + + [DllImport("libtest")] + public static extern void mono_test_MerpCrashSignalAbrt (); + + public static void + MerpCrashSignalAbrt () + { + mono_test_MerpCrashSignalAbrt (); + } + + [DllImport("libtest")] + public static extern void mono_test_MerpCrashSignalFpe (); + + public static void + MerpCrashSignalFpe () + { + mono_test_MerpCrashSignalFpe (); + } + + [DllImport("libtest")] + public static extern void mono_test_MerpCrashSignalBus (); + + public static void + MerpCrashSignalBus () + { + mono_test_MerpCrashSignalBus (); + } + + [DllImport("libtest")] + public static extern void mono_test_MerpCrashSignalSegv (); + + public static void + MerpCrashSignalSegv () + { + mono_test_MerpCrashSignalSegv (); + } + + [DllImport("libtest")] + public static extern void mono_test_MerpCrashSignalIll (); + + public static void + MerpCrashSignalIll () + { + mono_test_MerpCrashSignalIll (); + } + public static void MerpCrashUnhandledExceptionHook () { @@ -162,6 +239,12 @@ class C mono_test_MerpCrashUnhandledExceptionHook (); } + public static void + MerpCrashTestBreadcrumbs () + { + mono_test_MerpCrashSignalSegv (); + } + private static object jsonGetKey (object o, string key) => (o as Dictionary)[key]; private static object jsonGetKeys (object o, params string[] keys) { @@ -213,8 +296,6 @@ class C public static void TestValidate (string configDir, bool silent, Action validator = null) { - DumpLogCheck (); - var xmlFilePath = String.Format("{0}CustomLogsMetadata.xml", configDir); var paramsFilePath = String.Format("{0}MERP.uploadparams.txt", configDir); var crashFilePath = String.Format("{0}lastcrashlog.txt", configDir); @@ -259,7 +340,7 @@ class C } catch (CrasherClass.ValidationException e) { throw new Exception (String.Format ("Validation failed '{0}', json: {1}", e.Message, crashFile)); } catch (Exception e) { - throw new Exception (String.Format ("Invalid json: {0}", crashFile)); + throw new Exception (String.Format ("Invalid json ({0}:{1}): {2}", e.GetType(), e.Message, crashFile)); } File.Delete (crashFilePath); @@ -268,6 +349,8 @@ class C Console.WriteLine ("Crash file {0} missing", crashFilePath); } + DumpLogCheck (expected_level: "MerpInvoke"); // we are expecting merp invoke to fail + if (!xmlFileExists) throw new Exception (String.Format ("Did not produce {0}", xmlFilePath)); @@ -298,7 +381,7 @@ class C convert.Invoke(null, new object[] { null }); } - static void DumpLogCheck () + static void DumpLogCheck (string expected_level = "Done") { var monoType = Type.GetType ("Mono.Runtime", false); var convert = monoType.GetMethod("CheckCrashReportLog", BindingFlags.NonPublic | BindingFlags.Static); @@ -306,11 +389,17 @@ class C // Value of enum string [] levels = new string [] { "None", "Setup", "SuspendHandshake", "UnmanagedStacks", "ManagedStacks", "StateWriter", "StateWriterDone", "MerpWriter", "MerpInvoke", "Cleanup", "Done", "DoubleFault" }; - if ("MerpInvoke" == levels [result]) { - Console.WriteLine ("Merp invoke command failed, expected failure?"); - } else if ("Done" != levels [result]) { - throw new Exception (String.Format ("Crash level not done, failed in stage: {0}", levels [result])); - } + if (expected_level != levels [result]) + throw new Exception (String.Format ("Crash level {0} does not match expected {1}", levels [result], expected_level)); + + // also clear hash and reason breadcrumbs + convert = monoType.GetMethod("CheckCrashReportHash", BindingFlags.NonPublic | BindingFlags.Static); + var hash_result = (long) convert.Invoke(null, new object[] { "./", true }); + convert = monoType.GetMethod("CheckCrashReportReason", BindingFlags.NonPublic | BindingFlags.Static); + var reason_result = (string) convert.Invoke(null, new object[] { "./", true }); + + if (reason_result == string.Empty) + throw new Exception("Crash reason should not be an empty string"); } @@ -346,6 +435,40 @@ class C } } + public static void TestManagedException () + { + if (Directory.Exists (configDir)) { + Console.WriteLine ("Cleaning up left over configDir {0}", configDir); + Cleanup (configDir); + } + Directory.CreateDirectory (configDir); + + SetupCrash (configDir); + var monoType = Type.GetType ("Mono.Runtime", false); + var m = monoType.GetMethod ("ExceptionToState", BindingFlags.NonPublic | BindingFlags.Static); + var exception = new Exception ("test managed exception"); + var m_params = new object[] { exception }; + + var result = m.Invoke (null, m_params) as Tuple; + DumpLogCheck (expected_level: "StateWriterDone"); + Cleanup (configDir); + } + + public static Exception RunManagedExceptionTest () + { + Console.WriteLine ("Testing ExceptionToState()..."); + Exception exception_test_failure = null; + + try { + TestManagedException(); + } + catch (Exception e) + { + return e; + } + return null; + } + public static int Main (string [] args) { if (args.Length == 0) { @@ -370,10 +493,18 @@ class C } } + // Also test sending a managed exception + Exception exception_test_failure = RunManagedExceptionTest (); + Console.WriteLine ("\n\n##################"); Console.WriteLine ("Merp Test Results:"); Console.WriteLine ("##################\n\n"); + if (exception_test_failure != null) + { + Console.WriteLine ("Sending managed exception to MERP failed: {0}\n{1}\n", exception_test_failure.Message, exception_test_failure.StackTrace); + } + if (failure_count > 0) { for (int i=0; i < CrasherClass.Crashers.Count; i++) { if (failures [i] != null) { @@ -383,7 +514,7 @@ class C } } - if (failure_count > 0) + if (failure_count > 0 || exception_test_failure != null) return 1; Console.WriteLine ("\n\n##################"); diff --git a/mono/tests/module-cctor.il b/mono/tests/module-cctor.il new file mode 100644 index 0000000000..38854d97d2 --- /dev/null +++ b/mono/tests/module-cctor.il @@ -0,0 +1,32 @@ +.assembly TestDll { } +.assembly extern mscorlib { } + +.method assembly specialname rtspecialname static + void .cctor() cil managed +{ + ldc.i4 1 + stsfld int32 NS.TestClass::TestField + ldstr "Module contructor executed" + call void [mscorlib]System.Console::WriteLine(string) + ret +} + +.namespace NS +{ + .class public TestClass extends [mscorlib]System.Object + { + .field public static int32 TestField + + .method public static void TestMethod() cil managed + { + ldstr "TestMethod executed" + call void [mscorlib]System.Console::WriteLine(string) + ret + } + .method public static void Main() cil managed + { + .entrypoint + ret + } + } +} diff --git a/mono/tests/pinvoke2.cs b/mono/tests/pinvoke2.cs index 1528dd57c7..e9280db8c3 100644 --- a/mono/tests/pinvoke2.cs +++ b/mono/tests/pinvoke2.cs @@ -314,6 +314,9 @@ public unsafe class Tests { [DllImport ("libtest", EntryPoint="mono_test_return_vtype")] public static extern SimpleStruct mono_test_return_vtype (IntPtr i); + [DllImport ("libtest", EntryPoint="mono_test_return_vtype")] + public static extern SimpleStructGen mono_test_return_vtype_gen (IntPtr i); + [DllImport ("libtest", EntryPoint="mono_test_marshal_stringbuilder")] public static extern void mono_test_marshal_stringbuilder (StringBuilder sb, int len); @@ -482,6 +485,7 @@ public unsafe class Tests { SimpleStruct ss = new SimpleStruct (); ss.b = true; ss.d = "TEST"; + ss.d2 = "OK"; return mono_test_marshal_struct (ss); } @@ -490,6 +494,7 @@ public unsafe class Tests { SimpleStructGen ss = new SimpleStructGen (); ss.b = true; ss.d = "TEST"; + ss.d2 = "OK"; return mono_test_marshal_struct_gen (ss); } @@ -852,6 +857,15 @@ public unsafe class Tests { return 1; } + public static int test_0_return_vtype_gen () { + SimpleStructGen ss = mono_test_return_vtype_gen (new IntPtr (5)); + + if (!ss.a && ss.b && !ss.c && ss.d == "TEST" && ss.d2 == "TEST2") + return 0; + + return 1; + } + public static int test_0_marshal_stringbuilder () { StringBuilder sb = new StringBuilder(255); sb.Append ("ABCD"); @@ -1074,6 +1088,9 @@ public unsafe class Tests { catch (ArgumentException) { } + if (mono_test_asany (new IntPtr(5), 5) != 0) + return 7; + return 0; } diff --git a/mono/tests/process-leak.cs b/mono/tests/process-leak.cs new file mode 100644 index 0000000000..69a2ecf433 --- /dev/null +++ b/mono/tests/process-leak.cs @@ -0,0 +1,92 @@ +using System; +using System.Diagnostics; +using System.Reflection; + + +namespace ToManyOpenHandles +{ + class Program + { + static void Main(string[] args) + { + if (args.Length >= 1) + { + WriteStuffMode(args[0]); + return; + } + + RunStuffMode(); + + Console.WriteLine("Success!!!!"); + } + + private static void WriteStuffMode(string counter) + { + Console.WriteLine("Run {0} {1}", counter, Console.ReadLine ()); + } + + private static void RunStuffMode() + { + for (int i = 0; i < 100; i++) + { + Execute(Assembly.GetExecutingAssembly().Location, i.ToString()); + } + } + + public static void Execute(string exe, string exeArgs) + { + using (var p = NewProcess(exe, exeArgs)) + { + p.OutputDataReceived += (sender, args) => + { + if (args.Data != null) + Console.WriteLine(args.Data); + }; + p.ErrorDataReceived += (sender, args) => + { + if (args.Data != null) + Console.Error.WriteLine(args.Data); + }; + + p.Start(); + p.BeginOutputReadLine(); + p.BeginErrorReadLine(); + + p.StandardInput.WriteLine ("hello"); + + p.WaitForExit(); + p.CancelErrorRead(); + p.CancelOutputRead(); + + GC.Collect (); + } + } + + public static Process StartProcess(string filename, string arguments) + { + var p = NewProcess(filename, arguments); + + p.Start(); + return p; + } + + static Process NewProcess(string exe, string args) + { + var p = new Process + { + StartInfo = + { + Arguments = args, + CreateNoWindow = true, + UseShellExecute = false, + RedirectStandardOutput = true, + RedirectStandardInput = true, + RedirectStandardError = true, + FileName = exe, + } + }; + + return p; + } + } +} \ No newline at end of file diff --git a/mono/tests/process-stress-1.cs b/mono/tests/process-stress-1.cs new file mode 100644 index 0000000000..7f15a2f6e7 --- /dev/null +++ b/mono/tests/process-stress-1.cs @@ -0,0 +1,39 @@ + +using System; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; + +class Driver +{ + static void Main () + { + for (int i = 0; i < 1000; ++i) { + ProcessStartInfo psi = new ProcessStartInfo () { + FileName = "echo", + Arguments = "hello", + RedirectStandardOutput = true, + UseShellExecute = false + }; + + Process p = Process.Start (psi); + + ManualResetEvent mre = new ManualResetEvent (false); + + Task t = Task.Run (() => { + mre.Set (); + p.BeginOutputReadLine (); + if (!p.WaitForExit (10000)) + Environment.Exit (1); + }); + + if (!mre.WaitOne (10000)) + Environment.Exit (2); + if (!p.WaitForExit (10000)) + Environment.Exit (3); + + if (!t.Wait (10000)) + Environment.Exit (4); + } + } +} diff --git a/mono/tests/process-stress-2.cs b/mono/tests/process-stress-2.cs new file mode 100644 index 0000000000..c487c465d3 --- /dev/null +++ b/mono/tests/process-stress-2.cs @@ -0,0 +1,91 @@ + +using System; +using System.Diagnostics; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +class Driver +{ + static void Main () + { + Action[] tests = new Action [] { + new Action (Test1), + new Action (Test2), + }; + + ProcessStartInfo psi = new ProcessStartInfo () { + FileName = "echo", + Arguments = "hello", + UseShellExecute = false, + RedirectStandardOutput = true, + }; + + foreach (Action test in tests) { + for (int i = 0; i < 500; ++i) { + test (new Process () { StartInfo = psi }); + } + } + } + + static void Test1 (Process p) + { + StringBuilder sb = new StringBuilder (); + ManualResetEvent mre_exit = new ManualResetEvent (false); + ManualResetEvent mre_output = new ManualResetEvent (false); + + p.EnableRaisingEvents = true; + p.Exited += (s, a) => mre_exit.Set (); + + p.Start (); + + p.OutputDataReceived += (s, a) => { + if (a.Data == null) { + mre_output.Set (); + return; + } + sb.Append (a.Data); + }; + + p.BeginOutputReadLine (); + + if (!mre_exit.WaitOne (10000)) + Environment.Exit (1); + if (!mre_output.WaitOne (10000)) + Environment.Exit (2); + + if (sb.ToString () != "hello") { + Console.WriteLine ("process output = '{0}'", sb.ToString ()); + Environment.Exit (3); + } + } + + static void Test2 (Process p) + { + StringBuilder sb = new StringBuilder (); + ManualResetEvent mre_output = new ManualResetEvent (false); + + p.Start (); + + p.OutputDataReceived += (s, a) => { + if (a.Data == null) { + mre_output.Set (); + return; + } + + sb.Append (a.Data); + }; + + p.BeginOutputReadLine (); + + if (!p.WaitForExit (10000)) + Environment.Exit (4); + if (!mre_output.WaitOne (10000)) + Environment.Exit (5); + + if (sb.ToString () != "hello") { + Console.WriteLine ("process output = '{0}'", sb.ToString ()); + Environment.Exit (6); + } + } +} diff --git a/mono/tests/process-stress-3.cs b/mono/tests/process-stress-3.cs new file mode 100644 index 0000000000..657261d284 --- /dev/null +++ b/mono/tests/process-stress-3.cs @@ -0,0 +1,99 @@ + +using System; +using System.Diagnostics; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +class Driver +{ + static void Main () + { + Action[] tests = new Action [] { + new Action (Test1), + new Action (Test2), + }; + + ProcessStartInfo psi = new ProcessStartInfo () { + FileName = "find", + Arguments = ". -maxdepth 3", // this test should be run from mono/tests, so that will list all test files + UseShellExecute = false, + RedirectStandardOutput = true, + RedirectStandardError = true, + }; + + foreach (Action test in tests) { + for (int i = 0; i < 200; ++i) { + test (new Process () { StartInfo = psi }); + } + } + } + + static void Test1 (Process p) + { + ManualResetEvent mre_exit = new ManualResetEvent (false); + ManualResetEvent mre_output = new ManualResetEvent (false); + ManualResetEvent mre_error = new ManualResetEvent (false); + + p.EnableRaisingEvents = true; + p.Exited += (s, a) => mre_exit.Set (); + + p.Start (); + + p.OutputDataReceived += (s, a) => { + if (a.Data == null) { + mre_output.Set (); + return; + } + }; + + p.ErrorDataReceived += (s, a) => { + if (a.Data == null) { + mre_error.Set (); + return; + } + }; + + p.BeginOutputReadLine (); + p.BeginErrorReadLine (); + + if (!mre_exit.WaitOne (10000)) + Environment.Exit (1); + if (!mre_output.WaitOne (10000)) + Environment.Exit (2); + if (!mre_error.WaitOne (10000)) + Environment.Exit (3); + } + + static void Test2 (Process p) + { + ManualResetEvent mre_output = new ManualResetEvent (false); + ManualResetEvent mre_error = new ManualResetEvent (false); + + p.Start (); + + p.OutputDataReceived += (s, a) => { + if (a.Data == null) { + mre_output.Set (); + return; + } + }; + + p.ErrorDataReceived += (s, a) => { + if (a.Data == null) { + mre_error.Set (); + return; + } + }; + + p.BeginOutputReadLine (); + p.BeginErrorReadLine (); + + if (!p.WaitForExit (10000)) + Environment.Exit (4); + if (!mre_output.WaitOne (1000)) + Environment.Exit (5); + if (!mre_error.WaitOne (1000)) + Environment.Exit (6); + } +} diff --git a/mono/tests/rgctx-thread-static.cs b/mono/tests/rgctx-thread-static.cs new file mode 100644 index 0000000000..a2daa7815c --- /dev/null +++ b/mono/tests/rgctx-thread-static.cs @@ -0,0 +1,30 @@ +using System; +using System.Runtime.CompilerServices; + +public class TlsClass { + [ThreadStatic] + public static string staticTls; +} + +public class AccessClass { + + [MethodImpl(MethodImplOptions.NoInlining)] + public string GetStatic () + { + // Get field offset through rgctx_fetch of a class not yet initialized + return TlsClass.staticTls; + } +} + +public class Program { + + public static int Main (string[] args) + { + AccessClass ac1 = new AccessClass (); + if (ac1.GetStatic () != null) + return 1; + + return 0; + } + +} diff --git a/mono/tests/testing_gac/Makefile.am b/mono/tests/testing_gac/Makefile.am index 24c493ca22..44f82cac49 100644 --- a/mono/tests/testing_gac/Makefile.am +++ b/mono/tests/testing_gac/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules ### buildtree stuff @@ -62,6 +62,7 @@ BASE_MONO_PATH=$(CLASS) V1_SRC= v1/gactestlib.cs V2_SRC= v2/gactestlib.cs APP_V1_SRC = v1/app.cs v1/app-refl-load.cs +APP_BOTH_SRC = app-both.cs APP_SIGNED_V1_EXE = app-v1.exe app-refl-load-v1.exe @@ -97,7 +98,7 @@ SIGN= -delaysign -keyfile:$(SIGNING_KEY) ### autotools stuff -EXTRA_DIST= README $(SIGNING_KEY) $(GACTESTLIB_SRCS) +EXTRA_DIST= README $(SIGNING_KEY) $(GACTESTLIB_SRCS) $(APP_V1_SRC) $(APP_BOTH_SRC) ### Test cases diff --git a/mono/tests/testing_gac/Makefile.in b/mono/tests/testing_gac/Makefile.in index 1d95c2e2ac..6f9881b371 100644 --- a/mono/tests/testing_gac/Makefile.in +++ b/mono/tests/testing_gac/Makefile.in @@ -132,8 +132,8 @@ am__can_run_installinfo = \ esac am__extra_recursive_targets = test-recursive test-bundle-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs README +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs \ + README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -453,6 +453,7 @@ BASE_MONO_PATH = $(CLASS) V1_SRC = v1/gactestlib.cs V2_SRC = v2/gactestlib.cs APP_V1_SRC = v1/app.cs v1/app-refl-load.cs +APP_BOTH_SRC = app-both.cs APP_SIGNED_V1_EXE = app-v1.exe app-refl-load-v1.exe APP_BOTH_EXE = app-both.exe UNSIGNED_V1_DLL = unsigned_v1/gactestlib.dll @@ -478,11 +479,11 @@ GACDIR = . SIGN = -delaysign -keyfile:$(SIGNING_KEY) ### autotools stuff -EXTRA_DIST = README $(SIGNING_KEY) $(GACTESTLIB_SRCS) +EXTRA_DIST = README $(SIGNING_KEY) $(GACTESTLIB_SRCS) $(APP_V1_SRC) $(APP_BOTH_SRC) all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -502,7 +503,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/tests/testing_gac/app-both.cs b/mono/tests/testing_gac/app-both.cs new file mode 100644 index 0000000000..ae32d3ef3e --- /dev/null +++ b/mono/tests/testing_gac/app-both.cs @@ -0,0 +1,23 @@ + +// reference both versions of gactestlib via extern aliases. + +// N.B. the order of the aliases is important - the compiler will emit +// .assembly declarations in the IL file in order, and Mono will try to load the declarations in the same order. +// The test relies on V1 being loaded first and then V2 being tried from V1's MONO_PATH directory. +extern alias V1; +extern alias V2; + +using System; + +public class AppBoth { + public static int Main (string[] args) { + // regression test that references two strongly named + // assemblies that have the same name but different versions. + V1.OnlyInV1.M (); + V2.OnlyInV2.M (); + if (typeof (V1.X).Assembly.GetName ().Version == typeof (V2.X).Assembly.GetName ().Version) + return 1; + + return 0; + } +} diff --git a/mono/tests/testing_gac/v1/app-refl-load.cs b/mono/tests/testing_gac/v1/app-refl-load.cs new file mode 100644 index 0000000000..4170aa0cc6 --- /dev/null +++ b/mono/tests/testing_gac/v1/app-refl-load.cs @@ -0,0 +1,45 @@ +using System; +using System.Reflection; + +public class App { + const string assemblyName = "gactestlib"; + const string assemblyVersion = "1.0.0.0"; + const string assemblyPublicKeyToken = "537eab56aa911cb7"; /* see testkey.snk */ + public static int Main (string[] args) + { + TestAssemblyLoad (); + + TestReflectionOnlyLoad (); + + return 0; + } + + public static void TestAssemblyLoad () + { + var expectedVersion = new Version (assemblyVersion); + + var s = String.Format ("{0}, Version={1}, Culture=\"\", PublicKeyToken={2}", + assemblyName, assemblyVersion, assemblyPublicKeyToken); + var n = new AssemblyName (s); + var a = AppDomain.CurrentDomain.Load (n); + + if (a == null) + Environment.Exit (1); + if (a.GetName ().Version != expectedVersion) + Environment.Exit (2); + } + + public static void TestReflectionOnlyLoad () + { + var expectedVersion = new Version (assemblyVersion); + + var s = String.Format ("{0}, Version={1}, Culture=\"\", PublicKeyToken={2}", + assemblyName, assemblyVersion, assemblyPublicKeyToken); + var a = Assembly.ReflectionOnlyLoad (s); + + if (a == null) + Environment.Exit (3); + if (a.GetName ().Version != expectedVersion) + Environment.Exit (4); + } +} diff --git a/mono/tests/testing_gac/v1/app.cs b/mono/tests/testing_gac/v1/app.cs new file mode 100644 index 0000000000..523668a145 --- /dev/null +++ b/mono/tests/testing_gac/v1/app.cs @@ -0,0 +1,8 @@ +using System; + +public class App { + public static void Main () { + X.N1 (); + X.N2 (); + } +} diff --git a/mono/tests/threadpool-exceptions2.cs b/mono/tests/threadpool-exceptions2.cs new file mode 100644 index 0000000000..17988c5441 --- /dev/null +++ b/mono/tests/threadpool-exceptions2.cs @@ -0,0 +1,48 @@ +using System; +using System.Threading; + +class Test { + + static ManualResetEvent mre = new ManualResetEvent (false); + + static int Main () + { + AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; + WaitCallback wcb = new WaitCallback ((a) => { + throw new Exception ("From the threadpoool"); + }); + wcb.BeginInvoke (wcb, OnCBFinished, null); + + if (!mre.WaitOne (10000)) + return 2; + + GC.Collect (); + GC.WaitForPendingFinalizers (); + + /* expected exit code: 255 */ + Thread.Sleep (10000); + return 0; + } + + static void OnUnhandledException (object sender, UnhandledExceptionEventArgs e) + { + string str = e.ExceptionObject.ToString (); + if (!str.Contains ("From OnCBFinished")) { + Environment.Exit (3); + return; + } + + if (!e.IsTerminating) { + Environment.Exit (4); + return; + } + + mre.Set (); + } + + static void OnCBFinished (object arg) + { + throw new Exception ("From OnCBFinished"); + } +} + diff --git a/mono/tests/threadpool-exceptions5.cs b/mono/tests/threadpool-exceptions5.cs new file mode 100644 index 0000000000..945866169f --- /dev/null +++ b/mono/tests/threadpool-exceptions5.cs @@ -0,0 +1,49 @@ +using System; +using System.Threading; + +class Test { + + static ManualResetEvent mre = new ManualResetEvent (false); + + static int Main () + { + AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; + WaitCallback wcb = new WaitCallback ((a) => { + Thread.CurrentThread.Abort(); + }); + + wcb.BeginInvoke (wcb, OnCBFinished, null); + + if (!mre.WaitOne (10000)) + return 2; + + GC.Collect (); + GC.WaitForPendingFinalizers (); + + /* expected exit code: 255 */ + Thread.Sleep (10000); + return 0; + } + + static void OnUnhandledException (object sender, UnhandledExceptionEventArgs e) + { + string str = e.ExceptionObject.ToString (); + if (!str.Contains ("From OnCBFinished")) { + Environment.Exit (3); + return; + } + + if (!e.IsTerminating) { + Environment.Exit (4); + return; + } + + mre.Set (); + } + + static void OnCBFinished (object arg) + { + throw new Exception ("From OnCBFinished"); + } +} + diff --git a/mono/tests/unhandled-exception-1.cs b/mono/tests/unhandled-exception-1.cs new file mode 100644 index 0000000000..90ff5e6162 --- /dev/null +++ b/mono/tests/unhandled-exception-1.cs @@ -0,0 +1,32 @@ +using System; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; + +class CustomException : Exception +{ +} + +class Driver +{ + /* Expected exit code: 1 */ + static void Main (string[] args) + { + if (Environment.GetEnvironmentVariable ("TEST_UNHANDLED_EXCEPTION_HANDLER") != null) + AppDomain.CurrentDomain.UnhandledException += (s, e) => {}; + + ManualResetEvent mre = new ManualResetEvent (false); + + var t = new Thread (new ThreadStart (() => { try { throw new CustomException (); } finally { mre.Set (); } })); + t.Start (); + + if (!mre.WaitOne (5000)) + Environment.Exit (2); + + /* Give a chance to the thread to finish executing the exception unwinding + * after the finally, before we exit with status 0 on the current thread */ + Thread.Sleep (1000); + + Environment.Exit (0); + } +} diff --git a/mono/tests/unhandled-exception-2.cs b/mono/tests/unhandled-exception-2.cs new file mode 100644 index 0000000000..cb05c269fd --- /dev/null +++ b/mono/tests/unhandled-exception-2.cs @@ -0,0 +1,39 @@ +using System; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; + +class CustomException : Exception +{ +} + +class Driver +{ + /* expected exit code: 255 */ + static void Main (string[] args) + { + if (Environment.GetEnvironmentVariable ("TEST_UNHANDLED_EXCEPTION_HANDLER") != null) + AppDomain.CurrentDomain.UnhandledException += (s, e) => {}; + + ManualResetEvent mre = new ManualResetEvent (false); + + var a = new Action (() => { try { throw new CustomException (); } finally { mre.Set (); } }); + var ares = a.BeginInvoke (null, null); + + if (!mre.WaitOne (5000)) + Environment.Exit (2); + + try { + a.EndInvoke (ares); + Environment.Exit (4); + } catch (CustomException) { + /* expected behaviour */ + Environment.Exit (255); + } catch (Exception ex) { + Console.WriteLine (ex); + Environment.Exit (3); + } + + Environment.Exit (5); + } +} diff --git a/mono/tests/unhandled-exception-3.cs b/mono/tests/unhandled-exception-3.cs new file mode 100644 index 0000000000..5805614c69 --- /dev/null +++ b/mono/tests/unhandled-exception-3.cs @@ -0,0 +1,31 @@ +using System; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; + +class CustomException : Exception +{ +} + +class Driver +{ + /* expected exit code: 255 */ + static void Main (string[] args) + { + if (Environment.GetEnvironmentVariable ("TEST_UNHANDLED_EXCEPTION_HANDLER") != null) + AppDomain.CurrentDomain.UnhandledException += (s, e) => {}; + + ManualResetEvent mre = new ManualResetEvent (false); + + ThreadPool.QueueUserWorkItem (_ => { try { throw new CustomException (); } finally { mre.Set (); } }); + + if (!mre.WaitOne (5000)) + Environment.Exit (2); + + /* Give a chance to the threadpool thread to finish executing the exception unwinding + * after the finally, before we exit with status 0 on the current thread */ + Thread.Sleep (1000); + + Environment.Exit (0); + } +} diff --git a/mono/tests/unhandled-exception-4.cs b/mono/tests/unhandled-exception-4.cs new file mode 100644 index 0000000000..4a85514e58 --- /dev/null +++ b/mono/tests/unhandled-exception-4.cs @@ -0,0 +1,41 @@ +using System; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; + +class CustomException : Exception +{ +} + +class Driver +{ + /* expected exit code: 255 */ + static void Main (string[] args) + { + if (Environment.GetEnvironmentVariable ("TEST_UNHANDLED_EXCEPTION_HANDLER") != null) + AppDomain.CurrentDomain.UnhandledException += (s, e) => {}; + + ManualResetEvent mre = new ManualResetEvent (false); + + var t = Task.Factory.StartNew (new Action (() => { try { throw new CustomException (); } finally { mre.Set (); } })); + + if (!mre.WaitOne (5000)) + Environment.Exit (2); + + try { + t.Wait (); + Environment.Exit (5); + } catch (AggregateException ae) { + Console.WriteLine (ae); + if (ae.InnerExceptions [0] is CustomException) { + /* expected behaviour */ + Environment.Exit (255); + } + } catch (Exception ex) { + Console.WriteLine (ex); + Environment.Exit (3); + } + + Environment.Exit (6); + } +} diff --git a/mono/tests/unhandled-exception-5.cs b/mono/tests/unhandled-exception-5.cs new file mode 100644 index 0000000000..65cff47d99 --- /dev/null +++ b/mono/tests/unhandled-exception-5.cs @@ -0,0 +1,46 @@ +using System; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; + +class CustomException : Exception +{ +} + +class Driver +{ + static ManualResetEvent mre = new ManualResetEvent (false); + + class FinalizedClass + { + ~FinalizedClass () + { + try { + throw new CustomException (); + } finally { + mre.Set (); + } + } + } + + /* expected exit code: 255 */ + static void Main (string[] args) + { + if (Environment.GetEnvironmentVariable ("TEST_UNHANDLED_EXCEPTION_HANDLER") != null) + AppDomain.CurrentDomain.UnhandledException += (s, e) => {}; + + new FinalizedClass(); + + GC.Collect (); + GC.WaitForPendingFinalizers (); + + if (!mre.WaitOne (5000)) + Environment.Exit (2); + + /* Give a chance to the finalizer thread to finish executing the exception unwinding + * after the finally, before we exit with status 0 on the current thread */ + Thread.Sleep (1000); + + Environment.Exit (0); + } +} diff --git a/mono/tests/unhandled-exception-6.cs b/mono/tests/unhandled-exception-6.cs new file mode 100644 index 0000000000..7ed54d3330 --- /dev/null +++ b/mono/tests/unhandled-exception-6.cs @@ -0,0 +1,36 @@ +using System; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; +using System.Runtime.Remoting.Messaging; + +class CustomException : Exception +{ +} + +class Driver +{ + /* expected exit code: 255 */ + static void Main (string[] args) + { + if (Environment.GetEnvironmentVariable ("TEST_UNHANDLED_EXCEPTION_HANDLER") != null) + AppDomain.CurrentDomain.UnhandledException += (s, e) => {}; + + var action = new Action (Delegate); + var ares = action.BeginInvoke (Callback, null); + + Thread.Sleep (5000); + + Environment.Exit (1); + } + + static void Delegate () + { + throw new CustomException (); + } + + static void Callback (IAsyncResult iares) + { + ((Action) ((AsyncResult) iares).AsyncDelegate).EndInvoke (iares); + } +} diff --git a/mono/tests/unhandled-exception-7.cs b/mono/tests/unhandled-exception-7.cs new file mode 100644 index 0000000000..87c5fbb8cb --- /dev/null +++ b/mono/tests/unhandled-exception-7.cs @@ -0,0 +1,58 @@ +using System; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; +using System.Runtime.Remoting.Messaging; + +class CustomException : Exception +{ +} + +class CrossDomain : MarshalByRefObject +{ + public Action NewDelegateWithTarget () + { + return new Action (Bar); + } + + public Action NewDelegateWithoutTarget () + { + return () => { throw new CustomException (); }; + } + + public void Bar () + { + throw new CustomException (); + } +} + +class Driver +{ + /* expected exit code: 255 */ + static void Main (string[] args) + { + if (Environment.GetEnvironmentVariable ("TEST_UNHANDLED_EXCEPTION_HANDLER") != null) + AppDomain.CurrentDomain.UnhandledException += (s, e) => {}; + + ManualResetEvent mre = new ManualResetEvent (false); + + var ad = AppDomain.CreateDomain ("ad"); + + if (Environment.GetEnvironmentVariable ("TEST_UNHANDLED_EXCEPTION_HANDLER") != null) + ad.UnhandledException += (s, e) => {}; + + var cd = (CrossDomain) ad.CreateInstanceAndUnwrap (typeof(CrossDomain).Assembly.FullName, "CrossDomain"); + + var action = cd.NewDelegateWithoutTarget (); + var ares = action.BeginInvoke (Callback, null); + + Thread.Sleep (5000); + + Environment.Exit (1); + } + + static void Callback (IAsyncResult iares) + { + ((Action) ((AsyncResult) iares).AsyncDelegate).EndInvoke (iares); + } +} diff --git a/mono/tests/unhandled-exception-8.cs b/mono/tests/unhandled-exception-8.cs new file mode 100644 index 0000000000..7b4de0e97b --- /dev/null +++ b/mono/tests/unhandled-exception-8.cs @@ -0,0 +1,24 @@ + +using System; +using System.Threading; + +class CustomException : Exception +{ +} + +class Driver +{ + /* expected exit code: 255 */ + public static void Main () + { + if (Environment.GetEnvironmentVariable ("TEST_UNHANDLED_EXCEPTION_HANDLER") != null) + AppDomain.CurrentDomain.UnhandledException += (s, e) => {}; + + ManualResetEvent mre = new ManualResetEvent(false); + + ThreadPool.RegisterWaitForSingleObject (mre, (state, timedOut) => { throw new CustomException (); }, null, -1, true); + mre.Set(); + + Thread.Sleep (5000); + } +} \ No newline at end of file diff --git a/mono/tests/unhandled-exception-9.cs b/mono/tests/unhandled-exception-9.cs new file mode 100644 index 0000000000..7016b5dceb --- /dev/null +++ b/mono/tests/unhandled-exception-9.cs @@ -0,0 +1,16 @@ +using System; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; + +class Driver +{ + /* expected exit code: 1 */ + static void Main (string[] args) + { + if (Environment.GetEnvironmentVariable ("TEST_UNHANDLED_EXCEPTION_HANDLER") != null) + AppDomain.CurrentDomain.UnhandledException += (s, e) => {}; + + throw new AppDomainUnloadedException (); + } +} diff --git a/mono/unit-tests/Makefile.am b/mono/unit-tests/Makefile.am index f306e29501..85fff692ef 100644 --- a/mono/unit-tests/Makefile.am +++ b/mono/unit-tests/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono -I$(top_srcdir)/samples $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\" diff --git a/mono/unit-tests/Makefile.in b/mono/unit-tests/Makefile.in index 243547b71e..4fb7383584 100644 --- a/mono/unit-tests/Makefile.in +++ b/mono/unit-tests/Makefile.in @@ -532,8 +532,7 @@ TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ - $(top_srcdir)/mk/common.mk $(top_srcdir)/mkinstalldirs \ - $(top_srcdir)/test-driver + $(top_srcdir)/mkinstalldirs $(top_srcdir)/test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -906,7 +905,7 @@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -926,7 +925,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/utils/Makefile.am b/mono/utils/Makefile.am index fc502ee5a7..110065d4f8 100644 --- a/mono/utils/Makefile.am +++ b/mono/utils/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules if !ENABLE_MSVC_ONLY diff --git a/mono/utils/Makefile.in.REMOVED.git-id b/mono/utils/Makefile.in.REMOVED.git-id index bf05d7f526..bd72e82917 100644 --- a/mono/utils/Makefile.in.REMOVED.git-id +++ b/mono/utils/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -df5621f345d2f42667485d303087cbc461100441 \ No newline at end of file +4620cb7df0ed41617ad86d5c81676053d500e98c \ No newline at end of file diff --git a/mono/utils/atomic.c b/mono/utils/atomic.c index 58c46e2860..eac6be3255 100644 --- a/mono/utils/atomic.c +++ b/mono/utils/atomic.c @@ -13,7 +13,6 @@ #include #include -#include #if defined (WAPI_NO_ATOMIC_ASM) || defined (BROKEN_64BIT_ATOMICS_INTRINSIC) #define NEED_64BIT_CMPXCHG_FALLBACK @@ -509,7 +508,7 @@ void mono_atomic_store_ptr(volatile gpointer *dst, gpointer val) gint64 mono_atomic_cas_i64(volatile gint64 *dest, gint64 exch, gint64 comp) { - return __sync_val_compare_and_swap (dest, comp, exch); + return gcc_sync_val_compare_and_swap (dest, comp, exch); } #elif defined (__arm__) && defined (HAVE_ARMV7) && (defined(TARGET_IOS) || defined(TARGET_WATCHOS) || defined(TARGET_ANDROID)) @@ -527,7 +526,7 @@ mono_atomic_cas_i64(volatile gint64 *dest, gint64 exch, gint64 comp) gint64 mono_atomic_cas_i64(volatile gint64 *dest, gint64 exch, gint64 comp) { - return __sync_val_compare_and_swap (dest, comp, exch); + return gcc_sync_val_compare_and_swap (dest, comp, exch); } #elif defined (TARGET_ANDROID) diff --git a/mono/utils/atomic.h b/mono/utils/atomic.h index 40574c1244..4b46122c51 100755 --- a/mono/utils/atomic.h +++ b/mono/utils/atomic.h @@ -16,6 +16,7 @@ #include "config.h" #include #include +#include /* The current Nexus 7 arm-v7a fails with: diff --git a/mono/utils/dlmalloc.c.REMOVED.git-id b/mono/utils/dlmalloc.c.REMOVED.git-id index c0f6ebdd51..66786622bf 100644 --- a/mono/utils/dlmalloc.c.REMOVED.git-id +++ b/mono/utils/dlmalloc.c.REMOVED.git-id @@ -1 +1 @@ -42010447fb493a8ac5a7595d6c8c337edbd6b816 \ No newline at end of file +ed68e4103be5c384d499b22108ab5573ec5947db \ No newline at end of file diff --git a/mono/utils/dlmalloc.h b/mono/utils/dlmalloc.h index 56192152e7..327cc4c0c1 100644 --- a/mono/utils/dlmalloc.h +++ b/mono/utils/dlmalloc.h @@ -28,26 +28,6 @@ #include /* for size_t */ #include -// Returning an undefined struct by value from extern "C" -// is sometimes an error. Mono does not use the code (dlmallinfo).. -// -// Other fixes: -// - define the struct -// - #if __cplusplus -// - #if HOST_WASM -// - #ifndef HAVE_USR_INCLUDE_MALLOC_H -// - Make it not extern "C". -// - Return the struct through an out parameter. -// - remove extern "C" entirely in dlmalloc. -// -// Mono does not use the function (dlmallinfo). -// -#define NO_MALLINFO 1 /* mono */ - -#ifdef __cplusplus -extern "C" { -#endif - #if !ONLY_MSPACES #ifndef USE_DL_PREFIX @@ -554,8 +534,4 @@ int mspace_mallopt(int, int); #endif /* MSPACES */ -#ifdef __cplusplus -}; /* end of extern "C" */ -#endif - #endif /* MALLOC_280_H */ diff --git a/mono/utils/jemalloc/Makefile.am b/mono/utils/jemalloc/Makefile.am index 41d07e323a..3bd3acfb14 100644 --- a/mono/utils/jemalloc/Makefile.am +++ b/mono/utils/jemalloc/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules # # Conditional submodule for jemalloc diff --git a/mono/utils/jemalloc/Makefile.in b/mono/utils/jemalloc/Makefile.in index 509f995a82..a8c764c8da 100644 --- a/mono/utils/jemalloc/Makefile.in +++ b/mono/utils/jemalloc/Makefile.in @@ -135,8 +135,7 @@ am__can_run_installinfo = \ esac am__extra_recursive_targets = test-recursive test-bundle-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mk/common.mk \ - $(top_srcdir)/mkinstalldirs \ +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs \ $(top_srcdir)/scripts/submodules/versions.mk DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -435,7 +434,7 @@ EXTRA_DIST = SUBMODULES.json all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(top_srcdir)/scripts/submodules/versions.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/scripts/submodules/versions.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -455,7 +454,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(top_srcdir)/scripts/submodules/versions.mk $(am__empty): +$(top_srcdir)/scripts/submodules/versions.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/mono/utils/mono-counters.c b/mono/utils/mono-counters.c index 7bf6ccbc56..cc04809e40 100644 --- a/mono/utils/mono-counters.c +++ b/mono/utils/mono-counters.c @@ -518,6 +518,14 @@ mono_counters_sample (MonoCounter *counter, void *buffer, int buffer_size) return sample_internal (counter, buffer, buffer_size); } +// We want to default to g_print if outfile is not specified. This matters because on some platforms (e.g. Android), +// printing to stdout is not the actual way to see output, and we've wrapped that logic in `g_print`. +#define FPRINTF_OR_G_PRINT(outfile, ...) if (outfile) { \ + fprintf (outfile, __VA_ARGS__); \ +} else { \ + g_print (__VA_ARGS__); \ +} + #define ENTRY_FMT "%-36s: " static void dump_counter (MonoCounter *counter, FILE *outfile) { @@ -526,34 +534,36 @@ dump_counter (MonoCounter *counter, FILE *outfile) { switch (counter->type & MONO_COUNTER_TYPE_MASK) { case MONO_COUNTER_INT: - fprintf (outfile, ENTRY_FMT "%d\n", counter->name, *(int*)buffer); + FPRINTF_OR_G_PRINT (outfile, ENTRY_FMT "%d\n", counter->name, *(int*)buffer); break; case MONO_COUNTER_UINT: - fprintf (outfile, ENTRY_FMT "%u\n", counter->name, *(guint*)buffer); + FPRINTF_OR_G_PRINT (outfile, ENTRY_FMT "%u\n", counter->name, *(guint*)buffer); break; case MONO_COUNTER_LONG: - if ((counter->type & MONO_COUNTER_UNIT_MASK) == MONO_COUNTER_TIME) - fprintf (outfile, ENTRY_FMT "%.2f ms\n", counter->name, (double)(*(gint64*)buffer) / 10000.0); - else - fprintf (outfile, ENTRY_FMT "%lld\n", counter->name, *(long long *)buffer); + if ((counter->type & MONO_COUNTER_UNIT_MASK) == MONO_COUNTER_TIME) { + FPRINTF_OR_G_PRINT (outfile, ENTRY_FMT "%.2f ms\n", counter->name, (double)(*(gint64*)buffer) / 10000.0); + } else { + FPRINTF_OR_G_PRINT (outfile, ENTRY_FMT "%" PRId64 "\n", counter->name, *(gint64 *)buffer); + } break; case MONO_COUNTER_ULONG: - if ((counter->type & MONO_COUNTER_UNIT_MASK) == MONO_COUNTER_TIME) - fprintf (outfile, ENTRY_FMT "%.2f ms\n", counter->name, (double)(*(guint64*)buffer) / 10000.0); - else - fprintf (outfile, ENTRY_FMT "%llu\n", counter->name, *(unsigned long long *)buffer); + if ((counter->type & MONO_COUNTER_UNIT_MASK) == MONO_COUNTER_TIME) { + FPRINTF_OR_G_PRINT (outfile, ENTRY_FMT "%.2f ms\n", counter->name, (double)(*(guint64*)buffer) / 10000.0); + } else { + FPRINTF_OR_G_PRINT (outfile, ENTRY_FMT "%" PRIu64 "\n", counter->name, *(guint64 *)buffer); + } break; case MONO_COUNTER_WORD: - fprintf (outfile, ENTRY_FMT "%lld\n", counter->name, (long long)*(gssize*)buffer); + FPRINTF_OR_G_PRINT (outfile, ENTRY_FMT "%" PRId64 "\n", counter->name, (gint64)*(gssize*)buffer); break; case MONO_COUNTER_DOUBLE: - fprintf (outfile, ENTRY_FMT "%.4f\n", counter->name, *(double*)buffer); + FPRINTF_OR_G_PRINT (outfile, ENTRY_FMT "%.4f\n", counter->name, *(double*)buffer); break; case MONO_COUNTER_STRING: - fprintf (outfile, ENTRY_FMT "%s\n", counter->name, (size == 0) ? "(null)" : (char*)buffer); + FPRINTF_OR_G_PRINT (outfile, ENTRY_FMT "%s\n", counter->name, (size == 0) ? "(null)" : (char*)buffer); break; case MONO_COUNTER_TIME_INTERVAL: - fprintf (outfile, ENTRY_FMT "%.2f ms\n", counter->name, (double)(*(gint64*)buffer) / 1000.0); + FPRINTF_OR_G_PRINT (outfile, ENTRY_FMT "%.2f ms\n", counter->name, (double)(*(gint64*)buffer) / 1000.0); break; } @@ -589,7 +599,7 @@ mono_counters_dump_section (int section, int variance, FILE *outfile) /** * mono_counters_dump: * \param section_mask The sections to dump counters for - * \param outfile a FILE to dump the results to + * \param outfile a FILE to dump the results to; NULL will default to g_print * Displays the counts of all the enabled counters registered. * To filter by variance, you can OR one or more variance with the specific section you want. * Use \c MONO_COUNTER_SECTION_MASK to dump all categories of a specific variance. @@ -620,15 +630,19 @@ mono_counters_dump (int section_mask, FILE *outfile) for (j = 0, i = MONO_COUNTER_JIT; i < MONO_COUNTER_LAST_SECTION; j++, i <<= 1) { if ((section_mask & i) && (set_mask & i)) { - fprintf (outfile, "\n%s statistics\n", section_names [j]); + FPRINTF_OR_G_PRINT (outfile, "\n%s statistics\n", section_names [j]); mono_counters_dump_section (i, variance, outfile); } } - fflush (outfile); + if (outfile) + fflush (outfile); + mono_os_mutex_unlock (&counters_mutex); } +#undef FPRINTF_OR_G_PRINT + /** * mono_counters_cleanup: * diff --git a/mono/utils/mono-dl-fallback.h b/mono/utils/mono-dl-fallback.h index 0383ad1c90..11ec4f30b8 100644 --- a/mono/utils/mono-dl-fallback.h +++ b/mono/utils/mono-dl-fallback.h @@ -10,10 +10,14 @@ MONO_BEGIN_DECLS enum { - MONO_DL_EAGER = 0, - MONO_DL_LAZY = 1, - MONO_DL_LOCAL = 2, - MONO_DL_MASK = 3 + MONO_DL_EAGER = 0, + MONO_DL_LAZY = 1, + // If MONO_DL_LOCAL is set, it will trump MONO_DL_GLOBAL. + MONO_DL_LOCAL = 2, + // MONO_DL_MASK is unused internally and no longer a full mask on netcore, given the introduction of MONO_DL_GLOBAL. Avoid. + MONO_DL_MASK = 3, + // Only applicable when building Mono in netcore mode. + MONO_DL_GLOBAL = 4 }; /* diff --git a/mono/utils/mono-dl-posix.c b/mono/utils/mono-dl-posix.c index eeebc1942c..1900a1acf5 100644 --- a/mono/utils/mono-dl-posix.c +++ b/mono/utils/mono-dl-posix.c @@ -132,12 +132,23 @@ mono_dl_lookup_symbol (MonoDl *module, const char *name) int mono_dl_convert_flags (int flags) { - int lflags = flags & MONO_DL_LOCAL? 0: RTLD_GLOBAL; + int lflags = 0; + +#ifdef ENABLE_NETCORE + // Specifying both will default to LOCAL + if (flags & MONO_DL_LOCAL) + lflags |= RTLD_LOCAL; + else if (flags & MONO_DL_GLOBAL) + lflags |= RTLD_GLOBAL; +#else + lflags = flags & MONO_DL_LOCAL ? RTLD_LOCAL : RTLD_GLOBAL; +#endif if (flags & MONO_DL_LAZY) lflags |= RTLD_LAZY; else lflags |= RTLD_NOW; + return lflags; } diff --git a/mono/utils/mono-dl-wasm.c b/mono/utils/mono-dl-wasm.c index c855716955..cd1ce22495 100644 --- a/mono/utils/mono-dl-wasm.c +++ b/mono/utils/mono-dl-wasm.c @@ -59,12 +59,23 @@ mono_dl_current_error_string (void) int mono_dl_convert_flags (int flags) { - int lflags = flags & MONO_DL_LOCAL ? 0 : RTLD_GLOBAL; + int lflags = 0; + +#ifdef ENABLE_NETCORE + // Specifying both will default to LOCAL + if (flags & MONO_DL_LOCAL) + lflags |= RTLD_LOCAL; + else if (flags & MONO_DL_GLOBAL) + lflags |= RTLD_GLOBAL; +#else + lflags = flags & MONO_DL_LOCAL ? RTLD_LOCAL : RTLD_GLOBAL; +#endif if (flags & MONO_DL_LAZY) lflags |= RTLD_LAZY; else lflags |= RTLD_NOW; + return lflags; } diff --git a/mono/utils/mono-dl.c b/mono/utils/mono-dl.c index bf5e8fcc5e..8b4aedd179 100644 --- a/mono/utils/mono-dl.c +++ b/mono/utils/mono-dl.c @@ -179,7 +179,7 @@ fix_libc_name (const char *name) * binary image. * \p flags can have the \c MONO_DL_LOCAL bit set to avoid exporting symbols * from the module to the shared namespace. The \c MONO_DL_LAZY bit can be set - * to lazily load the symbols instead of resolving everithing at load time. + * to lazily load the symbols instead of resolving everything at load time. * \p error_msg points to a string where an error message will be stored in * case of failure. The error must be released with \c g_free. * \returns a \c MonoDl pointer on success, NULL on failure. diff --git a/mono/utils/mono-internal-hash.c b/mono/utils/mono-internal-hash.c index 56b837db4a..92b68d1786 100644 --- a/mono/utils/mono-internal-hash.c +++ b/mono/utils/mono-internal-hash.c @@ -106,6 +106,18 @@ mono_internal_hash_table_insert (MonoInternalHashTable *table, resize_if_needed (table); } +void +mono_internal_hash_table_apply (MonoInternalHashTable *table, MonoInternalHashApplyFunc func) +{ + for (gint i = 0; i < table->size; i++) { + gpointer head = table->table [i]; + while (head) { + func (head); + head = *(table->next_value (head)); + } + } +} + gboolean mono_internal_hash_table_remove (MonoInternalHashTable *table, gpointer key) { diff --git a/mono/utils/mono-internal-hash.h b/mono/utils/mono-internal-hash.h index 40d44ffbc0..8a85f7d10a 100644 --- a/mono/utils/mono-internal-hash.h +++ b/mono/utils/mono-internal-hash.h @@ -37,6 +37,7 @@ typedef struct _MonoInternalHashTable MonoInternalHashTable; typedef gpointer (*MonoInternalHashKeyExtractFunc) (gpointer value); typedef gpointer* (*MonoInternalHashNextValueFunc) (gpointer value); +typedef void (*MonoInternalHashApplyFunc) (gpointer value); struct _MonoInternalHashTable { @@ -71,6 +72,9 @@ void mono_internal_hash_table_insert (MonoInternalHashTable *table, gpointer key, gpointer value); +void +mono_internal_hash_table_apply (MonoInternalHashTable *table, MonoInternalHashApplyFunc func); + gboolean mono_internal_hash_table_remove (MonoInternalHashTable *table, gpointer key); diff --git a/mono/utils/mono-log-flight-recorder.c b/mono/utils/mono-log-flight-recorder.c index 369cbab887..ff76d6d433 100644 --- a/mono/utils/mono-log-flight-recorder.c +++ b/mono/utils/mono-log-flight-recorder.c @@ -71,7 +71,7 @@ handle_command (gpointer state, gpointer payload, gboolean at_shutdown) dump.num_messages = 0; dump.max_num_messages = MAX_RECORDER_LOG_LEN; mono_log_dump_recorder_internal (recorder, &dump); - fprintf (stderr, "%zu messages\n", dump.num_messages); + fprintf (stderr, "%" G_GSIZE_FORMAT "u messages\n", dump.num_messages); for (int i=0; i < dump.num_messages; i++) fprintf (stderr, "\t(%d): %s\n", i, dump.messages [i].message); @@ -199,7 +199,7 @@ mono_log_dump_recorder (void) if (success) { fprintf (stderr, "Recent Logs Inserted\n"); - fprintf (stderr, "%zu messages\n", dump.num_messages); + fprintf (stderr, "%" G_GSIZE_FORMAT "u messages\n", dump.num_messages); for (int i=0; i < dump.num_messages; i++) fprintf (stderr, "\t(%d): %s\n", i, dump.messages [i].message); diff --git a/mono/utils/mono-md5.c b/mono/utils/mono-md5.c index 791ce859b0..ab1210707f 100644 --- a/mono/utils/mono-md5.c +++ b/mono/utils/mono-md5.c @@ -256,7 +256,7 @@ mono_md5_final (MonoMD5Context *ctx, guchar digest[16]) static void md5_transform (guint32 buf[4], const guint32 in[16]) { - register guint32 a, b, c, d; + guint32 a, b, c, d; a = buf[0]; b = buf[1]; diff --git a/mono/utils/mono-memory-model.h b/mono/utils/mono-memory-model.h index ce0130793a..de71af7efb 100644 --- a/mono/utils/mono-memory-model.h +++ b/mono/utils/mono-memory-model.h @@ -87,11 +87,11 @@ LDR R3, [R4, R0] #elif defined(__s390x__) -#define STORE_STORE_FENCE do {} while (0) -#define LOAD_LOAD_FENCE do {} while (0) -#define STORE_LOAD_FENCE do {} while (0) -#define LOAD_STORE_FENCE do {} while (0) -#define STORE_RELEASE_FENCE do {} while (0) +#define STORE_STORE_FENCE mono_compiler_barrier () +#define LOAD_LOAD_FENCE mono_compiler_barrier () +#define STORE_LOAD_FENCE mono_compiler_barrier () +#define LOAD_STORE_FENCE mono_compiler_barrier () +#define STORE_RELEASE_FENCE mono_compiler_barrier () #else @@ -108,35 +108,35 @@ LDR R3, [R4, R0] #endif #ifndef STORE_STORE_FENCE -#define STORE_STORE_FENCE +#define STORE_STORE_FENCE mono_compiler_barrier () #endif #ifndef LOAD_LOAD_FENCE -#define LOAD_LOAD_FENCE +#define LOAD_LOAD_FENCE mono_compiler_barrier () #endif #ifndef STORE_LOAD_FENCE -#define STORE_LOAD_FENCE +#define STORE_LOAD_FENCE mono_compiler_barrier () #endif #ifndef LOAD_STORE_FENCE -#define LOAD_STORE_FENCE +#define LOAD_STORE_FENCE mono_compiler_barrier () #endif #ifndef STORE_RELEASE_FENCE -#define STORE_RELEASE_FENCE +#define STORE_RELEASE_FENCE mono_compiler_barrier () #endif #ifndef LOAD_RELEASE_FENCE -#define LOAD_RELEASE_FENCE +#define LOAD_RELEASE_FENCE mono_compiler_barrier () #endif #ifndef STORE_ACQUIRE_FENCE -#define STORE_ACQUIRE_FENCE +#define STORE_ACQUIRE_FENCE mono_compiler_barrier () #endif #ifndef LOAD_ACQUIRE_FENCE -#define LOAD_ACQUIRE_FENCE +#define LOAD_ACQUIRE_FENCE mono_compiler_barrier () #endif diff --git a/mono/utils/mono-merp.c b/mono/utils/mono-merp.c index 14626df187..0da6f07a22 100644 --- a/mono/utils/mono-merp.c +++ b/mono/utils/mono-merp.c @@ -324,10 +324,10 @@ mono_merp_write_params (MERPStruct *merp) g_async_safe_fprintf(handle, "ApplicationPath: %s\n", merp->servicePathArg); g_async_safe_fprintf(handle, "BlameModuleName: %s\n", merp->moduleName); g_async_safe_fprintf(handle, "BlameModuleVersion: %s\n", merp->moduleVersion); - g_async_safe_fprintf(handle, "BlameModuleOffset: 0x%llx\n", (unsigned long long)merp->moduleOffset); + g_async_safe_fprintf(handle, "BlameModuleOffset: 0x%" PRIx64 "\n", (guint64)merp->moduleOffset); g_async_safe_fprintf(handle, "ExceptionType: %s\n", get_merp_exctype (merp->exceptionArg)); - g_async_safe_fprintf(handle, "StackChecksum: 0x%llx\n", merp->hashes.offset_free_hash); - g_async_safe_fprintf(handle, "StackHash: 0x%llx\n", merp->hashes.offset_rich_hash); + g_async_safe_fprintf(handle, "StackChecksum: 0x%" PRIx64 "\n", (guint64)merp->hashes.offset_free_hash); + g_async_safe_fprintf(handle, "StackHash: 0x%" PRIx64 "\n", (guint64)merp->hashes.offset_rich_hash); // Provided by icall g_async_safe_fprintf(handle, "OSVersion: %s\n", merp->osVersion); @@ -460,8 +460,8 @@ mono_merp_write_fingerprint_payload (const char *non_param_data, const MERPStruc g_async_safe_fprintf(handle, "\t\t\"BlameModuleVersion\" : \"%s\",\n", merp->moduleVersion); g_async_safe_fprintf(handle, "\t\t\"BlameModuleOffset\" : \"0x%lx\",\n", merp->moduleOffset); g_async_safe_fprintf(handle, "\t\t\"ExceptionType\" : \"%s\",\n", get_merp_exctype (merp->exceptionArg)); - g_async_safe_fprintf(handle, "\t\t\"StackChecksum\" : \"0x%llx\",\n", merp->hashes.offset_free_hash); - g_async_safe_fprintf(handle, "\t\t\"StackHash\" : \"0x%llx\",\n", merp->hashes.offset_rich_hash); + g_async_safe_fprintf(handle, "\t\t\"StackChecksum\" : \"0x%" PRIx64 "\",\n", (guint64)merp->hashes.offset_free_hash); + g_async_safe_fprintf(handle, "\t\t\"StackHash\" : \"0x%" PRIx64 "\",\n", (guint64)merp->hashes.offset_rich_hash); g_async_safe_fprintf(handle, "\t\t\"Extra\" : \n\t\t{\n"); for (GSList *cursor = merp->annotations; cursor; cursor = cursor->next) { @@ -518,13 +518,13 @@ mono_write_wer_template (MERPStruct *merp) i++; g_async_safe_fprintf(handle, "%s\n", i, merp->moduleVersion, i); i++; - g_async_safe_fprintf(handle, "0x%zx\n", i, merp->moduleOffset, i); + g_async_safe_fprintf(handle, "0x%" G_GSIZE_FORMAT "x\n", i, merp->moduleOffset, i); i++; g_async_safe_fprintf(handle, "%s\n", i, get_merp_exctype (merp->exceptionArg), i); i++; - g_async_safe_fprintf(handle, "0x%llx\n", i, merp->hashes.offset_free_hash, i); + g_async_safe_fprintf(handle, "0x%" PRIx64 "\n", i, merp->hashes.offset_free_hash, i); i++; - g_async_safe_fprintf(handle, "0x%llx\n", i, merp->hashes.offset_rich_hash, i); + g_async_safe_fprintf(handle, "0x%" PRIx64 "\n", i, merp->hashes.offset_rich_hash, i); i++; g_async_safe_fprintf(handle, "%s\n", i, merp->osVersion, i); i++; diff --git a/mono/utils/mono-mmap-wasm.c b/mono/utils/mono-mmap-wasm.c index c8ff1f8624..4af6764cd4 100644 --- a/mono/utils/mono-mmap-wasm.c +++ b/mono/utils/mono-mmap-wasm.c @@ -165,7 +165,7 @@ mono_vfree (void *addr, size_t length, MonoMemAccountType type) res = munmap (info->addr, info->size); END_CRITICAL_SECTION; g_free (info); - g_hash_table_remove (valloc_hash, info); + g_hash_table_remove (valloc_hash, addr); } else { BEGIN_CRITICAL_SECTION; res = munmap (addr, length); diff --git a/mono/utils/mono-mmap-windows.c b/mono/utils/mono-mmap-windows.c index 2caa3b0bc0..3d10a1fb02 100644 --- a/mono/utils/mono-mmap-windows.c +++ b/mono/utils/mono-mmap-windows.c @@ -221,7 +221,7 @@ exit: 0, win32_error, 0, win32_error_string, 99, NULL); // Win32 error messages end with an unsightly newline. remove_trailing_whitespace_utf16 (win32_error_string); - *error_message = g_strdup_printf ("%s failed file:%s length:0x%IX offset:0x%I64X function:%s error:%ls(0x%X)\n", + *error_message = g_strdup_printf ("%s failed file:%s length:0x%IX offset:0x%" PRIX64 " function:%s error:%ls(0x%X)\n", __func__, filepath ? filepath : "", length, offset, failed_function, win32_error_string, win32_error); } SetLastError (win32_error); diff --git a/mono/utils/mono-mmap.c b/mono/utils/mono-mmap.c index 174b154353..251e637ef6 100644 --- a/mono/utils/mono-mmap.c +++ b/mono/utils/mono-mmap.c @@ -391,8 +391,8 @@ mono_file_map_error (size_t length, int flags, int fd, guint64 offset, void **re #ifdef HOST_WASM if (length == 0) /* emscripten throws an exception on 0 length */ - *error_message = g_stdrup_printf ("%s failed file:%s length:0x%zx offset:0x%lluX error:%s\n", - __func__, filepath ? filepath : "", length, offset, "mmaps of zero length are not permitted with emscripten"); + *error_message = g_stdrup_printf ("%s failed file:%s length:0x%" G_GSIZE_FORMAT "x offset:0x%" PRIu64 "X error:%s\n", + __func__, filepath ? filepath : "", length, (guint64)offset, "mmaps of zero length are not permitted with emscripten"); return NULL; #endif @@ -402,8 +402,8 @@ mono_file_map_error (size_t length, int flags, int fd, guint64 offset, void **re END_CRITICAL_SECTION; if (ptr == MAP_FAILED) { if (error_message) { - *error_message = g_strdup_printf ("%s failed file:%s length:0x%zX offset:0x%lluX error:%s(0x%X)\n", - __func__, filepath ? filepath : "", length, (unsigned long long)offset, g_strerror (errno), errno); + *error_message = g_strdup_printf ("%s failed file:%s length:0x%" G_GSIZE_FORMAT "X offset:0x%" PRIu64 "X error:%s(0x%X)\n", + __func__, filepath ? filepath : "", length, (guint64)offset, g_strerror (errno), errno); } return NULL; } diff --git a/mono/utils/mono-proclib.c b/mono/utils/mono-proclib.c index 66d77b6ab7..423ee108aa 100644 --- a/mono/utils/mono-proclib.c +++ b/mono/utils/mono-proclib.c @@ -1072,7 +1072,7 @@ mono_pe_file_map (const gunichar2 *filename, gint32 *map_size, void **handle) /* Check basic file size */ if (statbuf.st_size < sizeof(IMAGE_DOS_HEADER)) { - mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_PROCESS, "%s: File %s is too small: %lld", __func__, filename_ext, (long long) statbuf.st_size); + mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_PROCESS, "%s: File %s is too small: %" PRId64, __func__, filename_ext, (gint64) statbuf.st_size); goto exit; } diff --git a/mono/utils/mono-state.c b/mono/utils/mono-state.c index 27cc909e8b..717c88cfb0 100644 --- a/mono/utils/mono-state.c +++ b/mono/utils/mono-state.c @@ -341,7 +341,6 @@ mono_state_free_mem (MonoStateMem *mem) if (!mem->mem) return; - msync(mem->mem, mem->size, MS_SYNC); munmap (mem->mem, mem->size); // Note: We aren't calling msync on this file. @@ -953,12 +952,12 @@ mono_native_state_add_memory (MonoStateWriter *writer) assert_has_space (writer); mono_state_writer_indent (writer); mono_state_writer_object_key (writer, "minor_gc_time"); - mono_state_writer_printf(writer, "\"%lld\",\n", stats.minor_gc_time); + mono_state_writer_printf(writer, "\"%" PRId64 "\",\n", (gint64)stats.minor_gc_time); assert_has_space (writer); mono_state_writer_indent (writer); mono_state_writer_object_key (writer, "major_gc_time"); - mono_state_writer_printf(writer, "\"%lld\",\n", stats.major_gc_time); + mono_state_writer_printf(writer, "\"%" PRId64 "\",\n", (gint64)stats.major_gc_time); assert_has_space (writer); mono_state_writer_indent (writer); @@ -973,7 +972,7 @@ mono_native_state_add_memory (MonoStateWriter *writer) assert_has_space (writer); mono_state_writer_indent (writer); mono_state_writer_object_key (writer, "major_gc_time_concurrent"); - mono_state_writer_printf(writer, "\"%lld\"\n", stats.major_gc_time_concurrent); + mono_state_writer_printf(writer, "\"%" PRId64 "\"\n", (gint64)stats.major_gc_time_concurrent); writer->indent--; mono_state_writer_indent (writer); diff --git a/mono/utils/mono-threads-debug.h b/mono/utils/mono-threads-debug.h index faf077a342..ded80a96f3 100644 --- a/mono/utils/mono-threads-debug.h +++ b/mono/utils/mono-threads-debug.h @@ -36,6 +36,7 @@ #if 1 #define THREADS_STATE_MACHINE_DEBUG(...) #else +#define THREADS_STATE_MACHINE_DEBUG_ENABLED #define THREADS_STATE_MACHINE_DEBUG MOSTLY_ASYNC_SAFE_PRINTF #endif diff --git a/mono/utils/mono-threads-posix.c b/mono/utils/mono-threads-posix.c index 52bb0180d2..cd32e6b042 100644 --- a/mono/utils/mono-threads-posix.c +++ b/mono/utils/mono-threads-posix.c @@ -336,6 +336,16 @@ mono_memory_barrier_process_wide (void) g_assert (status == 0); } +gint32 +mono_native_thread_processor_id_get (void) +{ +#ifdef HAVE_SCHED_GETCPU + return sched_getcpu (); +#else + return -1; +#endif +} + #endif /* defined(_POSIX_VERSION) */ #if defined(USE_POSIX_BACKEND) diff --git a/mono/utils/mono-threads-state-machine.c b/mono/utils/mono-threads-state-machine.c index 36f9c5b808..f1146f5a63 100644 --- a/mono/utils/mono-threads-state-machine.c +++ b/mono/utils/mono-threads-state-machine.c @@ -22,19 +22,23 @@ get_thread_state (int thread_state) return state.state; } +#if defined (THREADS_STATE_MACHINE_DEBUG_ENABLED) || defined (ENABLE_CHECKED_BUILD_THREAD) static int get_thread_suspend_count (int thread_state) { const MonoThreadStateMachine state = {thread_state}; return state.suspend_count; } +#endif +#ifdef THREADS_STATE_MACHINE_DEBUG_ENABLED static gboolean get_thread_no_safepoints (int thread_state) { const MonoThreadStateMachine state = {thread_state}; return state.no_safepoints; } +#endif static MonoThreadStateMachine build_thread_state (int thread_state, int suspend_count, gboolean no_safepoints) diff --git a/mono/utils/mono-threads-wasm.c b/mono/utils/mono-threads-wasm.c index c61d800f4b..e0b20fe1a8 100644 --- a/mono/utils/mono-threads-wasm.c +++ b/mono/utils/mono-threads-wasm.c @@ -110,6 +110,12 @@ mono_native_thread_os_id_get (void) #endif } +gint32 +mono_native_thread_processor_id_get (void) +{ + return -1; +} + MONO_API gboolean mono_native_thread_create (MonoNativeThreadId *tid, gpointer func, gpointer arg) { diff --git a/mono/utils/mono-threads-windows.c b/mono/utils/mono-threads-windows.c index a3ec0e9592..bcebad18e3 100644 --- a/mono/utils/mono-threads-windows.c +++ b/mono/utils/mono-threads-windows.c @@ -272,7 +272,6 @@ mono_win32_abort_blocking_io_call (MonoThreadInfo *info) gboolean mono_threads_suspend_begin_async_resume (MonoThreadInfo *info) { - DWORD id = mono_thread_info_get_tid (info); HANDLE handle; DWORD result; @@ -412,6 +411,14 @@ mono_native_thread_os_id_get (void) return (guint64)GetCurrentThreadId (); } +gint32 +mono_native_thread_processor_id_get (void) +{ + PROCESSOR_NUMBER proc_num; + GetCurrentProcessorNumberEx (&proc_num); + return ((proc_num.Group << 6) | proc_num.Number); +} + gboolean mono_native_thread_id_equals (MonoNativeThreadId id1, MonoNativeThreadId id2) { diff --git a/mono/utils/mono-threads.h b/mono/utils/mono-threads.h index 4fe447e21c..335b2ea4e5 100644 --- a/mono/utils/mono-threads.h +++ b/mono/utils/mono-threads.h @@ -641,6 +641,8 @@ mono_native_thread_id_get (void); */ guint64 mono_native_thread_os_id_get (void); +gint32 mono_native_thread_processor_id_get (void); + MONO_API gboolean mono_native_thread_id_equals (MonoNativeThreadId id1, MonoNativeThreadId id2); diff --git a/mono/zlib/Makefile.am b/mono/zlib/Makefile.am index 04efc43849..d3b4df1657 100644 --- a/mono/zlib/Makefile.am +++ b/mono/zlib/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/mk/common.mk +MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules ZLIB_SOURCE = \ adler32.c \ diff --git a/mono/zlib/Makefile.in b/mono/zlib/Makefile.in index 0827370084..9aa210e35c 100644 --- a/mono/zlib/Makefile.in +++ b/mono/zlib/Makefile.in @@ -179,7 +179,7 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ - $(top_srcdir)/mk/common.mk $(top_srcdir)/mkinstalldirs + $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -494,7 +494,7 @@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mk/common.mk $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -514,7 +514,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/mk/common.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/msvc/runmdesc.bat b/msvc/runmdesc.bat index 8d089341ae..337f26f571 100755 --- a/msvc/runmdesc.bat +++ b/msvc/runmdesc.bat @@ -1,22 +1,22 @@ -@echo off -rem This runs genmdesc on the x86 files when called on Visual Studio -echo Running genmdesc -cd ..\mono\mini -set PATH=%PATH%;%MONO_DEPENDENCIES_PREFIX%\bin -if "%2" == "Win32" goto x86 -if "%2" == "x64" goto x64 -goto error -:x86 -echo Platform detected is x86... -%1 cpu-x86.h x86_desc cpu-x86.md -goto end -:x64 -echo Platform detected is x64... -%1 cpu-amd64.h amd64_desc cpu-amd64.md -goto end -:error -echo Error: unsupported platform -exit /b 100 -:end -echo done - +@echo off +rem This runs genmdesc on the x86 files when called on Visual Studio +echo Running genmdesc +cd ..\mono\mini +set PATH=%PATH%;%MONO_DEPENDENCIES_PREFIX%\bin +if "%2" == "Win32" goto x86 +if "%2" == "x64" goto x64 +goto error +:x86 +echo Platform detected is x86... +%1 cpu-x86.h x86_desc cpu-x86.md +goto end +:x64 +echo Platform detected is x64... +%1 cpu-amd64.h amd64_desc cpu-amd64.md +goto end +:error +echo Error: unsupported platform +exit /b 100 +:end +echo done + diff --git a/msvc/winsetup.bat b/msvc/winsetup.bat index aa6c882155..f8a4574cbd 100755 --- a/msvc/winsetup.bat +++ b/msvc/winsetup.bat @@ -1,23 +1,23 @@ -@echo off -setlocal - -set BUILD_RESULT=1 - -:: Get path for current running script. -set RUN_WINSETUP_SCRIPT_PATH=%~dp0 - -:: Setup VS msbuild environment. -call %RUN_WINSETUP_SCRIPT_PATH%setup-vs-msbuild-env.bat - -call "msbuild.exe" /t:RunWinConfigSetup %RUN_WINSETUP_SCRIPT_PATH%mono.winconfig.targets && ( - set BUILD_RESULT=0 -) || ( - set BUILD_RESULT=1 - if not %ERRORLEVEL% == 0 ( - set BUILD_RESULT=%ERRORLEVEL% - ) -) - -exit /b %BUILD_RESULT% - -@echo on +@echo off +setlocal + +set BUILD_RESULT=1 + +:: Get path for current running script. +set RUN_WINSETUP_SCRIPT_PATH=%~dp0 + +:: Setup VS msbuild environment. +call %RUN_WINSETUP_SCRIPT_PATH%setup-vs-msbuild-env.bat + +call "msbuild.exe" /t:RunWinConfigSetup %RUN_WINSETUP_SCRIPT_PATH%mono.winconfig.targets && ( + set BUILD_RESULT=0 +) || ( + set BUILD_RESULT=1 + if not %ERRORLEVEL% == 0 ( + set BUILD_RESULT=%ERRORLEVEL% + ) +) + +exit /b %BUILD_RESULT% + +@echo on diff --git a/netcore/Makefile b/netcore/Makefile old mode 100755 new mode 100644 index 9877640288..d96668e68e --- a/netcore/Makefile +++ b/netcore/Makefile @@ -205,7 +205,7 @@ run-tests-corefx: prepare update-tests-corefx counter=$$((counter+1)); \ testname=$$(basename $$testdir); \ if [ -n "$$USE_TIMEOUT" ]; then timeoutcmd="../scripts/ci/run-step.sh --label=$$testname --timeout=10m --fatal"; fi; \ - $$timeoutcmd $(MAKE) run-tests-corefx-$$testname TEST_COUNTER="($$counter / $$tests_count) " || echo $$testname >> .failures; \ + $$timeoutcmd $(MAKE) run-tests-corefx-$$testname XUNIT_MONO_ENV_OPTIONS="$(XUNIT_MONO_ENV_OPTIONS)" XUNIT_ARGS="$(XUNIT_ARGS)" TEST_COUNTER="($$counter / $$tests_count) " || echo $$testname >> .failures; \ done; \ $(MAKE) xunit-summary; \ if [ -e ".failures" ]; then \ @@ -274,6 +274,28 @@ run-tests-coreclr: prepare update-tests-coreclr corerun echo "Failed: $$failures" endif +run-tests-mono: prepare + failures=0; \ + counter=0; \ + test_prj_dir=''; \ + test_prj_name=''; \ + test_projects=$$(find tests -type f -name "*.csproj"); \ + for test_prj in $$test_projects; do \ + counter=$$((counter+1)); \ + echo "Running $$test_prj_dir"; \ + test_prj_dir=$$(dirname $$test_prj); \ + test_prj_name=$$(basename $$test_prj); \ + test_prj_name=$${test_prj_name%.*}; \ + $(DOTNET) build -c Release $$test_prj; \ + MONO_ENV_OPTIONS="--debug $(MONO_ENV_OPTIONS)" COMPlus_DebugWriteToStdErr=1 ./dotnet --fx-version "$(NETCOREAPP_VERSION)" $$test_prj_dir/bin/netcoreapp3.0/$$test_prj_name.dll; \ + if [ $$? -ne 0 ]; then \ + failures=$$((failures+1)); \ + fi; \ + done; \ + echo "======================"; \ + echo "Tests Count: $$counter"; \ + echo "Failed: $$failures" + run-tests-coreclr-%: prepare update-tests-coreclr @echo "" @echo "***************** $* *********************" diff --git a/po/mcs/de.gmo b/po/mcs/de.gmo index e169b9f0ecb22c32568d966b736460d699acecaa..041e81c07f8065da42355dc5bde0109f36fa91d1 100644 GIT binary patch delta 23 ecmbQIHBW29BQ7p;T|)x}0}CrdgUxTajJNMy diff --git a/po/mcs/es.po.REMOVED.git-id b/po/mcs/es.po.REMOVED.git-id index fe2fb7d543..9ca5673d4f 100644 --- a/po/mcs/es.po.REMOVED.git-id +++ b/po/mcs/es.po.REMOVED.git-id @@ -1 +1 @@ -e1dd519fd87227792d67c9790dc56ef11c4c05b2 \ No newline at end of file +08131bdf1c5ff3d86390509d1da42baa9ca4d404 \ No newline at end of file diff --git a/po/mcs/ja.gmo b/po/mcs/ja.gmo index 3837f47b3cd739bb42355bca1fa02ad83926eb0a..81fb1cadbb45f74da3fafaeb3cf6478e7f52e5ef 100644 GIT binary patch delta 25 gcmeyri1Gg-#tp3MT;{rl1_}liR)z+f`PB=w0CiOdmH+?% delta 25 gcmeyri1Gg-#tp3MT&B8)W(o!tRt6TE`PB=w0ClJbp#T5? diff --git a/po/mcs/ja.po.REMOVED.git-id b/po/mcs/ja.po.REMOVED.git-id index a46c8dd653..1c66215ca1 100644 --- a/po/mcs/ja.po.REMOVED.git-id +++ b/po/mcs/ja.po.REMOVED.git-id @@ -1 +1 @@ -5df650079db1b734b05fe8fb1359ae9fbedda940 \ No newline at end of file +3ec71e70eafd496fd64d77faf1ca04cb6cfb347e \ No newline at end of file diff --git a/po/mcs/mcs.pot b/po/mcs/mcs.pot index 9eb4681453..5282fac29b 100644 --- a/po/mcs/mcs.pot +++ b/po/mcs/mcs.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: mono 6.10.0.105\n" +"Project-Id-Version: mono 6.12.0.86\n" "Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n" -"POT-Creation-Date: 2020-05-16 08:08+0000\n" +"POT-Creation-Date: 2020-07-10 08:10+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -488,140 +488,140 @@ msgid "" "`struct', `interface', or `void' keyword" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2137 +#: mcs/mcs/cs-tokenizer.cs:2123 #, csharp-format msgid "Unrecognized escape sequence `\\{0}'" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2156 +#: mcs/mcs/cs-tokenizer.cs:2142 msgid "Unrecognized escape sequence" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2421 +#: mcs/mcs/cs-tokenizer.cs:2407 msgid "Filename, single-line comment or end-of-line expected" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2469 +#: mcs/mcs/cs-tokenizer.cs:2455 msgid "Missing identifier to pre-processor directive" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2479 mcs/mcs/cs-tokenizer.cs:2483 +#: mcs/mcs/cs-tokenizer.cs:2465 mcs/mcs/cs-tokenizer.cs:2469 #, csharp-format msgid "Identifier expected: {0}" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3083 +#: mcs/mcs/cs-tokenizer.cs:3069 msgid "Integral constant is too large" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3088 +#: mcs/mcs/cs-tokenizer.cs:3074 msgid "Invalid number" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3093 +#: mcs/mcs/cs-tokenizer.cs:3079 msgid "Invalid preprocessor directive" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3100 +#: mcs/mcs/cs-tokenizer.cs:3086 #, csharp-format msgid "Unexpected processor directive ({0})" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3106 +#: mcs/mcs/cs-tokenizer.cs:3092 msgid "" "Cannot define or undefine preprocessor symbols after first token in file" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3112 +#: mcs/mcs/cs-tokenizer.cs:3098 msgid "" "Preprocessor directives must appear as the first non-whitespace character on " "a line" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3117 +#: mcs/mcs/cs-tokenizer.cs:3103 msgid "Single-line comment or end-of-line expected" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3162 mcs/mcs/cs-tokenizer.cs:4400 +#: mcs/mcs/cs-tokenizer.cs:3148 mcs/mcs/cs-tokenizer.cs:4386 msgid "Expected `#endif' directive" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3195 mcs/mcs/cs-tokenizer.cs:3216 -#: mcs/mcs/cs-tokenizer.cs:3247 mcs/mcs/cs-tokenizer.cs:4398 +#: mcs/mcs/cs-tokenizer.cs:3181 mcs/mcs/cs-tokenizer.cs:3202 +#: mcs/mcs/cs-tokenizer.cs:3233 mcs/mcs/cs-tokenizer.cs:4384 msgid "#endregion directive expected" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3296 +#: mcs/mcs/cs-tokenizer.cs:3282 msgid "Wrong preprocessor directive" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3308 +#: mcs/mcs/cs-tokenizer.cs:3294 #, csharp-format msgid "#error: '{0}'" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3326 +#: mcs/mcs/cs-tokenizer.cs:3312 msgid "The line number specified for #line directive is missing or invalid" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3380 mcs/mcs/cs-tokenizer.cs:4100 +#: mcs/mcs/cs-tokenizer.cs:3366 mcs/mcs/cs-tokenizer.cs:4086 msgid "Newline in constant" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3407 +#: mcs/mcs/cs-tokenizer.cs:3393 msgid "Unterminated string literal" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3451 mcs/mcs/cs-tokenizer.cs:3482 +#: mcs/mcs/cs-tokenizer.cs:3437 mcs/mcs/cs-tokenizer.cs:3468 #, csharp-format msgid "Unexpected character `\\{0}'" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3498 +#: mcs/mcs/cs-tokenizer.cs:3484 msgid "Identifier too long (limit is 512 chars)" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3845 +#: mcs/mcs/cs-tokenizer.cs:3831 msgid "A single-line comment may not be used in an interpolated string" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3915 +#: mcs/mcs/cs-tokenizer.cs:3901 msgid "End-of-file found, '*/' expected" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:4012 +#: mcs/mcs/cs-tokenizer.cs:3998 msgid "Missing close delimiter `}' for interpolated expression" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:4033 +#: mcs/mcs/cs-tokenizer.cs:4019 msgid "Keyword, identifier, or string expected after verbatim specifier: @" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:4070 +#: mcs/mcs/cs-tokenizer.cs:4056 #, csharp-format msgid "Unexpected character `{0}'" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:4095 +#: mcs/mcs/cs-tokenizer.cs:4081 msgid "Empty character literal" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:4116 +#: mcs/mcs/cs-tokenizer.cs:4102 msgid "Too many characters in character literal" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:4226 mcs/mcs/cs-tokenizer.cs:4289 +#: mcs/mcs/cs-tokenizer.cs:4212 mcs/mcs/cs-tokenizer.cs:4275 #, csharp-format msgid "" "A `{0}' character may only be escaped by doubling `{0}{0}' in an " "interpolated string" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:4267 +#: mcs/mcs/cs-tokenizer.cs:4253 msgid "Empty interpolated expression format specifier" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:4269 +#: mcs/mcs/cs-tokenizer.cs:4255 msgid "" "A interpolated expression format specifier may not contain trailing " "whitespace" diff --git a/po/mcs/pt_BR.gmo b/po/mcs/pt_BR.gmo index b95c2783ba41657ea31e3ef60b17d8ffd47a5768..6790954d152583b99c6eb9e9ef8e7b1312c65302 100644 GIT binary patch delta 25 hcmaF1gXP%{mJQKUxy*G94HOJ4tPBk{r%q*T2LOba2@C)L delta 25 hcmaF1gXP%{mJQKUxlDBp%@hnQtPCtRr%q*T2LOcY2^RnW diff --git a/po/mcs/pt_BR.po.REMOVED.git-id b/po/mcs/pt_BR.po.REMOVED.git-id index 7980275e30..60cbe2dee6 100644 --- a/po/mcs/pt_BR.po.REMOVED.git-id +++ b/po/mcs/pt_BR.po.REMOVED.git-id @@ -1 +1 @@ -3ccfed5d6e97a3efeeca14f9044561a772a11c3e \ No newline at end of file +3603b593f56d2c34c6b87e1d2c6d7d646cd4fc68 \ No newline at end of file diff --git a/runtime/Makefile.am b/runtime/Makefile.am index d88454a1fa..9e29cb58e3 100644 --- a/runtime/Makefile.am +++ b/runtime/Makefile.am @@ -195,7 +195,7 @@ PLATFORM_PATH_SEPARATOR = : endif # assemblies which are excluded from testing in mcs-compileall below -VERIFY_TESTS_FILTER = System.Runtime.CompilerServices.Unsafe.dll +VERIFY_TESTS_FILTER = System.Runtime.CompilerServices.Unsafe.dll nunitlite.dll if HOST_WIN32 # Mono.WebBrowser.dll fails to verify on Windows diff --git a/runtime/Makefile.in b/runtime/Makefile.in index 8d51ce5f80..6c528cad0f 100644 --- a/runtime/Makefile.in +++ b/runtime/Makefile.in @@ -470,7 +470,8 @@ TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/ilasm $(tmpinst)/bin/csc # fails to verify with "VTable setup of type Xunit.NetCore.Extensions.SkippedTestCase failed", not sure why VERIFY_TESTS_FILTER = System.Runtime.CompilerServices.Unsafe.dll \ - $(am__append_17) Xunit.NetCore.Extensions.dll $(am__append_18) + nunitlite.dll $(am__append_17) Xunit.NetCore.Extensions.dll \ + $(am__append_18) CLEANFILES = etc/mono/config all: all-am diff --git a/samples/embed/teste.c b/samples/embed/teste.c index a3e1445aa4..9aa49f2df2 100644 --- a/samples/embed/teste.c +++ b/samples/embed/teste.c @@ -17,7 +17,7 @@ */ static MonoString* -gimme () { +gimme (void) { return mono_string_new (mono_domain_get (), "All your monos are belong to us!"); } diff --git a/support/signal.c b/support/signal.c index eb94a99241..3b843733d4 100644 --- a/support/signal.c +++ b/support/signal.c @@ -481,13 +481,6 @@ wait_for_any (signal_info** signals, int count, int *currfd, struct pollfd* fd_s // Poll until one of this signal_info's pipes is ready to read. // Once a second, stop to check if the VM is shutting down. do { - struct timeval tv; - struct timeval *ptv = NULL; - if (timeout != -1) { - tv.tv_sec = timeout / 1000; - tv.tv_usec = (timeout % 1000)*1000; - ptv = &tv; - } r = poll (fd_structs, count, timeout); } while (keep_trying (r) && !shutting_down ()); diff --git a/tools/locale-builder/Driver.cs b/tools/locale-builder/Driver.cs index ce6eee6680..736289da2a 100644 --- a/tools/locale-builder/Driver.cs +++ b/tools/locale-builder/Driver.cs @@ -295,7 +295,7 @@ namespace Mono.Tools.LocaleBuilder "es_US", "es_CU", "bs_Cyrl", "bs_Latn", "sr_Cyrl", "sr_Latn", "az_Cyrl", "zh", "nn", "bs", "az_Latn", "uz_Cyrl", "mn_Cyrl", "zh_Hant", "zh_CHT", "nb", "sr", "tg_Cyrl", "uz_Latn", "pa_Arab", "tzm_Latn", "ha_Latn", "hsb", "tk", "fy", "lb", "ug", "hsb_DE", "ms_MY", "kk_KZ", "ky_KG", "tk_TM", "mn_MN", "fy_NL", "lb_LU", "ug_CN", "gsw_FR", "ca_ES_valencia", - "dsb_DE", "se_SE", "ms_BN", "smn_FI", "en_MY", "smn", "dsb" + "dsb_DE", "se_SE", "ms_BN", "smn_FI", "en_MY", "smn", "dsb", "tt", "tt_RU" }; var lcdids = GetXmlDocument ("lcids.xml"); diff --git a/tools/pedump/pedump.c b/tools/pedump/pedump.c index 1c090caf18..f3cd18a684 100644 --- a/tools/pedump/pedump.c +++ b/tools/pedump/pedump.c @@ -660,7 +660,7 @@ pedump_assembly_search_hook (MonoAssemblyLoadContext *alc, MonoAssembly *request for (tmp = loaded_assemblies; tmp; tmp = tmp->next) { MonoAssembly *ass = (MonoAssembly *)tmp->data; - if (mono_assembly_names_equal (aname, &ass->aname)) + if (mono_assembly_check_name_match (aname, &ass->aname)) return ass; } return NULL;