Use lower-case names for Windows headers.
# We rely on signed overflow to behave
CFLAGS="$CFLAGS -fwrapv"
- # We rely on zero length arrays in structs
- CFLAGS="$CFLAGS -Wno-zero-length-array"
-
CFLAGS="$CFLAGS -DMONO_DLL_EXPORT"
if test x"$disable_visibility_hidden" = xno; then
# Don't export any symbols by default
# https://bugzilla.samba.org/show_bug.cgi?id=8118
WARN="$WARN -Qunused-arguments"
WARN="$WARN -Wno-unused-function -Wno-tautological-compare -Wno-parentheses-equality -Wno-self-assign -Wno-return-stack-address -Wno-constant-logical-operand"
+ # We rely on zero length arrays in structs
+ WARN="$WARN -Wno-zero-length-array"
fi
else
# The Sun Forte compiler complains about inline functions that access static variables
TEST_PROFILE=default
enable_llvm_default=no
-INVARIANT_AOT_OPTIONS=nimt-trampolines=900,ntrampolines=8000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=2800
+INVARIANT_AOT_OPTIONS=nimt-trampolines=2000,ntrampolines=8000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=4000
if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
DISABLE_MCS_DOCS_default=yes
AC_ARG_ENABLE(btls, [ --disable-btls Disable the BoringTls provider], enable_btls=$enableval, enable_btls=$BTLS_SUPPORTED)
AC_ARG_WITH(btls_android_ndk, [ --with-btls-android-ndk Android NDK for BoringTls])
+AC_ARG_ENABLE(dynamic-btls, [ --enable-dynamic-btls Place the BTLS provider into a separate shared library/archive.], enable_dynamic_btls=$enableval, enable_dynamic_btls=no)
+
AM_CONDITIONAL(BTLS, test x$enable_btls = xyes)
+AM_CONDITIONAL(DYNAMIC_BTLS, test x$enable_dynamic_btls = xyes)
btls_android=no
if test "x$enable_btls" = "xyes"; then
AC_SUBST(BTLS_CMAKE_ARGS)
AC_DEFINE(HAVE_BTLS, 1, [BoringTls is supported])
+
+ if test "x$enable_dynamic_btls" = "xyes"; then
+ AC_DEFINE(HAVE_DYNAMIC_BTLS, 1, [BTLS in a shared libraty])
+ fi
else
enable_btls=no
fi
echo "AOT_BUILD_FLAGS=$AOT_BUILD_FLAGS" >> $srcdir/$mcsdir/build/config.make
fi
+ if test "x$enable_btls" = "xyes"; then
+ echo "HAVE_BTLS=1" >> $srcdir/$mcsdir/build/config.make
+ if test "x$enable_dynamic_btls" = "xyes"; then
+ echo "HAVE_DYNAMIC_BTLS=1" >> $srcdir/$mcsdir/build/config.make
+ fi
+ fi
+
fi
)
<dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
<dllmap dll="db2cli" target="libdb2_36@libsuffix@" os="!windows"/>
<dllmap dll="MonoPosixHelper" target="$mono_libdir/libMonoPosixHelper@libsuffix@" os="!windows" />
+ <dllmap dll="libmono-btls-shared" target="$mono_libdir/libmono-btls-shared@libsuffix@" os="!windows" />
<dllmap dll="i:msvcrt" target="@LIBC@" os="!windows"/>
<dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
<dllmap dll="sqlite" target="@SQLITE@" os="!windows"/>
-Subproject commit 9ad688f0ae679b32e9c0a9b21bb63a4488c28b6b
+Subproject commit 432738a3c938b4f751307301c6aa07f2027a8864
.PP
.B caspol [options] [policy level] [actions] [parameters] ...
.SH DESCRIPTION
-This tools allow to list and modify the different policy levels (user,
+This tool allows to list and modify the different policy levels (user,
machine and enterprise).
.SH OPTIONS
.TP
.TP
.I -f[orce]
Caspol.exe is a managed tool. Changing the security policies could affect
-it's ability to work properly. This option permit changes that could
+it's ability to work properly. This option permits changes that could
disallow caspol.exe from working properly.
.TP
.I -? | /? | -h[elp]
.TP
.I -af | -addfulltrust assemblyname
Add the specified assembly to the fully trusted assembly list in the
-policy level. If a policy use some custom security permissions then the
+policy level. If a policy uses some custom security permissions then the
assembly containing the custom permissions must be in the fully trusted
list. Note that this requirement is recursive (all assemblies required
by the specified assembly must also be in the list). The assembly must be
will deserialize the XML policy must be in a fully trusted assembly.
.TP
.I -hash algo [-hex hash | -file assemblyname]
-This condition specify a specific hash that an assembly must generate
+This condition specifies a specific hash that an assembly must generate
(from itself) to be satisfied. Any change to the assembly will require the
policy to be updated (as the hash value will have changed).
.TP
.I -pub [-cert certificate | -file signedfile | -hex rawdata]
-This condition specify a X.509 Authenticode(r) certificate that must have
+This condition specifies a X.509 Authenticode(r) certificate that must have
signed an assembly in order to be satisfied. The certificate can be referenced
as a file (binary DER), a signed file (containing the certificate) or with
the hexadecimal value of the certificate. Note that files outside the
policy must also be protected against tempering.
.TP
.I -strong -file filename [name | -noname] [version | -noversion]
-This condition specify a specific StrongName that must have signed an
+This condition specifies a specific StrongName that must have signed an
assembly to be satisfied. Use -noname if the assembly name isn't known
(or important) and -version if the version isn't known (or important) in
the resolution.
.TP
.I -site hostname
-This condition specify the site from where the assembly must come from to
+This condition specifies the site from where the assembly must come from to
be satisfied.
.TP
.I -url URL
-This condition specify the URL from where the assembly must come from to
+This condition specifies the URL from where the assembly must come from to
be satisfied.
.TP
.I -zone zonename
-This condition specify the zone from where the assembly must come from to
+This condition specifies the zone from where the assembly must come from to
be satisfied. Existing zones are MyComputer, Internet, Intranet, Trusted
and Untrusted.
.TP
This will list all machine level code groups, then remove the code group
labeled 1.6, list again all code groups (missing 1.6), reset the policy
-and finally showing all code groups (where 1.6 is back).
+and finally show all code groups (where 1.6 is back).
.SH KNOWN ISSUES
.TP
.PP
.B cccheck --assembly=<assembly> [options]
.SH DESCRIPTION
-Perform static code contracts verification to find bugs and inconsistences
+Perform static code contracts verification to find bugs and inconsistencies
between code and specification. This includes non-null, integer analyses.
.PP
The assembly must have been built with the symbol CONTRACTS_FULL defined,
.\"
.\" ccrewrite manual page.
-.\" Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+.\" Copyright (C) 2010 Chris Bacon.
.\" Author:
.\" Chris Bacon <chrisbacon76@gmail.com>
.\"
.TP
.I "--assembly <assembly-name>"
The assembly to rewrite. If no --output option is specified, then this file
-overwritten with the rewritten version.
+is overwritten with the rewritten version.
.TP
.I "--debug"
Use debug information if available to improve the usefulness of contract
Show help for ccrewrite, listing configuration options.
.TP
.I "--level <level> (default=4)"
-Set the which contract types are present in rewritten assembly:
+Set which contract types are present in rewritten assembly:
0 = No contracts;
1 = Release requires;
2 = Requires;
or
.B certmgr -ssl [options] url
.SH DESCRIPTION
-This tool allow to list, add, remove or extract certificates, certificate
+This tool allows to list, add, remove or extract certificates, certificate
revocation lists (CRL) or certificate trust lists (CTL) to/from a
certificate store. Certificate stores are used to build and validate
certificate chains for Authenticode(r) code signing validation and SSL
.SH STORES
The
.I store
-represents the certificate store to use. It can be one of the
+represents the certificate store to use. It can be one of the
following:
.TP
.I "My"
List the certificates, CTL or CTL in the specified store.
.TP
.I "-add"
-Add a certificate, CRL or CTL to specified store. If filename it's a pkcs12
+Add a certificate, CRL or CTL to specified store. If filename is a pkcs12
or pfx file, and it contains a private key, it will be imported to local key
pair container.
.TP
Download and add the certificates from a SSL session. You'll be asked to
confirm the addition of every certificate received from the server. Note
that SSL/TLS protocols do not requires a server to send the root certificate.
-This action assume an certificate (-c) object type and will import the
+This action assumes a certificate (-c) object type and will import the
certificates in appropriate stores (i.e. server certificate in the
-OtherPeople store, the root certificate in the Trust store, any other
+OtherPeople store, the root certificate in the Trust store and any other
intermediate certificates in the IntermediateCA store).
.TP
.I "-importKey"
Allows importing a private key from a pkcs12 file into a local key pair
-store. (Usefull when you already have the key's corresponding certificate
+store. (Useful when you already have the key's corresponding certificate
installed at the specific store.)
.SH OBJECT TYPES
.TP
.I "-c", "-cert", "-certificate"
-Add, Delete or Put certificates. That is the specified file must/will contains
+Add, Delete or Put certificates. That is the specified file must/will contain
X.509 certificates in DER binary encoding.
.TP
.I "-crl"
Add, Delete or Put certificate revocation lists (CRL). That is the specified
-file must/will contains X.509 CRL in DER binary encoding.
+file must/will contain X.509 CRL in DER binary encoding.
.TP
.I "-ctl"
Add, Delete or Put certificate trust lists (CRL). UNSUPPORTED.
More details displayed on the console.
.TP
.I "-p password"
-Use the specify password when accessing a pkcs12 file.
+Use the specified password when accessing a pkcs12 file.
.TP
.I "-help", "-h", "-?", "/?"
Display help about this tool.
.TP
Certificates files are kept in DER (binary) format (extension .cer).
.TP
-The filenames either starts with
+The filenames either start with
.I tbp
(thumbprint) or
.I ski
.B mono crlupdate.exe -f -m
Force the download of every CRL associated with certificates present in
the machine store. Note that the user running this needs read/write
-access to the machine store or not update will occur.
+access to the machine store or update will not occur.
.SH AUTHOR
Written by Sebastien Pouliot
.PP
The command set is similar to many other applications (cursor keys)
and incorporates some of the Emacs commands for editing as well as a
-history mechanism to
+history mechanism too.
.PP
.PP
The following keyboard input is supported:
.TP
.I Down Arrow Key, Control-n
Moves forward in the history, replaces the current line with the next
-lien in the history.
+line in the history.
.TP
.I Return
Executes the current line if the statement or expression is complete,
The following options are available:
.TP
.I "-nologo"
-Supress the startup logo.
+Suppress the startup logo.
.TP
.I "-nosave"
Do not save the discovered documents to disk. The default is to save the documents.
.I \-\-parse
Used for benchmarking. The compiler will only parse its input files.
.TP
+.I \-pathmap:K=V[,Kn=Vn]
+Sets a mapping for source path names used in generated output.
+.TP
.I \-pkg:package1[,packageN]
Reference assemblies for the given packages.
.Sp
There are two modes of operation, one uses an existing Mono binary or
a server-hosted list of binaries and is enabled when you use either
the
-.B --cross
+.B --cross,
+.B --sdk
or the
.B --runtime
command line options.
When passed, DIR will be set for the MONO_CFG_DIR environment variable
.TP
.I "--cross target"
-Creates a bundle for the specified target platform. The target
-must be a directory in ~/.mono/targets/ that contains a "mono"
-binary. You can fetch various targets using the --fetch-target
-command line option.
+Use this to request mkbundle generate a cross-compiled binary. It
+Creates a bundle for the specified target platform. The target must
+be a directory in ~/.mono/targets/ that contains an SDK installation
+as produced by the mono-package-runtime tool. You can get a list of
+the precompiled versions of the runtime using --list-targets and you
+can fetch a specific target using the --fetch-target command line
+option.
+.Sp
+This flag is mutually exclusive with
+.I --sdk
+which is used to specify an absolute path to resolve the Mono runtime
+from and the --runtime option which is used to manually construct the
+cross-platform package.
.TP
.I "--deps"
This option will bundle all of the referenced assemblies for the
Additionally, users of your binary can still configure their own
options by setting the
.I MONO_ENV_OPTIONS
-environment variable.
+environment variable.
+.TP
+.I "--sdk SDK_PATH"
+Use this flag to specify a path from which mkbundle will resolve the
+Mono SDK from. The SDK path should be the prefix path that you used
+to configure a Mono installation. And would typically contain files
+lik
+.I SDK_PATH/bin/mono
+,
+.I SDK_PATH/lib/mono/4.5
+and so on.
+.Sp
+When this flag is specified,
+.I mkbundle
+will resolve the runtime, the framework libraries, unmanaged resources
+and configuration files from the files located in this directory.
+.Sp
+This flag is mutually exlusive with
+.I --cross
+.
.TP
.I "--target-server SERVER"
By default the mkbundle tool will download from a Mono server the
makefrag = $(depsdir)/$(PROFILE)_$(base_prog).makefrag
+ifndef NO_BUILD
all-local: $(the_lib) $(PROGRAM_config)
+endif
install-local: all-local
test-local: all-local
NO_INSTALL = yes
MOBILE_STATIC = yes
MOBILE_PROFILE = yes
+
+PROFILE_DISABLE_BTLS=1
+++ /dev/null
-//
-// EventCounter.cs
-//
-// Authors:
-// Marek Safar <marek.safar@gmail.com>
-//
-// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Diagnostics.Tracing
-{
- public class EventCounter
- {
- public EventCounter (string name, EventSource eventSource)
- {
- }
-
- public void WriteMetric (float value)
- {
- }
- }
-}
\ No newline at end of file
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
<ItemGroup>\r
<Compile Include="AssemblyInfo.cs" />\r
- <Compile Include="EventCounter.cs" />\r
<Compile Include="TypeForwarders.cs" />\r </ItemGroup>\r
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
Other similar extension points exist, see Microsoft.Common.targets.\r
TypeForwarders.cs
AssemblyInfo.cs
-EventCounter.cs
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventTask))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventWrittenEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.NonEventAttribute))]
+
+#if NETSTANDARD
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventCounter))]
+#endif
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
<ItemGroup>\r
<Compile Include="AssemblyInfo.cs" />\r
- <Compile Include="SocketReceiveFromResult.cs" />\r
- <Compile Include="SocketReceiveMessageFromResult.cs" />\r
- <Compile Include="SocketTaskExtensions.cs" />\r
<Compile Include="TypeForwarders.cs" />\r </ItemGroup>\r
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
Other similar extension points exist, see Microsoft.Common.targets.\r
+++ /dev/null
-//
-// SocketReceiveFromResult.cs
-//
-// Authors:
-// Marek Safar <marek.safar@gmail.com>
-//
-// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Net.Sockets
-{
- public struct SocketReceiveFromResult
- {
- public int ReceivedBytes;
- public EndPoint RemoteEndPoint;
- }
-}
\ No newline at end of file
+++ /dev/null
-//
-// SocketReceiveMessageFromResult.cs
-//
-// Authors:
-// Marek Safar <marek.safar@gmail.com>
-//
-// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Net.Sockets
-{
- public struct SocketReceiveMessageFromResult
- {
- public int ReceivedBytes;
- public SocketFlags SocketFlags;
- public EndPoint RemoteEndPoint;
- public IPPacketInformation PacketInformation;
- }
-}
\ No newline at end of file
+++ /dev/null
-// 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.Threading.Tasks;
-
-namespace System.Net.Sockets
-{
- public static class SocketTaskExtensions
- {
- public static Task<Socket> AcceptAsync(this Socket socket)
- {
- return Task<Socket>.Factory.FromAsync(
- (callback, state) => ((Socket)state).BeginAccept(callback, state),
- asyncResult => ((Socket)asyncResult.AsyncState).EndAccept(asyncResult),
- state: socket);
- }
-
- public static Task<Socket> AcceptAsync(this Socket socket, Socket acceptSocket)
- {
- const int ReceiveSize = 0;
- return Task<Socket>.Factory.FromAsync(
- (socketForAccept, receiveSize, callback, state) => ((Socket)state).BeginAccept(socketForAccept, receiveSize, callback, state),
- asyncResult => ((Socket)asyncResult.AsyncState).EndAccept(asyncResult),
- acceptSocket,
- ReceiveSize,
- state: socket);
- }
-
- public static Task ConnectAsync(this Socket socket, EndPoint remoteEP)
- {
- return Task.Factory.FromAsync(
- (targetEndPoint, callback, state) => ((Socket)state).BeginConnect(targetEndPoint, callback, state),
- asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
- remoteEP,
- state: socket);
- }
-
- public static Task ConnectAsync(this Socket socket, IPAddress address, int port)
- {
- return Task.Factory.FromAsync(
- (targetAddress, targetPort, callback, state) => ((Socket)state).BeginConnect(targetAddress, targetPort, callback, state),
- asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
- address,
- port,
- state: socket);
- }
-
- public static Task ConnectAsync(this Socket socket, IPAddress[] addresses, int port)
- {
- return Task.Factory.FromAsync(
- (targetAddresses, targetPort, callback, state) => ((Socket)state).BeginConnect(targetAddresses, targetPort, callback, state),
- asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
- addresses,
- port,
- state: socket);
- }
-
- public static Task ConnectAsync(this Socket socket, string host, int port)
- {
- return Task.Factory.FromAsync(
- (targetHost, targetPort, callback, state) => ((Socket)state).BeginConnect(targetHost, targetPort, callback, state),
- asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
- host,
- port,
- state: socket);
- }
-
- public static Task<int> ReceiveAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags)
- {
- return Task<int>.Factory.FromAsync(
- (targetBuffer, flags, callback, state) => ((Socket)state).BeginReceive(
- targetBuffer.Array,
- targetBuffer.Offset,
- targetBuffer.Count,
- flags,
- callback,
- state),
- asyncResult => ((Socket)asyncResult.AsyncState).EndReceive(asyncResult),
- buffer,
- socketFlags,
- state: socket);
- }
-
- public static Task<int> ReceiveAsync(
- this Socket socket,
- IList<ArraySegment<byte>> buffers,
- SocketFlags socketFlags)
- {
- return Task<int>.Factory.FromAsync(
- (targetBuffers, flags, callback, state) => ((Socket)state).BeginReceive(targetBuffers, flags, callback, state),
- asyncResult => ((Socket)asyncResult.AsyncState).EndReceive(asyncResult),
- buffers,
- socketFlags,
- state: socket);
- }
-
- public static Task<SocketReceiveFromResult> ReceiveFromAsync(
- this Socket socket,
- ArraySegment<byte> buffer,
- SocketFlags socketFlags,
- EndPoint remoteEndPoint)
- {
- object[] packedArguments = new object[] { socket, remoteEndPoint };
-
- return Task<SocketReceiveFromResult>.Factory.FromAsync(
- (targetBuffer, flags, callback, state) =>
- {
- var arguments = (object[])state;
- var s = (Socket)arguments[0];
- var e = (EndPoint)arguments[1];
-
- IAsyncResult result = s.BeginReceiveFrom(
- targetBuffer.Array,
- targetBuffer.Offset,
- targetBuffer.Count,
- flags,
- ref e,
- callback,
- state);
-
- arguments[1] = e;
- return result;
- },
- asyncResult =>
- {
- var arguments = (object[])asyncResult.AsyncState;
- var s = (Socket)arguments[0];
- var e = (EndPoint)arguments[1];
-
- int bytesReceived = s.EndReceiveFrom(asyncResult, ref e);
-
- return new SocketReceiveFromResult()
- {
- ReceivedBytes = bytesReceived,
- RemoteEndPoint = e
- };
- },
- buffer,
- socketFlags,
- state: packedArguments);
- }
-
- public static Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(
- this Socket socket,
- ArraySegment<byte> buffer,
- SocketFlags socketFlags,
- EndPoint remoteEndPoint)
- {
- object[] packedArguments = new object[] { socket, socketFlags, remoteEndPoint };
-
- return Task<SocketReceiveMessageFromResult>.Factory.FromAsync(
- (targetBuffer, callback, state) =>
- {
- var arguments = (object[])state;
- var s = (Socket)arguments[0];
- var f = (SocketFlags)arguments[1];
- var e = (EndPoint)arguments[2];
-
- IAsyncResult result = s.BeginReceiveMessageFrom(
- targetBuffer.Array,
- targetBuffer.Offset,
- targetBuffer.Count,
- f,
- ref e,
- callback,
- state);
-
- arguments[2] = e;
- return result;
- },
- asyncResult =>
- {
- var arguments = (object[])asyncResult.AsyncState;
- var s = (Socket)arguments[0];
- var f = (SocketFlags)arguments[1];
- var e = (EndPoint)arguments[2];
- IPPacketInformation ipPacket;
-
- int bytesReceived = s.EndReceiveMessageFrom(
- asyncResult,
- ref f,
- ref e,
- out ipPacket);
-
- return new SocketReceiveMessageFromResult()
- {
- PacketInformation = ipPacket,
- ReceivedBytes = bytesReceived,
- RemoteEndPoint = e,
- SocketFlags = f
- };
- },
- buffer,
- state: packedArguments);
- }
-
- public static Task<int> SendAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags)
- {
- return Task<int>.Factory.FromAsync(
- (targetBuffer, flags, callback, state) => ((Socket)state).BeginSend(
- targetBuffer.Array,
- targetBuffer.Offset,
- targetBuffer.Count,
- flags,
- callback,
- state),
- asyncResult => ((Socket)asyncResult.AsyncState).EndSend(asyncResult),
- buffer,
- socketFlags,
- state: socket);
- }
-
- public static Task<int> SendAsync(
- this Socket socket,
- IList<ArraySegment<byte>> buffers,
- SocketFlags socketFlags)
- {
- return Task<int>.Factory.FromAsync(
- (targetBuffers, flags, callback, state) => ((Socket)state).BeginSend(targetBuffers, flags, callback, state),
- asyncResult => ((Socket)asyncResult.AsyncState).EndSend(asyncResult),
- buffers,
- socketFlags,
- state: socket);
- }
-
- public static Task<int> SendToAsync(
- this Socket socket,
- ArraySegment<byte> buffer,
- SocketFlags socketFlags,
- EndPoint remoteEP)
- {
- return Task<int>.Factory.FromAsync(
- (targetBuffer, flags, endPoint, callback, state) => ((Socket)state).BeginSendTo(
- targetBuffer.Array,
- targetBuffer.Offset,
- targetBuffer.Count,
- flags,
- endPoint,
- callback,
- state),
- asyncResult => ((Socket)asyncResult.AsyncState).EndSendTo(asyncResult),
- buffer,
- socketFlags,
- remoteEP,
- state: socket);
- }
- }
-}
\ No newline at end of file
TypeForwarders.cs
AssemblyInfo.cs
-SocketReceiveFromResult.cs
-SocketReceiveMessageFromResult.cs
-SocketTaskExtensions.cs
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.UdpClient))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.UdpReceiveResult))]
-
+#if NETSTANDARD
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketReceiveFromResult))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketReceiveMessageFromResult))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketTaskExtensions))]
+#endif
LIB_REFS = System Mono.Security
LIB_MCS_FLAGS = -unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign -d:SECURITY_DEP
+ifndef HAVE_BTLS
+NO_INSTALL = yes
+NO_SIGN_ASSEMBLY = yes
+NO_TEST = yes
+NO_BUILD = yes
+endif
+
include ../../build/library.make
$(the_lib): ../Mono.Security/Makefile
byte[] hash;
bool creating;
bool auto_generated;
+ readonly string sourceFile;
public static int Size {
get { return 8; }
creating = true;
}
- public SourceFileEntry (MonoSymbolFile file, string file_name, byte[] guid, byte[] checksum)
- : this (file, file_name)
+ public SourceFileEntry (MonoSymbolFile file, string sourceFile, byte [] guid, byte [] checksum)
+ : this (file, sourceFile, sourceFile, guid, checksum)
+ {
+ }
+
+ public SourceFileEntry (MonoSymbolFile file, string fileName, string sourceFile, byte[] guid, byte[] checksum)
+ : this (file, fileName)
{
this.guid = guid;
this.hash = checksum;
+ this.sourceFile = sourceFile;
}
public byte[] Checksum {
if (hash == null) {
try {
- using (FileStream fs = new FileStream (file_name, FileMode.Open, FileAccess.Read)) {
+ using (FileStream fs = new FileStream (sourceFile, FileMode.Open, FileAccess.Read)) {
MD5 md5 = MD5.Create ();
hash = md5.ComputeHash (fs);
}
int old_pos = (int) reader.BaseStream.Position;
reader.BaseStream.Position = DataOffset;
- file_name = reader.ReadString ();
+ sourceFile = file_name = reader.ReadString ();
guid = reader.ReadBytes (16);
hash = reader.ReadBytes (16);
auto_generated = reader.ReadByte () == 1;
public bool CheckChecksum ()
{
try {
- using (FileStream fs = new FileStream (file_name, FileMode.Open)) {
+ using (FileStream fs = new FileStream (sourceFile, FileMode.Open)) {
MD5 md5 = MD5.Create ();
byte[] data = md5.ComputeHash (fs);
for (int i = 0; i < 16; i++)
private void GetClientCertificate ()
{
-#warning "Client certificate selection is unfinished"
+// TODO: Client certificate selection is unfinished
ClientContext context = (ClientContext)this.Context;
// note: the server may ask for mutual authentication
// Check server prf against client prf
if (!Compare (clientHash, serverHash))
{
-#warning Review that selected alert is correct
+// TODO: Review that selected alert is correct
throw new TlsException(AlertDescription.InsuficientSecurity, "Invalid ServerFinished message received.");
}
}
protected override bool ReleaseHandle ()
{
- try {
- Marshal.FreeHGlobal (handle);
- return true;
- } catch (ArgumentException) {
- return false;
- }
+ MonoIOError error;
+ return MonoIO.Close (handle, out error);
}
}
}
<Compile Include="System.Security.Cryptography\ECCurve.cs" />\r
<Compile Include="System.Security.Cryptography\ECParameters.cs" />\r
<Compile Include="System.Security.Cryptography\ECPoint.cs" />\r
- <Compile Include="System.Security.Cryptography\IncrementalHash.cs" />\r
<Compile Include="System.Security.Cryptography\MD5Cng.cs" />\r
<Compile Include="System.Security.Cryptography\SHA1Cng.cs" />\r
<Compile Include="System.Security.Cryptography\SHA256Cng.cs" />\r
<Compile Include="System.Security.Cryptography\ECCurve.cs" />\r
<Compile Include="System.Security.Cryptography\ECParameters.cs" />\r
<Compile Include="System.Security.Cryptography\ECPoint.cs" />\r
- <Compile Include="System.Security.Cryptography\IncrementalHash.cs" />\r
<Compile Include="System.Security.Cryptography\MD5Cng.cs" />\r
<Compile Include="System.Security.Cryptography\SHA1Cng.cs" />\r
<Compile Include="System.Security.Cryptography\SHA256Cng.cs" />\r
+++ /dev/null
-//
-// IncrementalHash.cs
-//
-// Authors:
-// Marek Safar <marek.safar@gmail.com>
-//
-// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#if NETSTANDARD
-
-namespace System.Security.Cryptography
-{
- public sealed class IncrementalHash : IDisposable
- {
- private IncrementalHash () { }
- public HashAlgorithmName AlgorithmName { get { throw new NotImplementedException (); } }
- public void AppendData (byte[] data) { }
- public void AppendData (byte[] data, int offset, int count) { }
- public static IncrementalHash CreateHash (HashAlgorithmName hashAlgorithm) { throw new NotImplementedException (); }
- public static IncrementalHash CreateHMAC (HashAlgorithmName hashAlgorithm, byte[] key) { throw new NotImplementedException (); }
- public void Dispose () { }
- public byte[] GetHashAndReset () { throw new NotImplementedException (); }
- }
-}
-
-#endif
\ No newline at end of file
System.Security.Cryptography/ECCurve.cs
System.Security.Cryptography/ECPoint.cs
System.Security.Cryptography/ECParameters.cs
-System.Security.Cryptography/IncrementalHash.cs
TEST_MCS_FLAGS += -d:MONO_FEATURE_PROCESS_START
endif
-LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 $(REFERENCE_SOURCES_FLAGS) -unsafe $(RESOURCE_FILES:%=-resource:%)
+LIB_MCS_FLAGS = -d:CONFIGURATION_2_0 $(REFERENCE_SOURCES_FLAGS) -unsafe $(RESOURCE_FILES:%=-resource:%)
+
+ifndef PROFILE_DISABLE_BTLS
+ifdef HAVE_BTLS
+
+LIB_MCS_FLAGS += -d:MONO_FEATURE_BTLS
+
+ifdef HAVE_DYNAMIC_BTLS
+LIB_MCS_FLAGS += -d:MONO_FEATURE_DYNAMIC_BTLS
+endif
+
+endif
+endif
ifndef NO_THREAD_ABORT
REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_THREAD_ABORT
# MOBILE_PROFILE needs SECURITY_DEP
#
ifdef MOBILE_PROFILE
-LIB_MCS_FLAGS += -d:INSIDE_SYSTEM -d:SECURITY_DEP
+LIB_MCS_FLAGS += -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635
else
EXTERN_ALIAS_FLAGS = -d:MONO_SECURITY_ALIAS
endif
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Text;
return MonoBtlsBioMono.CreateStream (stream, false);
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_bio_read (IntPtr bio, IntPtr data, int len);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_bio_write (IntPtr bio, IntPtr data, int len);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_bio_flush (IntPtr bio);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_bio_indent (IntPtr bio, uint indent, uint max_indent);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_bio_hexdump (IntPtr bio, IntPtr data, int len, uint indent);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_bio_print_errors (IntPtr bio);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_bio_free (IntPtr handle);
public int Read (byte[] buffer, int offset, int size)
class MonoBtlsBioMemory : MonoBtlsBio
{
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_bio_mem_new ();
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_bio_mem_get_data (IntPtr handle, out IntPtr data);
public MonoBtlsBioMemory ()
delegate int BioWriteFunc (IntPtr bio, IntPtr data, int dataLength);
delegate long BioControlFunc (IntPtr bio, ControlCommand command, long arg);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_bio_mono_new ();
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_bio_mono_initialize (IntPtr handle, IntPtr instance, IntPtr readFunc, IntPtr writeFunc, IntPtr controlFunc);
long Control (ControlCommand command, long arg)
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
#if MONO_SECURITY_ALIAS
extern alias MonoSecurity;
#endif
}
}
- Exception GetException (MonoBtlsSslError status)
+ static Exception GetException (MonoBtlsSslError status)
{
var error = MonoBtlsError.GetError ();
- if (error == null)
- return new MonoBtlsException (status);
-
var text = MonoBtlsError.GetErrorString (error);
return new MonoBtlsException ("{0} {1}", status, text);
}
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-// #if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Text;
{
static class MonoBtlsError
{
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (MonoBtlsObject.BTLS_DYLIB)]
extern static int mono_btls_error_peek_error ();
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (MonoBtlsObject.BTLS_DYLIB)]
extern static int mono_btls_error_get_error ();
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (MonoBtlsObject.BTLS_DYLIB)]
extern static void mono_btls_error_clear_error ();
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (MonoBtlsObject.BTLS_DYLIB)]
extern static void mono_btls_error_get_error_string_n (int error, IntPtr buf, int len);
public static int PeekError ()
}
}
}
-// #endif
+#endif
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
namespace Mono.Btls
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Text;
}
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_key_free (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_key_up_ref (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_key_get_bytes (IntPtr handle, out IntPtr data, out int size, int include_private_bits);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_key_get_bits (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_key_is_rsa (IntPtr handle);
new internal BoringKeyHandle Handle {
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.Threading;
using System.Runtime.InteropServices;
{
abstract class MonoBtlsObject : IDisposable
{
+#if MONO_FEATURE_DYNAMIC_BTLS
+ internal const string BTLS_DYLIB = "libmono-btls-shared";
+#else
+ internal const string BTLS_DYLIB = "__Internal";
+#endif
+
internal MonoBtlsObject (MonoBtlsHandle handle)
{
this.handle = handle;
CheckError (ret == 1, callerName);
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_free (IntPtr data);
protected void FreeDataPtr (IntPtr data)
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Security.Cryptography.X509Certificates;
get { return (BoringPkcs12Handle)base.Handle; }
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_pkcs12_free (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_pkcs12_new ();
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_pkcs12_get_count (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_pkcs12_get_cert (IntPtr Handle, int index);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_pkcs12_add_cert (IntPtr chain, IntPtr x509);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern unsafe static int mono_btls_pkcs12_import (IntPtr chain, void* data, int len, IntPtr password);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_pkcs12_has_private_key (IntPtr pkcs12);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_pkcs12_get_private_key (IntPtr pkcs12);
internal MonoBtlsPkcs12 ()
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
#if MONO_SECURITY_ALIAS
extern alias MonoSecurity;
#endif
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Text;
}
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_ssl_destroy (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_ssl_new (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_use_certificate (IntPtr handle, IntPtr x509);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_use_private_key (IntPtr handle, IntPtr key);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_add_chain_certificate (IntPtr handle, IntPtr x509);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_accept (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_connect (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_handshake (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_ssl_close (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_ssl_set_bio (IntPtr handle, IntPtr bio);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_read (IntPtr handle, IntPtr data, int len);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_write (IntPtr handle, IntPtr data, int len);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_get_error (IntPtr handle, int ret_code);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_get_version (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_ssl_set_min_version (IntPtr handle, int version);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_ssl_set_max_version (IntPtr handle, int version);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_get_cipher (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_get_ciphers (IntPtr handle, out IntPtr data);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_ssl_get_peer_certificate (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_set_cipher_list (IntPtr handle, IntPtr str);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_ssl_print_errors_cb (IntPtr func, IntPtr ctx);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_set_verify_param (IntPtr handle, IntPtr param);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_set_server_name (IntPtr handle, IntPtr name);
static BoringSslHandle Create_internal (MonoBtlsSslCtx ctx)
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
get { return (BoringSslCtxHandle)base.Handle; }
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_ssl_ctx_new ();
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_ctx_free (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_ssl_ctx_up_ref (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_ssl_ctx_initialize (IntPtr handle, IntPtr instance);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_ssl_ctx_set_debug_bio (IntPtr handle, IntPtr bio);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_ssl_ctx_set_cert_verify_callback (IntPtr handle, IntPtr func, int cert_required);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_ssl_ctx_set_cert_select_callback (IntPtr handle, IntPtr func);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_ssl_ctx_set_min_version (IntPtr handle, int version);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_ssl_ctx_set_max_version (IntPtr handle, int version);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_ctx_is_cipher_supported (IntPtr handle, short value);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_ctx_set_ciphers (IntPtr handle, int count, IntPtr data, int allow_unsupported);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_ssl_ctx_set_verify_param (IntPtr handle, IntPtr param);
delegate int NativeVerifyFunc (IntPtr instance, int preverify_ok, IntPtr ctx);
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
namespace Mono.Btls
{
// keep in sync with boringssl/include/ssl.h
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
#if MONO_SECURITY_ALIAS
extern alias MonoSecurity;
#endif
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.Text;
using System.Security.Cryptography.X509Certificates;
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Text;
{
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_up_ref (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_from_data (IntPtr data, int len, MonoBtlsX509Format format);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_get_subject_name (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_get_issuer_name (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_get_subject_name_string (IntPtr handle, IntPtr buffer, int size);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_get_issuer_name_string (IntPtr handle, IntPtr buffer, int size);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_get_raw_data (IntPtr handle, IntPtr bio, MonoBtlsX509Format format);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_cmp (IntPtr a, IntPtr b);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_get_hash (IntPtr handle, out IntPtr data);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static long mono_btls_x509_get_not_before (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static long mono_btls_x509_get_not_after (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_get_public_key (IntPtr handle, IntPtr bio);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_get_serial_number (IntPtr handle, IntPtr data, int size, int mono_style);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_get_version (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_get_signature_algorithm (IntPtr handle, IntPtr buffer, int size);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_get_public_key_asn1 (IntPtr handle, IntPtr oid, int oid_size, out IntPtr data, out int size);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_get_public_key_parameters (IntPtr handle, IntPtr oid, int oid_size, out IntPtr data, out int size);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_get_pubkey (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_get_subject_key_identifier (IntPtr handle, out IntPtr data, out int size);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_print (IntPtr handle, IntPtr bio);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_x509_free (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_dup (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_add_trust_object (IntPtr handle, MonoBtlsX509Purpose purpose);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_add_reject_object (IntPtr handle, MonoBtlsX509Purpose purpose);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_add_explicit_trust (IntPtr handle, MonoBtlsX509TrustKind kind);
internal MonoBtlsX509 Copy ()
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Security.Cryptography.X509Certificates;
get { return (BoringX509ChainHandle)base.Handle; }
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_chain_new ();
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_chain_get_count (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_chain_get_cert (IntPtr Handle, int index);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_chain_add_cert (IntPtr chain, IntPtr x509);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_chain_up_ref (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_x509_chain_free (IntPtr handle);
public MonoBtlsX509Chain ()
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Text;
{
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_crl_ref (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_crl_from_data (IntPtr data, int len, MonoBtlsX509Format format);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_crl_get_by_cert (IntPtr handle, IntPtr x509);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
unsafe extern static IntPtr mono_btls_x509_crl_get_by_serial (IntPtr handle, void *serial, int len);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_crl_get_revoked_count (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_crl_get_revoked (IntPtr handle, int index);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static long mono_btls_x509_crl_get_last_update (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static long mono_btls_x509_crl_get_next_update (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static long mono_btls_x509_crl_get_version (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_crl_get_issuer (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_x509_crl_free (IntPtr handle);
public static MonoBtlsX509Crl LoadFromData (byte[] buffer, MonoBtlsX509Format format)
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
namespace Mono.Btls
{
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
namespace Mono.Btls
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
namespace Mono.Btls
{
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
namespace Mono.Btls
{
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Runtime.InteropServices;
get { return (BoringX509LookupHandle)base.Handle; }
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_lookup_new (IntPtr store, MonoBtlsX509LookupType type);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_lookup_load_file (IntPtr handle, IntPtr file, MonoBtlsX509FileType type);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_lookup_add_dir (IntPtr handle, IntPtr dir, MonoBtlsX509FileType type);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_lookup_add_mono (IntPtr handle, IntPtr monoLookup);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_x509_lookup_method_mono_init (
IntPtr handle, IntPtr instance, IntPtr by_subject_func);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_lookup_init (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_lookup_shutdown (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_lookup_by_subject (IntPtr handle, IntPtr name);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_lookup_by_fingerprint (IntPtr handle, IntPtr bytes, int len);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_x509_lookup_free (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_lookup_peek_lookup (IntPtr handle);
MonoBtlsX509LookupType type;
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP && MONODROID
+#if SECURITY_DEP && MONO_FEATURE_BTLS && MONODROID
using System;
using System.IO;
using System.Runtime.InteropServices;
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Runtime.InteropServices;
get { return (BoringX509LookupMonoHandle)base.Handle; }
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_lookup_mono_new ();
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_x509_lookup_mono_init (
IntPtr handle, IntPtr instance, IntPtr by_subject_func);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_lookup_mono_free (IntPtr handle);
delegate int BySubjectFunc (IntPtr instance, IntPtr name, out IntPtr x509_ptr);
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Runtime.InteropServices;
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
namespace Mono.Btls
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Text;
}
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_name_print_bio (IntPtr handle, IntPtr bio);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_name_print_string (IntPtr handle, IntPtr buffer, int size);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_name_get_raw_data (IntPtr handle, out IntPtr buffer, int use_canon_enc);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static long mono_btls_x509_name_hash (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static long mono_btls_x509_name_hash_old (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_name_get_entry_count (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static MonoBtlsX509NameEntryType mono_btls_x509_name_get_entry_type (IntPtr name, int index);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_name_get_entry_oid (IntPtr name, int index, IntPtr buffer, int size);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_name_get_entry_oid_data (IntPtr name, int index, out IntPtr data);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_name_get_entry_value (IntPtr name, int index, out int tag, out IntPtr str);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern unsafe static IntPtr mono_btls_x509_name_from_data (void* data, int len, int use_canon_enc);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_x509_name_free (IntPtr handle);
new internal BoringX509NameHandle Handle {
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
namespace Mono.Btls
{
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Text;
}
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_name_list_new ();
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_name_list_get_count (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_name_list_add (IntPtr handle, IntPtr name);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_name_list_get_item (IntPtr handle, int index);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_x509_name_list_free (IntPtr handle);
new internal BoringX509NameListHandle Handle {
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
namespace Mono.Btls
{
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Text;
{
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_revoked_get_serial_number (IntPtr handle, IntPtr data, int size);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static long mono_btls_x509_revoked_get_revocation_date (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_revoked_get_reason (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_revoked_get_sequence (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_x509_revoked_free (IntPtr handle);
public byte[] GetSerialNumber ()
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Collections.Generic;
get { return (BoringX509StoreHandle)base.Handle; }
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_store_new ();
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_store_from_ctx (IntPtr ctx);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_store_from_ssl_ctx (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_store_load_locations (IntPtr handle, IntPtr file, IntPtr path);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_store_set_default_paths (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_store_add_cert (IntPtr handle, IntPtr x509);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_store_get_count (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_x509_store_free (IntPtr handle);
Dictionary<IntPtr,MonoBtlsX509Lookup> lookupHash;
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Runtime.InteropServices;
get { return (BoringX509StoreCtxHandle)base.Handle; }
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_store_ctx_new ();
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_store_ctx_from_ptr (IntPtr ctx);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static MonoBtlsX509Error mono_btls_x509_store_ctx_get_error (IntPtr handle, out IntPtr error_string);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_store_ctx_get_error_depth (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_store_ctx_get_chain (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_store_ctx_init (IntPtr handle, IntPtr store, IntPtr chain);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_store_ctx_set_param (IntPtr handle, IntPtr param);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_store_ctx_verify_cert (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_store_ctx_get_by_subject (IntPtr handle, IntPtr name);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_store_ctx_get_current_cert (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_store_ctx_get_current_issuer (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_store_ctx_get_verify_param (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_store_ctx_get_untrusted (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_store_ctx_up_ref (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_x509_store_ctx_free (IntPtr handle);
internal MonoBtlsX509StoreCtx ()
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
#if MONO_SECURITY_ALIAS
extern alias MonoSecurity;
#endif
static class MonoBtlsX509StoreManager
{
static bool initialized;
+#if !ANDROID
static string machineTrustedRootPath;
static string machineIntermediateCAPath;
static string machineUntrustedPath;
static string userTrustedRootPath;
static string userIntermediateCAPath;
static string userUntrustedPath;
+#endif
static void Initialize ()
{
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
namespace Mono.Btls
{
enum MonoBtlsX509StoreType
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
namespace Mono.Btls
{
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
namespace Mono.Btls
{
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.IO;
using System.Runtime.InteropServices;
get { return (BoringX509VerifyParamHandle)base.Handle; }
}
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_verify_param_new ();
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_verify_param_copy (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_verify_param_lookup (IntPtr name);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_verify_param_can_modify (IntPtr param);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_verify_param_set_name (IntPtr handle, IntPtr name);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_verify_param_set_host (IntPtr handle, IntPtr name, int namelen);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_verify_param_add_host (IntPtr handle, IntPtr name, int namelen);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static ulong mono_btls_x509_verify_param_get_flags (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_verify_param_set_flags (IntPtr handle, ulong flags);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static MonoBtlsX509VerifyFlags mono_btls_x509_verify_param_get_mono_flags (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_verify_param_set_mono_flags (IntPtr handle, MonoBtlsX509VerifyFlags flags);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_verify_param_set_purpose (IntPtr handle, MonoBtlsX509Purpose purpose);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_verify_param_get_depth (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_verify_param_set_depth (IntPtr handle, int depth);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_verify_param_set_time (IntPtr handle, long time);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static IntPtr mono_btls_x509_verify_param_get_peername (IntPtr handle);
- [MethodImpl (MethodImplOptions.InternalCall)]
+ [DllImport (BTLS_DYLIB)]
extern static void mono_btls_x509_verify_param_free (IntPtr handle);
internal MonoBtlsX509VerifyParam ()
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
#if MONO_SECURITY_ALIAS
extern alias MonoSecurity;
#endif
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.Text;
using System.Security;
untrusted = new X509Certificate2Collection ();
policy.ExtraStore = untrusted;
for (int i = 0; i < untrustedChain.Count; i++) {
- using (var cert = untrustedChain.GetCertificate (i))
+ var cert = untrustedChain.GetCertificate (i);
using (var impl = new X509CertificateImplBtls (cert))
untrusted.Add (new X509Certificate2 (impl));
}
for (int i = 0; i < certificates.Length; i++) {
var cert = chain.GetCertificate (i);
- var impl = new X509CertificateImplBtls (cert);
- certificates [i] = new X509Certificate2 (impl);
+ using (var impl = new X509CertificateImplBtls (cert))
+ certificates [i] = new X509Certificate2 (impl);
elements.Add (certificates [i]);
}
if (untrusted != null) {
foreach (var cert in untrusted)
cert.Dispose ();
+ untrusted = null;
+ }
+ if (certificates != null) {
+ foreach (var cert in certificates)
+ cert.Dispose ();
+ certificates = null;
}
}
base.Dispose (disposing);
readonly MonoTlsStream tlsStream;
readonly HttpWebRequest request;
+#pragma warning disable 618
+
internal static ICertificateValidator GetInternalValidator (MonoTlsProvider provider, MonoTlsSettings settings)
{
if (settings == null)
certValidationCallback = ServicePointManager.ServerCertValidationCallback;
}
+#pragma warning restore 618
+
static X509Certificate DefaultSelectionCallback (string targetHost, X509CertificateCollection localCertificates, X509Certificate remoteCertificate, string[] acceptableIssuers)
{
X509Certificate clientCertificate;
*/
X509Certificate OnCertificateSelection (X509CertificateCollection clientCerts, X509Certificate serverCert, string targetHost, X509CertificateCollection serverRequestedCerts)
{
+#pragma warning disable 618
string [] acceptableIssuers = new string [serverRequestedCerts != null ? serverRequestedCerts.Count : 0];
for (int i = 0; i < acceptableIssuers.Length; i++)
acceptableIssuers [i] = serverRequestedCerts [i].GetIssuerName ();
X509Certificate clientCertificate;
certificateValidator.SelectClientCertificate (targetHost, clientCerts, serverCert, acceptableIssuers, out clientCertificate);
return clientCertificate;
+#pragma warning restore 618
}
public virtual IAsyncResult BeginAuthenticateAsClient (string targetHost, AsyncCallback asyncCallback, object asyncState)
ServicePointManager.CheckCertificateRevocationList);
status = WebExceptionStatus.Success;
- } catch (Exception ex) {
+ } catch (Exception) {
status = WebExceptionStatus.SecureChannelFailure;
throw;
} finally {
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
+#if !MONOTOUCH_WATCH
using Mono.Net;
+#endif
namespace System.Net
{
return "md2RSA";
case "1.2.840.113549.1.1.3":
return "md4RSA";
- return "md4RSA";
- return "md4RSA";
case "1.3.14.3.2.27":
return "dsaSHA1";
case "2.16.840.1.101.2.1.1.19":
<SchemaVersion>2.0</SchemaVersion>\r
<ProjectGuid>{483DB7F6-9145-4AE2-B9B2-2B5EE6FDEFB4}</ProjectGuid>\r
<OutputType>Library</OutputType>\r
- <NoWarn>1699,618</NoWarn>\r
+ <NoWarn>1699</NoWarn>\r
<OutputPath>./../../class/lib/net_4_x/bare</OutputPath>\r
<IntermediateOutputPath>obj-bare</IntermediateOutputPath>\r
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
<DebugSymbols>true</DebugSymbols>\r
<DebugType>full</DebugType>\r
- <NoWarn>1699,618</NoWarn>\r
+ <NoWarn>1699</NoWarn>\r
<Optimize>false</Optimize>\r
- <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS</DefineConstants>\r
+ <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_FEATURE_BTLS</DefineConstants>\r
<ErrorReport>prompt</ErrorReport>\r
<WarningLevel>4</WarningLevel>\r
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
<DebugType>pdbonly</DebugType>\r
- <NoWarn>1699,618</NoWarn>\r
+ <NoWarn>1699</NoWarn>\r
<Optimize>true</Optimize>\r
- <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS</DefineConstants>\r
+ <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_FEATURE_BTLS</DefineConstants>\r
<ErrorReport>prompt</ErrorReport>\r
<WarningLevel>4</WarningLevel>\r
</PropertyGroup>\r
<Compile Include="System.Net.Sockets\SocketAsyncEventArgs.cs" />\r
<Compile Include="System.Net.Sockets\SocketAsyncResult.cs" />\r
<Compile Include="System.Net.Sockets\SocketOperation.cs" />\r
+ <Compile Include="System.Net.Sockets\SocketReceiveFromResult.cs" />\r
+ <Compile Include="System.Net.Sockets\SocketReceiveMessageFromResult.cs" />\r
+ <Compile Include="System.Net.Sockets\SocketTaskExtensions.cs" />\r
<Compile Include="System.Net.WebSockets\ClientWebSocket.cs" />\r
<Compile Include="System.Net.WebSockets\ClientWebSocketOptions.cs" />\r
<Compile Include="System.Net.WebSockets\HttpListenerWebSocketContext.cs" />\r
<SchemaVersion>2.0</SchemaVersion>\r
<ProjectGuid>{2762E921-91A8-4C87-91E9-BA628013F753}</ProjectGuid>\r
<OutputType>Library</OutputType>\r
- <NoWarn>1699,618</NoWarn>\r
+ <NoWarn>1699</NoWarn>\r
<OutputPath>./../../class/lib/net_4_x</OutputPath>\r
<IntermediateOutputPath>obj-net_4_x</IntermediateOutputPath>\r
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
<DebugSymbols>true</DebugSymbols>\r
<DebugType>full</DebugType>\r
- <NoWarn>1699,618</NoWarn>\r
+ <NoWarn>1699</NoWarn>\r
<Optimize>false</Optimize>\r
- <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS;CONFIGURATION_DEP</DefineConstants>\r
+ <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_FEATURE_BTLS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS;CONFIGURATION_DEP</DefineConstants>\r
<ErrorReport>prompt</ErrorReport>\r
<WarningLevel>4</WarningLevel>\r
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
<DebugType>pdbonly</DebugType>\r
- <NoWarn>1699,618</NoWarn>\r
+ <NoWarn>1699</NoWarn>\r
<Optimize>true</Optimize>\r
- <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS;CONFIGURATION_DEP</DefineConstants>\r
+ <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_FEATURE_BTLS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS;CONFIGURATION_DEP</DefineConstants>\r
<ErrorReport>prompt</ErrorReport>\r
<WarningLevel>4</WarningLevel>\r
</PropertyGroup>\r
<Compile Include="System.Net.Sockets\SocketAsyncEventArgs.cs" />\r
<Compile Include="System.Net.Sockets\SocketAsyncResult.cs" />\r
<Compile Include="System.Net.Sockets\SocketOperation.cs" />\r
+ <Compile Include="System.Net.Sockets\SocketReceiveFromResult.cs" />\r
+ <Compile Include="System.Net.Sockets\SocketReceiveMessageFromResult.cs" />\r
+ <Compile Include="System.Net.Sockets\SocketTaskExtensions.cs" />\r
<Compile Include="System.Net.WebSockets\ClientWebSocket.cs" />\r
<Compile Include="System.Net.WebSockets\ClientWebSocketOptions.cs" />\r
<Compile Include="System.Net.WebSockets\HttpListenerWebSocketContext.cs" />\r
<SchemaVersion>2.0</SchemaVersion>\r
<ProjectGuid>{19954F80-065E-4D46-8FEF-62BA4D6CFDAD}</ProjectGuid>\r
<OutputType>Library</OutputType>\r
- <NoWarn>1699,618</NoWarn>\r
+ <NoWarn>1699</NoWarn>\r
<OutputPath>./../../class/lib/net_4_x/secxml</OutputPath>\r
<IntermediateOutputPath>obj-secxml</IntermediateOutputPath>\r
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
<DebugSymbols>true</DebugSymbols>\r
<DebugType>full</DebugType>\r
- <NoWarn>1699,618</NoWarn>\r
+ <NoWarn>1699</NoWarn>\r
<Optimize>false</Optimize>\r
- <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS</DefineConstants>\r
+ <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_FEATURE_BTLS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS</DefineConstants>\r
<ErrorReport>prompt</ErrorReport>\r
<WarningLevel>4</WarningLevel>\r
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
<DebugType>pdbonly</DebugType>\r
- <NoWarn>1699,618</NoWarn>\r
+ <NoWarn>1699</NoWarn>\r
<Optimize>true</Optimize>\r
- <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS</DefineConstants>\r
+ <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_FEATURE_BTLS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS</DefineConstants>\r
<ErrorReport>prompt</ErrorReport>\r
<WarningLevel>4</WarningLevel>\r
</PropertyGroup>\r
<Compile Include="System.Net.Sockets\SocketAsyncEventArgs.cs" />\r
<Compile Include="System.Net.Sockets\SocketAsyncResult.cs" />\r
<Compile Include="System.Net.Sockets\SocketOperation.cs" />\r
+ <Compile Include="System.Net.Sockets\SocketReceiveFromResult.cs" />\r
+ <Compile Include="System.Net.Sockets\SocketReceiveMessageFromResult.cs" />\r
+ <Compile Include="System.Net.Sockets\SocketTaskExtensions.cs" />\r
<Compile Include="System.Net.WebSockets\ClientWebSocket.cs" />\r
<Compile Include="System.Net.WebSockets\ClientWebSocketOptions.cs" />\r
<Compile Include="System.Net.WebSockets\HttpListenerWebSocketContext.cs" />\r
using System.Runtime.InteropServices;
using System.Security.Permissions;
+#pragma warning disable 618
+
namespace System.CodeDom.Compiler {
[ComVisible (true)]
}
}
}
+
+#pragma warning restore 618
\ No newline at end of file
}
}
+#if FEATURE_MONO_CAS
// and you must have discovery access to the combined path
// note: the cache behaviour is tested in the CAS tests
if (SecurityManager.SecurityEnabled) {
new FileIOPermission (FileIOPermissionAccess.PathDiscovery, basepath).Demand ();
}
+#endif
}
return(basepath);
using System.Reflection;
using System.Collections.Specialized;
+#pragma warning disable 618
+
namespace System.Configuration
{
public class AppSettingsReader
using System.Xml;
#endif
+#pragma warning disable 618
+
namespace System.Configuration
{
class ConfigHelper
#if (XML_DEP)
using System.Xml;
+#pragma warning disable 618
+
namespace System.Configuration
{
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
using System.Xml.XPath;
#endif
+#pragma warning disable 618
+
namespace System.Configuration
{
public sealed class ConfigurationSettings
using XmlNode = System.Object;
#endif
+#pragma warning disable 618
+
namespace System.Configuration
{
public class NameValueFileSectionHandler : IConfigurationSectionHandler
using XmlNode = System.Object;
#endif
+#pragma warning disable 618
+
namespace System.Configuration
{
/// <summary>
//
using System;
-using System.Diagnostics;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.IO;
using System.Runtime.InteropServices;
+#pragma warning disable 618
+
namespace System.Diagnostics
{
[DefaultEvent ("EntryWritten")]
}
// may throw ArgumentNullException
- [DefaultValue (""), ReadOnly (true), RecommendedAsConfigurable (true)]
+ [DefaultValue (""), ReadOnly (true), SettingsBindable (true)]
[TypeConverter ("System.Diagnostics.Design.CategoryValueConverter, " + Consts.AssemblySystem_Design)]
[SRDescription ("The category name for this performance counter.")]
public string CategoryName {
}
// may throw ArgumentNullException
- [DefaultValue (""), ReadOnly (true), RecommendedAsConfigurable (true)]
+ [DefaultValue (""), ReadOnly (true), SettingsBindable (true)]
[TypeConverter ("System.Diagnostics.Design.CounterNameConverter, " + Consts.AssemblySystem_Design)]
[SRDescription ("The name of this performance counter.")]
public string CounterName
set { lifetime = value; }
}
- [DefaultValue (""), ReadOnly (true), RecommendedAsConfigurable (true)]
+ [DefaultValue (""), ReadOnly (true), SettingsBindable (true)]
[TypeConverter ("System.Diagnostics.Design.InstanceNameConverter, " + Consts.AssemblySystem_Design)]
[SRDescription ("The instance name for this performance counter.")]
public string InstanceName {
// may throw ArgumentException if machine name format is wrong
[MonoTODO("What's the machine name format?")]
- [DefaultValue ("."), Browsable (false), RecommendedAsConfigurable (true)]
+ [DefaultValue ("."), Browsable (false), SettingsBindable (true)]
[SRDescription ("The machine where this performance counter resides.")]
public string MachineName {
get {return machineName;}
while (true) {
try {
resetEvent.WaitOne ();
- } catch (ObjectDisposedException e) {
+ } catch (ObjectDisposedException) {
// Notifications have been disabled and event
// has been closed but not yet nulled. End thread.
break;
[DefaultValue("*.*")]
[IODescription("File name filter pattern")]
- [RecommendedAsConfigurable(true)]
+ [SettingsBindable(true)]
[TypeConverter ("System.Diagnostics.Design.StringValueConverter, " + Consts.AssemblySystem_Design)]
public string Filter {
get { return filter; }
[DefaultValue("")]
[IODescription("The directory to monitor")]
- [RecommendedAsConfigurable(true)]
+ [SettingsBindable(true)]
[TypeConverter ("System.Diagnostics.Design.StringValueConverter, " + Consts.AssemblySystem_Design)]
[Editor ("System.Diagnostics.Design.FSWPathEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
public string Path {
using System.ComponentModel;
+#pragma warning disable 67
+
namespace System.IO
{
public class FileSystemWatcher : Component, IDisposable, ISupportInitialize
protected void OnRenamed (RenamedEventArgs e) { throw new NotImplementedException (); }
public WaitForChangedResult WaitForChanged (WatcherChangeTypes changeType) { throw new NotImplementedException (); }
public WaitForChangedResult WaitForChanged (WatcherChangeTypes changeType, int timeout) { throw new NotImplementedException (); }
- public virtual void Dispose () { throw new NotImplementedException (); }
protected override void Dispose (bool disposing) { throw new NotImplementedException (); }
}
}
\ No newline at end of file
using XmlNode = System.Object;
#endif
+#pragma warning disable 618
+
namespace System.Net.Configuration
{
class ConnectionManagementData
continue;
}
- string prefix = HandlersUtil.ExtractAttributeValue ("prefix", child);
+ //string prefix = HandlersUtil.ExtractAttributeValue ("prefix", child);
if (name == "add") {
- string type = HandlersUtil.ExtractAttributeValue ("type", child, false);
+ //string type = HandlersUtil.ExtractAttributeValue ("type", child, false);
if (child.Attributes != null && child.Attributes.Count != 0)
HandlersUtil.ThrowException ("Unrecognized attribute", child);
public override IcmpV4Statistics GetIcmpV4Statistics ()
{
- if (!Socket.SupportsIPv4)
+ if (!Socket.OSSupportsIPv4)
throw new NetworkInformationException ();
Win32_MIBICMPINFO stats;
GetIcmpStatistics (out stats, AF_INET);
public override IPGlobalStatistics GetIPv4GlobalStatistics ()
{
- if (!Socket.SupportsIPv4)
+ if (!Socket.OSSupportsIPv4)
throw new NetworkInformationException ();
Win32_MIB_IPSTATS stats;
GetIpStatisticsEx (out stats, AF_INET);
public override TcpStatistics GetTcpIPv4Statistics ()
{
- if (!Socket.SupportsIPv4)
+ if (!Socket.OSSupportsIPv4)
throw new NetworkInformationException ();
Win32_MIB_TCPSTATS stats;
GetTcpStatisticsEx (out stats, AF_INET);
public override UdpStatistics GetUdpIPv4Statistics ()
{
- if (!Socket.SupportsIPv4)
+ if (!Socket.OSSupportsIPv4)
throw new NetworkInformationException ();
Win32_MIB_UDPSTATS stats;
GetUdpStatisticsEx (out stats, AF_INET);
#if MONOTOUCH || XAMMAC
return new MacOsNetworkInterfaceAPI ();
#else
- Version windowsVer51 = new Version (5, 1);
bool runningOnUnix = (Environment.OSVersion.Platform == PlatformID.Unix);
if (runningOnUnix) {
}
#if !MOBILE
+ Version windowsVer51 = new Version (5, 1);
if (Environment.OSVersion.Version >= windowsVer51)
return new Win32NetworkInterfaceAPI ();
#endif
#if MONODROID
[DllImport ("__Internal")]
- protected static extern int _monodroid_get_android_api_level ();
+ static extern int _monodroid_get_android_api_level ();
[DllImport ("__Internal")]
- protected static extern bool _monodroid_get_network_interface_up_state (string ifname, ref bool is_up);
+ static extern bool _monodroid_get_network_interface_up_state (string ifname, ref bool is_up);
[DllImport ("__Internal")]
- protected static extern bool _monodroid_get_network_interface_supports_multicast (string ifname, ref bool supports_multicast);
+ static extern bool _monodroid_get_network_interface_supports_multicast (string ifname, ref bool supports_multicast);
bool android_use_java_api;
#endif
static IPAddress GetNonLoopbackIP ()
{
+#pragma warning disable 618
foreach (IPAddress addr in Dns.GetHostByName (Dns.GetHostName ()).AddressList)
if (!IPAddress.IsLoopback (addr))
return addr;
+#pragma warning restore 618
+
throw new InvalidOperationException ("Could not resolve non-loopback IP address for localhost");
}
static MonoTlsProvider GetProvider ()
{
+#pragma warning disable 612
return MonoTlsProviderFactory.GetDefaultProvider ();
+#pragma warning restore 612
}
public SslStream (Stream innerStream)
if (endPoint == null)
throw new ArgumentNullException ("endPoint");
- SocketAsyncResult sockares = ValidateEndIAsyncResult (asyncResult, "EndReceiveMessageFrom", "asyncResult");
+ /*SocketAsyncResult sockares =*/ ValidateEndIAsyncResult (asyncResult, "EndReceiveMessageFrom", "asyncResult");
throw new NotImplementedException ();
}
--- /dev/null
+//
+// SocketReceiveFromResult.cs
+//
+// Authors:
+// Marek Safar <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NETSTANDARD
+
+namespace System.Net.Sockets
+{
+ public struct SocketReceiveFromResult
+ {
+ public int ReceivedBytes;
+ public EndPoint RemoteEndPoint;
+ }
+}
+
+#endif
--- /dev/null
+//
+// SocketReceiveMessageFromResult.cs
+//
+// Authors:
+// Marek Safar <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NETSTANDARD
+
+namespace System.Net.Sockets
+{
+ public struct SocketReceiveMessageFromResult
+ {
+ public int ReceivedBytes;
+ public SocketFlags SocketFlags;
+ public EndPoint RemoteEndPoint;
+ public IPPacketInformation PacketInformation;
+ }
+}
+
+#endif
--- /dev/null
+// 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.
+
+#if NETSTANDARD
+
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace System.Net.Sockets
+{
+ public static class SocketTaskExtensions
+ {
+ public static Task<Socket> AcceptAsync(this Socket socket)
+ {
+ return Task<Socket>.Factory.FromAsync(
+ (callback, state) => ((Socket)state).BeginAccept(callback, state),
+ asyncResult => ((Socket)asyncResult.AsyncState).EndAccept(asyncResult),
+ state: socket);
+ }
+
+ public static Task<Socket> AcceptAsync(this Socket socket, Socket acceptSocket)
+ {
+ const int ReceiveSize = 0;
+ return Task<Socket>.Factory.FromAsync(
+ (socketForAccept, receiveSize, callback, state) => ((Socket)state).BeginAccept(socketForAccept, receiveSize, callback, state),
+ asyncResult => ((Socket)asyncResult.AsyncState).EndAccept(asyncResult),
+ acceptSocket,
+ ReceiveSize,
+ state: socket);
+ }
+
+ public static Task ConnectAsync(this Socket socket, EndPoint remoteEP)
+ {
+ return Task.Factory.FromAsync(
+ (targetEndPoint, callback, state) => ((Socket)state).BeginConnect(targetEndPoint, callback, state),
+ asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
+ remoteEP,
+ state: socket);
+ }
+
+ public static Task ConnectAsync(this Socket socket, IPAddress address, int port)
+ {
+ return Task.Factory.FromAsync(
+ (targetAddress, targetPort, callback, state) => ((Socket)state).BeginConnect(targetAddress, targetPort, callback, state),
+ asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
+ address,
+ port,
+ state: socket);
+ }
+
+ public static Task ConnectAsync(this Socket socket, IPAddress[] addresses, int port)
+ {
+ return Task.Factory.FromAsync(
+ (targetAddresses, targetPort, callback, state) => ((Socket)state).BeginConnect(targetAddresses, targetPort, callback, state),
+ asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
+ addresses,
+ port,
+ state: socket);
+ }
+
+ public static Task ConnectAsync(this Socket socket, string host, int port)
+ {
+ return Task.Factory.FromAsync(
+ (targetHost, targetPort, callback, state) => ((Socket)state).BeginConnect(targetHost, targetPort, callback, state),
+ asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
+ host,
+ port,
+ state: socket);
+ }
+
+ public static Task<int> ReceiveAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags)
+ {
+ return Task<int>.Factory.FromAsync(
+ (targetBuffer, flags, callback, state) => ((Socket)state).BeginReceive(
+ targetBuffer.Array,
+ targetBuffer.Offset,
+ targetBuffer.Count,
+ flags,
+ callback,
+ state),
+ asyncResult => ((Socket)asyncResult.AsyncState).EndReceive(asyncResult),
+ buffer,
+ socketFlags,
+ state: socket);
+ }
+
+ public static Task<int> ReceiveAsync(
+ this Socket socket,
+ IList<ArraySegment<byte>> buffers,
+ SocketFlags socketFlags)
+ {
+ return Task<int>.Factory.FromAsync(
+ (targetBuffers, flags, callback, state) => ((Socket)state).BeginReceive(targetBuffers, flags, callback, state),
+ asyncResult => ((Socket)asyncResult.AsyncState).EndReceive(asyncResult),
+ buffers,
+ socketFlags,
+ state: socket);
+ }
+
+ public static Task<SocketReceiveFromResult> ReceiveFromAsync(
+ this Socket socket,
+ ArraySegment<byte> buffer,
+ SocketFlags socketFlags,
+ EndPoint remoteEndPoint)
+ {
+ object[] packedArguments = new object[] { socket, remoteEndPoint };
+
+ return Task<SocketReceiveFromResult>.Factory.FromAsync(
+ (targetBuffer, flags, callback, state) =>
+ {
+ var arguments = (object[])state;
+ var s = (Socket)arguments[0];
+ var e = (EndPoint)arguments[1];
+
+ IAsyncResult result = s.BeginReceiveFrom(
+ targetBuffer.Array,
+ targetBuffer.Offset,
+ targetBuffer.Count,
+ flags,
+ ref e,
+ callback,
+ state);
+
+ arguments[1] = e;
+ return result;
+ },
+ asyncResult =>
+ {
+ var arguments = (object[])asyncResult.AsyncState;
+ var s = (Socket)arguments[0];
+ var e = (EndPoint)arguments[1];
+
+ int bytesReceived = s.EndReceiveFrom(asyncResult, ref e);
+
+ return new SocketReceiveFromResult()
+ {
+ ReceivedBytes = bytesReceived,
+ RemoteEndPoint = e
+ };
+ },
+ buffer,
+ socketFlags,
+ state: packedArguments);
+ }
+
+ public static Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(
+ this Socket socket,
+ ArraySegment<byte> buffer,
+ SocketFlags socketFlags,
+ EndPoint remoteEndPoint)
+ {
+ object[] packedArguments = new object[] { socket, socketFlags, remoteEndPoint };
+
+ return Task<SocketReceiveMessageFromResult>.Factory.FromAsync(
+ (targetBuffer, callback, state) =>
+ {
+ var arguments = (object[])state;
+ var s = (Socket)arguments[0];
+ var f = (SocketFlags)arguments[1];
+ var e = (EndPoint)arguments[2];
+
+ IAsyncResult result = s.BeginReceiveMessageFrom(
+ targetBuffer.Array,
+ targetBuffer.Offset,
+ targetBuffer.Count,
+ f,
+ ref e,
+ callback,
+ state);
+
+ arguments[2] = e;
+ return result;
+ },
+ asyncResult =>
+ {
+ var arguments = (object[])asyncResult.AsyncState;
+ var s = (Socket)arguments[0];
+ var f = (SocketFlags)arguments[1];
+ var e = (EndPoint)arguments[2];
+ IPPacketInformation ipPacket;
+
+ int bytesReceived = s.EndReceiveMessageFrom(
+ asyncResult,
+ ref f,
+ ref e,
+ out ipPacket);
+
+ return new SocketReceiveMessageFromResult()
+ {
+ PacketInformation = ipPacket,
+ ReceivedBytes = bytesReceived,
+ RemoteEndPoint = e,
+ SocketFlags = f
+ };
+ },
+ buffer,
+ state: packedArguments);
+ }
+
+ public static Task<int> SendAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags)
+ {
+ return Task<int>.Factory.FromAsync(
+ (targetBuffer, flags, callback, state) => ((Socket)state).BeginSend(
+ targetBuffer.Array,
+ targetBuffer.Offset,
+ targetBuffer.Count,
+ flags,
+ callback,
+ state),
+ asyncResult => ((Socket)asyncResult.AsyncState).EndSend(asyncResult),
+ buffer,
+ socketFlags,
+ state: socket);
+ }
+
+ public static Task<int> SendAsync(
+ this Socket socket,
+ IList<ArraySegment<byte>> buffers,
+ SocketFlags socketFlags)
+ {
+ return Task<int>.Factory.FromAsync(
+ (targetBuffers, flags, callback, state) => ((Socket)state).BeginSend(targetBuffers, flags, callback, state),
+ asyncResult => ((Socket)asyncResult.AsyncState).EndSend(asyncResult),
+ buffers,
+ socketFlags,
+ state: socket);
+ }
+
+ public static Task<int> SendToAsync(
+ this Socket socket,
+ ArraySegment<byte> buffer,
+ SocketFlags socketFlags,
+ EndPoint remoteEP)
+ {
+ return Task<int>.Factory.FromAsync(
+ (targetBuffer, flags, endPoint, callback, state) => ((Socket)state).BeginSendTo(
+ targetBuffer.Array,
+ targetBuffer.Offset,
+ targetBuffer.Count,
+ flags,
+ endPoint,
+ callback,
+ state),
+ asyncResult => ((Socket)asyncResult.AsyncState).EndSendTo(asyncResult),
+ buffer,
+ socketFlags,
+ remoteEP,
+ state: socket);
+ }
+ }
+}
+
+#endif
return false;
if (InputStream.EndRead (ares) <= 0)
return true;
- } catch (ObjectDisposedException e) {
+ } catch (ObjectDisposedException) {
input_stream = null;
return true;
} catch {
InternalWrite (bytes, 0, bytes.Length);
trailer_sent = true;
}
- } catch (IOException ex) {
+ } catch (IOException) {
// Ignore error due to connection reset by peer
}
}
return;
}
#endif
+
+#pragma warning disable 618
manager = (ConnectionManagementData) ConfigurationSettings.GetConfig (configKey);
+#pragma warning restore 618
if (manager != null) {
defaultConnectionLimit = (int) manager.GetMaxConnections ("*");
}
SetAuditRule((AuditRule)rule);
}
- internal new void Persist (SafeHandle handle)
+ internal void Persist (SafeHandle handle)
{
WriteLock();
try {
using MonoSecurity::Mono.Security.Interface;
using MX = MonoSecurity::Mono.Security.X509;
#else
-#if !FEATURE_NO_BSD_SOCKETS
+#if MONO_FEATURE_BTLS
using Mono.Security.Interface;
#endif
using MX = Mono.Security.X509;
#endif
-#if !FEATURE_NO_BSD_SOCKETS
+#if MONO_FEATURE_BTLS
using Mono.Btls;
#endif
#endif
X509Helper.ThrowIfContextInvalid (impl);
}
-#if FEATURE_NO_BSD_SOCKETS
+#if !MONO_FEATURE_BTLS
static X509Certificate GetNativeInstance (X509CertificateImpl impl)
{
throw new PlatformNotSupportedException ();
x509.ExportAsPEM (bio, includeHumanReadableForm);
}
}
-#endif // !FEATURE_NO_BSD_SOCKETS
+#endif // !MONO_FEATURE_BTLS
internal static X509Certificate2Impl Import (byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags, bool disableProvider = false)
{
-#if !FEATURE_NO_BSD_SOCKETS
+#if MONO_FEATURE_BTLS
if (!disableProvider) {
var provider = MonoTlsProviderFactory.GetProvider ();
if (provider.HasNativeCertificates) {
return impl;
}
}
-#endif // FEATURE_NO_BSD_SOCKETS
+#endif // MONO_FEATURE_BTLS
var impl2 = new X509Certificate2ImplMono ();
impl2.Import (rawData, password, keyStorageFlags);
return impl2;
internal static X509Certificate2Impl Import (X509Certificate cert, bool disableProvider = false)
{
-#if !FEATURE_NO_BSD_SOCKETS
+#if MONO_FEATURE_BTLS
if (!disableProvider) {
var provider = MonoTlsProviderFactory.GetProvider ();
if (provider.HasNativeCertificates) {
return impl;
}
}
-#endif // FEATURE_NO_BSD_SOCKETS
+#endif // MONO_FEATURE_BTLS
var impl2 = cert.Impl as X509Certificate2Impl;
if (impl2 != null)
return (X509Certificate2Impl)impl2.Clone ();
System.Net.Sockets/SocketAsyncEventArgs.cs
System.Net.Sockets/SocketAsyncResult.cs
System.Net.Sockets/SocketOperation.cs
+System.Net.Sockets/SocketReceiveFromResult.cs
+System.Net.Sockets/SocketReceiveMessageFromResult.cs
+System.Net.Sockets/SocketTaskExtensions.cs
System.Net/WebAsyncResult.cs
System.Net/WebConnection.cs
System.Net/WebConnectionData.cs
Mono.Btls/MonoBtlsX509FileType.cs
Mono.Btls/MonoBtlsX509Format.cs
Mono.Btls/MonoBtlsX509Lookup.cs
-Mono.Btls/MonoBtlsX509LookupMono.cs
Mono.Btls/MonoBtlsX509LookupMonoCollection.cs
+Mono.Btls/MonoBtlsX509LookupMono.cs
Mono.Btls/MonoBtlsX509LookupType.cs
Mono.Btls/MonoBtlsX509Name.cs
Mono.Btls/MonoBtlsX509NameList.cs
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void DefaultProxy ()
{
WebClient wc = new WebClient ();
System.Net.Sockets/SocketAsyncEventArgs.cs
System.Net.Sockets/SocketAsyncResult.cs
System.Net.Sockets/SocketOperation.cs
+System.Net.Sockets/SocketReceiveFromResult.cs
+System.Net.Sockets/SocketReceiveMessageFromResult.cs
+System.Net.Sockets/SocketTaskExtensions.cs
System.Net/AuthenticationManager.cs
System.Net/BasicClient.cs
System.Net/BindIPEndPoint.cs
Mono.Net.Security/MonoTlsStream.cs
Mono.Net.Security/NoReflectionHelper.cs
Mono.Net.Security/SystemCertificateValidator.cs
+System.Net/MacProxy.cs
System.Net.Mail/SmtpClient.cs
System.Net.Security/SslStream.cs
System.Net.Sockets/TcpClient.cs
System.Net/WebConnectionData.cs
System.Net/WebConnectionGroup.cs
System.Net/WebConnectionStream.cs
-Mono.Btls/MonoBtlsBio.cs
-Mono.Btls/MonoBtlsContext.cs
-Mono.Btls/MonoBtlsError.cs
-Mono.Btls/MonoBtlsException.cs
-Mono.Btls/MonoBtlsKey.cs
-Mono.Btls/MonoBtlsObject.cs
-Mono.Btls/MonoBtlsPkcs12.cs
-Mono.Btls/MonoBtlsProvider.cs
-Mono.Btls/MonoBtlsSsl.cs
-Mono.Btls/MonoBtlsSslCtx.cs
-Mono.Btls/MonoBtlsSslError.cs
-Mono.Btls/MonoBtlsStream.cs
-Mono.Btls/MonoBtlsUtils.cs
-Mono.Btls/MonoBtlsX509.cs
-Mono.Btls/MonoBtlsX509Chain.cs
-Mono.Btls/MonoBtlsX509Crl.cs
-Mono.Btls/MonoBtlsX509Error.cs
-Mono.Btls/MonoBtlsX509Exception.cs
-Mono.Btls/MonoBtlsX509FileType.cs
-Mono.Btls/MonoBtlsX509Format.cs
-Mono.Btls/MonoBtlsX509Lookup.cs
-Mono.Btls/MonoBtlsX509LookupMonoCollection.cs
-Mono.Btls/MonoBtlsX509LookupMono.cs
-Mono.Btls/MonoBtlsX509LookupType.cs
-Mono.Btls/MonoBtlsX509Name.cs
-Mono.Btls/MonoBtlsX509NameList.cs
-Mono.Btls/MonoBtlsX509NameEntryType.cs
-Mono.Btls/MonoBtlsX509Purpose.cs
-Mono.Btls/MonoBtlsX509Revoked.cs
-Mono.Btls/MonoBtlsX509Store.cs
-Mono.Btls/MonoBtlsX509StoreCtx.cs
-Mono.Btls/MonoBtlsX509StoreManager.cs
-Mono.Btls/MonoBtlsX509StoreType.cs
-Mono.Btls/MonoBtlsX509TrustKind.cs
-Mono.Btls/MonoBtlsX509VerifyFlags.cs
-Mono.Btls/MonoBtlsX509VerifyParam.cs
-Mono.Btls/X509CertificateImplBtls.cs
-Mono.Btls/X509ChainImplBtls.cs
../referencesource/System/net/System/Net/Sockets/TCPClient.cs
../referencesource/System/net/System/Net/Sockets/TCPListener.cs
../referencesource/System/net/System/Net/Sockets/UDPClient.cs
--- /dev/null
+//
+// EventCounter.cs
+//
+// Authors:
+// Marek Safar <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NETSTANDARD
+
+namespace System.Diagnostics.Tracing
+{
+ public class EventCounter
+ {
+ public EventCounter (string name, EventSource eventSource)
+ {
+ }
+
+ public void WriteMetric (float value)
+ {
+ }
+ }
+}
+
+#endif
-//
+//
// ConditionalWeakTable.cs
//
// Author:
// Rodrigo Kumpera (rkumpera@novell.com)
+// Tautvydas Žilys <zilys@unity3d.com>
//
// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2016 Unity Technologies (https://unity3d.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
return res;
}
-
+
+ //--------------------------------------------------------------------------------------------
+ // Find a key that equals (value equality) with the given key - don't use in perf critical path
+ // Note that it calls out to Object.Equals which may calls the override version of Equals
+ // and that may take locks and leads to deadlock
+ // Currently it is only used by WinRT event code and you should only use this function
+ // if you know for sure that either you won't run into dead locks or you need to live with the
+ // possiblity
+ //--------------------------------------------------------------------------------------------
+ [System.Security.SecuritySafeCritical]
+ [FriendAccessAllowed]
+ internal TKey FindEquivalentKeyUnsafe(TKey key, out TValue value)
+ {
+ lock (_lock)
+ {
+ for (int i = 0; i < data.Length; ++i)
+ {
+ var item = data[i];
+ if (Object.Equals(item.key, key))
+ {
+ value = (TValue)item.value;
+ return (TKey)item.key;
+ }
+ }
+ }
+
+ value = default(TValue);
+ return null;
+ }
+
+ //--------------------------------------------------------------------------------------------
+ // Clear all the key/value pairs
+ //--------------------------------------------------------------------------------------------
+ [System.Security.SecuritySafeCritical]
+ internal void Clear()
+ {
+ lock (_lock)
+ {
+ for (int i = 0; i < data.Length; i++)
+ {
+ data[i].key = GC.EPHEMERON_TOMBSTONE;
+ data[i].value = null;
+ }
+
+ size = 0;
+ }
+ }
+
// extracted from ../../../../external/referencesource/mscorlib/system/runtime/compilerservices/
internal ICollection<TKey> Keys
{
[System.Security.SecuritySafeCritical]
get
{
+ var tombstone = GC.EPHEMERON_TOMBSTONE;
List<TKey> list = new List<TKey>(data.Length);
lock (_lock)
{
for (int i = 0; i < data.Length; ++i)
{
TKey key = (TKey) data [i].key;
- if (key != null)
+ if (key != null && key != tombstone)
list.Add (key);
}
}
return list;
}
}
+
+ internal ICollection<TValue> Values
+ {
+ [System.Security.SecuritySafeCritical]
+ get
+ {
+ var tombstone = GC.EPHEMERON_TOMBSTONE;
+ List<TValue> list = new List<TValue>(data.Length);
+ lock (_lock)
+ {
+ for (int i = 0; i < data.Length; ++i)
+ {
+ var item = data[i];
+ if (item.key != null && item.key != tombstone)
+ list.Add((TValue)item.value);
+ }
+ }
+
+ return list;
+ }
+ }
}
}
+++ /dev/null
-//
-// DefaultInterfaceAttribute.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.InteropServices.WindowsRuntime
-{
- [AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple = false, Inherited = false)]
- public sealed class DefaultInterfaceAttribute : Attribute
- {
- public Type DefaultInterface {
- get;
- private set;
- }
-
- public DefaultInterfaceAttribute (Type defaultInterface)
- {
- DefaultInterface = defaultInterface;
- }
- }
-}
+++ /dev/null
-//
-// EventRegistrationToken.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.InteropServices.WindowsRuntime
-{
- public struct EventRegistrationToken
- {
-#pragma warning disable 0649
- long value;
-#pragma warning restore 0649
-
- public static bool operator == (EventRegistrationToken left, EventRegistrationToken right)
- {
- return left.value == right.value;
- }
-
- public static bool operator != (EventRegistrationToken left, EventRegistrationToken right)
- {
- return left.value != right.value;
- }
-
- public override bool Equals (object obj)
- {
- return ((EventRegistrationToken)obj).value == value;
- }
-
- public override int GetHashCode ()
- {
- return unchecked ((int)value);
- }
- }
-}
+++ /dev/null
-//
-// EventRegistrationTokenTable.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.InteropServices.WindowsRuntime
-{
- [MonoTODO]
- public sealed class EventRegistrationTokenTable<T>
- where T : class
- {
- public EventRegistrationTokenTable ()
- {
- throw new NotImplementedException ();
- }
-
- public T InvocationList {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
-
- public EventRegistrationToken AddEventHandler (T handler)
- {
- throw new NotImplementedException ();
- }
-
- public static EventRegistrationTokenTable<T> GetOrCreateEventRegistrationTokenTable(ref EventRegistrationTokenTable<T> refEventTable)
- {
- throw new NotImplementedException ();
- }
-
- public void RemoveEventHandler (T handler)
- {
- throw new NotImplementedException ();
- }
-
- public void RemoveEventHandler (EventRegistrationToken token)
- {
- throw new NotImplementedException ();
- }
- }
-}
-
+++ /dev/null
-//
-// IActivationFactory.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.InteropServices.WindowsRuntime
-{
- [Guid("00000035-0000-0000-C000-000000000046")]
- public interface IActivationFactory
- {
- object ActivateInstance ();
- }
-}
+++ /dev/null
-//
-// InterfaceImplementedInVersionAttribute.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.InteropServices.WindowsRuntime
-{
- [AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple = true, Inherited = false)]
- public sealed class InterfaceImplementedInVersionAttribute : Attribute
- {
- public InterfaceImplementedInVersionAttribute (Type interfaceType, byte majorVersion, byte minorVersion,
- byte buildVersion, byte revisionVersion)
- {
- InterfaceType = interfaceType;
- MajorVersion = majorVersion;
- MinorVersion = minorVersion;
- BuildVersion = buildVersion;
- RevisionVersion = revisionVersion;
- }
-
- public byte BuildVersion {
- get;
- private set;
- }
-
- public Type InterfaceType {
- get;
- private set;
- }
-
- public byte MajorVersion {
- get;
- private set;
- }
-
- public byte MinorVersion {
- get;
- private set;
- }
-
- public byte RevisionVersion {
- get;
- private set;
- }
- }
-}
+++ /dev/null
-//
-// ReadOnlyArrayAttribute.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.InteropServices.WindowsRuntime
-{
- [AttributeUsageAttribute(AttributeTargets.Parameter, Inherited = false, AllowMultiple = false)]
- public sealed class ReadOnlyArrayAttribute : Attribute
- {
- }
-}
+++ /dev/null
-//
-// ReturnValueNameAttribute.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.InteropServices.WindowsRuntime
-{
- [AttributeUsageAttribute(AttributeTargets.Delegate|AttributeTargets.ReturnValue, AllowMultiple = false, Inherited = false)]
- public sealed class ReturnValueNameAttribute : Attribute
- {
- public ReturnValueNameAttribute (string name)
- {
- Name = name;
- }
-
- public string Name {
- get;
- private set;
- }
- }
-}
--- /dev/null
+//
+// UnsafeNativeMethods.cs
+//
+// Author:
+// Tautvydas Žilys <zilys@unity3d.com>
+//
+// Copyright (c) 2016 Unity Technologies (https://www.unity3d.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System.Runtime.CompilerServices;
+
+namespace System.Runtime.InteropServices.WindowsRuntime
+{
+ internal unsafe static class UnsafeNativeMethods
+ {
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public static extern int WindowsCreateString(string sourceString, int length, IntPtr* hstring);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public static extern int WindowsDeleteString(IntPtr hstring);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public static extern char* WindowsGetStringRawBuffer(IntPtr hstring, uint* length);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public static extern bool RoOriginateLanguageException(int error, string message, IntPtr languageException);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public static extern void RoReportUnhandledError(IRestrictedErrorInfo error);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public static extern IRestrictedErrorInfo GetRestrictedErrorInfo();
+ }
+}
\ No newline at end of file
+++ /dev/null
-//
-// WindowsRuntimeMarshal.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.InteropServices.WindowsRuntime
-{
- [MonoTODO]
- public static class WindowsRuntimeMarshal
- {
- public static void AddEventHandler<T> ( Func<T, EventRegistrationToken> addMethod, Action<EventRegistrationToken> removeMethod, T handler)
- {
- throw new NotImplementedException ();
- }
-
- public static void FreeHString (IntPtr ptr)
- {
- throw new NotImplementedException ();
- }
-
- public static IActivationFactory GetActivationFactory (Type type)
- {
- throw new NotImplementedException ();
- }
-
- public static string PtrToStringHString (IntPtr ptr)
- {
- throw new NotImplementedException ();
- }
-
- public static void RemoveAllEventHandlers(Action<EventRegistrationToken> removeMethod)
- {
- throw new NotImplementedException ();
- }
-
- public static void RemoveEventHandler<T> (Action<EventRegistrationToken> removeMethod, T handler)
- {
- throw new NotImplementedException ();
- }
-
- public static IntPtr StringToHString (string s)
- {
- throw new NotImplementedException ();
- }
-
- internal static bool ReportUnhandledError (Exception e)
- {
- return false;
- }
- }
-}
-
+++ /dev/null
-//
-// WriteOnlyArrayAttribute.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.InteropServices.WindowsRuntime
-{
- [AttributeUsageAttribute(AttributeTargets.Parameter, Inherited = false, AllowMultiple = false)]
- public sealed class WriteOnlyArrayAttribute : Attribute
- {
- }
-}
internal static void SetLastWin32Error (int error)
{
}
+
+ // Copied from referencesource/mscorlib/system/runtime/interopservices/marshal.cs
+ //====================================================================
+ // return the raw IUnknown* for a COM Object not related to current
+ // context
+ // Does not call AddRef
+ //====================================================================
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ internal static extern IntPtr /* IUnknown* */ GetRawIUnknownForComObjectNoAddRef(Object o);
+
+ // Copied from referencesource/mscorlib/system/runtime/interopservices/marshal.cs
+ //====================================================================
+ // Converts the CLR exception to an HRESULT. This function also sets
+ // up an IErrorInfo for the exception.
+ // This function is only used in WinRT and converts ObjectDisposedException
+ // to RO_E_CLOSED
+ //====================================================================
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ internal static extern int GetHRForException_WinRT(Exception e);
+
+ // Copied from referencesource/mscorlib/system/runtime/interopservices/marshal.cs
+ //========================================================================
+ // Create activation factory and wraps it with a unique RCW
+ //========================================================================
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ internal static extern object GetNativeActivationFactory(Type type);
}
}
--- /dev/null
+//
+// IncrementalHash.cs
+//
+// Authors:
+// Marek Safar <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NETSTANDARD
+
+namespace System.Security.Cryptography
+{
+ public sealed class IncrementalHash : IDisposable
+ {
+ public IncrementalHash () { }
+ public HashAlgorithmName AlgorithmName { get { throw new NotImplementedException (); } }
+ public void AppendData (byte[] data) { }
+ public void AppendData (byte[] data, int offset, int count) { }
+ public static IncrementalHash CreateHash (HashAlgorithmName hashAlgorithm) { throw new NotImplementedException (); }
+ public static IncrementalHash CreateHMAC (HashAlgorithmName hashAlgorithm, byte[] key) { throw new NotImplementedException (); }
+ public void Dispose () { }
+ public byte[] GetHashAndReset () { throw new NotImplementedException (); }
+ }
+}
+
+#endif
\ No newline at end of file
// Do not include a trailing newline for backwards compatibility
return st.ToString( System.Diagnostics.StackTrace.TraceFormat.Normal );
}
+
+ // Copied from referencesource Environment
+ internal static bool IsWinRTSupported
+ {
+ get
+ {
+ return true;
+ }
+ }
}
}
<Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\ucomienumconnections.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\unknownwrapper.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\variantWrapper.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\windowsruntime\attributes.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\windowsruntime\eventregistrationtoken.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\windowsruntime\eventregistrationtokentable.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\windowsruntime\iactivationfactory.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\windowsruntime\irestrictederrorinfo.cs" />\r
+ <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\windowsruntime\windowsruntimemarshal.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\NgenServicingAttributes.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\remoting\callcontext.cs" />\r
<Compile Include="..\referencesource\mscorlib\system\runtime\serialization\deserializationeventhandler.cs" />\r
<Compile Include="System.Diagnostics.Tracing\EventAttribute.cs" />\r
<Compile Include="System.Diagnostics.Tracing\EventCommand.cs" />\r
<Compile Include="System.Diagnostics.Tracing\EventCommandEventArgs.cs" />\r
+ <Compile Include="System.Diagnostics.Tracing\EventCounter.cs" />\r
<Compile Include="System.Diagnostics.Tracing\EventDataAttribute.cs" />\r
<Compile Include="System.Diagnostics.Tracing\EventFieldAttribute.cs" />\r
<Compile Include="System.Diagnostics.Tracing\EventFieldFormat.cs" />\r
<Compile Include="System.Runtime.CompilerServices\RuntimeHelpers.cs" />\r
<Compile Include="System.Runtime.Hosting\ActivationArguments.cs" />\r
<Compile Include="System.Runtime.Hosting\ApplicationActivator.cs" />\r
- <Compile Include="System.Runtime.InteropServices.WindowsRuntime\DefaultInterfaceAttribute.cs" />\r
<Compile Include="System.Runtime.InteropServices.WindowsRuntime\DesignerNamespaceResolveEventArgs.cs" />\r
- <Compile Include="System.Runtime.InteropServices.WindowsRuntime\EventRegistrationToken.cs" />\r
- <Compile Include="System.Runtime.InteropServices.WindowsRuntime\EventRegistrationTokenTable.cs" />\r
- <Compile Include="System.Runtime.InteropServices.WindowsRuntime\IActivationFactory.cs" />\r
- <Compile Include="System.Runtime.InteropServices.WindowsRuntime\InterfaceImplementedInVersionAttribute.cs" />\r
<Compile Include="System.Runtime.InteropServices.WindowsRuntime\NamespaceResolveEventArgs.cs" />\r
- <Compile Include="System.Runtime.InteropServices.WindowsRuntime\ReadOnlyArrayAttribute.cs" />\r
- <Compile Include="System.Runtime.InteropServices.WindowsRuntime\ReturnValueNameAttribute.cs" />\r
- <Compile Include="System.Runtime.InteropServices.WindowsRuntime\WindowsRuntimeMarshal.cs" />\r
+ <Compile Include="System.Runtime.InteropServices.WindowsRuntime\UnsafeNativeMethods.cs" />\r
<Compile Include="System.Runtime.InteropServices.WindowsRuntime\WindowsRuntimeMetadata.cs" />\r
- <Compile Include="System.Runtime.InteropServices.WindowsRuntime\WriteOnlyArrayAttribute.cs" />\r
<Compile Include="System.Runtime.InteropServices\_Activator.cs" />\r
<Compile Include="System.Runtime.InteropServices\_Assembly.cs" />\r
<Compile Include="System.Runtime.InteropServices\_AssemblyBuilder.cs" />\r
<Compile Include="System.Security.Cryptography\DESCryptoServiceProvider.cs" />\r
<Compile Include="System.Security.Cryptography\DSACryptoServiceProvider.cs" />\r
<Compile Include="System.Security.Cryptography\ICspAsymmetricAlgorithm.cs" />\r
+ <Compile Include="System.Security.Cryptography\IncrementalHash.cs" />\r
<Compile Include="System.Security.Cryptography\KeyNumber.cs" />\r
<Compile Include="System.Security.Cryptography\MD5CryptoServiceProvider.cs" />\r
<Compile Include="System.Security.Cryptography\RC2CryptoServiceProvider.cs" />\r
System.Diagnostics/StackTrace.cs
System.Diagnostics.Tracing/EventAttribute.cs
System.Diagnostics.Tracing/EventCommand.cs
+System.Diagnostics.Tracing/EventCounter.cs
System.Diagnostics.Tracing/EventSource.cs
System.Diagnostics.Tracing/EventSourceAttribute.cs
System.Diagnostics.Tracing/EventSourceSettings.cs
System.Runtime.InteropServices/ComAwareEventInfo.cs
System.Runtime.InteropServices/ComEventsHelper.cs
-System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs
System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs
-System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.cs
-System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable.cs
-System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.cs
-System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs
System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.cs
-System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.cs
-System.Runtime.InteropServices.WindowsRuntime/ReturnValueNameAttribute.cs
-System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.cs
+System.Runtime.InteropServices.WindowsRuntime/UnsafeNativeMethods.cs
System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.cs
-System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.cs
System.Runtime.Remoting/ActivatedClientTypeEntry.cs
System.Runtime.Remoting/ActivatedServiceTypeEntry.cs
System.Runtime.Remoting/CustomErrorsModes.cs
System.Security.Cryptography/DESCryptoServiceProvider.cs
System.Security.Cryptography/DSACryptoServiceProvider.cs
System.Security.Cryptography/ICspAsymmetricAlgorithm.cs
+System.Security.Cryptography/IncrementalHash.cs
System.Security.Cryptography/KeyNumber.cs
System.Security.Cryptography/MD5CryptoServiceProvider.cs
System.Security.Cryptography/RC2CryptoServiceProvider.cs
../referencesource/mscorlib/system/runtime/interopservices/expando/iexpando.cs
+../referencesource/mscorlib/system/runtime/interopservices/windowsruntime/attributes.cs
+../referencesource/mscorlib/system/runtime/interopservices/windowsruntime/eventregistrationtoken.cs
+../referencesource/mscorlib/system/runtime/interopservices/windowsruntime/eventregistrationtokentable.cs
+../referencesource/mscorlib/system/runtime/interopservices/windowsruntime/iactivationfactory.cs
+../referencesource/mscorlib/system/runtime/interopservices/windowsruntime/irestrictederrorinfo.cs
+../referencesource/mscorlib/system/runtime/interopservices/windowsruntime/windowsruntimemarshal.cs
+
../referencesource/mscorlib//system/runtime/reliability/criticalfinalizerobject.cs
../referencesource/mscorlib//system/runtime/reliability/prepreparemethodattribute.cs
../referencesource/mscorlib//system/runtime/reliability/reliabilitycontractattribute.cs
{
TypeDescriptionNode head = (TypeDescriptionNode)_providerTable[key];
TypeDescriptionNode target = head;
- TypeDescriptionNode prev = null;
+// TypeDescriptionNode prev = null;
while(target != null && target.Provider != provider)
{
- prev = target;
+// prev = target;
target = target.Next;
}
[ThreadStatic]
static int indentLevel;
static volatile int indentSize;
+#if CONFIGURATION_DEP
static volatile bool settingsInitialized;
static volatile bool defaultInitialized;
+#endif
// this is internal so TraceSource can use it. We want to lock on the same object because both TraceInternal and
// in the System.Diagnostics.Trace class
static internal void Refresh() {
lock (critSec) {
+#if CONFIGURATION_DEP
settingsInitialized = false;
+#endif
listeners = null;
}
InitializeSettings();
// call !
//
SocketException e = null;
- long scope = 0;
#if !MONO
+ long scope = 0;
if(Socket.OSSupportsIPv6)
{
byte[] bytes = new byte[IPv6AddressBytes];
// There are threading tricks a malicious app can use to create an ArraySegment with mismatched
// array/offset/count. Copy locally and make sure they're valid before using them.
internal static void ValidateSegment(ArraySegment<byte> segment) {
- if (segment == null || segment.Array == null) {
+ if (/*segment == null ||*/ segment.Array == null) {
throw new ArgumentNullException("segment");
}
// Length zero is explicitly allowed
internal static volatile bool s_SupportsIPv6;
internal static volatile bool s_OSSupportsIPv6;
internal static volatile bool s_Initialized;
+#if !MONO
private static volatile WaitOrTimerCallback s_RegisteredWaitCallback;
+#endif
private static volatile bool s_LoggingEnabled;
#if !FEATURE_PAL // perfcounter
internal static volatile bool s_PerfCountersEnabled;
DateTime tempUsed;
CookieCollection lruCc = null;
+#if !MONO
string lruDomain = null;
+#endif
string tempDomain = null;
PathList pathList;
// we also find the least used cookie collection in ENTIRE container
// we count the collection as LRU only if it holds 1+ elements
if (cc.Count > 0 && (tempUsed = cc.TimeStamp(CookieCollection.Stamp.Check)) < oldUsed) {
+#if !MONO
lruDomain = tempDomain;
+#endif
lruCc = cc;
oldUsed = tempUsed;
}
public override IAsyncResult BeginGetRequestStream(AsyncCallback callback, object state)
{
GlobalLog.Enter("FileWebRequest::BeginGetRequestStream");
+#if !MONO
bool success = true;
+#endif
try {
if (Aborted)
throw ExceptionHelper.RequestAbortedException;
m_ReadAResult = new LazyAsyncResult(this, state, callback);
ThreadPool.QueueUserWorkItem(s_GetRequestStreamCallback, m_ReadAResult);
} catch (Exception exception) {
+#if !MONO
success = false;
+#endif
if(Logging.On)Logging.Exception(Logging.Web, this, "BeginGetRequestStream", exception);
throw;
} finally {
public override IAsyncResult BeginGetResponse(AsyncCallback callback, object state)
{
GlobalLog.Enter("FileWebRequest::BeginGetResponse");
+#if !MONO
bool success = true;
+#endif
try {
if (Aborted)
m_WriteAResult = new LazyAsyncResult(this,state,callback);
ThreadPool.QueueUserWorkItem(s_GetResponseCallback,m_WriteAResult);
} catch (Exception exception) {
+#if !MONO
success = false;
+#endif
if(Logging.On)Logging.Exception(Logging.Web, this, "BeginGetResponse", exception);
throw;
} finally {
GlobalLog.Enter("FileWebRequest::EndGetRequestStream");
Stream stream;
+#if !MONO
bool success = false;
+#endif
try {
LazyAsyncResult ar = asyncResult as LazyAsyncResult;
if (asyncResult == null || ar == null) {
}
stream = (Stream) result;
m_writePending = false;
+#if !MONO
success = true;
+#endif
} catch (Exception exception) {
if(Logging.On)Logging.Exception(Logging.Web, this, "EndGetRequestStream", exception);
throw;
GlobalLog.Enter("FileWebRequest::EndGetResponse");
WebResponse response;
+#if !MONO
bool success = false;
+#endif
try {
LazyAsyncResult ar = asyncResult as LazyAsyncResult;
if (asyncResult == null || ar == null) {
}
response = (WebResponse) result;
m_readPending = false;
+#if !MONO
success = true;
+#endif
} catch (Exception exception) {
if(Logging.On)Logging.Exception(Logging.Web, this, "EndGetResponse", exception);
throw;
//used when the length of the header name itself is known (i.e. Subject : )
internal static string EncodeHeaderValue(string value, Encoding encoding, bool base64Encoding, int headerLength) {
- StringBuilder newString = new StringBuilder();
+// StringBuilder newString = new StringBuilder();
//no need to encode if it's pure ascii
if (IsAscii(value, false)) {
#if MONO
public static IWebProxy CreateDefaultProxy ()
{
-#if MONOTOUCH
+#if FEATURE_NO_BSD_SOCKETS
+ throw new PlatformNotSupportedException ();
+#elif MONOTOUCH
return Mono.Net.CFNetwork.GetDefaultProxy ();
#elif MONODROID
// Return the system web proxy. This only works for ICS+.
/// <devdoc>
/// </devdoc>
protected bool UseOptionC() {
- /* Mono: Set to false until we investigate https://bugzilla.xamarin.com/show_bug.cgi?id=25671 */
- return false;
#if FULL_AOT_RUNTIME
return false;
#else
+
+#if MONO
+ /* Mono: Set to false until we investigate https://bugzilla.xamarin.com/show_bug.cgi?id=25671 */
+ return false;
+#else
return(roptions & RegexOptions.Compiled) != 0;
+#endif
#endif
}
#endif
// This is code for Posix style properties - [:Ll:] or [:IsTibetan:].
// It currently doesn't do anything other than skip the whole thing!
if (CharsRight() > 0 && RightChar() == ':' && !inRange) {
- String name;
+// String name;
int savePos = Textpos();
MoveRight();
- name = ScanCapname();
+/* name = */ ScanCapname();
if (CharsRight() < 2 || MoveRightGetChar() != ':' || MoveRightGetChar() != ']')
Textto(savePos);
// else lookup name (nyi)
ProcessModuleCollection modules;
#endif // !FEATURE_PAL
+#if !MONO
bool haveMainWindow;
IntPtr mainWindowHandle; // no need to use SafeHandle for window
string mainWindowTitle;
+#endif
bool haveWorkingSetLimits;
IntPtr minWorkingSet;
IntPtr maxWorkingSet;
-
+
+#if !MONO
bool haveProcessorAffinity;
IntPtr processorAffinity;
+#endif
bool havePriorityClass;
ProcessPriorityClass priorityClass;
threads = null;
modules = null;
#endif // !FEATURE_PAL
+#if !MONO
mainWindowTitle = null;
+#endif
exited = false;
signaled = false;
+#if !MONO
haveMainWindow = false;
+#endif
haveWorkingSetLimits = false;
+#if !MONO
haveProcessorAffinity = false;
+#endif
havePriorityClass = false;
haveExitTime = false;
#if !MONO
#endif
// This exists in WaitHandle, but is oddly ifdefed for some reason...
+#if MONO
+ new
+#endif
private enum OpenExistingResult
{
Success,
//Non-Zero return
#if MONO
- if (!ReleaseSemaphore_internal(Handle, releaseCount, out previousCount))
+ if (!ReleaseSemaphore_internal(SafeWaitHandle.DangerousGetHandle(), releaseCount, out previousCount))
#else
if (!SafeNativeMethods.ReleaseSemaphore(SafeWaitHandle, releaseCount, out previousCount))
#endif
if (type == null)
throw new ArgumentNullException("type");
+#if FEATURE_COMINTEROP || MONO_COM
if (type.IsWindowsRuntimeObject && type.IsImport)
{
return (IActivationFactory)Marshal.GetNativeActivationFactory(type);
}
else
+#endif
{
#if FEATURE_COMINTEROP_WINRT_MANAGED_ACTIVATION
return GetManagedActivationFactory(type);
--- /dev/null
+// CS8101: The pathmap option was incorrectly formatted
+// Line: 0
+// Compiler options: -pathmap:a=
+
+class X
+{
+}
\ No newline at end of file
if (all_source_files == null) {
all_source_files = new Dictionary<string, SourceFile> ();
foreach (var source in SourceFiles)
- all_source_files[source.FullPathName] = source;
+ all_source_files[source.OriginalFullPathName] = source;
}
string path;
if (!Path.IsPathRooted (name)) {
var loc = comp_unit.SourceFile;
- string root = Path.GetDirectoryName (loc.FullPathName);
+ string root = Path.GetDirectoryName (loc.OriginalFullPathName);
path = Path.GetFullPath (Path.Combine (root, name));
var dir = Path.GetDirectoryName (loc.Name);
if (!string.IsNullOrEmpty (dir))
if ((fp.ModFlags & Parameter.Modifier.CallerLineNumber) != 0) {
e = new IntLiteral (ec.BuiltinTypes, loc.Row, loc);
} else if ((fp.ModFlags & Parameter.Modifier.CallerFilePath) != 0) {
- e = new StringLiteral (ec.BuiltinTypes, loc.NameFullPath, loc);
+ e = new StringLiteral (ec.BuiltinTypes, loc.SourceFile.GetFullPathName (ec.Module.Compiler.Settings.PathMap), loc);
} else if (ec.MemberContext.CurrentMemberDefinition != null) {
e = new StringLiteral (ec.BuiltinTypes, ec.MemberContext.CurrentMemberDefinition.GetCallerMemberName (), loc);
}
using Mono.CompilerServices.SymbolWriter;
using System.Diagnostics;
using System.Linq;
+using System.IO;
namespace Mono.CSharp
{
static readonly byte[] MD5Algorith = { 96, 166, 110, 64, 207, 100, 130, 76, 182, 240, 66, 212, 129, 114, 167, 153 };
public readonly string Name;
- public readonly string FullPathName;
+ public readonly string OriginalFullPathName;
public readonly int Index;
public bool AutoGenerated;
{
this.Index = index;
this.Name = name;
- this.FullPathName = path;
+ this.OriginalFullPathName = path;
}
public byte[] Checksum {
this.checksum = checksum;
}
- public SourceFileEntry CreateSymbolInfo (MonoSymbolFile symwriter)
+ public SourceFileEntry CreateSymbolInfo (MonoSymbolFile symwriter, List<KeyValuePair<string, string>> pathMap)
{
if (hidden_lines != null)
hidden_lines.Sort ();
- file = new SourceFileEntry (symwriter, FullPathName, algGuid, checksum);
+ file = new SourceFileEntry (symwriter, GetFullPathName (pathMap), OriginalFullPathName, algGuid, checksum);
if (AutoGenerated)
file.SetAutoGenerated ();
return file;
}
+ public string GetFullPathName (List<KeyValuePair<string, string>> pathMap)
+ {
+ var path = OriginalFullPathName;
+ if (pathMap != null) {
+ foreach (var map in pathMap) {
+ var prefix = map.Key;
+ if (path.Length <= prefix.Length)
+ continue;
+
+ if (path [prefix.Length] != Path.DirectorySeparatorChar)
+ continue;
+
+ if (!path.StartsWith (prefix, StringComparison.Ordinal))
+ continue;
+
+ path = map.Value + path.Substring (prefix.Length);
+ }
+ }
+
+ return path;
+ }
+
public bool Equals (SourceFile other)
{
- return FullPathName == other.FullPathName;
+ return OriginalFullPathName == other.OriginalFullPathName;
}
public bool IsHiddenLocation (Location loc)
public override string ToString ()
{
- return String.Format ("SourceFile ({0}:{1}:{2})", Name, FullPathName, Index);
+ return String.Format ("SourceFile ({0}:{1}:{2})", Name, OriginalFullPathName, Index);
}
}
public string NameFullPath {
get {
int index = File;
- if (token == 0 || index <= 0)
+ if (index <= 0)
return null;
- return source_list[index - 1].FullPathName;
+ return source_list[index - 1].OriginalFullPathName;
}
}
}
}
- // The ISymbolDocumentWriter interface is used by the symbol writer to
- // describe a single source file - for each source file there's exactly
- // one corresponding ISymbolDocumentWriter instance.
- //
- // This class has an internal hash table mapping source document names
- // to such ISymbolDocumentWriter instances - so there's exactly one
- // instance per document.
- //
- // This property returns the ISymbolDocumentWriter instance which belongs
- // to the location's source file.
- //
- // If we don't have a symbol writer, this property is always null.
public SourceFile SourceFile {
get {
int index = File;
if (include_files == null)
include_files = new Dictionary<string, SourceFile> ();
- if (!include_files.ContainsKey (file.FullPathName))
- include_files.Add (file.FullPathName, file);
+ if (!include_files.ContainsKey (file.OriginalFullPathName))
+ include_files.Add (file.OriginalFullPathName, file);
}
public void AddDefine (string value)
{
var sw = Module.DeclaringAssembly.SymbolWriter;
if (sw != null) {
- CreateUnitSymbolInfo (sw);
+ CreateUnitSymbolInfo (sw, Compiler.Settings.PathMap);
}
base.PrepareEmit ();
//
// Creates symbol file index in debug symbol file
//
- void CreateUnitSymbolInfo (MonoSymbolFile symwriter)
+ void CreateUnitSymbolInfo (MonoSymbolFile symwriter, List<KeyValuePair<string, string>> pathMap)
{
- var si = file.CreateSymbolInfo (symwriter);
+ var si = file.CreateSymbolInfo (symwriter, pathMap);
comp_unit = new CompileUnitEntry (symwriter, si);
if (include_files != null) {
foreach (SourceFile include in include_files.Values) {
- si = include.CreateSymbolInfo (symwriter);
+ si = include.CreateSymbolInfo (symwriter, pathMap);
comp_unit.AddFile (si);
}
}
//
public List<Tuple<string, string>> AssemblyReferencesAliases;
+ public List<KeyValuePair<string, string>> PathMap;
+
//
// Modules to be embedded
//
settings.RuntimeMetadataVersion = value;
return ParseResult.Success;
+ case "/pathmap":
+ if (value.Length == 0) {
+ return ParseResult.Success;
+ }
+
+ foreach (var pair in value.Split (',')) {
+ var kv = pair.Split ('=');
+ if (kv.Length != 2) {
+ report.Error (8101, "The pathmap option was incorrectly formatted");
+ return ParseResult.Error;
+ }
+
+ if (settings.PathMap == null)
+ settings.PathMap = new List<KeyValuePair<string, string>> ();
+
+ var key = kv [0].TrimEnd (Path.DirectorySeparatorChar);
+ var path = kv [1].TrimEnd (Path.DirectorySeparatorChar);
+ if (key.Length == 0 || path.Length == 0)
+ report.Error (8101, "The pathmap option was incorrectly formatted");
+
+ settings.PathMap.Add (new KeyValuePair<string, string> (key, path));
+ }
+
+ return ParseResult.Success;
+
// csc options that we don't support
case "/analyzer":
case "/appconfig":
case "/link":
case "/moduleassemblyname":
case "/nowin32manifest":
- case "/pathmap":
case "/pdb":
case "/preferreduilang":
case "/publicsign":
" -help Lists all compiler options (short: -?)\n" +
" -keycontainer:NAME The key pair container used to sign the output assembly\n" +
" -keyfile:FILE The key file used to strongname the ouput assembly\n" +
- " -langversion:TEXT Specifies language version: ISO-1, ISO-2, 3, 4, 5, Default or Experimental\n" +
+ " -langversion:TEXT Specifies language version: ISO-1, ISO-2, 3, 4, 5, 6, Default or Experimental\n" +
" -lib:PATH1[,PATHn] Specifies the location of referenced assemblies\n" +
" -main:CLASS Specifies the class with the Main method (short: -m)\n" +
" -noconfig Disables implicitly referenced assemblies\n" +
" -nowarn:W1[,Wn] Suppress one or more compiler warnings\n" +
" -optimize[+|-] Enables advanced compiler optimizations (short: -o)\n" +
" -out:FILE Specifies output assembly name\n" +
+ " -pathmap:K=V[,Kn=Vn] Sets a mapping for source path names used in generated output\n" +
" -pkg:P1[,Pn] References packages P1..Pn\n" +
" -platform:ARCH Specifies the target platform of the output assembly\n" +
" ARCH can be one of: anycpu, anycpu32bitpreferred, arm,\n" +
LIB_REFS = System Mono.Security Mono.Btls.Interface
PROGRAM = btls-cert-sync.exe
+ifndef HAVE_BTLS
+PROGRAM_NAME = dummy-btls-cert-sync.exe
+NO_INSTALL = yes
+NO_SIGN_ASSEMBLY = yes
+NO_TEST = yes
+NO_BUILD = yes
+endif
+
include ../../build/executable.make
var startup_files = new string [settings.SourceFiles.Count];
int i = 0;
foreach (var source in settings.SourceFiles)
- startup_files [i++] = source.FullPathName;
+ startup_files [i++] = source.OriginalFullPathName;
settings.SourceFiles.Clear ();
TextWriter agent_stderr = null;
Example:
-monoliner -d ../../libs -a program.exe
+monolinker -d ../../libs -a program.exe
8) Adding custom steps to the linker.
LOCAL_MCS_FLAGS= $(OTHER_RES:%=-resource:%)
LOCAL_MCS_FLAGS += -d:STATIC,NO_SYMBOL_WRITER,NO_AUTHENTICODE
-LIB_REFS = System.Xml System System.Core
+LIB_REFS = System.Xml System System.Core System.IO.Compression.FileSystem
EXTRA_DISTFILES = $(RESOURCE_FILES)
include ../../build/executable.make
mkbundle.exe: $(RESOURCE_FILES)
+
+test-simple: simple.exe
+ mono --debug $(the_lib) --simple simple.exe -o foo && ./foo
+ mono --debug $(the_lib) --cross default simple.exe -o foo && ./foo
+ mono --debug $(the_lib) --sdk `dirname \`which mono\``/.. simple.exe -o foo && ./foo
+ -rm DEMO.zip
+ mono-package-runtime `dirname \`which mono\``/.. DEMO
+ mkdir -p ~/.mono/targets/DEMO
+ unzip -d ~/.mono/targets/DEMO DEMO.zip
+ mono --debug $(the_lib) --cross DEMO simple.exe -o foo && ./foo
+
+simple.exe: Makefile
+ echo 'class X { static void Main () { System.Console.WriteLine ("OK");}}' > simple.cs && mcs simple.cs
<Project>{359142A1-D80F-401E-AA64-7167C9317649}</Project>\r
<Name>System.Core-net_4_x</Name>\r
</ProjectReference>\r
+ <ProjectReference Include="../../class/System.IO.Compression.FileSystem/System.IO.Compression.FileSystem-net_4_x.csproj">\r
+ <Project>{9E61FF2E-493E-4CA0-BBDA-2EF96A4CB058}</Project>\r
+ <Name>System.IO.Compression.FileSystem-net_4_x</Name>\r
+ </ProjectReference>\r
</ItemGroup>\r
<ItemGroup>\r
<Folder Include="Properties\" />\r
//
// Based on the `make-bundle' Perl script written by Paolo Molaro (lupus@debian.org)
//
+// TODO:
+// [x] Rename the paths for the zip file that is downloaded
+// [x] Update documentation with new flag
+// [x] Load internationalized assemblies
+// [x] Dependencies - if System.dll -> include Mono.Security.* (not needed, automatic)
+// [x] --list-targets should download from a different url
+// [x] --fetch-target should unpack zip file
+// [x] Update --cross to use not a runtime, but an SDK
+// [x] Update --local-targets to show the downloaded SDKs
+//
// Author:
// Miguel de Icaza
//
static bool custom_mode = true;
static string embedded_options = null;
static string runtime = null;
+ static string sdk_path = null;
+ static string lib_path = null;
static Dictionary<string,string> environment = new Dictionary<string,string>();
static string [] i18n = new string [] {
"West",
link_paths.Add (".");
DetectOS ();
-
+
for (int i = 0; i < top; i++){
switch (args [i]){
case "--help": case "-h": case "-?":
Help ();
return 1;
}
+ if (sdk_path != null || runtime != null)
+ Error ("You can not specify one of --runtime, --sdk or --cross");
custom_mode = false;
autodeps = true;
cross_target = args [++i];
alias = lspec.Substring (0, p);
path = lspec.Substring (p+1);
}
- if (!File.Exists (path)){
- Console.Error.WriteLine ($"The specified library file {path} does not exist");
- return 1;
- }
+ if (!File.Exists (path))
+ Error ($"The specified library file {path} does not exist");
libraries [alias] = path;
break;
break;
case "--list-targets":
+ CommandLocalTargets ();
var wc = new WebClient ();
- var s = wc.DownloadString (new Uri (target_server + "target-list.txt"));
- Console.WriteLine ("Cross-compilation targets available:\n" + s);
-
+ var s = wc.DownloadString (new Uri (target_server + "target-sdks.txt"));
+ Console.WriteLine ("Targets available for download with --fetch-target:\n" + s);
return 0;
case "--target-server":
}
embedded_options = args [++i];
break;
+ case "--sdk":
+ if (i + 1 == top) {
+ Help ();
+ return 1;
+ }
+ custom_mode = false;
+ autodeps = true;
+ sdk_path = args [++i];
+ if (cross_target != null || runtime != null)
+ Error ("You can not specify one of --runtime, --sdk or --cross");
+ break;
case "--runtime":
if (i+1 == top){
Help ();
return 1;
}
+ if (sdk_path != null || cross_target != null)
+ Error ("You can only specify one of --runtime, --sdk or --cross");
custom_mode = false;
autodeps = true;
runtime = args [++i];
case "linux":
break;
default:
- Console.Error.WriteLine ("Invalid style '{0}' - only 'windows', 'mac' and 'linux' are supported for --style argument", style);
+ Error ("Invalid style '{0}' - only 'windows', 'mac' and 'linux' are supported for --style argument", style);
return 1;
}
}
}
+ // Modern bundling starts here
+ if (!custom_mode){
+ if (runtime != null){
+ // Nothing to do here, the user has chosen to manually specify --runtime nad libraries
+ } else if (sdk_path != null) {
+ VerifySdk (sdk_path);
+ } else if (cross_target == "default" || cross_target == null){
+ sdk_path = Path.GetFullPath (Path.Combine (Process.GetCurrentProcess().MainModule.FileName, "..", ".."));
+ VerifySdk (sdk_path);
+ } else {
+ sdk_path = Path.Combine (targets_dir, cross_target);
+ Console.WriteLine ("From: " + sdk_path);
+ VerifySdk (sdk_path);
+ }
+ }
if (fetch_target != null){
- var truntime = Path.Combine (targets_dir, fetch_target, "mono");
- Directory.CreateDirectory (Path.GetDirectoryName (truntime));
+ var directory = Path.Combine (targets_dir, fetch_target);
+ var zip_download = Path.Combine (directory, "sdk.zip");
+ Directory.CreateDirectory (Path.GetDirectoryName (directory));
var wc = new WebClient ();
var uri = new Uri ($"{target_server}{fetch_target}");
try {
if (!quiet){
- Console.WriteLine ($"Downloading runtime {uri} to {truntime}");
+ Console.WriteLine ($"Downloading runtime {uri} to {zip_download}");
}
- wc.DownloadFile (uri, truntime);
+ wc.DownloadFile (uri, zip_download);
+ ZipFile.ExtractToDirectory(zip_download, directory);
+ File.Delete (zip_download);
} catch {
Console.Error.WriteLine ($"Failure to download the specified runtime from {uri}");
- File.Delete (truntime);
+ File.Delete (zip_download);
return 1;
}
return 0;
}
List<string> assemblies = LoadAssemblies (sources);
+ LoadLocalizedAssemblies (assemblies);
List<string> files = new List<string> ();
foreach (string file in assemblies)
if (!QueueAssembly (files, file))
return 1;
if (custom_mode)
GenerateBundles (files);
- else {
- if (cross_target == "default")
- runtime = null;
- else {
- if (runtime == null){
- if (cross_target == null){
- Console.Error.WriteLine ("you should specify either a --runtime or a --cross compilation target");
- Environment.Exit (1);
- }
- runtime = Path.Combine (targets_dir, cross_target, "mono");
- if (!File.Exists (runtime)){
- Console.Error.WriteLine ($"The runtime for the {cross_target} does not exist, use --fetch-target {cross_target} to download first");
- return 1;
- }
- } else {
- if (!File.Exists (runtime)){
- Console.Error.WriteLine ($"The Mono runtime specified with --runtime does not exist");
- return 1;
- }
- }
-
- }
+ else
GeneratePackage (files);
- }
+
Console.WriteLine ("Generated {0}", output);
return 0;
}
+ static void VerifySdk (string path)
+ {
+ if (!Directory.Exists (path))
+ Error ($"The specified SDK path does not exist: {path}");
+ runtime = Path.Combine (sdk_path, "bin", "mono");
+ if (!File.Exists (runtime))
+ Error ($"The SDK location does not contain a {path}/bin/mono runtime");
+ lib_path = Path.Combine (path, "lib", "mono", "4.5");
+ if (!Directory.Exists (lib_path))
+ Error ($"The SDK location does not contain a {path}/lib/mono/4.5 directory");
+ link_paths.Add (lib_path);
+ }
+
static string targets_dir = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), ".mono", "targets");
static void CommandLocalTargets ()
{
string [] targets;
- Console.WriteLine ("Available targets:");
+ Console.WriteLine ("Available targets locally:");
Console.WriteLine ("\tdefault\t- Current System Mono");
try {
targets = Directory.GetDirectories (targets_dir);
return;
}
foreach (var target in targets){
- var p = Path.Combine (target, "mono");
+ var p = Path.Combine (target, "bin", "mono");
if (File.Exists (p))
Console.WriteLine ("\t{0}", Path.GetFileName (target));
}
return true;
if (!File.Exists (file)){
- Console.Error.WriteLine ("The file {0} does not exist", file);
+ Error ("The file {0} does not exist", file);
return false;
}
maker.Add (code, file);
if (IsUnix)
runtime = Process.GetCurrentProcess().MainModule.FileName;
else {
- Console.Error.WriteLine ("You must specify at least one runtime with --runtime or --cross");
+ Error ("You must specify at least one runtime with --runtime or --cross");
Environment.Exit (1);
}
}
if (!File.Exists (runtime)){
- Console.Error.WriteLine ($"The specified runtime at {runtime} does not exist");
+ Error ($"The specified runtime at {runtime} does not exist");
Environment.Exit (1);
}
if (ctor_func != null){
- Console.Error.WriteLine ("--static-ctor not supported with package bundling, you must use native compilation for this");
+ Error ("--static-ctor not supported with package bundling, you must use native compilation for this");
return false;
}
try {
conf = File.OpenRead (config_file);
} catch {
- Error (String.Format ("Failure to open {0}", config_file));
+ Error ("Failure to open {0}", config_file);
return;
}
if (!quiet)
try {
conf = File.OpenRead (machine_config_file);
} catch {
- Error (String.Format ("Failure to open {0}", machine_config_file));
+ Error ("Failure to open {0}", machine_config_file);
return;
}
if (!quiet)
List<string> assemblies = new List<string> ();
bool error = false;
- var other = i18n.Select (x=> "I18N." + x + (x.Length > 0 ? "." : "") + "dll");
-
- foreach (string name in sources.Concat (other)){
+ foreach (string name in sources){
try {
- Assembly a = LoadAssembly (name);
+ Assembly a = LoadAssemblyFile (name);
if (a == null){
error = true;
if (error)
Environment.Exit (1);
-
+
return assemblies;
}
+
+ static void LoadLocalizedAssemblies (List<string> assemblies)
+ {
+ var other = i18n.Select (x => "I18N." + x + (x.Length > 0 ? "." : "") + "dll");
+ bool error = false;
+
+ foreach (string name in other) {
+ try {
+ Assembly a = LoadAssembly (name);
+
+ if (a == null) {
+ error = true;
+ continue;
+ }
+
+ assemblies.Add (a.CodeBase);
+ } catch (Exception) {
+ if (skip_scan) {
+ if (!quiet)
+ Console.WriteLine ("File will not be scanned: {0}", name);
+ assemblies.Add (new Uri (new FileInfo (name).FullName).ToString ());
+ } else {
+ throw;
+ }
+ }
+ }
+
+ if (error)
+ Environment.Exit (1);
+ }
+
static readonly Universe universe = new Universe ();
static readonly Dictionary<string, string> loaded_assemblies = new Dictionary<string, string> ();
var name = GetAssemblyName (path);
string found;
if (loaded_assemblies.TryGetValue (name, out found)) {
- Error (string.Format ("Duplicate assembly name `{0}'. Both `{1}' and `{2}' use same assembly name.", name, path, found));
+ Error ("Duplicate assembly name `{0}'. Both `{1}' and `{2}' use same assembly name.", name, path, found);
return false;
}
Assembly a = universe.LoadFile (path);
foreach (AssemblyName an in a.GetReferencedAssemblies ()) {
- a = universe.Load (an.FullName);
+ LoadAssembly (an.FullName);
if (!QueueAssembly (files, a.CodeBase))
return false;
}
return true;
}
- static Assembly LoadAssembly (string assembly)
+ //
+ // Loads an assembly from a specific path
+ //
+ static Assembly LoadAssemblyFile (string assembly)
{
- Assembly a;
+ Assembly a = null;
try {
- char[] path_chars = { '/', '\\' };
-
- if (assembly.IndexOfAny (path_chars) != -1) {
- a = universe.LoadFile (assembly);
- } else {
- string ass = assembly;
- if (ass.EndsWith (".dll"))
- ass = assembly.Substring (0, assembly.Length - 4);
- a = universe.Load (ass);
- }
- return a;
+ a = universe.LoadFile (assembly);
} catch (FileNotFoundException){
- string total_log = "";
-
- foreach (string dir in link_paths){
- string full_path = Path.Combine (dir, assembly);
- if (!assembly.EndsWith (".dll") && !assembly.EndsWith (".exe"))
- full_path += ".dll";
-
- try {
- a = universe.LoadFile (full_path);
- return a;
- } catch (FileNotFoundException ff) {
- total_log += ff.FusionLog;
- continue;
- }
- }
- Error ("Cannot find assembly `" + assembly + "'" );
- if (!quiet)
- Console.WriteLine ("Log: \n" + total_log);
+ Error ($"Cannot find assembly `{assembly}'");
} catch (IKVM.Reflection.BadImageFormatException f) {
if (skip_scan)
throw;
- Error ("Cannot load assembly (bad file format) " + f.Message);
+ Error ($"Cannot load assembly (bad file format) " + f.Message);
} catch (FileLoadException f){
- Error ("Cannot load assembly " + f.Message);
+ Error ($"Cannot load assembly " + f.Message);
} catch (ArgumentNullException){
- Error("Cannot load assembly (null argument)");
+ Error( $"Cannot load assembly (null argument)");
}
- return null;
+ return a;
}
- static void Error (string msg)
+ //
+ // Loads an assembly from any of the link directories provided
+ //
+ static Assembly LoadAssembly (string assembly)
+ {
+ string total_log = "";
+ foreach (string dir in link_paths){
+ string full_path = Path.Combine (dir, assembly);
+ if (!assembly.EndsWith (".dll") && !assembly.EndsWith (".exe"))
+ full_path += ".dll";
+
+ try {
+ var a = universe.LoadFile (full_path);
+ return a;
+ } catch (FileNotFoundException ff) {
+ total_log += ff.FusionLog;
+ continue;
+ }
+ }
+ if (!quiet)
+ Console.WriteLine ("Log: \n" + total_log);
+ return null;
+ }
+
+ static void Error (string msg, params object [] args)
{
- Console.Error.WriteLine ("ERROR: " + msg);
+ Console.Error.WriteLine ("ERROR: {0}", string.Format (msg, args));
+ throw new Exception ();
Environment.Exit (1);
}
"--simple Simple mode does not require a C toolchain and can cross compile\n" +
" --cross TARGET Generates a binary for the given TARGET\n"+
" --env KEY=VALUE Hardcodes an environment variable for the target\n" +
+ " --fetch-target NAME Downloads the target SDK from the remote server\n" +
" --library [LIB,]PATH Bundles the specified dynamic library to be used at runtime\n" +
" LIB is optional shortname for file located at PATH\n" +
" --list-targets Lists available targets on the remote server\n" +
" --local-targets Lists locally available targets\n" +
" --options OPTIONS Embed the specified Mono command line options on target\n" +
" --runtime RUNTIME Manually specifies the Mono runtime to use\n" +
+ " --sdk PATH Use a Mono SDK root location instead of a target\n" +
" --target-server URL Specified a server to download targets from, default is " + target_server + "\n" +
"\n" +
"--custom Builds a custom launcher, options for --custom\n" +
p.WaitForExit ();
int ret = p.ExitCode;
if (ret != 0){
- Error (String.Format("[Fail] {0}", ret));
+ Error ("[Fail] {0}", ret);
}
}
}
${BORINGSSL_OBJECTS}
)
-if (BUILD_SHARED_LIBS)
+if (BUILD_DYNAMIC_BTLS)
+ add_library (mono-btls-shared SHARED ${MONO_BTLS_SOURCES})
+elseif (BUILD_SHARED_LIBS)
add_library (mono-btls-shared SHARED ${MONO_BTLS_SOURCES})
set_target_properties (mono-btls-shared PROPERTIES RULE_LAUNCH_LINK
- "${PROJECT_SOURCE_DIR}/create-object-library.sh ${CMAKE_BINARY_DIR} mono-btls-shared.txt mono-btls-shared-lo.txt libmono-btls-shared.a shared ${CMAKE_AR} ${CMAKE_RANLIB} <OBJECTS> --"
+ "${PROJECT_SOURCE_DIR}/create-object-library.sh ${CMAKE_BINARY_DIR} mono-btls-shared.txt mono-btls-shared-lo.txt libmono-btls-shared.a shared ${CMAKE_AR} ${CMAKE_RANLIB} <OBJECTS> --"
)
else ()
add_library (mono-btls-static STATIC ${MONO_BTLS_SOURCES})
all-local: $(BTLS_STATIC_LIST) $(BTLS_SHARED_LIST)
+if DYNAMIC_BTLS
+build-shared/Makefile:
+ -mkdir -p build-shared
+ (cd build-shared && $(CMAKE) $(CMAKE_ARGS) $(BTLS_CMAKE_ARGS) -DBUILD_DYNAMIC_BTLS=1 $(abs_top_srcdir)/mono/btls)
+else
build-shared/Makefile:
-mkdir -p build-shared
(cd build-shared && $(CMAKE) $(CMAKE_ARGS) $(BTLS_CMAKE_ARGS) -DBUILD_SHARED_LIBS=1 $(abs_top_srcdir)/mono/btls)
+endif
build-static/Makefile:
-mkdir -p build-static
-rm -rf build-static
-rm -rf build-shared
+if DYNAMIC_BTLS
+install-exec-local:
+ $(install_sh) build-shared/libmono-btls-shared.* "$(DESTDIR)/$(libdir)"
+endif
NULL, NULL, mono_ctrl, mono_new, mono_free, NULL
};
-BIO *
+MONO_API BIO *
mono_btls_bio_mono_new (void)
{
BIO *bio;
return bio;
}
-void
+MONO_API void
mono_btls_bio_mono_initialize (BIO *bio, const void *instance,
MonoBtlsReadFunc read_func, MonoBtlsWriteFunc write_func,
MonoBtlsControlFunc control_func)
bio->init = 1;
}
-int
+MONO_API int
mono_btls_bio_read (BIO *bio, void *data, int len)
{
return BIO_read (bio, data, len);
}
-int
+MONO_API int
mono_btls_bio_write (BIO *bio, const void *data, int len)
{
return BIO_write (bio, data, len);
}
-int
+MONO_API int
mono_btls_bio_flush (BIO *bio)
{
return BIO_flush (bio);
}
-int
+MONO_API int
mono_btls_bio_indent (BIO *bio, unsigned indent, unsigned max_indent)
{
return BIO_indent (bio, indent, max_indent);
}
-int
+MONO_API int
mono_btls_bio_hexdump (BIO *bio, const uint8_t *data, int len, unsigned indent)
{
return BIO_hexdump (bio, data, len, indent);
}
-void
+MONO_API void
mono_btls_bio_print_errors (BIO *bio)
{
BIO_print_errors (bio);
}
-void
+MONO_API void
mono_btls_bio_free (BIO *bio)
{
BIO_free (bio);
}
-BIO *
+MONO_API BIO *
mono_btls_bio_mem_new (void)
{
return BIO_new (BIO_s_mem ());
}
-int
+MONO_API int
mono_btls_bio_mem_get_data (BIO *bio, void **data)
{
return (int)BIO_get_mem_data (bio, (char**)data);
//
#include <btls-error.h>
+#include <btls-util.h>
#include <assert.h>
-int
+MONO_API int
mono_btls_error_peek_error (void)
{
return ERR_peek_error ();
}
-int
+MONO_API int
mono_btls_error_get_error (void)
{
return ERR_get_error ();
}
-void
+MONO_API void
mono_btls_error_clear_error (void)
{
ERR_clear_error ();
}
-void
+MONO_API void
mono_btls_error_get_error_string_n (int error, char *buf, int len)
{
ERR_error_string_n (error, buf, len);
#include <btls-key.h>
-void
+MONO_API void
mono_btls_key_free (EVP_PKEY *pkey)
{
EVP_PKEY_free (pkey);
}
-EVP_PKEY *
+MONO_API EVP_PKEY *
mono_btls_key_up_ref (EVP_PKEY *pkey)
{
return EVP_PKEY_up_ref (pkey);
}
-int
+MONO_API int
mono_btls_key_get_bits (EVP_PKEY *pkey)
{
return EVP_PKEY_bits (pkey);
}
-int
+MONO_API int
mono_btls_key_is_rsa (EVP_PKEY *pkey)
{
return pkey->type == EVP_PKEY_RSA;
}
-int
+MONO_API int
mono_btls_key_get_bytes (EVP_PKEY *pkey, uint8_t **buffer, int *size, int include_private_bits)
{
size_t len;
CRYPTO_refcount_t references;
};
-MonoBtlsPkcs12 *
+MONO_API MonoBtlsPkcs12 *
mono_btls_pkcs12_new (void)
{
MonoBtlsPkcs12 *pkcs12 = (MonoBtlsPkcs12 *)OPENSSL_malloc (sizeof (MonoBtlsPkcs12));
return pkcs12;
}
-int
+MONO_API int
mono_btls_pkcs12_get_count (MonoBtlsPkcs12 *pkcs12)
{
return (int)sk_X509_num (pkcs12->certs);
}
-X509 *
+MONO_API X509 *
mono_btls_pkcs12_get_cert (MonoBtlsPkcs12 *pkcs12, int index)
{
X509 *cert;
return cert;
}
-STACK_OF(X509) *
+MONO_API STACK_OF(X509) *
mono_btls_pkcs12_get_certs (MonoBtlsPkcs12 *pkcs12)
{
return pkcs12->certs;
}
-int
+MONO_API int
mono_btls_pkcs12_free (MonoBtlsPkcs12 *pkcs12)
{
if (!CRYPTO_refcount_dec_and_test_zero (&pkcs12->references))
return 1;
}
-MonoBtlsPkcs12 *
+MONO_API MonoBtlsPkcs12 *
mono_btls_pkcs12_up_ref (MonoBtlsPkcs12 *pkcs12)
{
CRYPTO_refcount_inc (&pkcs12->references);
return pkcs12;
}
-void
+MONO_API void
mono_btls_pkcs12_add_cert (MonoBtlsPkcs12 *pkcs12, X509 *x509)
{
X509_up_ref (x509);
sk_X509_push (pkcs12->certs, x509);
}
-int
+MONO_API int
mono_btls_pkcs12_import (MonoBtlsPkcs12 *pkcs12, const void *data, int len, const void *password)
{
CBS cbs;
return PKCS12_get_key_and_certs (&pkcs12->private_key, pkcs12->certs, &cbs, password);
}
-int
+MONO_API int
mono_btls_pkcs12_has_private_key (MonoBtlsPkcs12 *pkcs12)
{
return pkcs12->private_key != NULL;
}
-EVP_PKEY *
+MONO_API EVP_PKEY *
mono_btls_pkcs12_get_private_key (MonoBtlsPkcs12 *pkcs12)
{
if (!pkcs12->private_key)
void ssl_cipher_preference_list_free (struct ssl_cipher_preference_list_st *cipher_list);
-int
+MONO_API int
mono_btls_ssl_ctx_is_debug_enabled (MonoBtlsSslCtx *ctx)
{
return ctx->debug_bio != NULL;
}
-int
+MONO_API int
mono_btls_ssl_ctx_debug_printf (MonoBtlsSslCtx *ctx, const char *format, ...)
{
va_list args;
return ret;
}
-MonoBtlsSslCtx *
+MONO_API MonoBtlsSslCtx *
mono_btls_ssl_ctx_new (void)
{
MonoBtlsSslCtx *ctx;
return ctx;
}
-MonoBtlsSslCtx *
+MONO_API MonoBtlsSslCtx *
mono_btls_ssl_ctx_up_ref (MonoBtlsSslCtx *ctx)
{
CRYPTO_refcount_inc (&ctx->references);
return ctx;
}
-int
+MONO_API int
mono_btls_ssl_ctx_free (MonoBtlsSslCtx *ctx)
{
if (!CRYPTO_refcount_dec_and_test_zero (&ctx->references))
return 1;
}
-SSL_CTX *
+MONO_API SSL_CTX *
mono_btls_ssl_ctx_get_ctx (MonoBtlsSslCtx *ctx)
{
return ctx->ctx;
}
-void
+MONO_API void
mono_btls_ssl_ctx_set_debug_bio (MonoBtlsSslCtx *ctx, BIO *debug_bio)
{
if (debug_bio)
ctx->debug_bio = NULL;
}
-void
+MONO_API void
mono_btls_ssl_ctx_initialize (MonoBtlsSslCtx *ctx, void *instance)
{
ctx->instance = instance;
return ret;
}
-void
+MONO_API void
mono_btls_ssl_ctx_set_cert_verify_callback (MonoBtlsSslCtx *ptr, MonoBtlsVerifyFunc func, int cert_required)
{
int mode;
return ret;
}
-void
+MONO_API void
mono_btls_ssl_ctx_set_cert_select_callback (MonoBtlsSslCtx *ptr, MonoBtlsSelectFunc func)
{
ptr->select_func = func;
SSL_CTX_set_cert_cb (ptr->ctx, cert_select_callback, ptr);
}
-X509_STORE *
+MONO_API X509_STORE *
mono_btls_ssl_ctx_peek_store (MonoBtlsSslCtx *ctx)
{
return SSL_CTX_get_cert_store (ctx->ctx);
}
-void
+MONO_API void
mono_btls_ssl_ctx_set_min_version (MonoBtlsSslCtx *ctx, int version)
{
SSL_CTX_set_min_version (ctx->ctx, version);
}
-void
+MONO_API void
mono_btls_ssl_ctx_set_max_version (MonoBtlsSslCtx *ctx, int version)
{
SSL_CTX_set_max_version (ctx->ctx, version);
}
-int
+MONO_API int
mono_btls_ssl_ctx_is_cipher_supported (MonoBtlsSslCtx *ctx, uint16_t value)
{
const SSL_CIPHER *cipher;
return cipher != NULL;
}
-int
+MONO_API int
mono_btls_ssl_ctx_set_ciphers (MonoBtlsSslCtx *ctx, int count, const uint16_t *data,
int allow_unsupported)
{
return 0;
}
-int
+MONO_API int
mono_btls_ssl_ctx_set_verify_param (MonoBtlsSslCtx *ctx, const MonoBtlsX509VerifyParam *param)
{
return SSL_CTX_set1_param (ctx->ctx, mono_btls_x509_verify_param_peek_param (param));
STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list (SSL *s, const CBS *cbs);
-MonoBtlsSsl *
+MONO_API MonoBtlsSsl *
mono_btls_ssl_new (MonoBtlsSslCtx *ctx)
{
MonoBtlsSsl *ptr;
return ptr;
}
-void
+MONO_API void
mono_btls_ssl_destroy (MonoBtlsSsl *ptr)
{
mono_btls_ssl_close (ptr);
free (ptr);
}
-void
+MONO_API void
mono_btls_ssl_close (MonoBtlsSsl *ptr)
{
;
}
-void
+MONO_API void
mono_btls_ssl_set_bio (MonoBtlsSsl *ptr, BIO *bio)
{
BIO_up_ref (bio);
SSL_set_bio (ptr->ssl, bio, bio);
}
-void
+MONO_API void
mono_btls_ssl_print_errors_cb (ERR_print_errors_callback_t callback, void *ctx)
{
ERR_print_errors_cb (callback, ctx);
}
-int
+MONO_API int
mono_btls_ssl_use_certificate (MonoBtlsSsl *ptr, X509 *x509)
{
return SSL_use_certificate (ptr->ssl, x509);
}
-int
+MONO_API int
mono_btls_ssl_use_private_key (MonoBtlsSsl *ptr, EVP_PKEY *key)
{
return SSL_use_PrivateKey (ptr->ssl, key);
}
-int
+MONO_API int
mono_btls_ssl_add_chain_certificate (MonoBtlsSsl *ptr, X509 *x509)
{
return SSL_add1_chain_cert (ptr->ssl, x509);
}
-int
+MONO_API int
mono_btls_ssl_accept (MonoBtlsSsl *ptr)
{
return SSL_accept (ptr->ssl);
}
-int
+MONO_API int
mono_btls_ssl_connect (MonoBtlsSsl *ptr)
{
return SSL_connect (ptr->ssl);
}
-int
+MONO_API int
mono_btls_ssl_handshake (MonoBtlsSsl *ptr)
{
return SSL_do_handshake (ptr->ssl);
}
-int
+MONO_API int
mono_btls_ssl_read (MonoBtlsSsl *ptr, void *buf, int count)
{
return SSL_read (ptr->ssl, buf, count);
}
-int
+MONO_API int
mono_btls_ssl_write (MonoBtlsSsl *ptr, void *buf, int count)
{
return SSL_write (ptr->ssl, buf, count);
}
-int
+MONO_API int
mono_btls_ssl_get_version (MonoBtlsSsl *ptr)
{
return SSL_version (ptr->ssl);
}
-void
+MONO_API void
mono_btls_ssl_set_min_version (MonoBtlsSsl *ptr, int version)
{
SSL_set_min_version (ptr->ssl, version);
}
-void
+MONO_API void
mono_btls_ssl_set_max_version (MonoBtlsSsl *ptr, int version)
{
SSL_set_max_version (ptr->ssl, version);
}
-int
+MONO_API int
mono_btls_ssl_get_cipher (MonoBtlsSsl *ptr)
{
const SSL_CIPHER *cipher;
return (uint16_t)SSL_CIPHER_get_id (cipher);
}
-int
+MONO_API int
mono_btls_ssl_set_cipher_list (MonoBtlsSsl *ptr, const char *str)
{
return SSL_set_cipher_list(ptr->ssl, str);
}
-int
+MONO_API int
mono_btls_ssl_get_ciphers (MonoBtlsSsl *ptr, uint16_t **data)
{
STACK_OF(SSL_CIPHER) *ciphers;
return count;
}
-X509 *
+MONO_API X509 *
mono_btls_ssl_get_peer_certificate (MonoBtlsSsl *ptr)
{
return SSL_get_peer_certificate (ptr->ssl);
}
-int
+MONO_API int
mono_btls_ssl_get_error (MonoBtlsSsl *ptr, int ret_code)
{
return SSL_get_error (ptr->ssl, ret_code);
}
-int
+MONO_API int
mono_btls_ssl_set_verify_param (MonoBtlsSsl *ptr, const MonoBtlsX509VerifyParam *param)
{
return SSL_set1_param (ptr->ssl, mono_btls_x509_verify_param_peek_param (param));
}
-int
+MONO_API int
mono_btls_ssl_set_server_name (MonoBtlsSsl *ptr, const char *name)
{
return SSL_set_tlsext_host_name (ptr->ssl, name);
extern int asn1_generalizedtime_to_tm (struct tm *tm, const ASN1_GENERALIZEDTIME *d);
-void
+MONO_API void
mono_btls_free (void *data)
{
OPENSSL_free (data);
#include <string.h>
#include <openssl/ssl.h>
+#ifndef MONO_API
+#if defined(_MSC_VER)
+
+#define MONO_API __declspec(dllexport)
+
+#else
+
+#ifdef __GNUC__
+#define MONO_API __attribute__ ((visibility ("default")))
+#else
+#define MONO_API
+#endif
+
+#endif
+#endif
+
void
mono_btls_free (void *data);
CRYPTO_refcount_t references;
};
-MonoBtlsX509Chain *
+MONO_API MonoBtlsX509Chain *
mono_btls_x509_chain_new (void)
{
MonoBtlsX509Chain *chain = (MonoBtlsX509Chain *)OPENSSL_malloc (sizeof (MonoBtlsX509Chain));
return chain;
}
-MonoBtlsX509Chain *
+MONO_API MonoBtlsX509Chain *
mono_btls_x509_chain_from_certs (STACK_OF(X509) *certs)
{
MonoBtlsX509Chain *chain = (MonoBtlsX509Chain *)OPENSSL_malloc (sizeof (MonoBtlsX509Chain));
return chain;
}
-STACK_OF(X509) *
+MONO_API STACK_OF(X509) *
mono_btls_x509_chain_peek_certs (MonoBtlsX509Chain *chain)
{
return chain->certs;
}
-int
+MONO_API int
mono_btls_x509_chain_get_count (MonoBtlsX509Chain *chain)
{
return (int)sk_X509_num(chain->certs);
}
-X509 *
+MONO_API X509 *
mono_btls_x509_chain_get_cert (MonoBtlsX509Chain *chain, int index)
{
X509 *cert;
return cert;
}
-STACK_OF(X509) *
+MONO_API STACK_OF(X509) *
mono_btls_x509_chain_get_certs (MonoBtlsX509Chain *chain)
{
return chain->certs;
}
-int
+MONO_API int
mono_btls_x509_chain_free (MonoBtlsX509Chain *chain)
{
if (!CRYPTO_refcount_dec_and_test_zero(&chain->references))
return 1;
}
-MonoBtlsX509Chain *
+MONO_API MonoBtlsX509Chain *
mono_btls_x509_chain_up_ref (MonoBtlsX509Chain *chain)
{
CRYPTO_refcount_inc(&chain->references);
return chain;
}
-void
+MONO_API void
mono_btls_x509_chain_add_cert (MonoBtlsX509Chain *chain, X509 *x509)
{
X509_up_ref(x509);
CRYPTO_refcount_t references;
};
-MonoBtlsX509Crl *
+MONO_API MonoBtlsX509Crl *
mono_btls_x509_crl_from_data (const void *buf, int len, MonoBtlsX509Format format)
{
MonoBtlsX509Crl *crl;
return crl;
}
-MonoBtlsX509Crl *
+MONO_API MonoBtlsX509Crl *
mono_btls_x509_crl_ref (MonoBtlsX509Crl *crl)
{
CRYPTO_refcount_inc (&crl->references);
return crl;
}
-int
+MONO_API int
mono_btls_x509_crl_free (MonoBtlsX509Crl *crl)
{
if (!CRYPTO_refcount_dec_and_test_zero (&crl->references))
return 1;
}
-MonoBtlsX509Revoked *
+MONO_API MonoBtlsX509Revoked *
mono_btls_x509_crl_get_by_cert (MonoBtlsX509Crl *crl, X509 *x509)
{
X509_REVOKED *revoked;
return mono_btls_x509_revoked_new (crl, revoked);
}
-MonoBtlsX509Revoked *
+MONO_API MonoBtlsX509Revoked *
mono_btls_x509_crl_get_by_serial (MonoBtlsX509Crl *crl, void *serial, int len)
{
ASN1_INTEGER si;
return mono_btls_x509_revoked_new (crl, revoked);
}
-int
+MONO_API int
mono_btls_x509_crl_get_revoked_count (MonoBtlsX509Crl *crl)
{
STACK_OF(X509_REVOKED) *stack;
return (int)sk_X509_REVOKED_num (stack);
}
-MonoBtlsX509Revoked *
+MONO_API MonoBtlsX509Revoked *
mono_btls_x509_crl_get_revoked (MonoBtlsX509Crl *crl, int index)
{
STACK_OF(X509_REVOKED) *stack;
return mono_btls_x509_revoked_new (crl, revoked);
}
-long
+MONO_API long
mono_btls_x509_crl_get_last_update (MonoBtlsX509Crl *crl)
{
return mono_btls_util_asn1_time_to_ticks (X509_CRL_get_lastUpdate (crl->crl));
}
-long
+MONO_API long
mono_btls_x509_crl_get_next_update (MonoBtlsX509Crl *crl)
{
return mono_btls_util_asn1_time_to_ticks (X509_CRL_get_nextUpdate (crl->crl));
}
-long
+MONO_API long
mono_btls_x509_crl_get_version (MonoBtlsX509Crl *crl)
{
return X509_CRL_get_version (crl->crl);
}
-MonoBtlsX509Name *
+MONO_API MonoBtlsX509Name *
mono_btls_x509_crl_get_issuer (MonoBtlsX509Crl *crl)
{
return mono_btls_x509_name_copy (X509_CRL_get_issuer (crl->crl));
MonoLookup *lookup;
};
-MonoBtlsX509LookupMono *
+MONO_API MonoBtlsX509LookupMono *
mono_btls_x509_lookup_mono_new (void)
{
MonoBtlsX509LookupMono *mono;
return mono;
}
-void
+MONO_API void
mono_btls_x509_lookup_mono_init (MonoBtlsX509LookupMono *mono, const void *instance,
MonoBtlsX509LookupMono_BySubject by_subject_func)
{
return 0;
}
-int
+MONO_API int
mono_btls_x509_lookup_mono_free (MonoBtlsX509LookupMono *mono)
{
mono->instance = NULL;
NULL, /* get_by_alias */
};
-X509_LOOKUP_METHOD *
+MONO_API X509_LOOKUP_METHOD *
mono_btls_x509_lookup_mono_method (void)
{
return &mono_lookup_method;
}
-int
+MONO_API int
mono_btls_x509_lookup_add_mono (MonoBtlsX509Lookup *lookup, MonoBtlsX509LookupMono *mono)
{
if (mono_btls_x509_lookup_get_type (lookup) != MONO_BTLS_X509_LOOKUP_TYPE_MONO)
}
}
-MonoBtlsX509Lookup *
+MONO_API MonoBtlsX509Lookup *
mono_btls_x509_lookup_new (MonoBtlsX509Store *store, MonoBtlsX509LookupType type)
{
MonoBtlsX509Lookup *lookup;
return lookup;
}
-int
+MONO_API int
mono_btls_x509_lookup_load_file (MonoBtlsX509Lookup *lookup, const char *file, MonoBtlsX509FileType type)
{
return X509_LOOKUP_load_file (lookup->lookup, file, type);
}
-int
+MONO_API int
mono_btls_x509_lookup_add_dir (MonoBtlsX509Lookup *lookup, const char *dir, MonoBtlsX509FileType type)
{
return X509_LOOKUP_add_dir (lookup->lookup, dir, type);
}
-MonoBtlsX509Lookup *
+MONO_API MonoBtlsX509Lookup *
mono_btls_x509_lookup_up_ref (MonoBtlsX509Lookup *lookup)
{
CRYPTO_refcount_inc (&lookup->references);
return lookup;
}
-int
+MONO_API int
mono_btls_x509_lookup_free (MonoBtlsX509Lookup *lookup)
{
if (!CRYPTO_refcount_dec_and_test_zero (&lookup->references))
return 1;
}
-int
+MONO_API int
mono_btls_x509_lookup_init (MonoBtlsX509Lookup *lookup)
{
return X509_LOOKUP_init (lookup->lookup);
}
-int
+MONO_API int
mono_btls_x509_lookup_shutdown (MonoBtlsX509Lookup *lookup)
{
return X509_LOOKUP_shutdown (lookup->lookup);
}
-MonoBtlsX509LookupType
+MONO_API MonoBtlsX509LookupType
mono_btls_x509_lookup_get_type (MonoBtlsX509Lookup *lookup)
{
return lookup->type;
}
-X509_LOOKUP *
+MONO_API X509_LOOKUP *
mono_btls_x509_lookup_peek_lookup (MonoBtlsX509Lookup *lookup)
{
return lookup->lookup;
}
-X509 *
+MONO_API X509 *
mono_btls_x509_lookup_by_subject (MonoBtlsX509Lookup *lookup, MonoBtlsX509Name *name)
{
X509_OBJECT obj;
return x509;
}
-X509 *
+MONO_API X509 *
mono_btls_x509_lookup_by_fingerprint (MonoBtlsX509Lookup *lookup, unsigned char *bytes, int len)
{
X509_OBJECT obj;
X509_NAME *name;
};
-MonoBtlsX509Name *
+MONO_API MonoBtlsX509Name *
mono_btls_x509_name_from_name (X509_NAME *xn)
{
MonoBtlsX509Name *name;
return name;
}
-MonoBtlsX509Name *
+MONO_API MonoBtlsX509Name *
mono_btls_x509_name_copy (X509_NAME *xn)
{
MonoBtlsX509Name *name;
return name;
}
-void
+MONO_API void
mono_btls_x509_name_free (MonoBtlsX509Name *name)
{
if (name->owns) {
OPENSSL_free(name);
}
-X509_NAME *
+MONO_API X509_NAME *
mono_btls_x509_name_peek_name (MonoBtlsX509Name *name)
{
return name->name;
}
-int
+MONO_API int
mono_btls_x509_name_print_bio (MonoBtlsX509Name *name, BIO *bio)
{
return X509_NAME_print_ex (bio, name->name, 0, ASN1_STRFLGS_RFC2253 | XN_FLAG_FN_SN | XN_FLAG_SEP_CPLUS_SPC | XN_FLAG_DN_REV);
}
-int
+MONO_API int
mono_btls_x509_name_get_raw_data (MonoBtlsX509Name *name, void **buffer, int use_canon_enc)
{
int len;
return len;
}
-MonoBtlsX509Name *
+MONO_API MonoBtlsX509Name *
mono_btls_x509_name_from_data (const void *data, int len, int use_canon_enc)
{
MonoBtlsX509Name *name;
return name;
}
-int
+MONO_API int
mono_btls_x509_name_print_string (MonoBtlsX509Name *name, char *buffer, int size)
{
*buffer = 0;
return X509_NAME_oneline (name->name, buffer, size) != NULL;
}
-long
+MONO_API long
mono_btls_x509_name_hash (MonoBtlsX509Name *name)
{
return X509_NAME_hash (name->name);
}
-long
+MONO_API long
mono_btls_x509_name_hash_old (MonoBtlsX509Name *name)
{
return X509_NAME_hash_old (name->name);
}
-int
+MONO_API int
mono_btls_x509_name_get_entry_count (MonoBtlsX509Name *name)
{
return X509_NAME_entry_count (name->name);
}
}
-MonoBtlsX509NameEntryType
+MONO_API MonoBtlsX509NameEntryType
mono_btls_x509_name_get_entry_type (MonoBtlsX509Name *name, int index)
{
X509_NAME_ENTRY *entry;
return nid2mono (OBJ_obj2nid (obj));
}
-int
+MONO_API int
mono_btls_x509_name_get_entry_oid (MonoBtlsX509Name *name, int index, char *buffer, int size)
{
X509_NAME_ENTRY *entry;
return OBJ_obj2txt (buffer, size, obj, 1);
}
-int
+MONO_API int
mono_btls_x509_name_get_entry_oid_data (MonoBtlsX509Name *name, int index, const void **data)
{
X509_NAME_ENTRY *entry;
return obj->length;
}
-int
+MONO_API int
mono_btls_x509_name_get_entry_value (MonoBtlsX509Name *name, int index, int *tag, unsigned char **str)
{
X509_NAME_ENTRY *entry;
X509_REVOKED *revoked;
};
-MonoBtlsX509Revoked *
+MONO_API MonoBtlsX509Revoked *
mono_btls_x509_revoked_new (MonoBtlsX509Crl *owner, X509_REVOKED *revoked)
{
MonoBtlsX509Revoked *instance;
return instance;
}
-void
+MONO_API void
mono_btls_x509_revoked_free (MonoBtlsX509Revoked *revoked)
{
mono_btls_x509_crl_free (revoked->owner);
OPENSSL_free (revoked);
}
-int
+MONO_API int
mono_btls_x509_revoked_get_serial_number (MonoBtlsX509Revoked *revoked, char *buffer, int size)
{
ASN1_INTEGER *serial;
return serial->length;
}
-long
+MONO_API long
mono_btls_x509_revoked_get_revocation_date (MonoBtlsX509Revoked *revoked)
{
ASN1_TIME *date;
return mono_btls_util_asn1_time_to_ticks (date);
}
-int
+MONO_API int
mono_btls_x509_revoked_get_reason (MonoBtlsX509Revoked *revoked)
{
return revoked->revoked->reason;
}
-int
+MONO_API int
mono_btls_x509_revoked_get_sequence (MonoBtlsX509Revoked *revoked)
{
return revoked->revoked->sequence;
MonoBtlsX509Chain *chain;
};
-MonoBtlsX509StoreCtx *
+MONO_API MonoBtlsX509StoreCtx *
mono_btls_x509_store_ctx_from_ptr (X509_STORE_CTX *ptr)
{
MonoBtlsX509StoreCtx *ctx;
return ctx;
}
-MonoBtlsX509StoreCtx *
+MONO_API MonoBtlsX509StoreCtx *
mono_btls_x509_store_ctx_new (void)
{
MonoBtlsX509StoreCtx *ctx;
return ctx;
}
-MonoBtlsX509StoreCtx *
+MONO_API MonoBtlsX509StoreCtx *
mono_btls_x509_store_ctx_up_ref (MonoBtlsX509StoreCtx *ctx)
{
CRYPTO_refcount_inc (&ctx->references);
return ctx;
}
-int
+MONO_API int
mono_btls_x509_store_ctx_free (MonoBtlsX509StoreCtx *ctx)
{
if (!CRYPTO_refcount_dec_and_test_zero (&ctx->references))
return 1;
}
-int
+MONO_API int
mono_btls_x509_store_ctx_get_error (MonoBtlsX509StoreCtx *ctx, const char **error_string)
{
int error;
return error;
}
-int
+MONO_API int
mono_btls_x509_store_ctx_get_error_depth (MonoBtlsX509StoreCtx *ctx)
{
return X509_STORE_CTX_get_error_depth (ctx->ctx);
}
-MonoBtlsX509Chain *
+MONO_API MonoBtlsX509Chain *
mono_btls_x509_store_ctx_get_chain (MonoBtlsX509StoreCtx *ctx)
{
STACK_OF(X509) *certs;
return mono_btls_x509_chain_from_certs (certs);
}
-MonoBtlsX509Chain *
+MONO_API MonoBtlsX509Chain *
mono_btls_x509_store_ctx_get_untrusted (MonoBtlsX509StoreCtx *ctx)
{
STACK_OF(X509) *untrusted;
return mono_btls_x509_chain_from_certs (untrusted);
}
-int
+MONO_API int
mono_btls_x509_store_ctx_init (MonoBtlsX509StoreCtx *ctx,
MonoBtlsX509Store *store, MonoBtlsX509Chain *chain)
{
return 1;
}
-int
+MONO_API int
mono_btls_x509_store_ctx_set_param (MonoBtlsX509StoreCtx *ctx, MonoBtlsX509VerifyParam *param)
{
return X509_VERIFY_PARAM_set1 (X509_STORE_CTX_get0_param (ctx->ctx), mono_btls_x509_verify_param_peek_param (param));
}
-int
+MONO_API int
mono_btls_x509_store_ctx_verify_cert (MonoBtlsX509StoreCtx *ctx)
{
return X509_verify_cert (ctx->ctx);
}
-X509 *
+MONO_API X509 *
mono_btls_x509_store_ctx_get_by_subject (MonoBtlsX509StoreCtx *ctx, MonoBtlsX509Name *name)
{
X509_OBJECT obj;
return x509;
}
-X509 *
+MONO_API X509 *
mono_btls_x509_store_ctx_get_current_cert (MonoBtlsX509StoreCtx *ctx)
{
X509 *x509 = X509_STORE_CTX_get_current_cert (ctx->ctx);
return X509_up_ref (x509);
}
-X509 *
+MONO_API X509 *
mono_btls_x509_store_ctx_get_current_issuer (MonoBtlsX509StoreCtx *ctx)
{
X509 *x509 = X509_STORE_CTX_get0_current_issuer (ctx->ctx);
return X509_up_ref (x509);
}
-MonoBtlsX509VerifyParam *
+MONO_API MonoBtlsX509VerifyParam *
mono_btls_x509_store_ctx_get_verify_param (MonoBtlsX509StoreCtx *ctx)
{
X509_VERIFY_PARAM *param;
return mono_btls_x509_verify_param_from_store_ctx (ctx, param);
}
-int
+MONO_API int
mono_btls_x509_store_ctx_get_foo (MonoBtlsX509StoreCtx *ctx)
{
return 0;
-}
\ No newline at end of file
+}
CRYPTO_refcount_t references;
};
-MonoBtlsX509Store *
+MONO_API MonoBtlsX509Store *
mono_btls_x509_store_from_store (X509_STORE *ctx)
{
MonoBtlsX509Store *store;
return store;
}
-MonoBtlsX509Store *
+MONO_API MonoBtlsX509Store *
mono_btls_x509_store_from_ctx (X509_STORE_CTX *ctx)
{
return mono_btls_x509_store_from_store (ctx->ctx);
}
-MonoBtlsX509Store *
+MONO_API MonoBtlsX509Store *
mono_btls_x509_store_new (void)
{
MonoBtlsX509Store *store;
return store;
}
-X509_STORE *
+MONO_API X509_STORE *
mono_btls_x509_store_peek_store (MonoBtlsX509Store *store)
{
return store->store;
}
-MonoBtlsX509Store *
+MONO_API MonoBtlsX509Store *
mono_btls_x509_store_from_ssl_ctx (MonoBtlsSslCtx *ctx)
{
X509_STORE *store = mono_btls_ssl_ctx_peek_store (ctx);
return mono_btls_x509_store_from_store (store);
}
-int
+MONO_API int
mono_btls_x509_store_free (MonoBtlsX509Store *store)
{
if (!CRYPTO_refcount_dec_and_test_zero(&store->references))
return 1;
}
-MonoBtlsX509Store *
+MONO_API MonoBtlsX509Store *
mono_btls_x509_store_up_ref (MonoBtlsX509Store *store)
{
CRYPTO_refcount_inc (&store->references);
return store;
}
-int
+MONO_API int
mono_btls_x509_store_add_cert (MonoBtlsX509Store *store, X509 *cert)
{
return X509_STORE_add_cert (store->store, cert);
}
-int
+MONO_API int
mono_btls_x509_store_load_locations (MonoBtlsX509Store *store, const char *file, const char *path)
{
return X509_STORE_load_locations (store->store, file, path);
}
-int
+MONO_API int
mono_btls_x509_store_set_default_paths (MonoBtlsX509Store *store)
{
return X509_STORE_set_default_paths (store->store);
}
-int
+MONO_API int
mono_btls_x509_store_get_count (MonoBtlsX509Store *store)
{
return (int)sk_X509_OBJECT_num (store->store->objs);
X509_VERIFY_PARAM *param;
};
-MonoBtlsX509VerifyParam *
+MONO_API MonoBtlsX509VerifyParam *
mono_btls_x509_verify_param_new (void)
{
MonoBtlsX509VerifyParam *param;
return param;
}
-MonoBtlsX509VerifyParam *
+MONO_API MonoBtlsX509VerifyParam *
mono_btls_x509_verify_param_from_store_ctx (MonoBtlsX509StoreCtx *ctx, X509_VERIFY_PARAM *param)
{
MonoBtlsX509VerifyParam *instance;
return instance;
}
-MonoBtlsX509VerifyParam *
+MONO_API MonoBtlsX509VerifyParam *
mono_btls_x509_verify_param_copy (const MonoBtlsX509VerifyParam *from)
{
MonoBtlsX509VerifyParam *param;
return param;
}
-const X509_VERIFY_PARAM *
+MONO_API const X509_VERIFY_PARAM *
mono_btls_x509_verify_param_peek_param (const MonoBtlsX509VerifyParam *param)
{
return param->param;
}
-int
+MONO_API int
mono_btls_x509_verify_param_can_modify (MonoBtlsX509VerifyParam *param)
{
return param->owns;
}
-MonoBtlsX509VerifyParam *
+MONO_API MonoBtlsX509VerifyParam *
mono_btls_x509_verify_param_lookup (const char *name)
{
MonoBtlsX509VerifyParam *param;
return param;
}
-void
+MONO_API void
mono_btls_x509_verify_param_free (MonoBtlsX509VerifyParam *param)
{
if (param->owns) {
OPENSSL_free (param);
}
-int
+MONO_API int
mono_btls_x509_verify_param_set_name (MonoBtlsX509VerifyParam *param, const char *name)
{
if (!param->owns)
return X509_VERIFY_PARAM_set1_name (param->param, name);
}
-int
+MONO_API int
mono_btls_x509_verify_param_set_host (MonoBtlsX509VerifyParam *param, const char *host, int namelen)
{
if (!param->owns)
return X509_VERIFY_PARAM_set1_host (param->param, host, namelen);
}
-int
+MONO_API int
mono_btls_x509_verify_param_add_host (MonoBtlsX509VerifyParam *param, const char *host, int namelen)
{
if (!param->owns)
return X509_VERIFY_PARAM_set1_host (param->param, host, namelen);
}
-unsigned long
+MONO_API unsigned long
mono_btls_x509_verify_param_get_flags (MonoBtlsX509VerifyParam *param)
{
return X509_VERIFY_PARAM_get_flags (param->param);
}
-int
+MONO_API int
mono_btls_x509_verify_param_set_flags (MonoBtlsX509VerifyParam *param, unsigned long flags)
{
if (!param->owns)
return X509_VERIFY_PARAM_set_flags (param->param, flags);
}
-MonoBtlsX509VerifyFlags
+MONO_API MonoBtlsX509VerifyFlags
mono_btls_x509_verify_param_get_mono_flags (MonoBtlsX509VerifyParam *param)
{
MonoBtlsX509VerifyFlags current;
return current;
}
-int
+MONO_API int
mono_btls_x509_verify_param_set_mono_flags (MonoBtlsX509VerifyParam *param, MonoBtlsX509VerifyFlags flags)
{
unsigned long current;
return X509_VERIFY_PARAM_set_flags (param->param, current);
}
-int
+MONO_API int
mono_btls_x509_verify_param_set_purpose (MonoBtlsX509VerifyParam *param, MonoBtlsX509Purpose purpose)
{
if (!param->owns)
return X509_VERIFY_PARAM_set_purpose (param->param, purpose);
}
-int
+MONO_API int
mono_btls_x509_verify_param_get_depth (MonoBtlsX509VerifyParam *param)
{
return X509_VERIFY_PARAM_get_depth (param->param);
}
-int
+MONO_API int
mono_btls_x509_verify_param_set_depth (MonoBtlsX509VerifyParam *param, int depth)
{
if (!param->owns)
return 1;
}
-int
+MONO_API int
mono_btls_x509_verify_param_set_time (MonoBtlsX509VerifyParam *param, long time)
{
if (!param->owns)
return 1;
}
-char *
+MONO_API char *
mono_btls_x509_verify_param_get_peername (MonoBtlsX509VerifyParam *param)
{
char *peer = X509_VERIFY_PARAM_get0_peername (param->param);
#include <openssl/x509v3.h>
#include <openssl/pkcs12.h>
-X509 *
+MONO_API X509 *
mono_btls_x509_from_data (const void *buf, int len, MonoBtlsX509Format format)
{
BIO *bio;
return cert;
}
-X509 *
+MONO_API X509 *
mono_btls_x509_up_ref (X509 *x509)
{
X509_up_ref (x509);
return x509;
}
-void
+MONO_API void
mono_btls_x509_free (X509 *x509)
{
X509_free (x509);
}
-X509 *
+MONO_API X509 *
mono_btls_x509_dup (X509 *x509)
{
return X509_dup (x509);
}
-MonoBtlsX509Name *
+MONO_API MonoBtlsX509Name *
mono_btls_x509_get_subject_name (X509 *x509)
{
return mono_btls_x509_name_copy (X509_get_subject_name (x509));
}
-MonoBtlsX509Name *
+MONO_API MonoBtlsX509Name *
mono_btls_x509_get_issuer_name (X509 *x509)
{
return mono_btls_x509_name_copy (X509_get_issuer_name (x509));
}
-int
+MONO_API int
mono_btls_x509_get_subject_name_string (X509 *name, char *buffer, int size)
{
*buffer = 0;
return X509_NAME_oneline (X509_get_subject_name (name), buffer, size) != NULL;
}
-int
+MONO_API int
mono_btls_x509_get_issuer_name_string (X509 *name, char *buffer, int size)
{
*buffer = 0;
return X509_NAME_oneline (X509_get_issuer_name (name), buffer, size) != NULL;
}
-int
+MONO_API int
mono_btls_x509_get_raw_data (X509 *x509, BIO *bio, MonoBtlsX509Format format)
{
switch (format) {
}
}
-int
+MONO_API int
mono_btls_x509_cmp (const X509 *a, const X509 *b)
{
return X509_cmp (a, b);
}
-int
+MONO_API int
mono_btls_x509_get_hash (X509 *x509, const void **data)
{
X509_check_purpose (x509, -1, 0);
return SHA_DIGEST_LENGTH;
}
-long
+MONO_API long
mono_btls_x509_get_not_before (X509 *x509)
{
return mono_btls_util_asn1_time_to_ticks (X509_get_notBefore (x509));
}
-long
+MONO_API long
mono_btls_x509_get_not_after (X509 *x509)
{
return mono_btls_util_asn1_time_to_ticks (X509_get_notAfter (x509));
}
-int
+MONO_API int
mono_btls_x509_get_public_key (X509 *x509, BIO *bio)
{
EVP_PKEY *pkey;
return ret;
}
-int
+MONO_API int
mono_btls_x509_get_serial_number (X509 *x509, char *buffer, int size, int mono_style)
{
ASN1_INTEGER *serial;
return len;
}
-int
+MONO_API int
mono_btls_x509_get_public_key_algorithm (X509 *x509, char *buffer, int size)
{
X509_PUBKEY *pkey;
return OBJ_obj2txt (buffer, size, ppkalg, 1);
}
-int
+MONO_API int
mono_btls_x509_get_version (X509 *x509)
{
return (int)X509_get_version (x509) + 1;
}
-int
+MONO_API int
mono_btls_x509_get_signature_algorithm (X509 *x509, char *buffer, int size)
{
const ASN1_OBJECT *obj;
return OBJ_obj2txt (buffer, size, obj, 1);
}
-int
+MONO_API int
mono_btls_x509_get_public_key_asn1 (X509 *x509, char *out_oid, int oid_len, uint8_t **buffer, int *size)
{
X509_PUBKEY *pkey;
}
-int
+MONO_API int
mono_btls_x509_get_public_key_parameters (X509 *x509, char *out_oid, int oid_len, uint8_t **buffer, int *size)
{
X509_PUBKEY *pkey;
}
}
-EVP_PKEY *
+MONO_API EVP_PKEY *
mono_btls_x509_get_pubkey (X509 *x509)
{
return X509_get_pubkey (x509);
}
-int
+MONO_API int
mono_btls_x509_get_subject_key_identifier (X509 *x509, uint8_t **buffer, int *size)
{
ASN1_OCTET_STRING *skid;
return 1;
}
-int
+MONO_API int
mono_btls_x509_print (X509 *x509, BIO *bio)
{
return X509_print_ex (bio, x509, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
}
}
-int
+MONO_API int
mono_btls_x509_add_trust_object (X509 *x509, MonoBtlsX509Purpose purpose)
{
ASN1_OBJECT *trust;
return X509_add1_trust_object (x509, trust);
}
-int
+MONO_API int
mono_btls_x509_add_reject_object (X509 *x509, MonoBtlsX509Purpose purpose)
{
ASN1_OBJECT *reject;
return X509_add1_reject_object (x509, reject);
}
-int
+MONO_API int
mono_btls_x509_add_explicit_trust (X509 *x509, MonoBtlsX509TrustKind kind)
{
int ret = 0;
platform_sources += ../../support/libm/complex.c
endif
+if !DYNAMIC_BTLS
if BTLS
btls_file_list := $(shell cat ../btls/build-shared/mono-btls-shared-lo.txt)
btls_static_file_list := $(shell cat ../btls/build-static/mono-btls-static-lo.txt)
btls_static_libs = $(btls_static_file_list)
btls_cflags = -I$(top_srcdir)/external/boringssl/include -I$(top_srcdir)/mono/btls
endif
+endif
#
# libtool is not capable of creating static/shared versions of the same
boehm-gc.c
sgen_sources = \
- sgen-os-posix.c \
- sgen-os-mach.c \
- sgen-os-win32.c \
- sgen-os-coop.c \
sgen-bridge.c \
sgen-bridge.h \
sgen-bridge-internals.h \
* Returns: a string with the directory, this string should be freed by
* the caller.
*/
-G_CONST_RETURN gchar *
+gchar *
mono_native_getrootdir (void)
{
gchar* fullpath = g_build_path (G_DIR_SEPARATOR_S, mono_assembly_getrootdir (), mono_config_get_reloc_lib_dir(), NULL);
MONO_API void mono_assembly_close (MonoAssembly *assembly);
MONO_API void mono_assembly_setrootdir (const char *root_dir);
MONO_API MONO_CONST_RETURN char *mono_assembly_getrootdir (void);
-MONO_API MONO_CONST_RETURN char *mono_native_getrootdir (void);
-MONO_API void mono_assembly_foreach (MonoFunc func, void* user_data);
+MONO_API char *mono_native_getrootdir (void);
+MONO_API void mono_assembly_foreach (MonoFunc func, void* user_data);
MONO_API void mono_assembly_set_main (MonoAssembly *assembly);
MONO_API MonoAssembly *mono_assembly_get_main (void);
MONO_API MonoImage *mono_assembly_get_image (MonoAssembly *assembly);
return NULL;
}
-void
-mono_gc_set_current_thread_appdomain (MonoDomain *domain)
-{
-}
-
gboolean
mono_gc_precise_stack_mark_enabled (void)
{
};
/* type of exception being "on hold" for later processing (see exception_type) */
-enum {
+typedef enum {
MONO_EXCEPTION_NONE = 0,
MONO_EXCEPTION_INVALID_PROGRAM = 3,
MONO_EXCEPTION_UNVERIFIABLE_IL = 4,
MONO_EXCEPTION_INLINE_FAILED = 15,
MONO_EXCEPTION_MONO_ERROR = 16,
/* add other exception type */
-};
+} MonoExceptionType;
/* This struct collects the info needed for the runtime use of a class,
* like the vtables for a domain, the GC descriptor, etc.
MonoThreadInfo *info; \
MONO_FAST_TLS_SET (tls_appdomain,x); \
mono_native_tls_set_value (appdomain_thread_id, x); \
- mono_gc_set_current_thread_appdomain (x); \
info = mono_thread_info_current (); \
if (info) \
mono_thread_info_tls_set (info, TLS_KEY_DOMAIN, (x)); \
#define SET_APPDOMAIN(x) do { \
MonoThreadInfo *info; \
mono_native_tls_set_value (appdomain_thread_id, x); \
- mono_gc_set_current_thread_appdomain (x); \
info = mono_thread_info_current (); \
if (info) \
mono_thread_info_tls_set (info, TLS_KEY_DOMAIN, (x)); \
void* mono_gc_get_nursery (int *shift_bits, size_t *size);
-void mono_gc_set_current_thread_appdomain (MonoDomain *domain);
-
void mono_gc_set_skip_thread (gboolean skip);
#ifndef HOST_WIN32
ICALL(NATIVEMETHODS_11, "WaitForInputIdle", ves_icall_Microsoft_Win32_NativeMethods_WaitForInputIdle)
#endif /* !DISABLE_PROCESS_HANDLING */
-#if HAVE_BTLS
+#if defined(HAVE_BTLS) && !defined(HAVE_DYNAMIC_BTLS)
ICALL_TYPE(BTLS_BIO, "Mono.Btls.MonoBtlsBio", BTLS_BIO_1)
ICALL(BTLS_BIO_1, "mono_btls_bio_flush", mono_btls_bio_flush)
ICALL(BTLS_BIO_2, "mono_btls_bio_free", mono_btls_bio_free)
ICALL(MARSHAL_9, "GetDelegateForFunctionPointerInternal", ves_icall_System_Runtime_InteropServices_Marshal_GetDelegateForFunctionPointerInternal)
ICALL(MARSHAL_10, "GetFunctionPointerForDelegateInternal", ves_icall_System_Runtime_InteropServices_Marshal_GetFunctionPointerForDelegateInternal)
#ifndef DISABLE_COM
+ICALL(MARSHAL_52, "GetHRForException_WinRT", ves_icall_System_Runtime_InteropServices_Marshal_GetHRForException_WinRT)
ICALL(MARSHAL_45, "GetIDispatchForObjectInternal", ves_icall_System_Runtime_InteropServices_Marshal_GetIDispatchForObjectInternal)
ICALL(MARSHAL_46, "GetIUnknownForObjectInternal", ves_icall_System_Runtime_InteropServices_Marshal_GetIUnknownForObjectInternal)
#endif
ICALL(MARSHAL_11, "GetLastWin32Error", ves_icall_System_Runtime_InteropServices_Marshal_GetLastWin32Error)
#ifndef DISABLE_COM
+ICALL(MARSHAL_53, "GetNativeActivationFactory", ves_icall_System_Runtime_InteropServices_Marshal_GetNativeActivationFactory)
ICALL(MARSHAL_47, "GetObjectForCCW", ves_icall_System_Runtime_InteropServices_Marshal_GetObjectForCCW)
+ICALL(MARSHAL_54, "GetRawIUnknownForComObjectNoAddRef", ves_icall_System_Runtime_InteropServices_Marshal_GetRawIUnknownForComObjectNoAddRef)
ICALL(MARSHAL_48, "IsComObject", ves_icall_System_Runtime_InteropServices_Marshal_IsComObject)
#endif
ICALL(MARSHAL_12, "OffsetOf", ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf)
ICALL(MARSHAL_41, "copy_from_unmanaged", ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged)
ICALL(MARSHAL_42, "copy_to_unmanaged", ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged)
+#ifndef DISABLE_COM
+ICALL_TYPE(WINDOWSRUNTIME_UNM, "System.Runtime.InteropServices.WindowsRuntime.UnsafeNativeMethods", WINDOWSRUNTIME_UNM_0)
+ICALL(WINDOWSRUNTIME_UNM_0, "GetRestrictedErrorInfo", ves_icall_System_Runtime_InteropServices_WindowsRuntime_UnsafeNativeMethods_GetRestrictedErrorInfo)
+ICALL(WINDOWSRUNTIME_UNM_1, "RoOriginateLanguageException", ves_icall_System_Runtime_InteropServices_WindowsRuntime_UnsafeNativeMethods_RoOriginateLanguageException)
+ICALL(WINDOWSRUNTIME_UNM_2, "RoReportUnhandledError", ves_icall_System_Runtime_InteropServices_WindowsRuntime_UnsafeNativeMethods_RoReportUnhandledError)
+ICALL(WINDOWSRUNTIME_UNM_3, "WindowsCreateString", ves_icall_System_Runtime_InteropServices_WindowsRuntime_UnsafeNativeMethods_WindowsCreateString)
+ICALL(WINDOWSRUNTIME_UNM_4, "WindowsDeleteString", ves_icall_System_Runtime_InteropServices_WindowsRuntime_UnsafeNativeMethods_WindowsDeleteString)
+ICALL(WINDOWSRUNTIME_UNM_5, "WindowsGetStringRawBuffer", ves_icall_System_Runtime_InteropServices_WindowsRuntime_UnsafeNativeMethods_WindowsGetStringRawBuffer)
+#endif
+
ICALL_TYPE(ACTS, "System.Runtime.Remoting.Activation.ActivationServices", ACTS_1)
ICALL(ACTS_1, "AllocateUninitializedClassInstance", ves_icall_System_Runtime_Activation_ActivationServices_AllocateUninitializedClassInstance)
ICALL(ACTS_2, "EnableProxyActivation", ves_icall_System_Runtime_Activation_ActivationServices_EnableProxyActivation)
#include <sys/utsname.h>
#endif
-#if HAVE_BTLS
+#if defined(HAVE_BTLS) && !defined(HAVE_DYNAMIC_BTLS)
#include <btls/btls-ssl.h>
#include <btls/btls-bio.h>
#include <btls/btls-error.h>
#endif
}
+#ifndef DISABLE_COM
+
+ICALL_EXPORT int
+ves_icall_System_Runtime_InteropServices_Marshal_GetHRForException_WinRT(MonoException* ex)
+{
+ mono_set_pending_exception(mono_get_exception_not_implemented("System.Runtime.InteropServices.Marshal.GetHRForException_WinRT internal call is not implemented."));
+ return 0;
+}
+
+ICALL_EXPORT MonoObject*
+ves_icall_System_Runtime_InteropServices_Marshal_GetNativeActivationFactory(MonoObject* type)
+{
+ mono_set_pending_exception(mono_get_exception_not_implemented("System.Runtime.InteropServices.Marshal.GetNativeActivationFactory internal call is not implemented."));
+ return NULL;
+}
+
+ICALL_EXPORT void*
+ves_icall_System_Runtime_InteropServices_Marshal_GetRawIUnknownForComObjectNoAddRef(MonoObject* obj)
+{
+ mono_set_pending_exception(mono_get_exception_not_implemented("System.Runtime.InteropServices.Marshal.GetRawIUnknownForComObjectNoAddRef internal call is not implemented."));
+ return NULL;
+}
+
+ICALL_EXPORT MonoObject*
+ves_icall_System_Runtime_InteropServices_WindowsRuntime_UnsafeNativeMethods_GetRestrictedErrorInfo()
+{
+ mono_set_pending_exception(mono_get_exception_not_implemented("System.Runtime.InteropServices.WindowsRuntime.UnsafeNativeMethods.GetRestrictedErrorInfo internal call is not implemented."));
+ return NULL;
+}
+
+ICALL_EXPORT MonoBoolean
+ves_icall_System_Runtime_InteropServices_WindowsRuntime_UnsafeNativeMethods_RoOriginateLanguageException(int error, MonoString* message, void* languageException)
+{
+ mono_set_pending_exception(mono_get_exception_not_implemented("System.Runtime.InteropServices.WindowsRuntime.UnsafeNativeMethods.RoOriginateLanguageException internal call is not implemented."));
+ return FALSE;
+}
+
+ICALL_EXPORT void
+ves_icall_System_Runtime_InteropServices_WindowsRuntime_UnsafeNativeMethods_RoReportUnhandledError(MonoObject* error)
+{
+ mono_set_pending_exception(mono_get_exception_not_implemented("System.Runtime.InteropServices.WindowsRuntime.UnsafeNativeMethods.RoReportUnhandledError internal call is not implemented."));
+}
+
+ICALL_EXPORT int
+ves_icall_System_Runtime_InteropServices_WindowsRuntime_UnsafeNativeMethods_WindowsCreateString(MonoString* sourceString, int length, void** hstring)
+{
+ mono_set_pending_exception(mono_get_exception_not_implemented("System.Runtime.InteropServices.WindowsRuntime.UnsafeNativeMethods.WindowsCreateString internal call is not implemented."));
+ return 0;
+}
+
+ICALL_EXPORT int
+ves_icall_System_Runtime_InteropServices_WindowsRuntime_UnsafeNativeMethods_WindowsDeleteString(void* hstring)
+{
+ mono_set_pending_exception(mono_get_exception_not_implemented("System.Runtime.InteropServices.WindowsRuntime.UnsafeNativeMethods.WindowsDeleteString internal call is not implemented."));
+ return 0;
+}
+
+ICALL_EXPORT mono_unichar2*
+ves_icall_System_Runtime_InteropServices_WindowsRuntime_UnsafeNativeMethods_WindowsGetStringRawBuffer(void* hstring, unsigned* length)
+{
+ mono_set_pending_exception(mono_get_exception_not_implemented("System.Runtime.InteropServices.WindowsRuntime.UnsafeNativeMethods.WindowsGetStringRawBuffer internal call is not implemented."));
+ return NULL;
+}
+
+#endif
+
+
#ifndef DISABLE_ICALL_TABLES
#define ICALL_TYPE(id,name,first)
{
MonoError error;
MonoMethod *inst, *res;
+ WrapperInfo *ginfo, *info;
/*
* We use the same cache for the generic definition and the instances.
inst = mono_class_inflate_generic_method_checked (def, ctx, &error);
g_assert (mono_error_ok (&error)); /* FIXME don't swallow the error */
+ ginfo = mono_marshal_get_wrapper_info (def);
+ if (ginfo) {
+ info = (WrapperInfo *)mono_image_alloc0 (def->klass->image, sizeof (WrapperInfo));
+ info->subtype = ginfo->subtype;
+ if (info->subtype == WRAPPER_SUBTYPE_NONE) {
+ info->d.delegate_invoke.method = mono_class_inflate_generic_method_checked (ginfo->d.delegate_invoke.method, ctx, &error);
+ mono_error_assert_ok (&error);
+ }
+ }
+
mono_memory_barrier ();
mono_marshal_lock ();
res = (MonoMethod *)g_hash_table_lookup (cache, orig_method->klass);
#endif /* DISABLE_JIT */
info = mono_wrapper_info_create (mb, subtype);
- info->d.delegate_invoke.method = orig_method;
+ info->d.delegate_invoke.method = method;
if (ctx) {
MonoMethod *def;
mono_mb_emit_icon (mb, esize);
mono_mb_emit_byte (mb, CEE_MUL);
mono_mb_emit_byte (mb, CEE_PREFIX1);
- mono_mb_emit_byte (mb, CEE_CPBLK);
+ mono_mb_emit_byte (mb, CEE_CPBLK);
+ mono_mb_patch_branch (mb, label1);
break;
}
}
/*bits 9,11,14,15,19,21,24-31 */
-#define INVALID_TYPEDEF_FLAG_BITS ((1 << 6) | (1 << 9) | (1 << 14) | (1 << 15) | (1 << 19) | (1 << 21) | 0xFF000000)
+#define INVALID_TYPEDEF_FLAG_BITS ((1 << 6) | (1 << 9) | (1 << 15) | (1 << 19) | (1 << 21) | 0xFF000000)
static void
verify_typedef_table (VerifyContext *ctx)
{
else if (strcmp (attribute_names [i], "target") == 0){
char *p = strstr (attribute_values [i], "$mono_libdir");
if (p != NULL){
- const char *libdir = mono_native_getrootdir ();
+ char *libdir = mono_native_getrootdir ();
size_t libdir_len = strlen (libdir);
char *result;
return NULL;
}
-void
-mono_gc_set_current_thread_appdomain (MonoDomain *domain)
-{
-}
-
gboolean
mono_gc_precise_stack_mark_enabled (void)
{
gboolean skip, suspend_done;
volatile int in_critical_region;
- gpointer stopped_ip; /* only valid if the thread is stopped */
- MonoDomain *stopped_domain; /* dsto */
-
/*
This is set the argument of mono_gc_set_skip_thread.
{
}
-int sgen_thread_handshake (BOOL suspend);
-gboolean sgen_suspend_thread (SgenThreadInfo *info);
-gboolean sgen_resume_thread (SgenThreadInfo *info);
-void sgen_wait_for_suspend_ack (int count);
-
#ifdef HAVE_KW_THREAD
extern __thread SgenThreadInfo *sgen_thread_info;
#define TLAB_ACCESS_INIT
#include "utils/mono-logger-internals.h"
#include "utils/mono-threads-coop.h"
#include "sgen/sgen-thread-pool.h"
+#include "utils/mono-threads.h"
#ifdef HEAVY_STATISTICS
static guint64 stat_wbarrier_set_arrayref = 0;
sgen_wbarrier_value_copy_bitmap (_dest, _src, size, bitmap);
}
+int
+mono_gc_get_suspend_signal (void)
+{
+ return mono_threads_suspend_get_suspend_signal ();
+}
+
+int
+mono_gc_get_restart_signal (void)
+{
+ return mono_threads_suspend_get_restart_signal ();
+}
+
static MonoMethod *write_barrier_conc_method;
static MonoMethod *write_barrier_noconc_method;
* Appdomain handling
*/
-void
-mono_gc_set_current_thread_appdomain (MonoDomain *domain)
-{
- SgenThreadInfo *info = mono_thread_info_current ();
-
- /* Could be called from sgen_thread_unregister () with a NULL info */
- if (domain) {
- g_assert (info);
- info->client_info.stopped_domain = domain;
- }
-}
-
static gboolean
need_remove_object_for_domain (GCObject *start, MonoDomain *domain)
{
#endif
info->client_info.skip = 0;
- info->client_info.stopped_ip = NULL;
- info->client_info.stopped_domain = NULL;
info->client_info.stack_start = NULL;
}
#endif
- /*
- * This needs to happen before any internal allocations because
- * it inits the small id which is required for hazard pointer
- * operations.
- */
- sgen_os_init ();
-
mono_gc_register_thread (&dummy);
}
+++ /dev/null
-/*
- * sgen-os-coop.c: SGen Cooperative backend support.
- *
- * Author:
- * João Matos (joao.matos@xamarin.com)
- * Copyright (C) 2015 Xamarin Inc
- *
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-#include "config.h"
-
-#ifdef HAVE_SGEN_GC
-
-
-#include <glib.h>
-#include "sgen/sgen-gc.h"
-#include "sgen/sgen-archdep.h"
-#include "sgen/sgen-protocol.h"
-#include "metadata/object-internals.h"
-#include "metadata/gc-internals.h"
-
-
-#if defined(USE_COOP_GC)
-
-gboolean
-sgen_resume_thread (SgenThreadInfo *info)
-{
- g_error ("FIXME");
- return FALSE;
-}
-
-gboolean
-sgen_suspend_thread (SgenThreadInfo *info)
-{
- g_error ("FIXME");
- return FALSE;
-}
-
-void
-sgen_wait_for_suspend_ack (int count)
-{
-}
-
-/* LOCKING: assumes the GC lock is held */
-int
-sgen_thread_handshake (BOOL suspend)
-{
- g_error ("FIXME");
- return 0;
-}
-
-void
-sgen_os_init (void)
-{
-}
-
-int
-mono_gc_get_suspend_signal (void)
-{
- return -1;
-}
-
-int
-mono_gc_get_restart_signal (void)
-{
- return -1;
-}
-#else
-
-#ifdef _MSC_VER
-// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
-void __mono_win32_sgen_os_coop_quiet_lnk4221(void) {}
-#endif
-#endif /* USE_COOP_GC */
-#endif
+++ /dev/null
-/*
- * sgen-os-mach.c: Mach-OS support.
- *
- * Author:
- * Paolo Molaro (lupus@ximian.com)
- * Mark Probst (mprobst@novell.com)
- * Geoff Norton (gnorton@novell.com)
- *
- * Copyright 2010 Novell, Inc (http://www.novell.com)
- * Copyright (C) 2012 Xamarin Inc
- *
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-#include "config.h"
-#ifdef HAVE_SGEN_GC
-
-
-#include <glib.h>
-#include "sgen/sgen-gc.h"
-#include "sgen/sgen-archdep.h"
-#include "sgen/sgen-protocol.h"
-#include "sgen/sgen-thread-pool.h"
-#include "metadata/object-internals.h"
-#include "metadata/gc-internals.h"
-
-#if defined(__MACH__)
-#include "utils/mach-support.h"
-#endif
-
-#if defined(__MACH__) && MONO_MACH_ARCH_SUPPORTED
-
-#if !defined(USE_COOP_GC)
-gboolean
-sgen_resume_thread (SgenThreadInfo *info)
-{
- kern_return_t ret;
- do {
- ret = thread_resume (info->client_info.info.native_handle);
- } while (ret == KERN_ABORTED);
- return ret == KERN_SUCCESS;
-}
-
-gboolean
-sgen_suspend_thread (SgenThreadInfo *info)
-{
- mach_msg_type_number_t num_state;
- thread_state_t state;
- kern_return_t ret;
- ucontext_t ctx;
- mcontext_t mctx;
-
- gpointer stack_start;
-
- state = (thread_state_t) alloca (mono_mach_arch_get_thread_state_size ());
- mctx = (mcontext_t) alloca (mono_mach_arch_get_mcontext_size ());
-
- do {
- ret = thread_suspend (info->client_info.info.native_handle);
- } while (ret == KERN_ABORTED);
- if (ret != KERN_SUCCESS)
- return FALSE;
-
- do {
- ret = mono_mach_arch_get_thread_state (info->client_info.info.native_handle, state, &num_state);
- } while (ret == KERN_ABORTED);
- if (ret != KERN_SUCCESS)
- return FALSE;
-
- mono_mach_arch_thread_state_to_mcontext (state, mctx);
- ctx.uc_mcontext = mctx;
-
- info->client_info.stopped_domain = mono_thread_info_tls_get (info, TLS_KEY_DOMAIN);
- info->client_info.stopped_ip = (gpointer) mono_mach_arch_get_ip (state);
- info->client_info.stack_start = NULL;
- stack_start = (char*) mono_mach_arch_get_sp (state) - REDZONE_SIZE;
- /* If stack_start is not within the limits, then don't set it in info and we will be restarted. */
- if (stack_start >= info->client_info.stack_start_limit && stack_start <= info->client_info.stack_end) {
- info->client_info.stack_start = stack_start;
-
- mono_sigctx_to_monoctx (&ctx, &info->client_info.ctx);
- } else {
- g_assert (!info->client_info.stack_start);
- }
-
- /* Notify the JIT */
- if (mono_gc_get_gc_callbacks ()->thread_suspend_func)
- mono_gc_get_gc_callbacks ()->thread_suspend_func (info->client_info.runtime_data, &ctx, NULL);
-
- SGEN_LOG (2, "thread %p stopped at %p stack_start=%p", (void*)(gsize)info->client_info.info.native_handle, info->client_info.stopped_ip, info->client_info.stack_start);
- binary_protocol_thread_suspend ((gpointer)mono_thread_info_get_tid (info), info->client_info.stopped_ip);
-
- return TRUE;
-}
-
-void
-sgen_wait_for_suspend_ack (int count)
-{
- /* mach thread_resume is synchronous so we dont need to wait for them */
-}
-
-/* LOCKING: assumes the GC lock is held */
-int
-sgen_thread_handshake (BOOL suspend)
-{
- SgenThreadInfo *cur_thread = mono_thread_info_current ();
- kern_return_t ret;
-
- int count = 0;
-
- cur_thread->client_info.suspend_done = TRUE;
- FOREACH_THREAD (info) {
- if (info == cur_thread || sgen_thread_pool_is_thread_pool_thread (mono_thread_info_get_tid (info)))
- continue;
-
- info->client_info.suspend_done = FALSE;
- if (info->client_info.gc_disabled)
- continue;
-
- if (suspend) {
- if (!sgen_suspend_thread (info))
- continue;
- } else {
- do {
- ret = thread_resume (info->client_info.info.native_handle);
- } while (ret == KERN_ABORTED);
- if (ret != KERN_SUCCESS)
- continue;
- }
- count ++;
- } FOREACH_THREAD_END
- return count;
-}
-
-void
-sgen_os_init (void)
-{
-}
-
-int
-mono_gc_get_suspend_signal (void)
-{
- return -1;
-}
-
-int
-mono_gc_get_restart_signal (void)
-{
- return -1;
-}
-#endif
-#endif
-#endif
+++ /dev/null
-/*
- * sgen-os-posix.c: Posix support.
- *
- * Author:
- * Paolo Molaro (lupus@ximian.com)
- * Mark Probst (mprobst@novell.com)
- * Geoff Norton (gnorton@novell.com)
- *
- * Copyright 2010 Novell, Inc (http://www.novell.com)
- * Copyright (C) 2012 Xamarin Inc
- *
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
-#include "config.h"
-
-#if defined(HAVE_SGEN_GC) && !defined(USE_COOP_GC)
-#if !defined(__MACH__) && !MONO_MACH_ARCH_SUPPORTED && defined(HAVE_PTHREAD_KILL)
-
-#include <errno.h>
-#include <glib.h>
-#include "sgen/sgen-gc.h"
-#include "metadata/gc-internals.h"
-#include "sgen/sgen-archdep.h"
-#include "metadata/object-internals.h"
-#include "utils/mono-signal-handler.h"
-
-#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-const static int suspend_signal_num = SIGXFSZ;
-#else
-const static int suspend_signal_num = SIGPWR;
-#endif
-const static int restart_signal_num = SIGXCPU;
-
-static SgenSemaphore suspend_ack_semaphore;
-static SgenSemaphore *suspend_ack_semaphore_ptr;
-
-static sigset_t suspend_signal_mask;
-static sigset_t suspend_ack_signal_mask;
-
-static void
-suspend_thread (SgenThreadInfo *info, void *context)
-{
- int stop_count;
- MonoContext ctx;
- gpointer stack_start;
-
- info->client_info.stopped_domain = mono_domain_get ();
- info->client_info.stack_start = NULL;
- info->client_info.signal = 0;
- stop_count = sgen_global_stop_count;
- /* duplicate signal */
- if (0 && info->client_info.stop_count == stop_count)
- return;
-
- if (context) {
- mono_sigctx_to_monoctx (context, &ctx);
- info->client_info.stopped_ip = MONO_CONTEXT_GET_IP (&ctx);
- stack_start = (((guint8 *) MONO_CONTEXT_GET_SP (&ctx)) - REDZONE_SIZE);
- } else {
- info->client_info.stopped_ip = NULL;
- stack_start = NULL;
- }
-
- /* If stack_start is not within the limits, then don't set it
- in info and we will be restarted. */
- if (stack_start >= info->client_info.stack_start_limit && stack_start <= info->client_info.stack_end) {
- info->client_info.stack_start = stack_start;
-
- if (context) {
- memcpy (&info->client_info.ctx, &ctx, sizeof (MonoContext));
- } else {
- memset (&info->client_info.ctx, 0, sizeof (MonoContext));
- }
- } else {
- g_assert (!info->client_info.stack_start);
- }
-
- /* Notify the JIT */
- if (mono_gc_get_gc_callbacks ()->thread_suspend_func)
- mono_gc_get_gc_callbacks ()->thread_suspend_func (info->client_info.runtime_data, context, NULL);
-
- SGEN_LOG (4, "Posting suspend_ack_semaphore for suspend from %p %p", info, (gpointer) (gsize) mono_native_thread_id_get ());
-
- /*
- Block the restart signal.
- We need to block the restart signal while posting to the suspend_ack semaphore or we race to sigsuspend,
- which might miss the signal and get stuck.
- */
- pthread_sigmask (SIG_BLOCK, &suspend_ack_signal_mask, NULL);
-
- /* notify the waiting thread */
- SGEN_SEMAPHORE_POST (suspend_ack_semaphore_ptr);
- info->client_info.stop_count = stop_count;
-
- /* wait until we receive the restart signal */
- do {
- info->client_info.signal = 0;
- sigsuspend (&suspend_signal_mask);
- } while (info->client_info.signal != restart_signal_num);
-
- /* Unblock the restart signal. */
- pthread_sigmask (SIG_UNBLOCK, &suspend_ack_signal_mask, NULL);
-
- SGEN_LOG (4, "Posting suspend_ack_semaphore for resume from %p %p\n", info, (gpointer) (gsize) mono_native_thread_id_get ());
- /* notify the waiting thread */
- SGEN_SEMAPHORE_POST (suspend_ack_semaphore_ptr);
-}
-
-/* LOCKING: assumes the GC lock is held (by the stopping thread) */
-MONO_SIG_HANDLER_FUNC (static, suspend_handler)
-{
- /*
- * The suspend signal handler potentially uses syscalls that
- * can set errno, and it calls functions that use the hazard
- * pointer machinery. Since we're interrupting other code we
- * must restore those to the values they had when we
- * interrupted.
- */
- SgenThreadInfo *info;
- int old_errno = errno;
- int hp_save_index = mono_hazard_pointer_save_for_signal_handler ();
- MONO_SIG_HANDLER_GET_CONTEXT;
-
- info = mono_thread_info_current ();
- suspend_thread (info, ctx);
-
- mono_hazard_pointer_restore_for_signal_handler (hp_save_index);
- errno = old_errno;
-}
-
-MONO_SIG_HANDLER_FUNC (static, restart_handler)
-{
- SgenThreadInfo *info;
- int old_errno = errno;
-
- info = mono_thread_info_current ();
- info->client_info.signal = restart_signal_num;
- SGEN_LOG (4, "Restart handler in %p %p", info, (gpointer) (gsize) mono_native_thread_id_get ());
- errno = old_errno;
-}
-
-gboolean
-sgen_resume_thread (SgenThreadInfo *info)
-{
- return mono_threads_pthread_kill (info, restart_signal_num) == 0;
-}
-
-gboolean
-sgen_suspend_thread (SgenThreadInfo *info)
-{
- return mono_threads_pthread_kill (info, suspend_signal_num) == 0;
-}
-
-void
-sgen_wait_for_suspend_ack (int count)
-{
- int i, result;
-
- for (i = 0; i < count; ++i) {
- while ((result = SGEN_SEMAPHORE_WAIT (suspend_ack_semaphore_ptr)) != 0) {
- if (errno != EINTR) {
- g_error ("SGEN_SEMAPHORE_WAIT FAILED with %d errno %d (%s)", result, errno, strerror (errno));
- }
- }
- }
-}
-
-int
-sgen_thread_handshake (BOOL suspend)
-{
- int count, result;
- int signum = suspend ? suspend_signal_num : restart_signal_num;
-
- MonoNativeThreadId me = mono_native_thread_id_get ();
-
- count = 0;
- mono_thread_info_current ()->client_info.suspend_done = TRUE;
- FOREACH_THREAD (info) {
- if (mono_native_thread_id_equals (mono_thread_info_get_tid (info), me)) {
- continue;
- }
- info->client_info.suspend_done = FALSE;
- if (info->client_info.gc_disabled)
- continue;
- /*if (signum == suspend_signal_num && info->stop_count == global_stop_count)
- continue;*/
- result = mono_threads_pthread_kill (info, signum);
- if (result == 0) {
- count++;
- } else {
- info->client_info.skip = 1;
- }
- } FOREACH_THREAD_END
-
- sgen_wait_for_suspend_ack (count);
-
- SGEN_LOG (4, "%s handshake for %d threads\n", suspend ? "suspend" : "resume", count);
-
- return count;
-}
-
-void
-sgen_os_init (void)
-{
- struct sigaction sinfo;
-
- if (mono_thread_info_unified_management_enabled ())
- return;
-
- suspend_ack_semaphore_ptr = &suspend_ack_semaphore;
- SGEN_SEMAPHORE_INIT (&suspend_ack_semaphore, 0);
-
- sigfillset (&sinfo.sa_mask);
- sinfo.sa_flags = SA_RESTART | SA_SIGINFO;
- sinfo.sa_sigaction = suspend_handler;
- if (sigaction (suspend_signal_num, &sinfo, NULL) != 0) {
- g_error ("failed sigaction");
- }
-
- sinfo.sa_handler = (void (*)(int))restart_handler;
- if (sigaction (restart_signal_num, &sinfo, NULL) != 0) {
- g_error ("failed sigaction");
- }
-
- sigfillset (&suspend_signal_mask);
- sigdelset (&suspend_signal_mask, restart_signal_num);
-
- sigemptyset (&suspend_ack_signal_mask);
- sigaddset (&suspend_ack_signal_mask, restart_signal_num);
-
-}
-
-int
-mono_gc_get_suspend_signal (void)
-{
- return suspend_signal_num;
-}
-
-int
-mono_gc_get_restart_signal (void)
-{
- return restart_signal_num;
-}
-#endif
-#endif
+++ /dev/null
-#include "config.h"
-
-#if defined(HAVE_SGEN_GC) && !defined(USE_COOP_GC) && defined(HOST_WIN32)
-
-#include "io-layer/io-layer.h"
-
-#include "sgen/sgen-gc.h"
-#include "metadata/gc-internals.h"
-
-gboolean
-sgen_resume_thread (SgenThreadInfo *info)
-{
- DWORD id = mono_thread_info_get_tid (info);
- HANDLE handle = OpenThread (THREAD_ALL_ACCESS, FALSE, id);
- DWORD result;
-
- g_assert (handle);
-
- result = ResumeThread (handle);
- g_assert (result != (DWORD)-1);
-
- CloseHandle (handle);
-
- return result != (DWORD)-1 && result > 0;
-}
-
-gboolean
-sgen_suspend_thread (SgenThreadInfo *info)
-{
- DWORD id = mono_thread_info_get_tid (info);
- HANDLE handle = OpenThread (THREAD_ALL_ACCESS, FALSE, id);
- CONTEXT context;
- DWORD result;
-
- g_assert (id != GetCurrentThreadId ());
-
- g_assert (handle);
-
- result = SuspendThread (handle);
- if (result == (DWORD)-1) {
- fprintf (stderr, "could not suspend thread %x (handle %p): %d\n", id, handle, GetLastError ()); fflush (stderr);
- CloseHandle (handle);
- return FALSE;
- }
-
- context.ContextFlags = CONTEXT_INTEGER | CONTEXT_CONTROL;
-
- if (!GetThreadContext (handle, &context)) {
- g_assert_not_reached ();
- ResumeThread (handle);
- CloseHandle (handle);
- return FALSE;
- }
-
- g_assert (context.ContextFlags & CONTEXT_INTEGER);
- g_assert (context.ContextFlags & CONTEXT_CONTROL);
-
- CloseHandle (handle);
-
-#if !defined(MONO_CROSS_COMPILE)
- memset (&info->client_info.ctx, 0, sizeof (MonoContext));
-#ifdef TARGET_AMD64
- info->client_info.ctx.gregs[AMD64_RIP] = context.Rip;
- info->client_info.ctx.gregs[AMD64_RAX] = context.Rax;
- info->client_info.ctx.gregs[AMD64_RCX] = context.Rcx;
- info->client_info.ctx.gregs[AMD64_RDX] = context.Rdx;
- info->client_info.ctx.gregs[AMD64_RBX] = context.Rbx;
- info->client_info.ctx.gregs[AMD64_RSP] = context.Rsp;
- info->client_info.ctx.gregs[AMD64_RBP] = context.Rbp;
- info->client_info.ctx.gregs[AMD64_RSI] = context.Rsi;
- info->client_info.ctx.gregs[AMD64_RDI] = context.Rdi;
- info->client_info.ctx.gregs[AMD64_R8] = context.R8;
- info->client_info.ctx.gregs[AMD64_R9] = context.R9;
- info->client_info.ctx.gregs[AMD64_R10] = context.R10;
- info->client_info.ctx.gregs[AMD64_R11] = context.R11;
- info->client_info.ctx.gregs[AMD64_R12] = context.R12;
- info->client_info.ctx.gregs[AMD64_R13] = context.R13;
- info->client_info.ctx.gregs[AMD64_R14] = context.R14;
- info->client_info.ctx.gregs[AMD64_R15] = context.R15;
- info->client_info.stopped_ip = info->client_info.ctx.gregs[AMD64_RIP];
- info->client_info.stack_start = (char*)info->client_info.ctx.gregs[AMD64_RSP] - REDZONE_SIZE;
-#else
- info->client_info.ctx.edi = context.Edi;
- info->client_info.ctx.esi = context.Esi;
- info->client_info.ctx.ebx = context.Ebx;
- info->client_info.ctx.edx = context.Edx;
- info->client_info.ctx.ecx = context.Ecx;
- info->client_info.ctx.eax = context.Eax;
- info->client_info.ctx.ebp = context.Ebp;
- info->client_info.ctx.esp = context.Esp;
- info->client_info.stopped_ip = (gpointer)context.Eip;
- info->client_info.stack_start = (char*)context.Esp - REDZONE_SIZE;
-#endif
-#endif
-
- /* Notify the JIT */
- if (mono_gc_get_gc_callbacks ()->thread_suspend_func)
- mono_gc_get_gc_callbacks ()->thread_suspend_func (info->client_info.runtime_data, NULL, NULL);
-
- return TRUE;
-}
-
-void
-sgen_wait_for_suspend_ack (int count)
-{
- /* Win32 suspend/resume is synchronous, so we don't need to wait for anything */
-}
-
-int
-sgen_thread_handshake (BOOL suspend)
-{
- SgenThreadInfo *current = mono_thread_info_current ();
- int count = 0;
-
- current->client_info.suspend_done = TRUE;
- FOREACH_THREAD (info) {
- if (info == current)
- continue;
- info->client_info.suspend_done = FALSE;
- if (info->client_info.gc_disabled)
- continue;
- if (suspend) {
- if (!sgen_suspend_thread (info))
- continue;
- } else {
- if (!sgen_resume_thread (info))
- continue;
- }
- ++count;
- } FOREACH_THREAD_END
- return count;
-}
-
-void
-sgen_os_init (void)
-{
-}
-
-int
-mono_gc_get_suspend_signal (void)
-{
- return -1;
-}
-
-#endif
#include "metadata/sgen-bridge-internals.h"
#include "metadata/gc-internals.h"
#include "utils/mono-threads.h"
+#include "utils/mono-threads-debug.h"
#define TV_DECLARE SGEN_TV_DECLARE
#define TV_GETTIME SGEN_TV_GETTIME
mono_gc_get_gc_callbacks ()->thread_suspend_func (info->client_info.runtime_data, NULL, &info->client_info.ctx);
}
-static gboolean
-is_ip_in_managed_allocator (MonoDomain *domain, gpointer ip)
-{
- MonoJitInfo *ji;
-
- if (!mono_thread_internal_current ())
- /* Happens during thread attach */
- return FALSE;
-
- if (!ip || !domain)
- return FALSE;
- if (!sgen_has_critical_method ())
- return FALSE;
-
- /*
- * mono_jit_info_table_find is not async safe since it calls into the AOT runtime to load information for
- * missing methods (#13951). To work around this, we disable the AOT fallback. For this to work, the JIT needs
- * to register the jit info for all GC critical methods after they are JITted/loaded.
- */
- ji = mono_jit_info_table_find_internal (domain, (char *)ip, FALSE, FALSE);
- if (!ji)
- return FALSE;
-
- return sgen_is_critical_method (mono_jit_info_get_method (ji));
-}
-
-static int
-restart_threads_until_none_in_managed_allocator (void)
-{
- int num_threads_died = 0;
- int sleep_duration = -1;
-
- for (;;) {
- int restart_count = 0, restarted_count = 0;
- /* restart all threads that stopped in the
- allocator */
- FOREACH_THREAD (info) {
- gboolean result;
- if (info->client_info.skip || info->client_info.gc_disabled || info->client_info.suspend_done)
- continue;
- if (mono_thread_info_is_live (info) &&
- (!info->client_info.stack_start || info->client_info.in_critical_region || info->client_info.info.inside_critical_region ||
- is_ip_in_managed_allocator (info->client_info.stopped_domain, info->client_info.stopped_ip))) {
- binary_protocol_thread_restart ((gpointer)mono_thread_info_get_tid (info));
- SGEN_LOG (3, "thread %p resumed.", (void*) (size_t) info->client_info.info.native_handle);
- result = sgen_resume_thread (info);
- if (result) {
- ++restart_count;
- } else {
- info->client_info.skip = 1;
- }
- } else {
- /* we set the stopped_ip to
- NULL for threads which
- we're not restarting so
- that we can easily identify
- the others */
- info->client_info.stopped_ip = NULL;
- info->client_info.stopped_domain = NULL;
- info->client_info.suspend_done = TRUE;
- }
- } FOREACH_THREAD_END
- /* if no threads were restarted, we're done */
- if (restart_count == 0)
- break;
-
- /* wait for the threads to signal their restart */
- sgen_wait_for_suspend_ack (restart_count);
-
- if (sleep_duration < 0) {
- mono_thread_info_yield ();
- sleep_duration = 0;
- } else {
- g_usleep (sleep_duration);
- sleep_duration += 10;
- }
-
- /* stop them again */
- FOREACH_THREAD (info) {
- gboolean result;
- if (info->client_info.skip || info->client_info.stopped_ip == NULL)
- continue;
- result = sgen_suspend_thread (info);
-
- if (result) {
- ++restarted_count;
- } else {
- info->client_info.skip = 1;
- }
- } FOREACH_THREAD_END
- /* some threads might have died */
- num_threads_died += restart_count - restarted_count;
- /* wait for the threads to signal their suspension
- again */
- sgen_wait_for_suspend_ack (restarted_count);
- }
-
- return num_threads_died;
-}
-
static void
acquire_gc_locks (void)
{
SGEN_LOG (3, "stopping world n %d from %p %p", sgen_global_stop_count, mono_thread_info_current (), (gpointer) (gsize) mono_native_thread_id_get ());
TV_GETTIME (stop_world_time);
- if (mono_thread_info_unified_management_enabled ()) {
- sgen_unified_suspend_stop_world ();
- } else {
- int count, dead;
- count = sgen_thread_handshake (TRUE);
- dead = restart_threads_until_none_in_managed_allocator ();
- if (count < dead)
- g_error ("More threads have died (%d) that been initialy suspended %d", dead, count);
- }
+ sgen_unified_suspend_stop_world ();
SGEN_LOG (3, "world stopped");
TV_GETTIME (start_handshake);
- if (mono_thread_info_unified_management_enabled ())
- sgen_unified_suspend_restart_world ();
- else
- sgen_thread_handshake (FALSE);
+ sgen_unified_suspend_restart_world ();
TV_GETTIME (end_sw);
time_restart_world += TV_ELAPSED (start_handshake, end_sw);
int sleep_duration = -1;
mono_threads_begin_global_suspend ();
- THREADS_STW_DEBUG ("[GC-STW-BEGIN] *** BEGIN SUSPEND *** \n");
+ THREADS_STW_DEBUG ("[GC-STW-BEGIN][%p] *** BEGIN SUSPEND *** \n", mono_thread_info_get_tid (mono_thread_info_current ()));
FOREACH_THREAD (info) {
int reason;
info->client_info.suspend_done = FALSE;
if (sgen_is_thread_in_current_stw (info, &reason)) {
info->client_info.skip = !mono_thread_info_begin_suspend (info);
- THREADS_STW_DEBUG ("[GC-STW-BEGIN-SUSPEND] SUSPEND thread %p skip %d\n", mono_thread_info_get_tid (info), info->client_info.skip);
+ THREADS_STW_DEBUG ("[GC-STW-BEGIN-SUSPEND] SUSPEND thread %p skip %s\n", mono_thread_info_get_tid (info), info->client_info.skip ? "true" : "false");
} else {
- THREADS_STW_DEBUG ("[GC-STW-BEGIN-SUSPEND] IGNORE thread %p skip %d reason %d\n", mono_thread_info_get_tid (info), info->client_info.skip, reason);
+ THREADS_STW_DEBUG ("[GC-STW-BEGIN-SUSPEND] IGNORE thread %p skip %s reason %d\n", mono_thread_info_get_tid (info), info->client_info.skip ? "true" : "false", reason);
}
} FOREACH_THREAD_END
if (!(suspend_count == 1))
g_error ("[%p] suspend_count = %d, but should be 1", mono_thread_info_get_tid (info), suspend_count);
res = mono_thread_info_begin_resume (info);
- THREADS_STW_DEBUG ("[GC-STW-RESTART] RESTART thread %p skip %d\n", mono_thread_info_get_tid (info), res);
if (res)
++restart_counter;
else
info->client_info.skip = TRUE;
+ THREADS_STW_DEBUG ("[GC-STW-RESTART] RESTART thread %p skip %s\n", mono_thread_info_get_tid (info), info->client_info.skip ? "true" : "false");
} else {
THREADS_STW_DEBUG ("[GC-STW-RESTART] DONE thread %p deemed fully suspended\n", mono_thread_info_get_tid (info));
g_assert (!info->client_info.in_critical_region);
if (mono_thread_info_is_running (info)) {
gboolean res = mono_thread_info_begin_suspend (info);
- THREADS_STW_DEBUG ("[GC-STW-RESTART] SUSPEND thread %p skip %d\n", mono_thread_info_get_tid (info), res);
if (!res)
info->client_info.skip = TRUE;
+ THREADS_STW_DEBUG ("[GC-STW-RESTART] SUSPEND thread %p skip %s\n", mono_thread_info_get_tid (info), info->client_info.skip ? "true" : "false");
}
} FOREACH_THREAD_END
FOREACH_THREAD (info) {
int reason = 0;
if (sgen_is_thread_in_current_stw (info, &reason)) {
- MonoThreadUnwindState *state;
+ gpointer stopped_ip;
- THREADS_STW_DEBUG ("[GC-STW-SUSPEND-END] thread %p is suspended\n", mono_thread_info_get_tid (info));
g_assert (info->client_info.suspend_done);
- state = mono_thread_info_get_suspend_state (info);
+ info->client_info.ctx = mono_thread_info_get_suspend_state (info)->ctx;
- info->client_info.ctx = state->ctx;
+ /* Once we remove the old suspend code, we should move sgen to directly access the state in MonoThread */
+ info->client_info.stack_start = (gpointer) ((char*)MONO_CONTEXT_GET_SP (&info->client_info.ctx) - REDZONE_SIZE);
- if (!state->unwind_data [MONO_UNWIND_DATA_DOMAIN] || !state->unwind_data [MONO_UNWIND_DATA_LMF]) {
- /* thread is starting or detaching, nothing to scan here */
- info->client_info.stopped_domain = NULL;
- info->client_info.stopped_ip = NULL;
- info->client_info.stack_start = NULL;
- } else {
- /* Once we remove the old suspend code, we should move sgen to directly access the state in MonoThread */
- info->client_info.stopped_domain = (MonoDomain*) mono_thread_info_tls_get (info, TLS_KEY_DOMAIN);
- info->client_info.stopped_ip = (gpointer) (MONO_CONTEXT_GET_IP (&info->client_info.ctx));
- info->client_info.stack_start = (gpointer) ((char*)MONO_CONTEXT_GET_SP (&info->client_info.ctx) - REDZONE_SIZE);
-
- /* altstack signal handler, sgen can't handle them, mono-threads should have handled this. */
- if (!info->client_info.stack_start
- || info->client_info.stack_start < info->client_info.stack_start_limit
- || info->client_info.stack_start >= info->client_info.stack_end) {
- g_error ("BAD STACK: stack_start = %p, stack_start_limit = %p, stack_end = %p",
- info->client_info.stack_start, info->client_info.stack_start_limit, info->client_info.stack_end);
- }
+ /* altstack signal handler, sgen can't handle them, mono-threads should have handled this. */
+ if (!info->client_info.stack_start
+ || info->client_info.stack_start < info->client_info.stack_start_limit
+ || info->client_info.stack_start >= info->client_info.stack_end) {
+ g_error ("BAD STACK: stack_start = %p, stack_start_limit = %p, stack_end = %p",
+ info->client_info.stack_start, info->client_info.stack_start_limit, info->client_info.stack_end);
}
- binary_protocol_thread_suspend ((gpointer) mono_thread_info_get_tid (info), info->client_info.stopped_ip);
+ stopped_ip = (gpointer) (MONO_CONTEXT_GET_IP (&info->client_info.ctx));
+
+ THREADS_STW_DEBUG ("[GC-STW-SUSPEND-END] thread %p is suspended, stopped_ip = %p, stack = %p -> %p\n",
+ mono_thread_info_get_tid (info), stopped_ip, info->client_info.stack_start, info->client_info.stack_start ? info->client_info.stack_end : NULL);
+
+ binary_protocol_thread_suspend ((gpointer) mono_thread_info_get_tid (info), stopped_ip);
} else {
THREADS_STW_DEBUG ("[GC-STW-SUSPEND-END] thread %p is NOT suspended, reason %d\n", mono_thread_info_get_tid (info), reason);
g_assert (!info->client_info.suspend_done || info == mono_thread_info_current ());
#include <mono/metadata/metadata.h>
#include <mono/metadata/image.h>
#include <mono/metadata/loader.h>
+#include <mono/metadata/class-internals.h>
#include <glib.h> /* GSList dep */
MONO_BEGIN_DECLS
typedef struct {
MonoVerifyInfo info;
- int8_t exception_type; /*should be one of MONO_EXCEPTION_* */
+ MonoExceptionType exception_type : 8; /*should be one of MONO_EXCEPTION_* */
} MonoVerifyInfoExtended;
static char*
get_plt_entry_debug_sym (MonoAotCompile *acfg, MonoJumpInfo *ji, GHashTable *cache);
+static void
+add_gsharedvt_wrappers (MonoAotCompile *acfg, MonoMethodSignature *sig, gboolean gsharedvt_in, gboolean gsharedvt_out);
+
static void
aot_printf (MonoAotCompile *acfg, const gchar *format, ...)
{
(method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL)) {
add_method (acfg, mono_marshal_get_native_wrapper (method, TRUE, TRUE));
}
+
+ if (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) {
+ if (acfg->aot_opts.llvm_only) {
+ /* The wrappers have a different signature (hasthis is not set) so need to add this too */
+ add_gsharedvt_wrappers (acfg, mono_method_signature (method), FALSE, TRUE);
+ }
+ }
}
/* native-to-managed wrappers */
mini_llvm_init ();
if (acfg->aot_opts.asm_only && !acfg->aot_opts.llvm_outfile) {
- aot_printerrf (acfg, "Compiling with LLVM and the asm-only option requires the llvm-outputfile= option.");
+ aot_printerrf (acfg, "Compiling with LLVM and the asm-only option requires the llvm-outfile= option.\n");
return 1;
}
}
#ifdef HOST_WIN32
" --mixed-mode Enable mixed-mode image support.\n"
#endif
+ " --handlers Install custom handlers, use --help-handlers for details.\n"
);
}
}
#endif
+
+#define MONO_HANDLERS_ARGUMENT "--handlers="
+#define MONO_HANDLERS_ARGUMENT_LEN G_N_ELEMENTS(MONO_HANDLERS_ARGUMENT)-1
+
/**
* mono_main:
* @argc: number of arguments in the argv array
} else if (strcmp (argv [i], "--nacl-null-checks-off") == 0){
nacl_null_checks_off = TRUE;
#endif
+ } else if (strncmp (argv [i], MONO_HANDLERS_ARGUMENT, MONO_HANDLERS_ARGUMENT_LEN) == 0) {
+ //Install specific custom handlers.
+ if (!mono_runtime_install_custom_handlers (argv[i] + MONO_HANDLERS_ARGUMENT_LEN)) {
+ fprintf (stderr, "error: " MONO_HANDLERS_ARGUMENT ", one or more unknown handlers: '%s'\n", argv [i]);
+ return 1;
+ }
+ } else if (strcmp (argv [i], "--help-handlers") == 0) {
+ mono_runtime_install_custom_handlers_usage ();
+ return 0;
} else if (argv [i][0] == '-' && argv [i][1] == '-' && mini_parse_debug_option (argv [i] + 2)) {
} else {
fprintf (stderr, "Unknown command line option: '%s'\n", argv [i]);
static guint8*
get_throw_trampoline (const char *name, gboolean rethrow, gboolean llvm, gboolean corlib, gboolean llvm_abs, gboolean resume_unwind, MonoTrampInfo **info, gboolean aot)
{
- guint8 *start, *code;
+ guint8 *start, *code, *labels [16];
int i, stack_size, stack_offset, arg_offsets [5], regs_offset;
MonoJumpInfo *ji = NULL;
GSList *unwind_ops = NULL;
x86_lea_membase (code, X86_EAX, X86_ESP, stack_offset);
x86_mov_membase_reg (code, X86_ESP, regs_offset + (X86_ESP * 4), X86_EAX, 4);
+ /* Clear fp stack */
+ labels [0] = code;
+ x86_fnstsw (code);
+ x86_shift_reg_imm (code, X86_SHR, X86_EAX, 11);
+ x86_alu_reg_imm (code, X86_AND, X86_EAX, 7);
+ x86_alu_reg_imm (code, X86_CMP, X86_EAX, 0);
+ labels [1] = code;
+ x86_branch8 (code, X86_CC_EQ, 0, FALSE);
+ x86_fstp (code, 0);
+ x86_jump_code (code, labels [0]);
+ mono_x86_patch (labels [1], code);
+
/* Set arg1 == regs */
x86_lea_membase (code, X86_EAX, X86_ESP, regs_offset);
x86_mov_membase_reg (code, X86_ESP, arg_offsets [0], X86_EAX, 4);
/*
* inline_method:
*
- * Return the cost of inlining CMETHOD.
+ * Return the cost of inlining CMETHOD, or zero if it should not be inlined.
*/
static int
inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **sp,
- guchar *ip, guint real_offset, gboolean inline_always)
+ guchar *ip, guint real_offset, gboolean inline_always)
{
MonoError error;
MonoInst *ins, *rvar = NULL;
/*
* mono_method_to_ir:
*
- * Translate the .net IL into linear IR.
+ * Translate the .net IL into linear IR.
+ *
+ * @start_bblock: if not NULL, the starting basic block, used during inlining.
+ * @end_bblock: if not NULL, the ending basic block, used during inlining.
+ * @return_var: if not NULL, the place where the return value is stored, used during inlining.
+ * @inline_args: if not NULL, contains the arguments to the inline call
+ * @inline_offset: if not zero, the real offset from the inline call, or zero otherwise.
+ * @is_virtual_call: whether this method is being called as a result of a call to callvirt
+ *
+ * This method is used to turn ECMA IL into Mono's internal Linear IR
+ * reprensetation. It is used both for entire methods, as well as
+ * inlining existing methods. In the former case, the @start_bblock,
+ * @end_bblock, @return_var, @inline_args are all set to NULL, and the
+ * inline_offset is set to zero.
+ *
+ * Returns: the inline cost, or -1 if there was an error processing this method.
*/
int
mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_bblock, MonoBasicBlock *end_bblock,
MonoThreadInfo *thread = mono_thread_info_current_unchecked ();
if (!thread) {
ctx->valid = FALSE;
- G_BREAKPOINT ();
+ g_error ("Invoked mono_thread_state_init_from_sigctx from non-Mono thread");
return FALSE;
}
if (method->wrapper_type == MONO_WRAPPER_DELEGATE_INVOKE) {
WrapperInfo *info = mono_marshal_get_wrapper_info (method);
- if (info->subtype == WRAPPER_SUBTYPE_NONE)
- return mono_marshal_get_delegate_invoke (mini_get_shared_method_full (info->d.delegate_invoke.method, all_vt, is_gsharedvt), NULL);
+ if (info->subtype == WRAPPER_SUBTYPE_NONE) {
+ MonoMethod *m = mono_marshal_get_delegate_invoke (mini_get_shared_method_full (info->d.delegate_invoke.method, all_vt, is_gsharedvt), NULL);
+ return m;
+ }
}
if (method->is_generic || (method->klass->generic_container && !method->is_inflated)) {
module->llvm_only = llvm_only;
/* The first few entries are reserved */
module->max_got_offset = 16;
- module->context = LLVMContextCreate ();
+ module->context = LLVMGetGlobalContext ();
if (llvm_only)
/* clang ignores our debug info because it has an invalid version */
#include <mono/utils/dtrace.h>
#include <mono/utils/mono-signal-handler.h>
#include <mono/utils/mono-threads.h>
-#include <mono/utils/mono-threads-posix-signals.h>
#include "mini.h"
#include <string.h>
*/
#if defined (USE_POSIX_BACKEND) && defined (SIGRTMIN) && !defined (PLATFORM_ANDROID)
/* Just take the first real-time signal we can get. */
- profiler_signal = mono_threads_posix_signal_search_alternative (-1);
+ profiler_signal = mono_threads_suspend_search_alternative_signal ();
#else
profiler_signal = SIGPROF;
#endif
/* Not used */
g_assert_not_reached ();
}
+
+// Custom handlers currently only implemented by Windows.
+#ifndef HOST_WIN32
+gboolean
+mono_runtime_install_custom_handlers (const char *handlers)
+{
+ return FALSE;
+}
+
+void
+mono_runtime_install_custom_handlers_usage (void)
+{
+ fprintf (stdout,
+ "Custom Handlers:\n"
+ " --handlers=HANDLERS Enable handler support, HANDLERS is a comma\n"
+ " separated list of available handlers to install.\n"
+ "\n"
+ "No handlers supported on current platform.\n");
+}
+#endif /* HOST_WIN32 */
#include <config.h>
#include <signal.h>
#include <math.h>
+#include <conio.h>
+#include <assert.h>
#include <mono/metadata/assembly.h>
#include <mono/metadata/loader.h>
#include <mmsystem.h>
#endif
+#define MONO_HANDLER_DELIMITER ','
+#define MONO_HANDLER_DELIMITER_LEN G_N_ELEMENTS(MONO_HANDLER_DELIMITER)-1
+
+#define MONO_HANDLER_ATEXIT_WAIT_KEYPRESS "atexit-waitkeypress"
+#define MONO_HANDLER_ATEXIT_WAIT_KEYPRESS_LEN G_N_ELEMENTS(MONO_HANDLER_ATEXIT_WAIT_KEYPRESS)-1
+
+// Typedefs used to setup handler table.
+typedef void (*handler)(void);
+
+typedef struct {
+ const char * cmd;
+ const int cmd_len;
+ handler handler;
+} HandlerItem;
+
+#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
+/**
+* atexit_wait_keypress:
+*
+* This function is installed as an atexit function making sure that the console is not terminated before the end user has a chance to read the result.
+* This can be handy in debug scenarios (running from within the debugger) since an exit of the process will close the console window
+* without giving the end user a chance to look at the output before closed.
+*/
+static void
+atexit_wait_keypress (void)
+{
+
+ fflush (stdin);
+
+ printf ("Press any key to continue . . . ");
+ fflush (stdout);
+
+ _getch ();
+
+ return;
+}
+
+/**
+* install_atexit_wait_keypress:
+*
+* This function installs the wait keypress exit handler.
+*/
+static void
+install_atexit_wait_keypress (void)
+{
+ atexit (atexit_wait_keypress);
+ return;
+}
+
+#else
+
+/**
+* install_atexit_wait_keypress:
+*
+* Not supported on WINAPI family.
+*/
+static void
+install_atexit_wait_keypress (void)
+{
+ return;
+}
+
+#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
+
+// Table describing handlers that can be installed at process startup. Adding a new handler can be done by adding a new item to the table together with an install handler function.
+const HandlerItem g_handler_items[] = { { MONO_HANDLER_ATEXIT_WAIT_KEYPRESS, MONO_HANDLER_ATEXIT_WAIT_KEYPRESS_LEN, install_atexit_wait_keypress },
+ { NULL, 0, NULL } };
+
+/**
+ * get_handler_arg_len:
+ * @handlers: Get length of next handler.
+ *
+ * This function calculates the length of next handler included in argument.
+ *
+ * Returns: The length of next handler, if available.
+ */
+static size_t
+get_next_handler_arg_len (const char *handlers)
+{
+ assert (handlers != NULL);
+
+ size_t current_len = 0;
+ const char *handler = strchr (handlers, MONO_HANDLER_DELIMITER);
+ if (handler != NULL) {
+ // Get length of next handler arg.
+ current_len = (handler - handlers);
+ } else {
+ // Consume rest as length of next handler arg.
+ current_len = strlen (handlers);
+ }
+
+ return current_len;
+}
+
+/**
+ * install_custom_handler:
+ * @handlers: Handlers included in --handler argument, example "atexit-waitkeypress,someothercmd,yetanothercmd".
+ * @handler_arg_len: Output, length of consumed handler.
+ *
+ * This function installs the next handler included in @handlers parameter.
+ *
+ * Returns: TRUE on successful install, FALSE on failure or unrecognized handler.
+ */
+static gboolean
+install_custom_handler (const char *handlers, size_t *handler_arg_len)
+{
+ gboolean result = FALSE;
+
+ assert (handlers != NULL);
+ assert (handler_arg_len);
+
+ *handler_arg_len = get_next_handler_arg_len (handlers);
+ for (int current_item = 0; current_item < G_N_ELEMENTS (g_handler_items); ++current_item) {
+ const HandlerItem * handler_item = &g_handler_items [current_item];
+
+ if (handler_item->cmd == NULL)
+ continue;
+
+ if (*handler_arg_len == handler_item->cmd_len && strncmp (handlers, handler_item->cmd, *handler_arg_len) == 0) {
+ assert (handler_item->handler != NULL);
+ handler_item->handler ();
+ result = TRUE;
+ break;
+ }
+ }
+ return result;
+}
+
void
mono_runtime_install_handlers (void)
{
#endif
}
+gboolean
+mono_runtime_install_custom_handlers (const char *handlers)
+{
+ gboolean result = FALSE;
+
+ assert (handlers != NULL);
+ while (*handlers != '\0') {
+ size_t handler_arg_len = 0;
+
+ result = install_custom_handler (handlers, &handler_arg_len);
+ handlers += handler_arg_len;
+
+ if (*handlers == MONO_HANDLER_DELIMITER)
+ handlers++;
+ if (!result)
+ break;
+ }
+
+ return result;
+}
+
+void
+mono_runtime_install_custom_handlers_usage (void)
+{
+ fprintf (stdout,
+ "Custom Handlers:\n"
+ " --handlers=HANDLERS Enable handler support, HANDLERS is a comma\n"
+ " separated list of available handlers to install.\n"
+ "\n"
+#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
+ "HANDLERS is composed of:\n"
+ " atexit-waitkeypress Install an atexit handler waiting for a keypress\n"
+ " before exiting process.\n");
+#else
+ "No handlers supported on current platform.\n");
+#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
+}
+
void
mono_runtime_cleanup_handlers (void)
{
guint8 *thunks;
/* Offset between the start of code and the thunks area */
int thunks_offset;
- guint32 exception_type; /* MONO_EXCEPTION_* */
+ MonoExceptionType exception_type; /* MONO_EXCEPTION_* */
guint32 exception_data;
char* exception_message;
gpointer exception_ptr;
* Per-OS implementation functions.
*/
void mono_runtime_install_handlers (void);
+gboolean mono_runtime_install_custom_handlers (const char *handlers);
+void mono_runtime_install_custom_handlers_usage (void);
void mono_runtime_cleanup_handlers (void);
void mono_runtime_setup_stat_profiler (void);
void mono_runtime_shutdown_stat_profiler (void);
bug-29585.cs \
priority.cs \
abort-cctor.cs \
- thread-native-exit.cs \
- reference-loader.cs
+ thread-native-exit.cs
if INSTALL_MOBILE_STATIC
BASE_TEST_CS_SRC= \
bug-459094.exe \
delegate-invoke.exe \
bug-Xamarin-5278.exe \
+ reference-loader.cs \
$(PLATFORM_DISABLED_TESTS) \
$(EXTRA_DISABLED_TESTS) \
$(COOP_DISABLED_TESTS) \
delegate-with-null-target.il \
bug-318677.il \
gsharing-valuetype-layout.il \
- invalid_generic_instantiation.il
+ invalid_generic_instantiation.il \
+ bug-45841-fpstack-exceptions.il
if INSTALL_MOBILE_STATIC
TEST_IL_SRC= \
--- /dev/null
+
+// Metadata version: v4.0.30319
+.assembly extern mscorlib
+{
+ .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
+ .ver 4:0:0:0
+}
+.assembly extern System.Data
+{
+ .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
+ .ver 4:0:0:0
+}
+.assembly x
+{
+ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
+ .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
+ 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
+ .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 )
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+.module x.exe
+// MVID: {0EDDDD7B-2C90-4D6D-9C28-383B7DA8A1EB}
+.imagebase 0x00400000
+.file alignment 0x00000200
+.stackreserve 0x00100000
+.subsystem 0x0003 // WINDOWS_CUI
+.corflags 0x00000001 // ILONLY
+
+
+// =============== CLASS MEMBERS DECLARATION ===================
+
+.class public auto ansi beforefieldinit SqlSingleTest
+ extends [mscorlib]System.Object
+{
+ .method public hidebysig static int32 Main() cil managed
+ {
+ .entrypoint
+ // Code size 164 (0xa4)
+ .maxstack 2
+ .locals init (valuetype [System.Data]System.Data.SqlTypes.SqlDecimal V_0)
+ .try
+ {
+ ldc.r8 5
+ newobj instance void [mscorlib]System.OverflowException::.ctor(string)
+ throw
+ pop
+ IL_001c: leave.s IL_0021
+
+ } // end .try
+ catch [mscorlib]System.Exception
+ {
+ IL_001e: pop
+ IL_001f: leave.s IL_0021
+
+ } // end handler
+ IL_0021: nop
+ .try
+ {
+ ldc.r8 5
+ newobj instance void [mscorlib]System.OverflowException::.ctor(string)
+ throw
+ pop
+ IL_002e: leave.s IL_0033
+
+ } // end .try
+ catch [mscorlib]System.Exception
+ {
+ IL_0030: pop
+ IL_0031: leave.s IL_0033
+
+ } // end handler
+ IL_0033: nop
+ .try
+ {
+ ldc.r8 5
+ newobj instance void [mscorlib]System.OverflowException::.ctor(string)
+ throw
+ IL_0044: leave.s IL_0049
+
+ } // end .try
+ catch [mscorlib]System.Exception
+ {
+ IL_0046: pop
+ IL_0047: leave.s IL_0049
+
+ } // end handler
+ IL_0049: nop
+ .try
+ {
+ ldc.r8 5
+ newobj instance void [mscorlib]System.OverflowException::.ctor(string)
+ throw
+ pop
+ IL_005a: leave.s IL_005f
+
+ } // end .try
+ catch [mscorlib]System.Exception
+ {
+ IL_005c: pop
+ IL_005d: leave.s IL_005f
+
+ } // end handler
+ IL_005f: nop
+ .try
+ {
+ ldc.r8 5
+ newobj instance void [mscorlib]System.OverflowException::.ctor(string)
+ throw
+ pop
+ IL_006c: leave.s IL_0071
+
+ } // end .try
+ catch [mscorlib]System.Exception
+ {
+ IL_006e: pop
+ IL_006f: leave.s IL_0071
+
+ } // end handler
+ IL_0071: nop
+ .try
+ {
+ ldc.r8 5
+ newobj instance void [mscorlib]System.OverflowException::.ctor(string)
+ throw
+ pop
+ IL_0082: leave.s IL_0087
+
+ } // end .try
+ catch [mscorlib]System.Exception
+ {
+ IL_0084: pop
+ IL_0085: leave.s IL_0087
+
+ } // end handler
+ IL_0087:
+ ldloca.s V_0
+ IL_0089: ldc.r8 5
+ IL_0092: call instance void [System.Data]System.Data.SqlTypes.SqlDecimal::.ctor(float64)
+ IL_0097: ldloca.s V_0
+ IL_0099: call instance valuetype [mscorlib]System.Decimal [System.Data]System.Data.SqlTypes.SqlDecimal::get_Value()
+ call float64 [mscorlib]System.Decimal::ToDouble([mscorlib]System.Decimal)
+ ldc.r8 5
+ ceq
+ ldc.i4 0
+ ceq
+ ret
+ } // end of method SqlSingleTest::Main
+
+ .method public hidebysig specialname rtspecialname
+ instance void .ctor() cil managed
+ {
+ // Code size 7 (0x7)
+ .maxstack 8
+ IL_0000: ldarg.0
+ IL_0001: call instance void [mscorlib]System.Object::.ctor()
+ IL_0006: ret
+ } // end of method SqlSingleTest::.ctor
+
+} // end of class SqlSingleTest
+
+
+// =============================================================
+
+// *********** DISASSEMBLY COMPLETE ***********************
for (int i = 0; i < st.FrameCount; ++i) {
StackFrame sf = st.GetFrame (i);
MethodBase m = sf.GetMethod ();
+ if (m == null)
+ continue;
Type t = m.DeclaringType;
if (m.IsGenericMethod) {
Type[] margs = m.GetGenericArguments ();
return mono_test_marshal_array_delegate1 (null, 0, new ArrayDelegate1 (array_delegate2));
}
+ public delegate int ArrayDelegateBlittable (int i, string j,
+ [In, MarshalAs(UnmanagedType.LPArray,
+ ArraySubType=UnmanagedType.LPStr, SizeParamIndex=0)] int[] arr);
+
+ [DllImport ("libtest", EntryPoint="mono_test_marshal_array_delegate")]
+ public static extern int mono_test_marshal_array_delegate1 (string[] arr, int len, ArrayDelegateBlittable d);
+
+ public static int array_delegate_null_blittable (int i, string j, int[] arr) {
+ return (arr == null) ? 0 : 1;
+ }
+
+ public static int test_0_marshal_array_delegate_null_blittable () {
+ return mono_test_marshal_array_delegate1 (null, 0, new ArrayDelegateBlittable (array_delegate_null_blittable));
+ }
+
public delegate int ArrayDelegate3 (int i,
string j,
[In, MarshalAs(UnmanagedType.LPArray,
endif
+if HOST_WIN32
+win32_sources = \
+ os-event-win32.c
+
+platform_sources = $(win32_sources)
+else
+unix_sources = \
+ os-event-unix.c
+
+platform_sources = $(unix_sources)
+endif
+
monoutils_sources = \
+ $(platform_sources) \
mono-md5.c \
mono-sha1.c \
mono-logger.c \
mono-threads-state-machine.c \
mono-threads-posix.c \
mono-threads-posix-signals.c \
- mono-threads-posix-signals.h \
mono-threads-mach.c \
mono-threads-mach-helper.c \
mono-threads-windows.c \
mono-threads-openbsd.c \
mono-threads-android.c \
mono-threads.h \
+ mono-threads-debug.h \
mono-threads-api.h \
mono-threads-coop.c \
mono-threads-coop.h \
- mono-threads-mach-abort-syscall.c \
- mono-threads-posix-abort-syscall.c \
- mono-threads-windows-abort-syscall.c \
mono-tls.h \
mono-tls.c \
linux_magic.h \
checked-build.c \
checked-build.h \
w32handle.c \
- w32handle.h
+ w32handle.h \
+ os-event.h
arch_sources =
#include <mono/utils/mono-threads-coop.h>
#include <mono/utils/mono-threads-api.h>
#include <mono/utils/checked-build.h>
+#include <mono/utils/mono-threads-debug.h>
#ifdef TARGET_OSX
#include <mono/utils/mach-support.h>
--- /dev/null
+
+#ifndef __MONO_UTILS_MONO_THREADS_DEBUG_H__
+#define __MONO_UTILS_MONO_THREADS_DEBUG_H__
+
+/* Logging - enable them below if you need specific logging for the category you need */
+#define MOSTLY_ASYNC_SAFE_PRINTF(...) do { \
+ char __buff[1024]; __buff [0] = '\0'; \
+ g_snprintf (__buff, sizeof (__buff), __VA_ARGS__); \
+ write (1, __buff, strlen (__buff)); \
+} while (0)
+
+#if 1
+#define THREADS_DEBUG(...)
+#else
+#define THREADS_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
+#endif
+
+#if 1
+#define THREADS_STW_DEBUG(...)
+#else
+#define THREADS_STW_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
+#endif
+
+#if 1
+#define THREADS_SUSPEND_DEBUG(...)
+#else
+#define THREADS_SUSPEND_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
+#endif
+
+#if 1
+#define THREADS_STATE_MACHINE_DEBUG(...)
+#else
+#define THREADS_STATE_MACHINE_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
+#endif
+
+#if 1
+#define THREADS_INTERRUPT_DEBUG(...)
+#else
+#define THREADS_INTERRUPT_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
+#endif
+
+#endif /* __MONO_UTILS_MONO_THREADS_DEBUG_H__ */
+++ /dev/null
-/*
- * mono-threads-mach-abort-syscall.c: Low-level syscall aborting
- *
- * Author:
- * Ludovic Henry (ludovic@xamarin.com)
- *
- * (C) 2015 Xamarin, Inc
- */
-
-#include "config.h"
-#include <glib.h>
-
-#if defined (__MACH__)
-#define _DARWIN_C_SOURCE 1
-#endif
-
-#include <mono/utils/mono-threads.h>
-
-#if defined(USE_MACH_BACKEND)
-
-#if defined(HOST_WATCHOS) || defined(HOST_TVOS)
-
-void
-mono_threads_abort_syscall_init (void)
-{
-}
-
-void
-mono_threads_suspend_abort_syscall (MonoThreadInfo *info)
-{
-
-}
-
-gboolean
-mono_threads_suspend_needs_abort_syscall (void)
-{
- return FALSE;
-}
-
-#else
-
-void
-mono_threads_abort_syscall_init (void)
-{
-}
-
-void
-mono_threads_suspend_abort_syscall (MonoThreadInfo *info)
-{
- kern_return_t ret;
-
- do {
- ret = thread_suspend (info->native_handle);
- } while (ret == KERN_ABORTED);
-
- if (ret != KERN_SUCCESS)
- return;
-
- do {
- ret = thread_abort_safely (info->native_handle);
- } while (ret == KERN_ABORTED);
-
- /*
- * We are doing thread_abort when thread_abort_safely returns KERN_SUCCESS because
- * for some reason accept is not interrupted by thread_abort_safely.
- * The risk of aborting non-atomic operations while calling thread_abort should not
- * exist because by the time thread_abort_safely returns KERN_SUCCESS the target
- * thread should have return from the kernel and should be waiting for thread_resume
- * to resume the user code.
- */
- if (ret == KERN_SUCCESS)
- ret = thread_abort (info->native_handle);
-
- do {
- ret = thread_resume (info->native_handle);
- } while (ret == KERN_ABORTED);
-
- g_assert (ret == KERN_SUCCESS);
-}
-
-gboolean
-mono_threads_suspend_needs_abort_syscall (void)
-{
- return TRUE;
-}
-
-#endif
-
-#endif
#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-threads.h>
#include <mono/utils/hazard-pointer.h>
+#include <mono/utils/mono-threads-debug.h>
void
mono_threads_suspend_init (void)
g_assert_not_reached ();
}
+void
+mono_threads_suspend_abort_syscall (MonoThreadInfo *info)
+{
+ g_assert_not_reached ();
+}
+
+gboolean
+mono_threads_suspend_needs_abort_syscall (void)
+{
+ return FALSE;
+}
+
#else /* defined(HOST_WATCHOS) || defined(HOST_TVOS) */
gboolean
}
info->suspend_can_continue = mono_threads_get_runtime_callbacks ()->
thread_state_init_from_handle (&info->thread_saved_state [ASYNC_SUSPEND_STATE_INDEX], info);
- THREADS_SUSPEND_DEBUG ("thread state %p -> %d\n", (gpointer)(gsize)info->native_handle, res);
+ THREADS_SUSPEND_DEBUG ("thread state %p -> %d\n", (gpointer)(gsize)info->native_handle, ret);
if (info->suspend_can_continue) {
if (interrupt_kernel)
thread_abort (info->native_handle);
} else {
THREADS_SUSPEND_DEBUG ("FAILSAFE RESUME/2 %p -> %d\n", (gpointer)(gsize)info->native_handle, 0);
}
- return info->suspend_can_continue;
+ return TRUE;
}
gboolean
return ret == KERN_SUCCESS;
}
+void
+mono_threads_suspend_abort_syscall (MonoThreadInfo *info)
+{
+ kern_return_t ret;
+
+ do {
+ ret = thread_suspend (info->native_handle);
+ } while (ret == KERN_ABORTED);
+
+ if (ret != KERN_SUCCESS)
+ return;
+
+ do {
+ ret = thread_abort_safely (info->native_handle);
+ } while (ret == KERN_ABORTED);
+
+ /*
+ * We are doing thread_abort when thread_abort_safely returns KERN_SUCCESS because
+ * for some reason accept is not interrupted by thread_abort_safely.
+ * The risk of aborting non-atomic operations while calling thread_abort should not
+ * exist because by the time thread_abort_safely returns KERN_SUCCESS the target
+ * thread should have return from the kernel and should be waiting for thread_resume
+ * to resume the user code.
+ */
+ if (ret == KERN_SUCCESS)
+ ret = thread_abort (info->native_handle);
+
+ do {
+ ret = thread_resume (info->native_handle);
+ } while (ret == KERN_ABORTED);
+
+ g_assert (ret == KERN_SUCCESS);
+}
+
+gboolean
+mono_threads_suspend_needs_abort_syscall (void)
+{
+ return TRUE;
+}
+
#endif /* defined(HOST_WATCHOS) || defined(HOST_TVOS) */
void
mach_port_deallocate (current_task (), info->native_handle);
}
+void
+mono_threads_suspend_init_signals (void)
+{
+}
+
+gint
+mono_threads_suspend_search_alternative_signal (void)
+{
+ g_assert_not_reached ();
+}
+
+gint
+mono_threads_suspend_get_suspend_signal (void)
+{
+ return -1;
+}
+
+gint
+mono_threads_suspend_get_restart_signal (void)
+{
+ return -1;
+}
+
+gint
+mono_threads_suspend_get_abort_signal (void)
+{
+ return -1;
+}
+
#endif /* USE_MACH_BACKEND */
#ifdef __MACH__
+++ /dev/null
-/*
- * mono-threads-posix-abort-syscall.c: Low-level syscall aborting
- *
- * Author:
- * Ludovic Henry (ludovic@xamarin.com)
- *
- * (C) 2015 Xamarin, Inc
- */
-
-#include "config.h"
-#include <glib.h>
-
-#if defined (__MACH__)
-#define _DARWIN_C_SOURCE 1
-#endif
-
-#include "mono-threads.h"
-#include "mono-threads-posix-signals.h"
-
-#if defined(USE_POSIX_BACKEND)
-
-void
-mono_threads_abort_syscall_init (void)
-{
- mono_threads_posix_init_signals (MONO_THREADS_POSIX_INIT_SIGNALS_ABORT);
-}
-
-void
-mono_threads_suspend_abort_syscall (MonoThreadInfo *info)
-{
- /* We signal a thread to break it from the current syscall.
- * This signal should not be interpreted as a suspend request. */
- info->syscall_break_signal = TRUE;
- if (!mono_threads_pthread_kill (info, mono_threads_posix_get_abort_signal ()))
- mono_threads_add_to_pending_operation_set (info);
-}
-
-gboolean
-mono_threads_suspend_needs_abort_syscall (void)
-{
- return TRUE;
-}
-
-#endif
#include <errno.h>
#include <signal.h>
-#include "mono-threads-posix-signals.h"
+#include "mono-threads-debug.h"
#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#define DEFAULT_SUSPEND_SIGNAL SIGXFSZ
#endif
#define DEFAULT_RESTART_SIGNAL SIGXCPU
-static int suspend_signal_num;
-static int restart_signal_num;
static int abort_signal_num;
static sigset_t suspend_signal_mask;
static sigset_t suspend_ack_signal_mask;
-//Can't avoid the circular dep on this. Will be gone pretty soon
-extern int mono_gc_get_suspend_signal (void);
-
-int
-mono_threads_posix_signal_search_alternative (int min_signal)
+gint
+mono_threads_suspend_search_alternative_signal (void)
{
#if !defined (SIGRTMIN)
g_error ("signal search only works with RTMIN");
#else
int i;
/* we try to avoid SIGRTMIN and any one that might have been set already, see bug #75387 */
- for (i = MAX (min_signal, SIGRTMIN) + 1; i < SIGRTMAX; ++i) {
+ for (i = SIGRTMIN + 1; i < SIGRTMAX; ++i) {
struct sigaction sinfo;
sigaction (i, NULL, &sinfo);
if (sinfo.sa_handler == SIG_DFL && (void*)sinfo.sa_sigaction == (void*)SIG_DFL) {
static void
signal_add_handler (int signo, gpointer handler, int flags)
{
-#if !defined(__native_client__)
+#if defined(__native_client__)
+ g_assert_not_reached ();
+#else
/*FIXME, move the code from mini to utils and do the right thing!*/
struct sigaction sa;
struct sigaction previous_sa;
#endif
}
-static int
-suspend_signal_get (void)
-{
-#if defined(PLATFORM_ANDROID)
- return SIGUNUSED;
-#elif !defined (SIGRTMIN)
-#ifdef SIGUSR1
- return SIGUSR1;
-#else
- return -1;
-#endif /* SIGUSR1 */
-#else
- static int suspend_signum = -1;
- if (suspend_signum == -1)
- suspend_signum = mono_threads_posix_signal_search_alternative (-1);
- return suspend_signum;
-#endif /* SIGRTMIN */
-}
-
-static int
-restart_signal_get (void)
-{
-#if defined(PLATFORM_ANDROID)
- return SIGTTOU;
-#elif !defined (SIGRTMIN)
-#ifdef SIGUSR2
- return SIGUSR2;
-#else
- return -1;
-#endif /* SIGUSR1 */
-#else
- static int resume_signum = -1;
- if (resume_signum == -1)
- resume_signum = mono_threads_posix_signal_search_alternative (suspend_signal_get () + 1);
- return resume_signum;
-#endif /* SIGRTMIN */
-}
-
-
static int
abort_signal_get (void)
{
#if defined(PLATFORM_ANDROID)
return SIGTTIN;
-#elif !defined (SIGRTMIN)
-#ifdef SIGTTIN
- return SIGTTIN;
-#else
- return -1;
-#endif /* SIGRTMIN */
-#else
+#elif defined (SIGRTMIN)
static int abort_signum = -1;
if (abort_signum == -1)
- abort_signum = mono_threads_posix_signal_search_alternative (restart_signal_get () + 1);
+ abort_signum = mono_threads_suspend_search_alternative_signal ();
return abort_signum;
-#endif /* SIGRTMIN */
+#elif defined (SIGTTIN)
+ return SIGTTIN;
+#else
+ return -1;
+#endif
}
static void
int old_errno = errno;
info = mono_thread_info_current ();
- info->signal = restart_signal_num;
+ info->signal = DEFAULT_RESTART_SIGNAL;
errno = old_errno;
#endif
}
do {
current->signal = 0;
sigsuspend (&suspend_signal_mask);
- } while (current->signal != restart_signal_num);
+ } while (current->signal != DEFAULT_RESTART_SIGNAL);
/* Unblock the restart signal. */
pthread_sigmask (SIG_UNBLOCK, &suspend_ack_signal_mask, NULL);
#endif
}
-static void
-abort_signal_handler (int _dummy, siginfo_t *info, void *context)
-{
-#if defined(__native_client__)
- g_assert_not_reached ();
-#else
- suspend_signal_handler (_dummy, info, context);
-#endif
-}
-
void
-mono_threads_posix_init_signals (MonoThreadPosixInitSignals signals)
+mono_threads_suspend_init_signals (void)
{
sigset_t signal_set;
- g_assert ((signals == MONO_THREADS_POSIX_INIT_SIGNALS_SUSPEND_RESTART) ^ (signals == MONO_THREADS_POSIX_INIT_SIGNALS_ABORT));
-
sigemptyset (&signal_set);
- switch (signals) {
- case MONO_THREADS_POSIX_INIT_SIGNALS_SUSPEND_RESTART: {
- if (mono_thread_info_unified_management_enabled ()) {
- suspend_signal_num = DEFAULT_SUSPEND_SIGNAL;
- restart_signal_num = DEFAULT_RESTART_SIGNAL;
- } else {
- suspend_signal_num = suspend_signal_get ();
- restart_signal_num = restart_signal_get ();
- }
+ sigfillset (&suspend_signal_mask);
+ sigdelset (&suspend_signal_mask, DEFAULT_RESTART_SIGNAL);
- sigfillset (&suspend_signal_mask);
- sigdelset (&suspend_signal_mask, restart_signal_num);
- if (!mono_thread_info_unified_management_enabled ())
- sigdelset (&suspend_signal_mask, mono_gc_get_suspend_signal ());
+ sigemptyset (&suspend_ack_signal_mask);
+ sigaddset (&suspend_ack_signal_mask, DEFAULT_RESTART_SIGNAL);
- sigemptyset (&suspend_ack_signal_mask);
- sigaddset (&suspend_ack_signal_mask, restart_signal_num);
+ signal_add_handler (DEFAULT_SUSPEND_SIGNAL, suspend_signal_handler, SA_RESTART);
+ signal_add_handler (DEFAULT_RESTART_SIGNAL, restart_signal_handler, SA_RESTART);
- signal_add_handler (suspend_signal_num, suspend_signal_handler, SA_RESTART);
- signal_add_handler (restart_signal_num, restart_signal_handler, SA_RESTART);
+ sigaddset (&signal_set, DEFAULT_SUSPEND_SIGNAL);
+ sigaddset (&signal_set, DEFAULT_RESTART_SIGNAL);
- sigaddset (&signal_set, suspend_signal_num);
- sigaddset (&signal_set, restart_signal_num);
+ abort_signal_num = abort_signal_get ();
- break;
- }
- case MONO_THREADS_POSIX_INIT_SIGNALS_ABORT: {
- abort_signal_num = abort_signal_get ();
-
- signal_add_handler (abort_signal_num, abort_signal_handler, 0);
-
- sigaddset (&signal_set, abort_signal_num);
+ /* the difference between abort and suspend here is made by not
+ * passing SA_RESTART, meaning we won't restart the syscall when
+ * receiving a signal */
+ signal_add_handler (abort_signal_num, suspend_signal_handler, 0);
- break;
- }
- default: g_assert_not_reached ();
- }
+ sigaddset (&signal_set, abort_signal_num);
/* ensure all the new signals are unblocked */
sigprocmask (SIG_UNBLOCK, &signal_set, NULL);
}
gint
-mono_threads_posix_get_suspend_signal (void)
+mono_threads_suspend_get_suspend_signal (void)
{
- return suspend_signal_num;
+ return DEFAULT_SUSPEND_SIGNAL;
}
gint
-mono_threads_posix_get_restart_signal (void)
+mono_threads_suspend_get_restart_signal (void)
{
- return restart_signal_num;
+ return DEFAULT_RESTART_SIGNAL;
}
gint
-mono_threads_posix_get_abort_signal (void)
+mono_threads_suspend_get_abort_signal (void)
{
return abort_signal_num;
}
+++ /dev/null
-
-#ifndef __MONO_THREADS_POSIX_SIGNALS_H__
-#define __MONO_THREADS_POSIX_SIGNALS_H__
-
-#include <config.h>
-#include <glib.h>
-
-#include "mono-threads.h"
-
-#if defined(USE_POSIX_BACKEND) || defined(USE_POSIX_SYSCALL_ABORT)
-
-typedef enum {
- MONO_THREADS_POSIX_INIT_SIGNALS_SUSPEND_RESTART,
- MONO_THREADS_POSIX_INIT_SIGNALS_ABORT,
-} MonoThreadPosixInitSignals;
-
-int
-mono_threads_posix_signal_search_alternative (int min_signal);
-
-void
-mono_threads_posix_init_signals (MonoThreadPosixInitSignals signals);
-
-gint
-mono_threads_posix_get_suspend_signal (void);
-
-gint
-mono_threads_posix_get_restart_signal (void);
-
-gint
-mono_threads_posix_get_abort_signal (void);
-
-#endif /* defined(USE_POSIX_BACKEND) || defined(USE_POSIX_SYSCALL_ABORT) */
-
-#endif /* __MONO_THREADS_POSIX_SIGNALS_H__ */
#endif
#include <mono/utils/mono-threads.h>
-#include <mono/utils/mono-threads-posix-signals.h>
#include <mono/utils/mono-coop-semaphore.h>
#include <mono/metadata/gc-internals.h>
#include <mono/utils/w32handle.h>
+#include <mono/utils/mono-threads-debug.h>
#include <errno.h>
gboolean
mono_threads_suspend_begin_async_suspend (MonoThreadInfo *info, gboolean interrupt_kernel)
{
- int sig = interrupt_kernel ? mono_threads_posix_get_abort_signal () : mono_threads_posix_get_suspend_signal ();
+ int sig = interrupt_kernel ? mono_threads_suspend_get_abort_signal () : mono_threads_suspend_get_suspend_signal ();
if (!mono_threads_pthread_kill (info, sig)) {
mono_threads_add_to_pending_operation_set (info);
mono_threads_suspend_begin_async_resume (MonoThreadInfo *info)
{
mono_threads_add_to_pending_operation_set (info);
- return mono_threads_pthread_kill (info, mono_threads_posix_get_restart_signal ()) == 0;
+ return mono_threads_pthread_kill (info, mono_threads_suspend_get_restart_signal ()) == 0;
+}
+
+void
+mono_threads_suspend_abort_syscall (MonoThreadInfo *info)
+{
+ /* We signal a thread to break it from the current syscall.
+ * This signal should not be interpreted as a suspend request. */
+ info->syscall_break_signal = TRUE;
+ if (mono_threads_pthread_kill (info, mono_threads_suspend_get_abort_signal ()) == 0) {
+ mono_threads_add_to_pending_operation_set (info);
+ }
+}
+
+gboolean
+mono_threads_suspend_needs_abort_syscall (void)
+{
+ return TRUE;
}
void
void
mono_threads_suspend_init (void)
{
- mono_threads_posix_init_signals (MONO_THREADS_POSIX_INIT_SIGNALS_SUSPEND_RESTART);
}
#endif /* defined(USE_POSIX_BACKEND) */
#include <mono/utils/mono-memory-model.h>
#include <mono/utils/atomic.h>
#include <mono/utils/checked-build.h>
+#include <mono/utils/mono-threads-debug.h>
#include <errno.h>
+++ /dev/null
-/*
- * mono-threads-windows-abort-syscall.c: Low-level syscall aborting
- *
- * Author:
- * Ludovic Henry (ludovic@xamarin.com)
- *
- * (C) 2015 Xamarin, Inc
- */
-
-#include "config.h"
-#include <glib.h>
-
-#include <mono/utils/mono-threads.h>
-
-#if defined(USE_WINDOWS_BACKEND)
-
-#include <limits.h>
-
-void
-mono_threads_abort_syscall_init (void)
-{
-}
-
-static void CALLBACK
-abort_apc (ULONG_PTR param)
-{
- THREADS_INTERRUPT_DEBUG ("%06d - abort_apc () called", GetCurrentThreadId ());
-}
-
-void
-mono_threads_suspend_abort_syscall (MonoThreadInfo *info)
-{
- DWORD id = mono_thread_info_get_tid (info);
- HANDLE handle;
-
- handle = OpenThread (THREAD_ALL_ACCESS, FALSE, id);
- g_assert (handle);
-
- THREADS_INTERRUPT_DEBUG ("%06d - Aborting syscall in thread %06d", GetCurrentThreadId (), id);
- QueueUserAPC ((PAPCFUNC)abort_apc, handle, (ULONG_PTR)NULL);
-
- CloseHandle (handle);
-}
-
-gboolean
-mono_threads_suspend_needs_abort_syscall (void)
-{
- return TRUE;
-}
-
-#endif
#if defined(USE_WINDOWS_BACKEND)
#include <mono/utils/mono-compiler.h>
+#include <mono/utils/mono-threads-debug.h>
#include <limits.h>
}
CloseHandle (handle);
- return info->suspend_can_continue;
+ return TRUE;
}
gboolean
return info->suspend_can_continue;
}
+static void CALLBACK
+abort_apc (ULONG_PTR param)
+{
+ THREADS_INTERRUPT_DEBUG ("%06d - abort_apc () called", GetCurrentThreadId ());
+}
+
+void
+mono_threads_suspend_abort_syscall (MonoThreadInfo *info)
+{
+ DWORD id = mono_thread_info_get_tid (info);
+ HANDLE handle;
+
+ handle = OpenThread (THREAD_ALL_ACCESS, FALSE, id);
+ g_assert (handle);
+
+ THREADS_INTERRUPT_DEBUG ("%06d - Aborting syscall in thread %06d", GetCurrentThreadId (), id);
+ QueueUserAPC ((PAPCFUNC)abort_apc, handle, (ULONG_PTR)NULL);
+
+ CloseHandle (handle);
+}
+
+gboolean
+mono_threads_suspend_needs_abort_syscall (void)
+{
+ return TRUE;
+}
+
gboolean
mono_threads_suspend_begin_async_resume (MonoThreadInfo *info)
{
{
}
+void
+mono_threads_suspend_init_signals (void)
+{
+}
+
+gint
+mono_threads_suspend_search_alternative_signal (void)
+{
+ g_assert_not_reached ();
+}
+
+gint
+mono_threads_suspend_get_suspend_signal (void)
+{
+ return -1;
+}
+
+gint
+mono_threads_suspend_get_restart_signal (void)
+{
+ return -1;
+}
+
+gint
+mono_threads_suspend_get_abort_signal (void)
+{
+ return -1;
+}
+
#endif
#if defined (HOST_WIN32)
#include <mono/utils/mono-coop-mutex.h>
#include <mono/utils/mono-coop-semaphore.h>
#include <mono/utils/mono-threads-coop.h>
+#include <mono/utils/mono-threads-debug.h>
#include <errno.h>
static MonoSemType suspend_semaphore;
static size_t pending_suspends;
-static gboolean unified_suspend_enabled;
#define mono_thread_info_run_state(info) (((MonoThreadInfo*)info)->thread_state & THREAD_STATE_MASK)
#endif
g_assert (res);
- unified_suspend_enabled = g_getenv ("MONO_ENABLE_UNIFIED_SUSPEND") != NULL || mono_threads_is_coop_enabled ();
-
if ((sleepLimit = g_getenv ("MONO_SLEEP_ABORT_LIMIT")) != NULL) {
errno = 0;
long threshold = strtol(sleepLimit, NULL, 10);
mono_thread_smr_init ();
mono_threads_platform_init ();
mono_threads_suspend_init ();
+ mono_threads_suspend_init_signals ();
mono_threads_coop_init ();
- mono_threads_abort_syscall_init ();
#if defined(__MACH__)
mono_mach_init (thread_info_key);
mono_thread_info_suspend_unlock ();
}
-gboolean
-mono_thread_info_unified_management_enabled (void)
-{
- return unified_suspend_enabled;
-}
-
/*
* mono_thread_info_set_is_async_context:
*
/* Mono Threads internal configuration knows*/
-/* Logging - enable them below if you need specific logging for the category you need */
-#define MOSTLY_ASYNC_SAFE_PRINTF(...) do { \
- char __buff[1024]; __buff [0] = '\0'; \
- g_snprintf (__buff, sizeof (__buff), __VA_ARGS__); \
- write (1, __buff, strlen (__buff)); \
-} while (0)
-
-
-#if 1
-#define THREADS_DEBUG(...)
-#else
-#define THREADS_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
-#endif
-
-#if 1
-#define THREADS_STW_DEBUG(...)
-#else
-#define THREADS_STW_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
-#endif
-
-#if 1
-#define THREADS_SUSPEND_DEBUG(...)
-#else
-#define THREADS_SUSPEND_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
-#endif
-
-#if 1
-#define THREADS_STATE_MACHINE_DEBUG(...)
-#else
-#define THREADS_STATE_MACHINE_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
-#endif
-
-#if 1
-#define THREADS_INTERRUPT_DEBUG(...)
-#else
-#define THREADS_INTERRUPT_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
-#endif
-
/* If this is defined, use the signals backed on Mach. Debug only as signals can't be made usable on OSX. */
// #define USE_SIGNALS_ON_MACH
//END of new API
-gboolean
-mono_thread_info_unified_management_enabled (void);
-
void
mono_thread_info_setup_async_call (THREAD_INFO_TYPE *info, void (*target_func)(void*), void *user_data);
*/
void mono_threads_suspend_init (void); //ok
+void mono_threads_suspend_init_signals (void);
+
void mono_threads_platform_init (void);
void mono_threads_coop_init (void);
-void mono_threads_abort_syscall_init (void);
-
/*
This begins async suspend. This function must do the following:
void mono_threads_suspend_free (THREAD_INFO_TYPE *info);
void mono_threads_suspend_abort_syscall (THREAD_INFO_TYPE *info);
gboolean mono_threads_suspend_needs_abort_syscall (void);
+gint mono_threads_suspend_search_alternative_signal (void);
+gint mono_threads_suspend_get_suspend_signal (void);
+gint mono_threads_suspend_get_restart_signal (void);
+gint mono_threads_suspend_get_abort_signal (void);
void mono_threads_platform_register (THREAD_INFO_TYPE *info);
void mono_threads_platform_unregister (THREAD_INFO_TYPE *info);
--- /dev/null
+/*
+ * os-event-unix.c: MonoOSEvent on Unix
+ *
+ * Author:
+ * Ludovic Henry (luhenry@microsoft.com)
+ *
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+ */
+
+#include "os-event.h"
+
+#include "atomic.h"
+#include "mono-lazy-init.h"
+#include "mono-threads.h"
+#include "mono-time.h"
+
+static mono_lazy_init_t status = MONO_LAZY_INIT_STATUS_NOT_INITIALIZED;
+
+static mono_mutex_t signal_mutex;
+static mono_cond_t signal_cond;
+
+static void
+initialize (void)
+{
+ mono_os_mutex_init (&signal_mutex);
+ mono_os_cond_init (&signal_cond);
+}
+
+void
+mono_os_event_init (MonoOSEvent *event, gboolean manual, gboolean initial)
+{
+ g_assert (event);
+
+ mono_lazy_initialize (&status, initialize);
+
+ mono_os_mutex_init (&event->mutex);
+ mono_os_cond_init (&event->cond);
+ event->signalled = initial;
+ event->manual = manual;
+ event->set_count = (initial && !manual) ? 1 : 0;
+}
+
+void
+mono_os_event_destroy (MonoOSEvent *event)
+{
+ g_assert (mono_lazy_is_initialized (&status));
+
+ g_assert (event);
+
+ mono_os_mutex_destroy (&event->mutex);
+ mono_os_cond_destroy (&event->cond);
+}
+
+static void
+mono_os_event_signal (MonoOSEvent *event, gboolean broadcast)
+{
+ g_assert (event);
+
+ mono_os_mutex_lock (&signal_mutex);
+
+ event->signalled = TRUE;
+
+ if (broadcast)
+ mono_os_cond_broadcast (&event->cond);
+ else
+ mono_os_cond_signal (&event->cond);
+
+ mono_os_cond_broadcast (&signal_cond);
+
+ mono_os_mutex_unlock (&signal_mutex);
+}
+
+void
+mono_os_event_set (MonoOSEvent *event)
+{
+ g_assert (mono_lazy_is_initialized (&status));
+
+ g_assert (event);
+
+ mono_os_mutex_lock (&event->mutex);
+
+ if (event->manual) {
+ mono_os_event_signal (event, FALSE);
+ } else {
+ event->set_count = 1;
+ mono_os_event_signal (event, TRUE);
+ }
+
+ mono_os_mutex_unlock (&event->mutex);
+}
+
+void
+mono_os_event_reset (MonoOSEvent *event)
+{
+ g_assert (mono_lazy_is_initialized (&status));
+
+ g_assert (event);
+
+ mono_os_mutex_lock (&event->mutex);
+
+ if (event->signalled)
+ event->signalled = FALSE;
+
+ event->set_count = 0;
+
+ mono_os_mutex_unlock (&event->mutex);
+}
+
+static gboolean
+mono_os_event_own (MonoOSEvent *event)
+{
+ g_assert (event);
+
+ if (!event->signalled)
+ return FALSE;
+
+ if (!event->manual) {
+ g_assert (event->set_count > 0);
+ event->set_count -= 1;
+
+ if (event->set_count == 0)
+ mono_os_event_signal (event, FALSE);
+ }
+
+ return TRUE;
+}
+
+MonoOSEventWaitRet
+mono_os_event_wait_one (MonoOSEvent *event, guint32 timeout)
+{
+ MonoOSEventWaitRet ret;
+ gint64 start;
+
+ g_assert (mono_lazy_is_initialized (&status));
+
+ g_assert (event);
+
+ mono_os_mutex_lock (&event->mutex);
+
+ if (timeout != MONO_INFINITE_WAIT)
+ start = mono_msec_ticks ();
+
+ for (;;) {
+ if (mono_os_event_own (event)) {
+ ret = MONO_OS_EVENT_WAIT_RET_SUCCESS_0;
+ goto done;
+ }
+
+ if (timeout == MONO_INFINITE_WAIT) {
+ mono_os_cond_wait (&event->cond, &event->mutex);
+ } else {
+ gint64 elapsed;
+ gint res;
+
+ elapsed = mono_msec_ticks () - start;
+ if (elapsed >= timeout) {
+ ret = MONO_OS_EVENT_WAIT_RET_TIMEOUT;
+ goto done;
+ }
+
+ res = mono_os_cond_timedwait (&event->cond, &event->mutex, timeout - elapsed);
+ if (res != 0) {
+ ret = MONO_OS_EVENT_WAIT_RET_TIMEOUT;
+ goto done;
+ }
+ }
+ }
+
+done:
+ mono_os_mutex_unlock (&event->mutex);
+
+ return ret;
+}
+
+static void
+mono_os_event_lock_events (MonoOSEvent **events, gsize nevents)
+{
+ gint i, j;
+
+retry:
+ for (i = 0; i < nevents; ++i) {
+ gint res;
+
+ res = mono_os_mutex_trylock (&events [i]->mutex);
+ if (res != 0) {
+ for (j = i - 1; j >= 0; j--)
+ mono_os_mutex_unlock (&events [j]->mutex);
+
+ mono_thread_info_yield ();
+
+ goto retry;
+ }
+ }
+}
+
+static void
+mono_os_event_unlock_events (MonoOSEvent **events, gsize nevents)
+{
+ gint i;
+
+ for (i = 0; i < nevents; ++i)
+ mono_os_mutex_unlock (&events [i]->mutex);
+}
+
+MonoOSEventWaitRet
+mono_os_event_wait_multiple (MonoOSEvent **events, gsize nevents, gboolean waitall, guint32 timeout)
+{
+ MonoOSEventWaitRet ret;
+ gint64 start;
+ gint i;
+
+ g_assert (mono_lazy_is_initialized (&status));
+
+ g_assert (events);
+ g_assert (nevents > 0);
+ g_assert (nevents <= MONO_OS_EVENT_WAIT_MAXIMUM_OBJECTS);
+
+ if (nevents == 1)
+ return mono_os_event_wait_one (events [0], timeout);
+
+ for (i = 0; i < nevents; ++i) {
+ g_assert (events [i]);
+ }
+
+ if (timeout != MONO_INFINITE_WAIT)
+ start = mono_msec_ticks ();
+
+ for (;;) {
+ gint count, lowest;
+ gboolean signalled;
+
+ mono_os_event_lock_events (events, nevents);
+
+ count = 0;
+ lowest = -1;
+
+ for (i = 0; i < nevents; ++i) {
+ if (events [i]->signalled) {
+ count += 1;
+ if (lowest == -1)
+ lowest = i;
+ }
+ }
+
+ signalled = (waitall && count == nevents) || (!waitall && count > 0);
+
+ if (signalled) {
+ for (i = 0; i < nevents; ++i)
+ mono_os_event_own (events [i]);
+ }
+
+ mono_os_event_unlock_events (events, nevents);
+
+ if (signalled) {
+ ret = MONO_OS_EVENT_WAIT_RET_SUCCESS_0 + lowest;
+ goto done;
+ }
+
+ mono_os_mutex_lock (&signal_mutex);
+
+ if (waitall) {
+ signalled = TRUE;
+ for (i = 0; i < nevents; ++i) {
+ if (!events [i]->signalled) {
+ signalled = FALSE;
+ break;
+ }
+ }
+ } else {
+ signalled = FALSE;
+ for (i = 0; i < nevents; ++i) {
+ if (events [i]->signalled) {
+ signalled = TRUE;
+ break;
+ }
+ }
+ }
+
+ if (signalled) {
+ mono_os_mutex_unlock (&signal_mutex);
+ continue;
+ }
+
+ if (timeout == MONO_INFINITE_WAIT) {
+ mono_os_cond_wait (&signal_cond, &signal_mutex);
+ } else {
+ gint64 elapsed;
+ gint res;
+
+ elapsed = mono_msec_ticks () - start;
+ if (elapsed >= timeout) {
+ mono_os_mutex_unlock (&signal_mutex);
+
+ ret = MONO_OS_EVENT_WAIT_RET_TIMEOUT;
+ goto done;
+ }
+
+ res = mono_os_cond_timedwait (&signal_cond, &signal_mutex, timeout - elapsed);
+ if (res != 0) {
+ mono_os_mutex_unlock (&signal_mutex);
+
+ ret = MONO_OS_EVENT_WAIT_RET_TIMEOUT;
+ goto done;
+ }
+ }
+
+ mono_os_mutex_unlock (&signal_mutex);
+ }
+
+done:
+ return ret;
+}
--- /dev/null
+/*
+ * os-event-win32.c: MonoOSEvent on Win32
+ *
+ * Author:
+ * Ludovic Henry (luhenry@microsoft.com)
+ *
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+ */
+
+#include "os-event.h"
+
+#include <windows.h>
+#include <winbase.h>
+
+#include "atomic.h"
+
+void
+mono_os_event_init (MonoOSEvent *event, gboolean manual, gboolean initial)
+{
+ g_assert (event);
+
+ event->handle = CreateEvent (NULL, manual, initial, NULL);
+ if (G_UNLIKELY (!event->handle))
+ g_error ("%s: CreateEvent failed with error %d", __func__, GetLastError ());
+}
+
+void
+mono_os_event_destroy (MonoOSEvent *event)
+{
+ BOOL res;
+
+ g_assert (event);
+ g_assert (event->handle);
+
+ res = CloseHandle (event->handle);
+ if (G_UNLIKELY (res == 0))
+ g_error ("%s: CloseHandle failed with error %d", __func__, GetLastError ());
+}
+
+void
+mono_os_event_set (MonoOSEvent *event)
+{
+ BOOL res;
+
+ g_assert (event);
+ g_assert (event->handle);
+
+ res = SetEvent (event->handle);
+ if (G_UNLIKELY (res == 0))
+ g_error ("%s: SetEvent failed with error %d", __func__, GetLastError ());
+}
+
+void
+mono_os_event_reset (MonoOSEvent *event)
+{
+ BOOL res;
+
+ g_assert (event);
+ g_assert (event->handle);
+
+ res = ResetEvent (event->handle);
+ if (G_UNLIKELY (res == 0))
+ g_error ("%s: ResetEvent failed with error %d", __func__, GetLastError ());
+}
+
+MonoOSEventWaitRet
+mono_os_event_wait_one (MonoOSEvent *event, guint32 timeout)
+{
+ DWORD res;
+
+ g_assert (event);
+ g_assert (event->handle);
+
+ res = WaitForSingleObjectEx (event->handle, timeout, TRUE);
+ if (res == WAIT_OBJECT_0)
+ return MONO_OS_EVENT_WAIT_RET_SUCCESS_0;
+ else if (res == WAIT_IO_COMPLETION)
+ return MONO_OS_EVENT_WAIT_RET_ALERTED;
+ else if (res == WAIT_TIMEOUT)
+ return MONO_OS_EVENT_WAIT_RET_TIMEOUT;
+ else if (res == WAIT_FAILED)
+ g_error ("%s: WaitForSingleObjectEx failed with error %d", __func__, GetLastError ());
+ else
+ g_error ("%s: unknown res value %d", __func__, res);
+}
+
+MonoOSEventWaitRet
+mono_os_event_wait_multiple (MonoOSEvent **events, gsize nevents, gboolean waitall, guint32 timeout)
+{
+ DWORD res;
+ gpointer handles [MONO_OS_EVENT_WAIT_MAXIMUM_OBJECTS];
+ gint i;
+
+ g_assert (events);
+ g_assert (nevents > 0);
+ g_assert (nevents <= MONO_OS_EVENT_WAIT_MAXIMUM_OBJECTS);
+
+ if (nevents == 1)
+ return mono_os_event_wait_one (events [0], timeout);
+
+ for (i = 0; i < nevents; ++i) {
+ g_assert (events [i]);
+ g_assert (events [i]->handle);
+ handles [i] = events [i]->handle;
+ }
+
+ res = WaitForMultipleObjectsEx (nevents, handles, waitall, timeout, TRUE);
+ if (res >= WAIT_OBJECT_0 && res < WAIT_OBJECT_0 + MONO_OS_EVENT_WAIT_MAXIMUM_OBJECTS)
+ return MONO_OS_EVENT_WAIT_RET_SUCCESS_0 + (res - WAIT_OBJECT_0);
+ else if (res == WAIT_IO_COMPLETION)
+ return MONO_OS_EVENT_WAIT_RET_ALERTED;
+ else if (res == WAIT_TIMEOUT)
+ return MONO_OS_EVENT_WAIT_RET_TIMEOUT;
+ else if (res == WAIT_FAILED)
+ g_error ("%s: WaitForSingleObjectEx failed with error %d", __func__, GetLastError ());
+ else
+ g_error ("%s: unknown res value %d", __func__, res);
+}
--- /dev/null
+
+#ifndef _MONO_UTILS_OS_EVENT_H_
+#define _MONO_UTILS_OS_EVENT_H_
+
+#include <config.h>
+#include <glib.h>
+
+#include "mono-os-mutex.h"
+
+#ifndef MONO_INFINITE_WAIT
+#define MONO_INFINITE_WAIT ((guint32) 0xFFFFFFFF)
+#endif
+
+#define MONO_OS_EVENT_WAIT_MAXIMUM_OBJECTS 64
+
+typedef enum {
+ MONO_OS_EVENT_WAIT_RET_SUCCESS_0 = 0,
+ MONO_OS_EVENT_WAIT_RET_ALERTED = -1,
+ MONO_OS_EVENT_WAIT_RET_TIMEOUT = -2,
+} MonoOSEventWaitRet;
+
+typedef struct _MonoOSEvent MonoOSEvent;
+
+typedef void (*MonoOSEventFreeCb) (MonoOSEvent*);
+
+struct _MonoOSEvent {
+#ifdef HOST_WIN32
+ gpointer handle;
+#else
+ mono_mutex_t mutex;
+ mono_cond_t cond;
+ gboolean manual;
+ gboolean signalled;
+ guint32 set_count;
+#endif
+};
+
+void
+mono_os_event_init (MonoOSEvent *event, gboolean manual, gboolean initial);
+
+void
+mono_os_event_destroy (MonoOSEvent *event);
+
+void
+mono_os_event_set (MonoOSEvent *event);
+
+void
+mono_os_event_reset (MonoOSEvent *event);
+
+MonoOSEventWaitRet
+mono_os_event_wait_one (MonoOSEvent *event, guint32 timeout);
+
+MonoOSEventWaitRet
+mono_os_event_wait_multiple (MonoOSEvent **events, gsize nevents, gboolean waitall, guint32 timeout);
+
+#endif /* _MONO_UTILS_OS_EVENT_H_ */
<ClCompile Include="..\mono\metadata\mono-security.c" />\r
<ClCompile Include="..\mono\metadata\seq-points-data.c" />\r
<ClCompile Include="..\mono\metadata\sgen-mono.c" />\r
- <ClCompile Include="..\mono\metadata\sgen-os-coop.c" />\r
<ClCompile Include="..\mono\metadata\threadpool-ms-io.c" />\r
<ClCompile Include="..\mono\metadata\threadpool-ms.c" />\r
<ClCompile Include="..\mono\metadata\sgen-bridge.c" />\r
<ClCompile Include="..\mono\metadata\sgen-new-bridge.c" />\r
<ClCompile Include="..\mono\metadata\sgen-old-bridge.c" />\r
- <ClCompile Include="..\mono\metadata\sgen-os-mach.c">\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
- </ClCompile>\r
- <ClCompile Include="..\mono\metadata\sgen-os-posix.c">\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
- </ClCompile>\r
- <ClCompile Include="..\mono\metadata\sgen-os-win32.c" />\r
<ClCompile Include="..\mono\metadata\sgen-tarjan-bridge.c" />\r
<ClCompile Include="..\mono\metadata\sgen-toggleref.c" />\r
<ClCompile Include="..\mono\metadata\sgen-stw.c" />\r
<ClCompile Include="..\mono\metadata\boehm-gc.c">\r
<Filter>Source Files\boehm</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\mono\metadata\sgen-os-mach.c">\r
- <Filter>Source Files\sgen</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\mono\metadata\sgen-os-posix.c">\r
- <Filter>Source Files\sgen</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\mono\metadata\sgen-os-win32.c">\r
- <Filter>Source Files\sgen</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\mono\metadata\appdomain.c">\r
<Filter>Source Files\gc</Filter>\r
</ClCompile>\r
<ClCompile Include="..\mono\metadata\sre-save.c">\r
<Filter>Source Files</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\mono\metadata\sgen-os-coop.c">\r
- <Filter>Source Files\sgen</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\mono\metadata\socket-io-windows.c">\r
<Filter>Source Files</Filter>\r
</ClCompile>\r
<ClCompile Include="..\mono\utils\mono-threads-windows.c" />\r
<ClCompile Include="..\mono\utils\mono-threads.c" />\r
<ClCompile Include="..\mono\utils\mono-threads-coop.c" />\r
- <ClCompile Include="..\mono\utils\mono-threads-posix-abort-syscall.c">\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
- </ClCompile>\r
- <ClCompile Include="..\mono\utils\mono-threads-mach-abort-syscall.c">\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
- </ClCompile>\r
- <ClCompile Include="..\mono\utils\mono-threads-windows-abort-syscall.c" />\r
<ClCompile Include="..\mono\utils\mono-time.c" />\r
<ClCompile Include="..\mono\utils\mono-tls.c" />\r
<ClCompile Include="..\mono\utils\mono-uri.c" />\r
<ClCompile Include="..\mono\utils\mono-value-hash.c" />\r
<ClCompile Include="..\mono\utils\monobitset.c" />\r
+ <ClCompile Include="..\mono\utils\os-event-win32.c" />\r
<ClCompile Include="..\mono\utils\strenc.c" />\r
<ClCompile Include="..\mono\utils\atomic.c" />\r
<ClCompile Include="..\mono\utils\mono-hwcap.c" />\r
<ClInclude Include="..\mono\utils\mono-threads.h" />\r
<ClInclude Include="..\mono\utils\mono-threads-api.h" />\r
<ClInclude Include="..\mono\utils\mono-threads-coop.h" />\r
- <ClInclude Include="..\mono\utils\mono-threads-posix-signals.h" />\r
<ClInclude Include="..\mono\utils\mono-time.h" />\r
<ClInclude Include="..\mono\utils\mono-tls.h" />\r
<ClInclude Include="..\mono\utils\mono-uri.h" />\r
<ClInclude Include="..\mono\utils\mono-value-hash.h" />\r
<ClInclude Include="..\mono\utils\monobitset.h" />\r
+ <ClInclude Include="..\mono\utils\os-event.h" />\r
<ClInclude Include="..\mono\utils\strenc.h" />\r
<ClInclude Include="..\mono\utils\valgrind.h" />\r
<ClInclude Include="..\mono\utils\atomic.h" />\r
<ClCompile Include="..\mono\utils\mono-mmap-windows.c">\r
<Filter>Source Files</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\mono\utils\os-event-win32.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
</ItemGroup>\r
<ItemGroup>\r
<ClInclude Include="..\mono\utils\atomic.h">\r
<ClInclude Include="..\mono\utils\mono-proclib-windows.h">\r
<Filter>Header Files</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\mono\utils\os-event.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
</ItemGroup>\r
<ItemGroup>\r
<Filter Include="Header Files">\r
</project>
<project dir="class/System" library="System-basic">
<boot>true</boot>
- <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:MONO -d:BOOTSTRAP_BASIC -nowarn:1699 -lib:./../../class/lib/basic -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -d:CONFIGURATION_DEP -r:./../../class/lib/basic/System.Xml.dll -r:./../../class/lib/basic/System.Configuration.dll -r:MonoSecurity=./../../class/lib/basic/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:MONO -d:BOOTSTRAP_BASIC -nowarn:1699 -lib:./../../class/lib/basic -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:MONO_FEATURE_BTLS -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -d:CONFIGURATION_DEP -r:./../../class/lib/basic/System.Xml.dll -r:./../../class/lib/basic/System.Configuration.dll -r:MonoSecurity=./../../class/lib/basic/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/basic/System.dll</library_output>
</project>
<project dir="class/System" library="System-build">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/build/mscorlib.dll -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -d:CONFIGURATION_DEP -r:./../../class/lib/build/System.Xml.dll -r:./../../class/lib/build/System.Configuration.dll -r:MonoSecurity=./../../class/lib/build/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/build/mscorlib.dll -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:MONO_FEATURE_BTLS -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -d:CONFIGURATION_DEP -r:./../../class/lib/build/System.Xml.dll -r:./../../class/lib/build/System.Configuration.dll -r:MonoSecurity=./../../class/lib/build/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/build/System.dll</library_output>
</project>
<project dir="class/System" library="System-bare-build">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/build/mscorlib.dll -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav</flags>
+ <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/build/mscorlib.dll -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:MONO_FEATURE_BTLS</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/build/bare/System.dll</library_output>
</project>
<project dir="class/System" library="System-secxml-build">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/build/mscorlib.dll -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -r:./../../class/lib/build/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/build/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/build/mscorlib.dll -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:MONO_FEATURE_BTLS -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -r:./../../class/lib/build/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/build/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/build/secxml/System.dll</library_output>
</project>
<project dir="class/System" library="System-net_4_x">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -d:CONFIGURATION_DEP -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:MonoSecurity=./../../class/lib/net_4_x/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:MONO_FEATURE_BTLS -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -d:CONFIGURATION_DEP -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:MonoSecurity=./../../class/lib/net_4_x/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/net_4_x/System.dll</library_output>
</project>
<project dir="class/System" library="System-bare-net_4_x">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav</flags>
+ <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:MONO_FEATURE_BTLS</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/net_4_x/bare/System.dll</library_output>
</project>
<project dir="class/System" library="System-secxml-net_4_x">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -r:./../../class/lib/net_4_x/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/net_4_x/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:MONO_FEATURE_BTLS -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -r:./../../class/lib/net_4_x/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/net_4_x/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/net_4_x/secxml/System.dll</library_output>
</project>
<project dir="tools/mkbundle" library="mkbundle-net_4_x">
<boot></boot>
- <flags>/codepage:65001 -resource:template.c -resource:template_z.c -resource:template_main.c -d:STATIC,NO_SYMBOL_WRITER,NO_AUTHENTICODE -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -r:System.Xml -r:System -r:System.Core</flags>
+ <flags>/codepage:65001 -resource:template.c -resource:template_z.c -resource:template_main.c -d:STATIC,NO_SYMBOL_WRITER,NO_AUTHENTICODE -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -r:System.Xml -r:System -r:System.Core -r:System.IO.Compression.FileSystem</flags>
<output>mkbundle.exe</output>
<built_sources></built_sources>
<library_output>./../../class/lib/net_4_x/mkbundle.exe</library_output>
</project>
<project dir="class/System" library="System-monodroid">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MONO -d:MOBILE,MOBILE_LEGACY -d:MOBILE_DYNAMIC -d:MONODROID -d:ANDROID -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monodroid/mscorlib.dll -debug -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monodroid/System.Xml.dll -r:MonoSecurity=./../../class/lib/monodroid/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MONO -d:MOBILE,MOBILE_LEGACY -d:MOBILE_DYNAMIC -d:MONODROID -d:ANDROID -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monodroid/mscorlib.dll -debug -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:MONO_FEATURE_BTLS -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monodroid/System.Xml.dll -r:MonoSecurity=./../../class/lib/monodroid/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monodroid/System.dll</library_output>
</project>
<project dir="class/System" library="System-bare-monodroid">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MONO -d:MOBILE,MOBILE_LEGACY -d:MOBILE_DYNAMIC -d:MONODROID -d:ANDROID -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monodroid/mscorlib.dll -debug -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MONO -d:MOBILE,MOBILE_LEGACY -d:MOBILE_DYNAMIC -d:MONODROID -d:ANDROID -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monodroid/mscorlib.dll -debug -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:MONO_FEATURE_BTLS -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monodroid/bare/System.dll</library_output>
</project>
<project dir="class/System" library="System-secxml-monodroid">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MONO -d:MOBILE,MOBILE_LEGACY -d:MOBILE_DYNAMIC -d:MONODROID -d:ANDROID -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monodroid/mscorlib.dll -debug -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monodroid/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/monodroid/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MONO -d:MOBILE,MOBILE_LEGACY -d:MOBILE_DYNAMIC -d:MONODROID -d:ANDROID -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monodroid/mscorlib.dll -debug -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:MONO_FEATURE_BTLS -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monodroid/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/monodroid/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monodroid/secxml/System.dll</library_output>
</project>
<project dir="class/System" library="System-monotouch">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch/System.dll</library_output>
</project>
<project dir="class/System" library="System-bare-monotouch">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch/bare/System.dll</library_output>
</project>
<project dir="class/System" library="System-secxml-monotouch">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch/secxml/System.dll</library_output>
</project>
<project dir="class/System" library="System-monotouch_runtime">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_runtime/mscorlib.dll -debug -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_runtime/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch_runtime/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_runtime/mscorlib.dll -debug -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_runtime/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch_runtime/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch_runtime/System.dll</library_output>
</project>
<project dir="class/System" library="System-bare-monotouch_runtime">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_runtime/mscorlib.dll -debug -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_runtime/mscorlib.dll -debug -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch_runtime/bare/System.dll</library_output>
</project>
<project dir="class/System" library="System-secxml-monotouch_runtime">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_runtime/mscorlib.dll -debug -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_runtime/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch_runtime/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_runtime/mscorlib.dll -debug -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_runtime/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch_runtime/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch_runtime/secxml/System.dll</library_output>
</project>
<project dir="class/System" library="System-monotouch_watch">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_watch/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -d:FEATURE_NO_BSD_SOCKETS -d:MONOTOUCH_WATCH -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_watch/System.Xml.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_watch/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -d:FEATURE_NO_BSD_SOCKETS -d:MONOTOUCH_WATCH -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_watch/System.Xml.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch_watch/System.dll</library_output>
</project>
<project dir="class/System" library="System-bare-monotouch_watch">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_watch/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -d:FEATURE_NO_BSD_SOCKETS -d:MONOTOUCH_WATCH -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_watch/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -d:FEATURE_NO_BSD_SOCKETS -d:MONOTOUCH_WATCH -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch_watch/bare/System.dll</library_output>
</project>
<project dir="class/System" library="System-secxml-monotouch_watch">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_watch/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -d:FEATURE_NO_BSD_SOCKETS -d:MONOTOUCH_WATCH -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_watch/bare/System.Xml.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_watch/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -d:FEATURE_NO_BSD_SOCKETS -d:MONOTOUCH_WATCH -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_watch/bare/System.Xml.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch_watch/secxml/System.dll</library_output>
</project>
<project dir="class/System" library="System-monotouch_watch_runtime">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_watch_runtime/mscorlib.dll -debug -d:FEATURE_NO_BSD_SOCKETS -d:MONOTOUCH_WATCH -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_watch_runtime/System.Xml.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_watch_runtime/mscorlib.dll -debug -d:FEATURE_NO_BSD_SOCKETS -d:MONOTOUCH_WATCH -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_watch_runtime/System.Xml.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch_watch_runtime/System.dll</library_output>
</project>
<project dir="class/System" library="System-bare-monotouch_watch_runtime">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_watch_runtime/mscorlib.dll -debug -d:FEATURE_NO_BSD_SOCKETS -d:MONOTOUCH_WATCH -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_watch_runtime/mscorlib.dll -debug -d:FEATURE_NO_BSD_SOCKETS -d:MONOTOUCH_WATCH -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch_watch_runtime/bare/System.dll</library_output>
</project>
<project dir="class/System" library="System-secxml-monotouch_watch_runtime">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_watch_runtime/mscorlib.dll -debug -d:FEATURE_NO_BSD_SOCKETS -d:MONOTOUCH_WATCH -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_watch_runtime/bare/System.Xml.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_watch_runtime/mscorlib.dll -debug -d:FEATURE_NO_BSD_SOCKETS -d:MONOTOUCH_WATCH -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_watch_runtime/bare/System.Xml.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch_watch_runtime/secxml/System.dll</library_output>
</project>
<project dir="class/System" library="System-monotouch_tv">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_tv/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -d:MONOTOUCH_TV -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_tv/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch_tv/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_tv/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -d:MONOTOUCH_TV -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_tv/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch_tv/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch_tv/System.dll</library_output>
</project>
<project dir="class/System" library="System-bare-monotouch_tv">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_tv/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -d:MONOTOUCH_TV -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_tv/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -d:MONOTOUCH_TV -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch_tv/bare/System.dll</library_output>
</project>
<project dir="class/System" library="System-secxml-monotouch_tv">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_tv/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -d:MONOTOUCH_TV -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_tv/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch_tv/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_tv/mscorlib.dll -debug -d:FULL_AOT_RUNTIME -d:MONOTOUCH_TV -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_tv/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch_tv/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch_tv/secxml/System.dll</library_output>
</project>
<project dir="class/System" library="System-monotouch_tv_runtime">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_tv_runtime/mscorlib.dll -debug -d:MONOTOUCH_TV -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_tv_runtime/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch_tv_runtime/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_tv_runtime/mscorlib.dll -debug -d:MONOTOUCH_TV -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_tv_runtime/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch_tv_runtime/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch_tv_runtime/System.dll</library_output>
</project>
<project dir="class/System" library="System-bare-monotouch_tv_runtime">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_tv_runtime/mscorlib.dll -debug -d:MONOTOUCH_TV -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_tv_runtime/mscorlib.dll -debug -d:MONOTOUCH_TV -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch_tv_runtime/bare/System.dll</library_output>
</project>
<project dir="class/System" library="System-secxml-monotouch_tv_runtime">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_tv_runtime/mscorlib.dll -debug -d:MONOTOUCH_TV -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_tv_runtime/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch_tv_runtime/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE,MOBILE_LEGACY -d:MONO -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/monotouch_tv_runtime/mscorlib.dll -debug -d:MONOTOUCH_TV -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/monotouch_tv_runtime/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/monotouch_tv_runtime/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/monotouch_tv_runtime/secxml/System.dll</library_output>
</project>
<project dir="class/System" library="System-xammac">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MONO -d:MOBILE -d:MOBILE_DYNAMIC -d:XAMMAC -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:XAMARIN_MODERN -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/xammac/mscorlib.dll -debug -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/xammac/System.Xml.dll -r:MonoSecurity=./../../class/lib/xammac/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MONO -d:MOBILE -d:MOBILE_DYNAMIC -d:XAMMAC -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:XAMARIN_MODERN -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/xammac/mscorlib.dll -debug -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:MONO_FEATURE_BTLS -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/xammac/System.Xml.dll -r:MonoSecurity=./../../class/lib/xammac/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/xammac/System.dll</library_output>
</project>
<project dir="class/System" library="System-bare-xammac">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MONO -d:MOBILE -d:MOBILE_DYNAMIC -d:XAMMAC -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:XAMARIN_MODERN -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/xammac/mscorlib.dll -debug -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MONO -d:MOBILE -d:MOBILE_DYNAMIC -d:XAMMAC -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:XAMARIN_MODERN -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/xammac/mscorlib.dll -debug -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:MONO_FEATURE_BTLS -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/xammac/bare/System.dll</library_output>
</project>
<project dir="class/System" library="System-secxml-xammac">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MONO -d:MOBILE -d:MOBILE_DYNAMIC -d:XAMMAC -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:XAMARIN_MODERN -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/xammac/mscorlib.dll -debug -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:INSIDE_SYSTEM -d:SECURITY_DEP -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/xammac/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/xammac/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MONO -d:MOBILE -d:MOBILE_DYNAMIC -d:XAMMAC -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:XAMARIN_MODERN -d:NETSTANDARD -nowarn:1699 -nostdlib -r:./../../class/lib/xammac/mscorlib.dll -debug -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -d:MONO_FEATURE_BTLS -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635 -d:SECURITY_DEP -d:XML_DEP -r:./../../class/lib/xammac/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/xammac/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/xammac/secxml/System.dll</library_output>
</project>
<project dir="class/System" library="System-xammac_net_4_5">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/xammac_net_4_5/mscorlib.dll -debug -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NO_SYSTEM_DRAWING_DEPENDENCY -d:NO_WINFORMS_DEPENDENCY -d:NO_SYSTEM_WEB_DEPENDENCY -d:XAMMAC_4_5 -d:XAMARIN_MODERN -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -d:CONFIGURATION_DEP -r:./../../class/lib/xammac_net_4_5/System.Xml.dll -r:./../../class/lib/xammac_net_4_5/System.Configuration.dll -r:MonoSecurity=./../../class/lib/xammac_net_4_5/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/xammac_net_4_5/mscorlib.dll -debug -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NO_SYSTEM_DRAWING_DEPENDENCY -d:NO_WINFORMS_DEPENDENCY -d:NO_SYSTEM_WEB_DEPENDENCY -d:XAMMAC_4_5 -d:XAMARIN_MODERN -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:MONO_FEATURE_BTLS -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -d:CONFIGURATION_DEP -r:./../../class/lib/xammac_net_4_5/System.Xml.dll -r:./../../class/lib/xammac_net_4_5/System.Configuration.dll -r:MonoSecurity=./../../class/lib/xammac_net_4_5/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/xammac_net_4_5/System.dll</library_output>
</project>
<project dir="class/System" library="System-bare-xammac_net_4_5">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/xammac_net_4_5/mscorlib.dll -debug -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NO_SYSTEM_DRAWING_DEPENDENCY -d:NO_WINFORMS_DEPENDENCY -d:NO_SYSTEM_WEB_DEPENDENCY -d:XAMMAC_4_5 -d:XAMARIN_MODERN -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav</flags>
+ <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/xammac_net_4_5/mscorlib.dll -debug -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NO_SYSTEM_DRAWING_DEPENDENCY -d:NO_WINFORMS_DEPENDENCY -d:NO_SYSTEM_WEB_DEPENDENCY -d:XAMMAC_4_5 -d:XAMARIN_MODERN -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:MONO_FEATURE_BTLS</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/xammac_net_4_5/bare/System.dll</library_output>
</project>
<project dir="class/System" library="System-secxml-xammac_net_4_5">
<boot>false</boot>
- <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/xammac_net_4_5/mscorlib.dll -debug -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NO_SYSTEM_DRAWING_DEPENDENCY -d:NO_WINFORMS_DEPENDENCY -d:NO_SYSTEM_WEB_DEPENDENCY -d:XAMMAC_4_5 -d:XAMARIN_MODERN -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -r:./../../class/lib/xammac_net_4_5/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/xammac_net_4_5/Mono.Security.dll</flags>
+ <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/xammac_net_4_5/mscorlib.dll -debug -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK -d:NO_SYSTEM_DRAWING_DEPENDENCY -d:NO_WINFORMS_DEPENDENCY -d:NO_SYSTEM_WEB_DEPENDENCY -d:XAMMAC_4_5 -d:XAMARIN_MODERN -optimize /noconfig -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -d:MONO_FEATURE_BTLS -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -r:./../../class/lib/xammac_net_4_5/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/xammac_net_4_5/Mono.Security.dll</flags>
<output>System.dll</output>
<built_sources></built_sources>
<library_output>./../../class/lib/xammac_net_4_5/secxml/System.dll</library_output>
etc/mono/config: ../data/config Makefile $(symlinks)
d=`cd ../support && pwd`; \
sed 's,target="$$mono_libdir/libMonoPosixHelper$(libsuffix)",target="'$$d'/libMonoPosixHelper.la",' ../data/config > $@t
+ d=`cd ../mono/btls/build-shared && pwd`; \
+ sed 's,target="$$mono_libdir/libmono-btls-shared$(libsuffix)",target="'$$d'/libmono-btls-shared$(libsuffix)",' $@t > $@tt
if test -z "$(libgdiplus_loc)"; then :; else \
- sed 's,target="$(libgdiplus_install_loc)",target="$(libgdiplus_loc)",' $@t > $@tt; \
- mv -f $@tt $@t; fi
- mv -f $@t $@
+ sed 's,target="$(libgdiplus_install_loc)",target="$(libgdiplus_loc)",' $@tt > $@ttt; \
+ mv -f $@ttt $@tt; fi
+ mv -f $@tt $@
+ rm -f $@t
$(tmpinst)/bin/mono: mono-wrapper etc/mono/config
$(mkinstalldirs) $(tmpinst)/bin