update to 3.10 [release 3.10-1mamba;Sat Dec 26 2015]

This commit is contained in:
Silvan Calarco 2024-01-06 07:14:05 +01:00
parent 3ab19c8a27
commit 6f91df02e0
3 changed files with 736 additions and 71 deletions

View File

@ -0,0 +1,219 @@
From 9d4930b9ea9b4c81e650618ed05ec370338e1c30 Mon Sep 17 00:00:00 2001
From: Timotheus Pokorra <timotheus.pokorra@solidcharity.com>
Date: Thu, 5 Dec 2013 22:13:54 +0100
Subject: [PATCH 1/2] fix make install, files cannot be installed because they
don't exist
---
webdoc/Makefile.am | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/webdoc/Makefile.am b/webdoc/Makefile.am
index 73d2517..2c613d0 100644
--- a/webdoc/Makefile.am
+++ b/webdoc/Makefile.am
@@ -117,18 +117,14 @@ install-data-hook:
$(INSTALL_DATA) $(srcdir)/App_Code/Plugins/*cs $(DESTDIR)$(webdir)/App_Code/Plugins
$(INSTALL_DATA) $(srcdir)/views/*css $(DESTDIR)$(webdir)/views
$(INSTALL_DATA) $(srcdir)/views/*js $(DESTDIR)$(webdir)/views
- $(INSTALL_DATA) $(srcdir)/views/*html $(DESTDIR)$(webdir)/views
$(INSTALL_DATA) $(srcdir)/views/images/*png $(DESTDIR)$(webdir)/views/images
- $(INSTALL_DATA) $(srcdir)/views/images/*gif $(DESTDIR)$(webdir)/views/images
+ $(INSTALL_DATA) $(srcdir)/views/images/*ico $(DESTDIR)$(webdir)/views/images
$(INSTALL_DATA) $(srcdir)/skins/mono-external/header* $(DESTDIR)$(webdir)/skins/mono-external
$(INSTALL_DATA) $(srcdir)/skins/mono-external/footer* $(DESTDIR)$(webdir)/skins/mono-external
$(INSTALL_DATA) $(srcdir)/skins/mono-external/*css $(DESTDIR)$(webdir)/skins/mono-external
- $(INSTALL_DATA) $(srcdir)/skins/mono-external/*js $(DESTDIR)$(webdir)/skins/mono-external
$(INSTALL_DATA) $(srcdir)/skins/mono-external/images/*png $(DESTDIR)$(webdir)/skins/mono-external/images
$(INSTALL_DATA) $(srcdir)/skins/mono-external/images/*gif $(DESTDIR)$(webdir)/skins/mono-external/images
- $(INSTALL_DATA) $(srcdir)/plugins/iframe-plugins/*css $(DESTDIR)$(webdir)/plugins/iframe-plugin
$(INSTALL_DATA) $(srcdir)/plugins/iframe-plugin/*js $(DESTDIR)$(webdir)/plugins/iframe-plugin
- $(INSTALL_DATA) $(srcdir)/plugins/iframe-plugin/*html $(DESTDIR)$(webdir)/plugins/iframe-plugin
$(INSTALL_DATA) $(srcdir)/plugins/tooltip-plugin/*js $(DESTDIR)$(webdir)/plugins/tooltip-plugin
$(INSTALL_DATA) $(srcdir)/plugins/sidebar-plugin/*css $(DESTDIR)$(webdir)/plugins/sidebar-plugin
$(INSTALL_DATA) $(srcdir)/plugins/sidebar-plugin/*js $(DESTDIR)$(webdir)/plugins/sidebar-plugin
From d39bebdafa2f34c308307a674135f36caf7e72aa Mon Sep 17 00:00:00 2001
From: Timotheus Pokorra <timotheus.pokorra@solidcharity.com>
Date: Thu, 5 Dec 2013 22:14:54 +0100
Subject: [PATCH 2/2] use mcs instead of gmcs or dmcs
---
Mono.Profiler/Mono.Profiler.Widgets/Makefile.am | 2 +-
Mono.Profiler/heap-snapshot-explorer/Makefile.am | 2 +-
Mono.Profiler/heap-snapshot-viewer/Makefile.am | 2 +-
Mono.Profiler/mprof-gui/Makefile.am | 2 +-
Mono.Profiler/profiler-decoder-library/Makefile.am | 2 +-
Mono.Profiler/profiler-file-decoder/Makefile.am | 2 +-
create-native-map/src/Makefile.am | 2 +-
docbrowser/Makefile.am | 4 ++--
gendarme/swf-wizard-runner/Makefile.am | 2 +-
ilcontrast/Makefile.am | 2 +-
minvoke/Makefile.am | 6 +++---
mperfmon/Makefile.am | 2 +-
12 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/Mono.Profiler/Mono.Profiler.Widgets/Makefile.am b/Mono.Profiler/Mono.Profiler.Widgets/Makefile.am
index f0bf1ec..c4b1843 100644
--- a/Mono.Profiler/Mono.Profiler.Widgets/Makefile.am
+++ b/Mono.Profiler/Mono.Profiler.Widgets/Makefile.am
@@ -56,7 +56,7 @@ build_references = $(addprefix /r:, $(PROJECT_REFERENCES)) $(REFERENCES)
$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources)
mkdir -p $(BUILDDIR)
- $(GMCS) $(CSFLAGS) -out:$(ASSEMBLY) -target:library $(build_sources) $(build_resources_args) $(build_references)
+ $(MCS) $(CSFLAGS) -out:$(ASSEMBLY) -target:library $(build_sources) $(build_resources_args) $(build_references)
EXTRA_DIST = Mono.Profiler.Widgets.csproj $(FILES) $(RESOURCES)
diff --git a/Mono.Profiler/heap-snapshot-explorer/Makefile.am b/Mono.Profiler/heap-snapshot-explorer/Makefile.am
index a9f34a3..c679ec9 100644
--- a/Mono.Profiler/heap-snapshot-explorer/Makefile.am
+++ b/Mono.Profiler/heap-snapshot-explorer/Makefile.am
@@ -51,6 +51,6 @@ build_references = $(addprefix /r:,$(PROJECT_REFERENCES)) $(PACKAGE_REFERENCES)
$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(PROJECT_REFERENCES)
mkdir -p $(BUILDDIR)
- $(GMCS) $(CSFLAGS) -out:$(ASSEMBLY) -target:library $(build_sources) $(build_resources_args) $(build_references)
+ $(MCS) $(CSFLAGS) -out:$(ASSEMBLY) -target:library $(build_sources) $(build_resources_args) $(build_references)
EXTRA_DIST = heap-snapshot-explorer.csproj $(FILES) $(RESOURCES)
diff --git a/Mono.Profiler/heap-snapshot-viewer/Makefile.am b/Mono.Profiler/heap-snapshot-viewer/Makefile.am
index f7b0888..19b4f0b 100644
--- a/Mono.Profiler/heap-snapshot-viewer/Makefile.am
+++ b/Mono.Profiler/heap-snapshot-viewer/Makefile.am
@@ -48,7 +48,7 @@ build_references = $(addprefix -r:, $(PROJECT_REFERENCES)) $(REFERENCES)
$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(PROJECT_REFERENCES)
mkdir -p $(shell dirname $(ASSEMBLY))
- $(GMCS) $(CSFLAGS) -out:$(ASSEMBLY) -target:exe $(build_sources) $(build_resources_args) $(build_references)
+ $(MCS) $(CSFLAGS) -out:$(ASSEMBLY) -target:exe $(build_sources) $(build_resources_args) $(build_references)
EXTRA_DIST = heap-snapshot-viewer.csproj $(FILES) $(RESOURCES) $(man_MANS)
diff --git a/Mono.Profiler/mprof-gui/Makefile.am b/Mono.Profiler/mprof-gui/Makefile.am
index 0369c2c..13e2ead 100644
--- a/Mono.Profiler/mprof-gui/Makefile.am
+++ b/Mono.Profiler/mprof-gui/Makefile.am
@@ -41,7 +41,7 @@ build_references = $(addprefix -r:, $(PROJECT_REFERENCES)) $(REFERENCES)
$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(PROJECT_REFERENCES)
mkdir -p $(shell dirname $(ASSEMBLY))
- $(GMCS) $(CSFLAGS) -out:$(ASSEMBLY) -target:exe $(build_sources) $(build_resources_args) $(build_references)
+ $(MCS) $(CSFLAGS) -out:$(ASSEMBLY) -target:exe $(build_sources) $(build_resources_args) $(build_references)
EXTRA_DIST = mprof-gui.csproj $(FILES) $(RESOURCES)
diff --git a/Mono.Profiler/profiler-decoder-library/Makefile.am b/Mono.Profiler/profiler-decoder-library/Makefile.am
index 71d49ac..4780ff0 100644
--- a/Mono.Profiler/profiler-decoder-library/Makefile.am
+++ b/Mono.Profiler/profiler-decoder-library/Makefile.am
@@ -33,7 +33,7 @@ build_references = $(addprefix /r:, $(REFERENCES))
$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources)
mkdir -p $(BUILDDIR)
- $(GMCS) $(CSFLAGS) -out:$(ASSEMBLY) -target:library $(build_sources) $(build_references)
+ $(MCS) $(CSFLAGS) -out:$(ASSEMBLY) -target:library $(build_sources) $(build_references)
EXTRA_DIST = profiler-decoder-library.csproj $(FILES) $(RESOURCES)
diff --git a/Mono.Profiler/profiler-file-decoder/Makefile.am b/Mono.Profiler/profiler-file-decoder/Makefile.am
index 2365dc7..2fd5338 100644
--- a/Mono.Profiler/profiler-file-decoder/Makefile.am
+++ b/Mono.Profiler/profiler-file-decoder/Makefile.am
@@ -32,7 +32,7 @@ build_references = $(addprefix /r:, $(PROJECT_REFERENCES))
$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(DLL_REFERENCES) $(PROJECT_REFERENCES)
mkdir -p $(shell dirname $(ASSEMBLY))
- $(GMCS) $(CSFLAGS) -out:$(ASSEMBLY) -target:exe $(build_sources) $(build_references)
+ $(MCS) $(CSFLAGS) -out:$(ASSEMBLY) -target:exe $(build_sources) $(build_references)
EXTRA_DIST = profiler-file-decoder.csproj $(FILES) $(RESOURCES) $(man_MANS)
diff --git a/create-native-map/src/Makefile.am b/create-native-map/src/Makefile.am
index fd23943..6a9a998 100644
--- a/create-native-map/src/Makefile.am
+++ b/create-native-map/src/Makefile.am
@@ -17,7 +17,7 @@ REFS = -r:Mono.Posix.dll
all: $(EXE)
$(EXE) : $(cnm_build_sources)
- $(GMCS) $(MCS_FLAGS) -d:TRACE -debug+ -out:$@ -target:exe $(REFS) $(cnm_build_sources)
+ $(MCS) $(MCS_FLAGS) -d:TRACE -debug+ -out:$@ -target:exe $(REFS) $(cnm_build_sources)
assemblydir = $(prefix)/lib/create-native-map
assembly_DATA = $(EXE) MapAttribute.cs
diff --git a/docbrowser/Makefile.am b/docbrowser/Makefile.am
index 065c430..2f2ecf5 100644
--- a/docbrowser/Makefile.am
+++ b/docbrowser/Makefile.am
@@ -1,9 +1,9 @@
monodocdir=$(prefix)/lib/monodoc
if DMCS_PRESENT
-COMPILER=$(DMCS)
+COMPILER=$(MCS)
else
-COMPILER=$(GMCS)
+COMPILER=$(MCS)
endif
SUBDIRS=theme-icons
diff --git a/gendarme/swf-wizard-runner/Makefile.am b/gendarme/swf-wizard-runner/Makefile.am
index ab54625..b797ddd 100644
--- a/gendarme/swf-wizard-runner/Makefile.am
+++ b/gendarme/swf-wizard-runner/Makefile.am
@@ -55,7 +55,7 @@ wizard_icon = Resources/gendarme.ico
wizard_build_icon = $(addprefix $(srcdir)/, $(wizard_icon))
../bin/gendarme-wizard.exe: $(wizard_build_sources) $(wizard_resources) Wizard.resources Properties/Resources.resources $(wizard_build_xsl) $(wizard_build_icon)
- $(GMCS) -debug -target:winexe -r:$(CECIL_ASM) -r:../bin/Gendarme.Framework.dll \
+ $(MCS) -debug -target:winexe -r:$(CECIL_ASM) -r:../bin/Gendarme.Framework.dll \
-r:System.Core.dll -r:System.Xml.Linq.dll -r:System.Windows.Forms.dll -r:System.Drawing.dll -r:System.Xml.dll \
-resource:$(wizard_build_xsl) -resource:Wizard.resources,Gendarme.Wizard.resources \
-resource:Properties/Resources.resources,Gendarme.Properties.Resources.resources \
diff --git a/ilcontrast/Makefile.am b/ilcontrast/Makefile.am
index be7c20e..bcfe656 100644
--- a/ilcontrast/Makefile.am
+++ b/ilcontrast/Makefile.am
@@ -47,7 +47,7 @@ sources = \
build_sources = Global.cs $(addprefix $(srcdir)/, $(sources))
ilcontrast.exe: $(build_sources)
- $(GMCS) -out:ilcontrast.exe $(references) $(resources) $(build_sources)
+ $(MCS) -out:ilcontrast.exe $(references) $(resources) $(build_sources)
Global.cs: Global.cs.in
sed -e "s|\@VERSION\@|$(VERSION)|" $< > $@
diff --git a/minvoke/Makefile.am b/minvoke/Makefile.am
index 49c60e1..87b6b86 100644
--- a/minvoke/Makefile.am
+++ b/minvoke/Makefile.am
@@ -18,13 +18,13 @@ retargetassembly_exe_sources = \
EXTRA_DIST = $(minvoke_sources) $(mapassembly_dll_souorces) $(retargetassembly_exe_sources) minvoke.in
MapAssembly.dll: $(mapassembly_dll_sources)
- $(GMCS) -noconfig -codepage:utf8 -warn:4 -optimize+ -target:library -out:MapAssembly.dll $(mapassembly_dll_sources)
+ $(MCS) -noconfig -codepage:utf8 -warn:4 -optimize+ -target:library -out:MapAssembly.dll $(mapassembly_dll_sources)
RetargetAssembly.exe: $(retargetassembly_exe_sources)
- $(GMCS) -noconfig -codepage:utf8 -warn:4 -optimize+ -target:exe -out:RetargetAssembly.exe $(retargetassembly_exe_sources)
+ $(MCS) -noconfig -codepage:utf8 -warn:4 -optimize+ -target:exe -out:RetargetAssembly.exe $(retargetassembly_exe_sources)
minvoke.exe: $(minvoke_sources);
- $(GMCS) -noconfig -codepage:utf8 -warn:4 -optimize+ -debug -define:DEBUG -target:exe -out:minvoke.exe $(minvoke_sources) -r:System.Core -r:$(CECIL_ASM)
+ $(MCS) -noconfig -codepage:utf8 -warn:4 -optimize+ -debug -define:DEBUG -target:exe -out:minvoke.exe $(minvoke_sources) -r:System.Core -r:$(CECIL_ASM)
test: minvoke.exe MapAssembly.dll RetargetAssembly.exe
diff --git a/mperfmon/Makefile.am b/mperfmon/Makefile.am
index 08f3dff..17ad4be 100644
--- a/mperfmon/Makefile.am
+++ b/mperfmon/Makefile.am
@@ -29,5 +29,5 @@ assemblies = -r:System -r:System.Xml -r:Mono.Cairo -r:Mono.Posix
ress= $(foreach res,$(mperfmon_resources), $(addprefix -resource:,$(res)),$(notdir $(res)))
mperfmon.exe: $(mperfmon_sources) $(mperfmon_resources)
- $(GMCS) -noconfig -codepage:utf8 -warn:4 -optimize+ -debug -define:DEBUG -target:exe -out:mperfmon.exe $(mperfmon_sources) $(ress) $(packages) $(assemblies)
+ $(MCS) -noconfig -codepage:utf8 -warn:4 -optimize+ -debug -define:DEBUG -target:exe -out:mperfmon.exe $(mperfmon_sources) $(ress) $(packages) $(assemblies)

View File

@ -0,0 +1,459 @@
From 9de0fe06a99003462df3c77dda93718ab85da487 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Steffen=20Kie=C3=9F?= <s-kiess@web.de>
Date: Thu, 10 Sep 2015 14:36:12 +0200
Subject: [PATCH] Changes to create-native-map
- Use CompareOptions.OrdinalIgnoreCase instead of
CompareOptions.Ordinal | CompareOptions.IgnoreCase (which is no longer
supported by newer mono versions)
- Make sure enum hex values are lowercase on newer mono versions
- Do not create conversion calls for inherited fields
- Allow [Map] for internal enums
---
create-native-map/man/create-native-map.1 | 3 ++
create-native-map/src/TestMap.cs | 26 +++++++--
create-native-map/src/create-native-map.cs | 27 ++++++----
create-native-map/src/test.c.ref | 86 ++++++++++++++++++++++++++++++
create-native-map/src/test.cs.ref | 64 ++++++++++++++++++++++
create-native-map/src/test.h.ref | 32 +++++++++++
6 files changed, 224 insertions(+), 14 deletions(-)
diff --git a/create-native-map/man/create-native-map.1 b/create-native-map/man/create-native-map.1
index 20092a0..f0edf30 100644
--- a/create-native-map/man/create-native-map.1
+++ b/create-native-map/man/create-native-map.1
@@ -435,6 +435,9 @@ becomes
}
.fi
+For classes, the conversion functions will only copy fields declared in the class itself. Fields declared in parent classes will not be copied. (This is because
+.I create-native-map
+does not know how the inheritance is implemented in C. Therefore copying fields from parent classes is left to the caller of the conversion functions.)
.TP
Fields
If a field (1) has the
diff --git a/create-native-map/src/TestMap.cs b/create-native-map/src/TestMap.cs
index fc25795..7d489ff 100644
--- a/create-native-map/src/TestMap.cs
+++ b/create-native-map/src/TestMap.cs
@@ -16,7 +16,7 @@ struct ForDelegate {int i;}
HandleRef h, ForDelegate fd);
[Map]
- enum TestEnum : long {
+ public enum TestEnum : long {
Foo,
Bar,
Baz,
@@ -24,7 +24,7 @@ enum TestEnum : long {
}
[Map, Flags]
- enum SimpleFlagsEnum {
+ public enum SimpleFlagsEnum {
None = 0,
A = 1,
B = 2,
@@ -33,7 +33,7 @@ enum SimpleFlagsEnum {
}
[Map, Flags]
- enum FlagsEnum {
+ public enum FlagsEnum {
None = 0,
A = 1,
B = 2,
@@ -110,6 +110,23 @@ class NativeMethods {
[DllImport ("NativeLib")]
private static extern void exclude_native_symbol ();
}
+
+ [Map]
+ enum InternalEnum : long {
+ Foo,
+ }
+
+ [Map ("struct parent")]
+ [StructLayout (LayoutKind.Sequential)]
+ public class Parent {
+ public int i;
+ }
+
+ [Map ("struct child")]
+ [StructLayout (LayoutKind.Sequential)]
+ public class Child : Parent {
+ public int j;
+ }
}
// Testing namespace renaming; this should be NSTo within test.h
@@ -121,8 +138,7 @@ class Stat {
}
[Map]
- enum Colors {
+ public enum Colors {
Red, Blue, Green
}
}
-
diff --git a/create-native-map/src/create-native-map.cs b/create-native-map/src/create-native-map.cs
index a237d46..26d8c6e 100644
--- a/create-native-map/src/create-native-map.cs
+++ b/create-native-map/src/create-native-map.cs
@@ -551,7 +551,7 @@ public int Compare (string s1, string s2)
if (s2 == null)
return -1;
return CultureInfo.InvariantCulture.CompareInfo.Compare (s1, s2,
- CompareOptions.Ordinal | CompareOptions.IgnoreCase);
+ CompareOptions.OrdinalIgnoreCase);
}
}
@@ -742,8 +742,8 @@ static void WriteLiteralValues (StreamWriter sh, Type t, string n)
if (!fi.IsLiteral)
continue;
string e = n + "_" + fi.Name;
- sh.WriteLine ("\t{0,-" + max_field_length + "} = 0x{1:x},",
- e, fi.GetValue (inst));
+ sh.WriteLine ("\t{0,-" + max_field_length + "} = 0x{1},",
+ e, string.Format ("{0:x}", fi.GetValue (inst)).ToLower ());
sh.WriteLine ("\t#define {0,-" + max_field_length + "} {0}", e);
}
sh.WriteLine ("};");
@@ -1407,7 +1407,8 @@ private void WriteToManagedClass (Type t, string ns, string fn, string etype)
private static FieldInfo[] GetFieldsToCopy (Type t)
{
FieldInfo[] fields = t.GetFields (BindingFlags.Instance |
- BindingFlags.Public | BindingFlags.NonPublic);
+ BindingFlags.Public | BindingFlags.NonPublic |
+ BindingFlags.DeclaredOnly);
int count = 0;
for (int i = 0; i < fields.Length; ++i)
if (MapUtils.GetCustomAttribute <NonSerializedAttribute> (fields [i]) == null)
@@ -1472,6 +1473,7 @@ private void WriteEnum (Type t, string ns, string fn)
{
string mtype = Enum.GetUnderlyingType(t).Name;
ObsoleteAttribute oa = MapUtils.GetCustomAttribute <ObsoleteAttribute> (t);
+ string visibility = (t.Attributes & TypeAttributes.Public) != 0 ? "public" : "internal";
string obsolete = "";
if (oa != null) {
obsolete = string.Format ("[Obsolete (\"{0}\", {1})]\n\t\t",
@@ -1481,12 +1483,12 @@ private void WriteEnum (Type t, string ns, string fn)
"\t\t{0}[DllImport (LIB, EntryPoint=\"{1}_From{2}\")]\n" +
"\t\tprivate static extern int From{2} ({2} value, out {3} rval);\n" +
"\n" +
- "\t\t{0}public static bool TryFrom{2} ({2} value, out {3} rval)\n" +
+ "\t\t{0}{4} static bool TryFrom{2} ({2} value, out {3} rval)\n" +
"\t\t{{\n" +
"\t\t\treturn From{2} (value, out rval) == 0;\n" +
"\t\t}}\n" +
"\n" +
- "\t\t{0}public static {3} From{2} ({2} value)\n" +
+ "\t\t{0}{4} static {3} From{2} ({2} value)\n" +
"\t\t{{\n" +
"\t\t\t{3} rval;\n" +
"\t\t\tif (From{2} (value, out rval) == -1)\n" +
@@ -1497,19 +1499,19 @@ private void WriteEnum (Type t, string ns, string fn)
"\t\t{0}[DllImport (LIB, EntryPoint=\"{1}_To{2}\")]\n" +
"\t\tprivate static extern int To{2} ({3} value, out {2} rval);\n" +
"\n" +
- "\t\t{0}public static bool TryTo{2} ({3} value, out {2} rval)\n" +
+ "\t\t{0}{4} static bool TryTo{2} ({3} value, out {2} rval)\n" +
"\t\t{{\n" +
"\t\t\treturn To{2} (value, out rval) == 0;\n" +
"\t\t}}\n" +
"\n" +
- "\t\t{0}public static {2} To{2} ({3} value)\n" +
+ "\t\t{0}{4} static {2} To{2} ({3} value)\n" +
"\t\t{{\n" +
"\t\t\t{2} rval;\n" +
"\t\t\tif (To{2} (value, out rval) == -1)\n" +
"\t\t\t\tThrowArgumentException (value);\n" +
"\t\t\treturn rval;\n" +
"\t\t}}\n",
- obsolete, ns, t.Name, mtype
+ obsolete, ns, t.Name, mtype, visibility
);
}
@@ -1571,6 +1573,8 @@ public override void WriteType (Type t, string ns, string fn)
{
if (!CanMapType (t) || !t.IsEnum)
return;
+ if ((t.Attributes & TypeAttributes.Public) == 0)
+ return;
bool bits = IsFlagsEnum (t);
@@ -1745,3 +1749,8 @@ public override void CloseFile (string file_prefix)
}
// vim: noexpandtab
+// Local Variables:
+// tab-width: 4
+// c-basic-offset: 4
+// indent-tabs-mode: t
+// End:
diff --git a/create-native-map/src/test.c.ref b/create-native-map/src/test.c.ref
index a494340..412a3fb 100644
--- a/create-native-map/src/test.c.ref
+++ b/create-native-map/src/test.c.ref
@@ -194,6 +194,36 @@
} G_STMT_END
#endif /* def DEBUG */
+#ifdef HAVE_STRUCT_CHILD
+int
+MakeMap_Test_FromChild (struct MakeMap_Test_Child *from, struct child *to)
+{
+ _cnm_return_val_if_overflow (int, from->j, -1);
+
+ memset (to, 0, sizeof(*to));
+
+ to->j = from->j;
+
+ return 0;
+}
+#endif /* ndef HAVE_STRUCT_CHILD */
+
+
+#ifdef HAVE_STRUCT_CHILD
+int
+MakeMap_Test_ToChild (struct child *from, struct MakeMap_Test_Child *to)
+{
+ _cnm_return_val_if_overflow (int, from->j, -1);
+
+ memset (to, 0, sizeof(*to));
+
+ to->j = from->j;
+
+ return 0;
+}
+#endif /* ndef HAVE_STRUCT_CHILD */
+
+
int MakeMap_Test_FromFlagsEnum (int x, int *r)
{
*r = 0;
@@ -432,6 +462,62 @@ MakeMap_Test_ToFooHolder (struct foo_holder *from, struct MakeMap_Test_FooHolder
#endif /* ndef HAVE_STRUCT_FOO_HOLDER */
+int MakeMap_Test_FromInternalEnum (gint64 x, gint64 *r)
+{
+ *r = 0;
+ if (x == MakeMap_Test_InternalEnum_Foo)
+#ifdef Foo
+ {*r = Foo; return 0;}
+#else /* def Foo */
+ {errno = EINVAL; return -1;}
+#endif /* ndef Foo */
+ if (x == 0)
+ return 0;
+ errno = EINVAL; return -1;
+}
+
+int MakeMap_Test_ToInternalEnum (gint64 x, gint64 *r)
+{
+ *r = 0;
+ if (x == 0)
+ return 0;
+#ifdef Foo
+ if (x == Foo)
+ {*r = MakeMap_Test_InternalEnum_Foo; return 0;}
+#endif /* ndef Foo */
+ errno = EINVAL; return -1;
+}
+
+#ifdef HAVE_STRUCT_PARENT
+int
+MakeMap_Test_FromParent (struct MakeMap_Test_Parent *from, struct parent *to)
+{
+ _cnm_return_val_if_overflow (int, from->i, -1);
+
+ memset (to, 0, sizeof(*to));
+
+ to->i = from->i;
+
+ return 0;
+}
+#endif /* ndef HAVE_STRUCT_PARENT */
+
+
+#ifdef HAVE_STRUCT_PARENT
+int
+MakeMap_Test_ToParent (struct parent *from, struct MakeMap_Test_Parent *to)
+{
+ _cnm_return_val_if_overflow (int, from->i, -1);
+
+ memset (to, 0, sizeof(*to));
+
+ to->i = from->i;
+
+ return 0;
+}
+#endif /* ndef HAVE_STRUCT_PARENT */
+
+
int MakeMap_Test_FromSimpleFlagsEnum (int x, int *r)
{
*r = 0;
diff --git a/create-native-map/src/test.cs.ref b/create-native-map/src/test.cs.ref
index 3723010..160fbe8 100644
--- a/create-native-map/src/test.cs.ref
+++ b/create-native-map/src/test.cs.ref
@@ -22,6 +22,22 @@ namespace Mono.Unix.Native {
Locale.GetText ("Current platform doesn't support this value."));
}
+ [DllImport (LIB, EntryPoint="MakeMap_Test_FromChild")]
+ private static extern int FromChild (Child source, IntPtr destination);
+
+ public static bool TryCopy (Child source, IntPtr destination)
+ {
+ return FromChild (source, destination) == 0;
+ }
+
+ [DllImport (LIB, EntryPoint="MakeMap_Test_ToChild")]
+ private static extern int ToChild (IntPtr source, Child destination);
+
+ public static bool TryCopy (IntPtr source, Child destination)
+ {
+ return ToChild (source, destination) == 0;
+ }
+
[DllImport (LIB, EntryPoint="MakeMap_Test_FromFlagsEnum")]
private static extern int FromFlagsEnum (FlagsEnum value, out Int32 rval);
@@ -86,6 +102,54 @@ namespace Mono.Unix.Native {
return ToFooHolder (source, out destination) == 0;
}
+ [DllImport (LIB, EntryPoint="MakeMap_Test_FromInternalEnum")]
+ private static extern int FromInternalEnum (InternalEnum value, out Int64 rval);
+
+ internal static bool TryFromInternalEnum (InternalEnum value, out Int64 rval)
+ {
+ return FromInternalEnum (value, out rval) == 0;
+ }
+
+ internal static Int64 FromInternalEnum (InternalEnum value)
+ {
+ Int64 rval;
+ if (FromInternalEnum (value, out rval) == -1)
+ ThrowArgumentException (value);
+ return rval;
+ }
+
+ [DllImport (LIB, EntryPoint="MakeMap_Test_ToInternalEnum")]
+ private static extern int ToInternalEnum (Int64 value, out InternalEnum rval);
+
+ internal static bool TryToInternalEnum (Int64 value, out InternalEnum rval)
+ {
+ return ToInternalEnum (value, out rval) == 0;
+ }
+
+ internal static InternalEnum ToInternalEnum (Int64 value)
+ {
+ InternalEnum rval;
+ if (ToInternalEnum (value, out rval) == -1)
+ ThrowArgumentException (value);
+ return rval;
+ }
+
+ [DllImport (LIB, EntryPoint="MakeMap_Test_FromParent")]
+ private static extern int FromParent (Parent source, IntPtr destination);
+
+ public static bool TryCopy (Parent source, IntPtr destination)
+ {
+ return FromParent (source, destination) == 0;
+ }
+
+ [DllImport (LIB, EntryPoint="MakeMap_Test_ToParent")]
+ private static extern int ToParent (IntPtr source, Parent destination);
+
+ public static bool TryCopy (IntPtr source, Parent destination)
+ {
+ return ToParent (source, destination) == 0;
+ }
+
[DllImport (LIB, EntryPoint="MakeMap_Test_FromSimpleFlagsEnum")]
private static extern int FromSimpleFlagsEnum (SimpleFlagsEnum value, out Int32 rval);
diff --git a/create-native-map/src/test.h.ref b/create-native-map/src/test.h.ref
index f45e838..34d2ef1 100644
--- a/create-native-map/src/test.h.ref
+++ b/create-native-map/src/test.h.ref
@@ -60,6 +60,13 @@ enum MakeMap_Test_FlagsEnum {
int MakeMap_Test_FromFlagsEnum (int x, int *r);
int MakeMap_Test_ToFlagsEnum (int x, int *r);
+enum MakeMap_Test_InternalEnum {
+ MakeMap_Test_InternalEnum_Foo = 0x0000000000000000,
+ #define MakeMap_Test_InternalEnum_Foo MakeMap_Test_InternalEnum_Foo
+};
+int MakeMap_Test_FromInternalEnum (gint64 x, gint64 *r);
+int MakeMap_Test_ToInternalEnum (gint64 x, gint64 *r);
+
enum MakeMap_Test_SimpleFlagsEnum {
MakeMap_Test_SimpleFlagsEnum_A = 0x00000001,
#define MakeMap_Test_SimpleFlagsEnum_A MakeMap_Test_SimpleFlagsEnum_A
@@ -105,9 +112,11 @@ int MakeMap_Rename_ToColors (int x, int *r);
*/
struct MakeMap_Test_Baz;
+struct MakeMap_Test_Child;
struct MakeMap_Test_Foo;
struct MakeMap_Test_FooHolder;
struct MakeMap_Test_ForDelegate;
+struct MakeMap_Test_Parent;
struct MakeMap_Test_Qux;
struct MakeMap_Rename_Stat;
@@ -115,8 +124,10 @@ struct MakeMap_Rename_Stat;
* Inferred Structure Declarations
*/
+struct child;
struct foo;
struct foo_holder;
+struct parent;
/*
* Delegate Declarations
@@ -147,6 +158,17 @@ struct MakeMap_Test_Baz {
DelRefArrayBaz b8;
};
+struct MakeMap_Test_Child {
+ int i;
+ int j;
+};
+
+int
+MakeMap_Test_FromChild (struct MakeMap_Test_Child* from, struct child *to);
+int
+MakeMap_Test_ToChild (struct child *from, struct MakeMap_Test_Child* to);
+
+
struct MakeMap_Test_Foo {
int foo;
void* p;
@@ -174,6 +196,16 @@ struct MakeMap_Test_ForDelegate {
int i;
};
+struct MakeMap_Test_Parent {
+ int i;
+};
+
+int
+MakeMap_Test_FromParent (struct MakeMap_Test_Parent* from, struct parent *to);
+int
+MakeMap_Test_ToParent (struct parent *from, struct MakeMap_Test_Parent* to);
+
+
struct MakeMap_Test_Qux {
int i;
struct MakeMap_Test_Baz* b;

View File

@ -1,5 +1,5 @@
Name: mono-tools
Version: 2.10
Version: 3.10
Release: 1mamba
Summary: Mono tools
Group: Graphical Desktop/Applications/Development
@ -7,14 +7,23 @@ Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.mono-project.com/Monodoc
Source: http://ftp.novell.com/pub/mono/sources/mono-tools/mono-tools-%{version}.tar.bz2
Source: http://download.mono-project.com/sources/mono-tools/mono-tools-%{version}.tar.gz
#Source: http://ftp.novell.com/pub/mono/sources/mono-tools/mono-tools-%{version}.tar.bz2
Patch0: mono-tools-3.10-mono-4.2.patch
Patch1: mono-tools-3.10-upstream-create-native-map.patch
License: GPL
BuildRequires: mono-nunit
## AUTOBUILDREQ-BEGIN
BuildRequires: gnome-sharp-devel
BuildRequires: gnome-desktop-sharp-devel
BuildRequires: gtk-sharp-devel
BuildRequires: gtk-sharp2-devel
BuildRequires: mono-core
BuildRequires: mono-web
BuildRequires: mono-winforms
## AUTOBUILDREQ-END
BuildRequires: mono-nunit
BuildRequires: mono-extras
Requires: gnome-sharp
Requires: gnome-desktop-sharp
#Requires: gnome-desktop-sharp
Requires: mono-extras
Requires: mono-nunit
BuildRoot: %{_tmppath}/%{name}-%{version}-root
@ -28,10 +37,20 @@ Mono Tools is a collection of development and testing programs and utilities for
%prep
%setup -q
%patch0 -p1
%patch1 -p1
# workaround for make install
touch webdoc/views/index.html
touch webdoc/views/images/dummy.gif
touch webdoc/skins/mono-external/dummy.js
mkdir webdoc/plugins/iframe-plugins
touch webdoc/plugins/iframe-plugins/dummy.css
touch webdoc/plugins/iframe-plugin/dummy.html
%build
%configure
%make -j1
make GMCS=mcs || make GMCS=mcs
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -59,65 +78,25 @@ Mono Tools is a collection of development and testing programs and utilities for
%{_bindir}/mperfmon
%{_bindir}/mprof-decoder
%{_bindir}/mprof-heap-viewer
%{_libdir}/create-native-map/MapAttribute.cs
%{_libdir}/create-native-map/create-native-map.exe
%{_libdir}/gendarme/Gendarme.Framework.dll
%{_libdir}/gendarme/Gendarme.Rules.BadPractice.dll
%{_libdir}/gendarme/Gendarme.Rules.Concurrency.dll
%{_libdir}/gendarme/Gendarme.Rules.Correctness.dll
%{_libdir}/gendarme/Gendarme.Rules.Design.dll
%{_libdir}/gendarme/Gendarme.Rules.Design.Generic.dll
%{_libdir}/gendarme/Gendarme.Rules.Design.Linq.dll
%{_libdir}/gendarme/Gendarme.Rules.Exceptions.dll
%{_libdir}/gendarme/Gendarme.Rules.Gendarme.dll
%{_libdir}/gendarme/Gendarme.Rules.Globalization.dll
%{_libdir}/gendarme/Gendarme.Rules.Interoperability.dll
%{_libdir}/gendarme/Gendarme.Rules.Interoperability.Com.dll
%{_libdir}/gendarme/Gendarme.Rules.Maintainability.dll
%{_libdir}/gendarme/Gendarme.Rules.Naming.dll
%{_libdir}/gendarme/Gendarme.Rules.Performance.dll
%{_libdir}/gendarme/Gendarme.Rules.Portability.dll
%{_libdir}/gendarme/Gendarme.Rules.NUnit.dll
%{_libdir}/gendarme/Gendarme.Rules.Security.dll
%{_libdir}/gendarme/Gendarme.Rules.Security.Cas.dll
%{_libdir}/gendarme/Gendarme.Rules.Serialization.dll
%{_libdir}/gendarme/Gendarme.Rules.Smells.dll
%{_libdir}/gendarme/Gendarme.Rules.Ui.dll
%{_libdir}/gendarme/gd2i.exe
%{_libdir}/gendarme/gendarme-wizard.exe
%{_libdir}/gendarme/gendarme.exe
%{_libdir}/gendarme/rules.xml
%{_libdir}/gsharp/gsharp.exe
%{_libdir}/gsharp/gsharp.exe.config
%{_libdir}/gui-compare/gui-compare.exe
%{_libdir}/gui-compare/gui-compare.exe.mdb
%{_libdir}/minvoke/minvoke.exe
%{_libdir}/mono-tools/emveepee.exe
%{_libdir}/mono-tools/emveepee.exe.mdb
%{_libdir}/mono-tools/mprof-decoder-library.dll
%{_libdir}/mono-tools/mprof-decoder-library.dll.mdb
%{_libdir}/mono-tools/mprof-decoder.exe
%{_libdir}/mono-tools/mprof-decoder.exe.mdb
%{_libdir}/mono-tools/mprof-heap-snapshot-explorer.dll
%{_libdir}/mono-tools/mprof-heap-snapshot-explorer.dll.mdb
%{_libdir}/mono-tools/mprof-heap-viewer.exe
%{_libdir}/mono-tools/mprof-heap-viewer.exe.mdb
%{_libdir}/mono-tools/Mono.Profiler.Widgets.dll
%{_libdir}/mono-tools/Mono.Profiler.Widgets.dll.mdb
%{_libdir}/mono/1.0/gasnview.exe
%dir %{_prefix}/lib/create-native-map
%{_prefix}/lib/create-native-map/*
%dir %{_prefix}/lib/gendarme
%{_prefix}/lib/gendarme/*
%dir %{_prefix}/lib/gsharp
%{_prefix}/lib/gsharp/*
%dir %{_prefix}/lib/gui-compare
%{_prefix}/lib/gui-compare/*
%dir %{_prefix}/lib/minvoke
%{_prefix}/lib/minvoke/*
%dir %{_libdir}/mono-tools
%{_libdir}/mono-tools/*
%{_prefix}/lib/mono/1.0/gasnview.exe
#%{_libdir}/mono/1.0/gnunit.exe
#%{_libdir}/mono/2.0/gnunit2.exe
%{_libdir}/monodoc/GtkHtmlHtmlRender.dll
%{_libdir}/monodoc/MonoWebBrowserHtmlRender.dll
%{_libdir}/monodoc/browser.exe
%{_libdir}/monodoc/sources/Gendarme.Rules.*
%{_libdir}/monodoc/sources/Gendarme.Framework.*
%{_libdir}/monodoc/sources/gendarme.*
%{_libdir}/monodoc/web
%{_libdir}/mperfmon/config
%{_libdir}/mperfmon/mperfmon.exe
%{_libdir}/pkgconfig/create-native-map.pc
%{_libdir}/pkgconfig/gendarme-framework.pc
%dir %{_prefix}/lib/monodoc
%{_prefix}/lib/monodoc/*
%dir %{_prefix}/lib/mperfmon
%{_prefix}/lib/mperfmon/*
%{_datadir}/applications/monodoc.desktop
%{_datadir}/applications/gendarme-wizard.desktop
%{_datadir}/applications/gsharp.desktop
@ -125,16 +104,24 @@ Mono Tools is a collection of development and testing programs and utilities for
#%{_datadir}/applications/mprof-heap-viewer.desktop
%{_datadir}/pixmaps/gendarme.svg
%{_datadir}/pixmaps/monodoc.png
%{_mandir}/man1/mprof-decoder.1.gz
%{_mandir}/man1/mprof-heap-viewer.1.gz
%{_mandir}/man1/create-native-map.1.gz
%{_mandir}/man1/gd2i.1.gz
%{_mandir}/man1/gendarme.1.gz
%{_mandir}/man1/mperfmon.1.gz
%{_mandir}/man5/gendarme.5.gz
%doc AUTHORS COPYING COPYING.LIB ChangeLog README
%{_mandir}/man1/mprof-decoder.1*
%{_mandir}/man1/mprof-heap-viewer.1*
%{_mandir}/man1/create-native-map.1*
%{_mandir}/man1/gd2i.1*
%{_mandir}/man1/gendarme.1*
%{_mandir}/man1/mperfmon.1*
%{_mandir}/man5/gendarme.5*
%{_prefix}/lib/pkgconfig/create-native-map.pc
%{_prefix}/lib/pkgconfig/gendarme-framework.pc
%doc AUTHORS COPYING COPYING.LIB
%changelog
* Sat Dec 26 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 3.10-1mamba
- update to 3.10
* Wed Apr 09 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.11-1mamba
- update to 2.11
* Sat Mar 26 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 2.10-1mamba
- update to 2.10