Merge branch 'upstream'

Former-commit-id: c2cd7b981e32d035f70d5e68e9da106a059b623b
This commit is contained in:
Xamarin Public Jenkins (auto-signing) 2018-02-14 20:03:08 +00:00
commit f0dec93903
36 changed files with 73 additions and 49 deletions

View File

@ -1 +1 @@
e85437818f00d2cd9616f6dcf51f3e793755c691
df960e3f494b0d30d808c1bd44ee0be557e4ca67

View File

@ -1 +1 @@
f717d8e40d24ffb6ae41b33e6a891cb36e88c578
0da7de0818f03e991729bf29ede5a6c90311c912

View File

@ -34,7 +34,7 @@ static class Consts
// Use these assembly version constants to make code more maintainable.
//
public const string MonoVersion = "5.10.0.105";
public const string MonoVersion = "5.10.0.107";
public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors";

View File

@ -20,7 +20,7 @@ namespace System.IO {
public LogcatTextWriter (string appname, TextWriter stdout)
{
this.appname = Encoding.UTF8.GetBytes (appname);
this.appname = Encoding.UTF8.GetBytes (appname + '\0');
this.stdout = stdout;
}
@ -48,13 +48,43 @@ namespace System.IO {
var o = line.ToString ();
line.Clear ();
Log (o);
stdout.WriteLine (o);
}
void Log (string message)
{
const int buffer_size = 512;
unsafe {
fixed (byte *b_appname = appname)
fixed (byte *b_message = Encoding.UTF8.GetBytes(o)) {
Log (b_appname, 1 << 5 /* G_LOG_LEVEL_MESSAGE */, b_message);
if (Encoding.UTF8.GetByteCount (message) < buffer_size) {
try {
fixed (char *b_message = message) {
byte* buffer = stackalloc byte[buffer_size];
int written = Encoding.UTF8.GetBytes (b_message, message.Length, buffer, buffer_size - 1);
buffer [written] = (byte)'\0';
Log (buffer);
}
return;
} catch (ArgumentException) {
/* It might be due to a failure to encode a character, or due to a smaller than necessary buffer. In the
* secode case, we want to fallback to simply allocating on the heap. */
}
}
fixed (byte *b_message = Encoding.UTF8.GetBytes(message + '\0')) {
Log (b_message);
}
}
stdout.WriteLine (o);
}
unsafe void Log (byte* b_message)
{
fixed (byte *b_appname = appname) {
Log (b_appname, 1 << 5 /* G_LOG_LEVEL_MESSAGE */, b_message);
}
}
public static bool IsRunningOnAndroid ()

View File

@ -1 +1 @@
fddd884e0a3f48fdac078ec0d528d6159dfe3856
bcddfd5f8af86e0b05fd9c450ea4edada90bb493

View File

@ -1 +1 @@
3d10120799d1ccf8914b1902a7c3fb41069946f5
625ac8e9f00e37f03dcaf40a9ab5a8a1aad5c9e5

View File

@ -1 +1 @@
d599d559b4f824d76c3fcfcf98e6a7ee61fdcfb6
7d093351bb4b8ff663b2f39fa536221188341b25

View File

@ -1 +1 @@
4c4fd3ffa294a529c35142173f121f7298a5c4a1
647964d71fe4b956b19eea16d85d62a6a31d0214

View File

@ -1 +1 @@
4fddd6a0abadcaa77515b4ed9f5f6f64ae70cfa4
ce49c39b40d2ff5525da2fc5badbdfeed1ad5766

View File

@ -1 +1 @@
040c8846dde8f31ee7cfa823ba1e2e45f34138a8
f78e411b0e0ef98a22b4d4e0092347189395dcf8

View File

@ -1 +1 @@
67be408a823afdbf1873d117d1ecc541ba05d81a
1c80cfd07f438371c803270dfa1d3df05d5565b5

View File

@ -1 +1 @@
fddd884e0a3f48fdac078ec0d528d6159dfe3856
bcddfd5f8af86e0b05fd9c450ea4edada90bb493

View File

@ -1 +1 @@
3d10120799d1ccf8914b1902a7c3fb41069946f5
625ac8e9f00e37f03dcaf40a9ab5a8a1aad5c9e5

View File

@ -1 +1 @@
d599d559b4f824d76c3fcfcf98e6a7ee61fdcfb6
7d093351bb4b8ff663b2f39fa536221188341b25

View File

@ -1 +1 @@
4c4fd3ffa294a529c35142173f121f7298a5c4a1
647964d71fe4b956b19eea16d85d62a6a31d0214

View File

@ -1 +1 @@
4fddd6a0abadcaa77515b4ed9f5f6f64ae70cfa4
ce49c39b40d2ff5525da2fc5badbdfeed1ad5766

View File

@ -1 +1 @@
040c8846dde8f31ee7cfa823ba1e2e45f34138a8
f78e411b0e0ef98a22b4d4e0092347189395dcf8

View File

@ -1 +1 @@
67be408a823afdbf1873d117d1ecc541ba05d81a
1c80cfd07f438371c803270dfa1d3df05d5565b5

View File

@ -1 +1 @@
fddd884e0a3f48fdac078ec0d528d6159dfe3856
bcddfd5f8af86e0b05fd9c450ea4edada90bb493

View File

@ -1 +1 @@
3d10120799d1ccf8914b1902a7c3fb41069946f5
625ac8e9f00e37f03dcaf40a9ab5a8a1aad5c9e5

Some files were not shown because too many files have changed in this diff Show More