Imported Upstream version 4.0.2.4
Former-commit-id: de0c2bbc3d900ab3bd764cd6c9d9062472ce7456
This commit is contained in:
parent
98e85815fb
commit
cae8e1b2db
@ -1 +1 @@
|
||||
62dc0af03655563a8fea1115dcadaa9a3dd95399
|
||||
0d2865058e8904b609431e735d1a6a58dd269476
|
@ -1 +1 @@
|
||||
cb8a0a6dc718f29977f2e6e37b92839c51c7e80b
|
||||
e26c88521f1fb3392393ffb4a102d2f9441ab54f
|
@ -34,7 +34,7 @@ static class Consts
|
||||
// Use these assembly version constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string MonoVersion = "4.0.1.0";
|
||||
public const string MonoVersion = "4.0.2.0";
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
|
@ -256,9 +256,8 @@ namespace Microsoft.Build.Tasks {
|
||||
{
|
||||
PackageAssemblyInfo pkg = null;
|
||||
|
||||
if (specific_version) {
|
||||
pkg = PcCache.GetAssemblyLocation (reference.ItemSpec);
|
||||
} else {
|
||||
pkg = PcCache.GetAssemblyLocation (reference.ItemSpec);
|
||||
if (pkg == null && !specific_version) {
|
||||
// if not specific version, then just match simple name
|
||||
string name = reference.ItemSpec;
|
||||
if (name.IndexOf (',') > 0)
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
|
||||
@ -334,34 +336,29 @@ namespace System.Xml.Linq
|
||||
|
||||
static readonly char [] escapeChars = new char [] {'<', '>', '&', '"', '\r', '\n', '\t'};
|
||||
|
||||
private static string GetPrefixOfNamespace (XNamespace ns)
|
||||
{
|
||||
string namespaceName = ns.NamespaceName;
|
||||
if (namespaceName.Length == 0)
|
||||
return string.Empty;
|
||||
if (namespaceName == XNamespace.Xml.NamespaceName)
|
||||
return "xml";
|
||||
if (namespaceName == XNamespace.Xmlns.NamespaceName)
|
||||
return "xmlns";
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder ();
|
||||
sb.Append (name.ToString ());
|
||||
sb.Append ("=\"");
|
||||
int start = 0;
|
||||
do {
|
||||
int idx = value.IndexOfAny (escapeChars, start);
|
||||
if (idx < 0) {
|
||||
if (start > 0)
|
||||
sb.Append (value, start, value.Length - start);
|
||||
else
|
||||
sb.Append (value);
|
||||
sb.Append ("\"");
|
||||
return sb.ToString ();
|
||||
using (StringWriter sw = new StringWriter (CultureInfo.InvariantCulture)) {
|
||||
XmlWriterSettings ws = new XmlWriterSettings ();
|
||||
ws.ConformanceLevel = ConformanceLevel.Fragment;
|
||||
using (XmlWriter w = XmlWriter.Create (sw, ws)) {
|
||||
w.WriteAttributeString (GetPrefixOfNamespace (Name.Namespace), Name.LocalName,
|
||||
Name.NamespaceName, Value);
|
||||
}
|
||||
sb.Append (value, start, idx - start);
|
||||
switch (value [idx]) {
|
||||
case '&': sb.Append ("&"); break;
|
||||
case '<': sb.Append ("<"); break;
|
||||
case '>': sb.Append (">"); break;
|
||||
case '"': sb.Append ("""); break;
|
||||
case '\r': sb.Append ("
"); break;
|
||||
case '\n': sb.Append ("
"); break;
|
||||
case '\t': sb.Append ("	"); break;
|
||||
}
|
||||
start = idx + 1;
|
||||
} while (true);
|
||||
return sw.ToString ().Trim ();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -205,6 +205,14 @@ namespace MonoTests.System.Xml.Linq
|
||||
Assert.AreEqual ("a=\" >_< \"", a.ToString ());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ToString_Xamarin29935 ()
|
||||
{
|
||||
var doc = XDocument.Parse ("<?xml version='1.0' encoding='utf-8'?><lift xmlns:test='http://test.example.com'></lift>");
|
||||
Assert.AreEqual ("xmlns:test=\"http://test.example.com\"",
|
||||
doc.Root.Attributes ().Select (s => s.ToString ()).First ());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DateTimeAttribute ()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ using System.Security;
|
||||
namespace System.Text
|
||||
{
|
||||
|
||||
internal static class EncodingHelper
|
||||
internal static partial class EncodingHelper
|
||||
{
|
||||
//
|
||||
// Only internal, to be used by the class libraries: Unmarked and non-input-validating
|
||||
@ -71,6 +71,7 @@ internal static class EncodingHelper
|
||||
[MethodImpl (MethodImplOptions.InternalCall)]
|
||||
extern internal static string InternalCodePage (ref int code_page);
|
||||
|
||||
#if !MONOTOUCH
|
||||
internal static Encoding GetDefaultEncoding ()
|
||||
{
|
||||
Encoding enc = null;
|
||||
@ -105,6 +106,7 @@ internal static class EncodingHelper
|
||||
}
|
||||
return enc;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Loaded copy of the "I18N" assembly. We need to move
|
||||
// this into a class in "System.Private" eventually.
|
||||
|
@ -592,7 +592,7 @@ namespace System
|
||||
|
||||
public AdjustmentRule [] GetAdjustmentRules ()
|
||||
{
|
||||
if (!supportsDaylightSavingTime)
|
||||
if (!supportsDaylightSavingTime || adjustmentRules == null)
|
||||
return new AdjustmentRule [0];
|
||||
else
|
||||
return (AdjustmentRule []) adjustmentRules.Clone ();
|
||||
@ -1254,8 +1254,10 @@ namespace System
|
||||
tz = CreateCustomTimeZone (id, baseUtcOffset, id, standardDisplayName, daylightDisplayName, ValidateRules (adjustmentRules).ToArray ());
|
||||
}
|
||||
|
||||
if (storeTransition)
|
||||
if (storeTransition && transitions.Count > 0) {
|
||||
tz.transitions = transitions;
|
||||
tz.supportsDaylightSavingTime = true;
|
||||
}
|
||||
|
||||
return tz;
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
a7e75eef6368c6220420fa94b92d9f18efdc954b
|
||||
f38526856d8b1842bd8d401eb0d67765bff4c2cb
|
@ -1 +1 @@
|
||||
2eb43af5239e63316874341249c70a7aaaa21548
|
||||
c5f8a1c26efb5e43b4537118287011b39e48146e
|
@ -1 +1 @@
|
||||
1e8e4cd027b107938b2ccffcb417211866ad1223
|
||||
fab1f967bd41df8741fe07faecefc4570b2fa0a0
|
@ -1 +1 @@
|
||||
c662727d3b509939685f97c0494d303020cc0725
|
||||
02bc04de3431cb4492836a94aa678ff49f7a43b2
|
@ -1 +1 @@
|
||||
134f3a9815c9cb89f775b433dcde3143b910e93c
|
||||
b65949d5a9390ad455d5f54e6afffd8dedd94429
|
@ -100,7 +100,8 @@ namespace Mono.Linker.Steps {
|
||||
var references = assembly.MainModule.AssemblyReferences;
|
||||
for (int i = 0; i < references.Count; i++) {
|
||||
var reference = references [i];
|
||||
if (!AreSameReference (reference, target.Name))
|
||||
var r = Context.Resolver.Resolve (reference);
|
||||
if (!AreSameReference (r.Name, target.Name))
|
||||
continue;
|
||||
|
||||
references.RemoveAt (i);
|
||||
|
@ -8,3 +8,9 @@ LOCAL_MCS_FLAGS += -d:NO_AUTHENTICODE,STATIC,NO_SYMBOL_WRITER
|
||||
CLEAN_FILES = monop.exe monop2.exe *.mdb
|
||||
|
||||
include ../../build/executable.make
|
||||
|
||||
run-test-local : basic-tests
|
||||
|
||||
basic-tests:
|
||||
for type in System.Array System.String 'System.Collections.Generic.List`1'; do \
|
||||
echo $$type; $(RUNTIME) $(build_lib) $$type >/dev/null || exit 1; done
|
@ -301,10 +301,10 @@ class MonoP {
|
||||
|
||||
static Options options = new Options ();
|
||||
|
||||
static void Main (string [] args)
|
||||
static int Main (string [] args)
|
||||
{
|
||||
if (!options.ProcessArgs (args))
|
||||
return;
|
||||
return 1;
|
||||
|
||||
if (options.Style == null)
|
||||
mscorlib = universe.LoadFile (typeof (int).Assembly.Location);
|
||||
@ -318,14 +318,14 @@ class MonoP {
|
||||
|
||||
if (options.ShowAll){
|
||||
ShowAll (assembly, options.ShowPrivate, options.FilterObsolete);
|
||||
return;
|
||||
return 0;
|
||||
} else {
|
||||
if (options.Type == null) {
|
||||
if (options.PrintRefs)
|
||||
PrintRefs (assembly);
|
||||
else
|
||||
PrintTypes (assembly, options.ShowPrivate, options.FilterObsolete);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -348,7 +348,7 @@ class MonoP {
|
||||
if (count > 1){
|
||||
Console.WriteLine ("Found " + count + " types that match:");
|
||||
Console.WriteLine (matches);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -394,7 +394,7 @@ class MonoP {
|
||||
notfound:
|
||||
if (t == null) {
|
||||
Console.WriteLine ("Could not find {0}", tname);
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
found:
|
||||
//
|
||||
@ -406,6 +406,7 @@ class MonoP {
|
||||
|
||||
if (message != null)
|
||||
Console.WriteLine (message);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,19 @@ using System.Reflection;
|
||||
#endif
|
||||
|
||||
namespace Mono.CSharp {
|
||||
|
||||
public static class TypeExtensions {
|
||||
public static string GetNamespace (this Type t)
|
||||
{
|
||||
// IKVM crashes here with a null ref sometimes
|
||||
try {
|
||||
return t.Namespace;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Outline {
|
||||
bool declared_only;
|
||||
bool show_private;
|
||||
@ -636,7 +649,7 @@ public class Outline {
|
||||
if (!type.StartsWith ("System.")) {
|
||||
if (type.IndexOf (".") == -1)
|
||||
return type;
|
||||
if (t.Namespace == this.t.Namespace)
|
||||
if (t.GetNamespace () == this.t.GetNamespace ())
|
||||
return t.Name;
|
||||
return type;
|
||||
}
|
||||
@ -745,7 +758,8 @@ public class Outline {
|
||||
}
|
||||
|
||||
if (!recursed) {
|
||||
string ns = t.Namespace;
|
||||
string ns;
|
||||
ns = t.GetNamespace ();
|
||||
if ((ns != null) && (ns != "")) {
|
||||
sb.Append (ns);
|
||||
sb.Append (".");
|
||||
|
@ -15,7 +15,7 @@ License: LGPL v2.1 only
|
||||
Group: Development/Languages/Mono
|
||||
Summary: A .NET Runtime Environment
|
||||
Url: http://www.mono-project.com
|
||||
Version: 4.0.1
|
||||
Version: 4.0.2
|
||||
Release: 0
|
||||
Source0: mono-%{version}.tar.bz2
|
||||
BuildRequires: bison
|
||||
|
@ -1 +1 @@
|
||||
b70897dccb00767160a66906636e4a11d355eba9
|
||||
1296ed12123a12950e6d9b97c95d1d2eda6c2b2a
|
@ -1 +1 @@
|
||||
0b3265de9b69f018f6bbdbc74247de6151f934c1
|
||||
57cf909b79c9925e99852392121898be48f52512
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user