[Mono-devel-list] xslttest patch
Fix Makefile a little bit: clean-xslttest had dependency on catalog-fixed.xml, then on catalog.xml which make did not know to build. Another fix is when generating reference results, check that we are running on windows, otherwise we can get to comparing mono results with mono results. Index: Makefile === --- Makefile (revision 44628) +++ Makefile (working copy) @@ -11,7 +11,8 @@ RUNTIME = mono --debug CSCOMPILE = mcs -TESTS = testsuite/TESTS/Xalan_Conformance_Tests/whitespace/whitespace35.xsl +CATALOG = testsuite/TESTS/catalog.xml +FIXED_CATALOG = testsuite/TESTS/catalog-fixed.xml TARGET_RESULTS = Results MSTEST_RESULTS = testsuite/TESTS/ExpectedResults TEST_ARCHIVE = xslt-testsuite-03.ZIP @@ -20,11 +21,11 @@ test : xslttest.exe alltest.exe prepare -prepare : $(TESTS) prepare-xslt prepare-mstest +prepare : $(FIXED_CATALOG) prepare-xslt prepare-mstest -prepare-xslt : xslttest.exe $(XSLTTEST_RESULTS) testsuite/TESTS/catalog-fixed.xml +prepare-xslt : xslttest.exe $(XSLTTEST_RESULTS) -prepare-mstest : alltest.exe $(MSTEST_RESULTS) testsuite/TESTS/catalog-fixed.xml +prepare-mstest : alltest.exe $(MSTEST_RESULTS) xslttest.exe : xslttest.cs $(CSCOMPILE) xslttest.cs @@ -35,12 +36,12 @@ alltest.exe : alltest.cs $(CSCOMPILE) alltest.cs -testsuite/TESTS/catalog-fixed.xml : testsuite/TESTS/catalog.xml catalog.sed - sed -f catalog.sed testsuite/TESTS/catalog.xml testsuite/TESTS/catalog-fixed.xml +$(FIXED_CATALOG) : $(CATALOG) catalog.sed + sed -f catalog.sed $(CATALOG) $(FIXED_CATALOG) -$(TESTS) : $(TEST_ARCHIVE) +$(CATALOG) : $(TEST_ARCHIVE) unzip -un $(TEST_ARCHIVE) - touch $(TESTS) + touch $(CATALOG) $(XSLTTEST_RESULTS) : $(XSLTTEST_RESULTS_ARCHIVE) unzip -n -d $(XSLTTEST_RESULTS_ARCHIVE) @@ -61,11 +62,11 @@ run-test : run-test-xslt run-test-ms -run-test-xslt : xslttest.exe testsuite/TESTS/catalog-fixed.xml +run-test-xslt : xslttest.exe $(FIXED_CATALOG) # Redirect stdout to /dev/null because it has only xsl:message garbage $(RUNTIME) $(RUNTIME_FLAGS) xslttest.exe --report:TestResult.xml --xml --details --outall /dev/null -run-test-ms : alltest.exe xmlnorm.exe testsuite/TESTS/catalog-fixed.xml +run-test-ms : alltest.exe xmlnorm.exe $(FIXED_CATALOG) $(RUNTIME) $(RUNTIME_FLAGS) ./alltest.exe $(TARGET_RESULTS) mono ./xmlnorm.exe -s testsuite/TESTS/$(TARGET_RESULTS) testsuite/TESTS/norm-tmp rm -rf testsuite/TESTS/$(TARGET_RESULTS) @@ -75,7 +76,7 @@ clean : clean-xslttest clean-mstest rm -f xslttest.exe -clean-xslttest : xslttest.exe +clean-xslttest : xslttest.exe $(FIXED_CATALOG) if (test -e testsuite) then \ $(RUNTIME) ./xslttest.exe --list output.lst; \ perl cleanup-output.pl; \ @@ -92,7 +93,12 @@ rm -rf testsuite rm -f $(TEST_ARCHIVE) $(XSLTTEST_RESULTS_ARCHIVE) $(MSTEST_RESULTS_ARCHIVE) -create-reference-output : clean-xslttest xslttest.exe +# Check that we are running on MS.NET - otherwise the reference output can be +# created on mono - and we will compare mono with mono +must-be-dotnet: + uname | grep CYGWIN + +create-reference-output : must-be-dotnet clean-xslttest xslttest.exe ./xslttest.exe --generate ./xslttest.exe --list output.lst zip xslttest-reference-output.zip -@ output.lst ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Problem with DbDataAdapter...
You're patch has nothing changes... I get always the same error... With the postgresql app... I can now login... but there's plenty of bugs inside... I think the best solution is to get an older version of Mono! Why do you include a patch if there's compatibility problems with data providers!!! thanks Le Mardi 17 Mai 2005 16:26, vous avez écrit : Hello again, Seems that Oracle provider does not initialize at all some columns in SchemaTable. The attached patch fixes that in a generic way. Regards, Konstantin Triger Hubert FONGARNAND wrote: I've applied your patch... It corrects the problem with my postgresql app... but i get always an error with the same app with oracle : System.IndexOutOfRangeException: Array index is out of range. in 0x00067 System.Data.DataRow:get_Item (System.String columnName, DataRowVersion version) in 0x00015 System.Data.DataRow:get_Item (System.String columnName) in 0x00495 System.Data.Common.DbDataAdapter:BuildSchema (IDataReader reader, System.Data.DataTable table, SchemaType schemaType, MissingSchemaAction missingSchAction, MissingMappingAction missingMapAction, System.Data.Common.DataTableMappingCollection dtMapping) in 0x00059 System.Data.Common.DbDataAdapter:BuildSchema (IDataReader reader, System.Data.DataTable table, SchemaType schemaType) in (wrapper remoting-invoke-with-check) System.Data.Common.DbDataAdapter:BuildSchema (System.Data.IDataReader,System.Data.DataTable,System.Data.SchemaType) in 0x00087 System.Data.Common.DbDataAdapter:FillTable (System.Data.DataTable dataTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, System.Int32 counter) in (wrapper remoting-invoke-with-check) System.Data.Common.DbDataAdapter:FillTable (System.Data.DataTable,System.Data.IDataReader,int,int,int) in 0x00117 System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet dataSet, System.String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) in 0x000ce System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet dataSet, Int32 startRecord, Int32 maxRecords, System.String srcTable, IDbCommand command, CommandBehavior behavior) in 0x00036 System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet dataSet, System.String srcTable) in (wrapper remoting-invoke-with-check) System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet,string) in 0x00121 MoteurCRM.CProfil:RetourneGroupeCommercial (System.String cnxstring, System.String televendeur_Id) in 0x007e7 FicheClient.Logon:btnValider_Click (System.Object sender, System.EventArgs e) in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs) Thanks... Le Mardi 17 Mai 2005 12:09, Konstantin Triger a écrit : Agreed, but in fact the provider should set the defaults, not the DataAdapter :-). Regards, Konstantin Triger Sureshkumar T wrote: + bool allowDBNull = value is bool ? (bool)value : false; default allowDBNull should be true ;-) suresh. ___ Ce message et les éventuels documents joints peuvent contenir des informations confidentielles. Au cas où il ne vous serait pas destiné, nous vous remercions de bien vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite. Les communications sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas assurée et la société émettrice ne peut être tenue pour responsable de son contenu. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Ce message et les éventuels documents joints peuvent contenir des informations confidentielles. Au cas où il ne vous serait pas destiné, nous vous remercions de bien vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite. Les communications sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas assurée et la société émettrice ne peut être tenue pour responsable de son contenu. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Problem with DbDataAdapter...
Hello Hubert, I'm completely agree that bugs are a bad thing, that's why I'm here to help you as soon as possible. The reason the DataAdapter code has changed is to solve other bugs, and the solution required some cooperation from providers too. Unfortunately it's not simple to make a complete testing over all the providers, so I do expect for some number of issues, but believe that with yours and others help we will stabilize the code very fast. I would like to ask you several questions: 1. Does your PG app work? If not, can you send the stack traces/code samples of the problems? 2. What is your current problem with Oracle? Can you please send a stack? (It cannot be the same one because in my latest patch I removed the calls to System.Data.DataRow:get_Item (System.String columnName) from the BuildSchema). 3. If it's possible, can you send your entire app, so I'll test it here? (The confidentiality will be ensured). Thank you in advance for your patience and cooperation. Regards, Konstantin Triger Hubert FONGARNAND wrote: You're patch has nothing changes... I get always the same error... With the postgresql app... I can now login... but there's plenty of bugs inside... I think the best solution is to get an older version of Mono! Why do you include a patch if there's compatibility problems with data providers!!! thanks Le Mardi 17 Mai 2005 16:26, vous avez écrit : Hello again, Seems that Oracle provider does not initialize at all some columns in SchemaTable. The attached patch fixes that in a generic way. Regards, Konstantin Triger Hubert FONGARNAND wrote: I've applied your patch... It corrects the problem with my postgresql app... but i get always an error with the same app with oracle : System.IndexOutOfRangeException: Array index is out of range. in 0x00067 System.Data.DataRow:get_Item (System.String columnName, DataRowVersion version) in 0x00015 System.Data.DataRow:get_Item (System.String columnName) in 0x00495 System.Data.Common.DbDataAdapter:BuildSchema (IDataReader reader, System.Data.DataTable table, SchemaType schemaType, MissingSchemaAction missingSchAction, MissingMappingAction missingMapAction, System.Data.Common.DataTableMappingCollection dtMapping) in 0x00059 System.Data.Common.DbDataAdapter:BuildSchema (IDataReader reader, System.Data.DataTable table, SchemaType schemaType) in (wrapper remoting-invoke-with-check) System.Data.Common.DbDataAdapter:BuildSchema (System.Data.IDataReader,System.Data.DataTable,System.Data.SchemaType) in 0x00087 System.Data.Common.DbDataAdapter:FillTable (System.Data.DataTable dataTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, System.Int32 counter) in (wrapper remoting-invoke-with-check) System.Data.Common.DbDataAdapter:FillTable (System.Data.DataTable,System.Data.IDataReader,int,int,int) in 0x00117 System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet dataSet, System.String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) in 0x000ce System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet dataSet, Int32 startRecord, Int32 maxRecords, System.String srcTable, IDbCommand command, CommandBehavior behavior) in 0x00036 System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet dataSet, System.String srcTable) in (wrapper remoting-invoke-with-check) System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet,string) in 0x00121 MoteurCRM.CProfil:RetourneGroupeCommercial (System.String cnxstring, System.String televendeur_Id) in 0x007e7 FicheClient.Logon:btnValider_Click (System.Object sender, System.EventArgs e) in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs) Thanks... Le Mardi 17 Mai 2005 12:09, Konstantin Triger a écrit : Agreed, but in fact the provider should set the defaults, not the DataAdapter :-). Regards, Konstantin Triger Sureshkumar T wrote: + bool allowDBNull = value is bool ? (bool)value : false; default allowDBNull should be true ;-) suresh. ___ Ce message et les éventuels documents joints peuvent contenir des informations confidentielles. Au cas où il ne vous serait pas destiné, nous vous remercions de bien vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite. Les communications sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas assurée et la société émettrice ne peut être tenue pour responsable de son contenu. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Ce message et les éventuels documents joints peuvent contenir des informations
[Mono-devel-list] Re: Problem with DbDataAdapter...
Hubert, You're patch has nothing changes... I get always the same error... With the postgresql app... I can now login... but there's plenty of bugs inside... I think the best solution is to get an older version of Mono! Why do you include a patch if there's compatibility problems with data providers!!! So why do you update from SVN if you *expect* regression-free code??? Stop moaning, rethink your update policy and help the developers to fix the bugs! ;-) Rob ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] xslttest patch
Hi, Atsushi. This is what I've got so far. I think I made all the changes we discussed, but have no time to run it today. It compiles, but I don't know more than that. So please see this patch as a draft, tomorrow I'll continue from this place. If you have any comments - let me know. Thanks, Andrew. Index: Makefile === --- Makefile (revision 44628) +++ Makefile (working copy) @@ -1,99 +1,76 @@ # -# make prepares automated download and build for both existing xslttest -# and MainSoft tests. +# make prepares automated download and build for all tests. # # make run-test executes both existing xslttest and MainSoft's new test # and reports the total diff numbers: # -# - For xslttest, it is TestResult.xml and -# - For MainSoft test, it is diffreport.txt +# - For xslttest, it is TestResult.xml and the list of the failed tests +# is in failed.lst # -RUNTIME = mono --debug +.SUFFIXES: .cs .exe + +RUNTIME = mono CSCOMPILE = mcs -TESTS = testsuite/TESTS/Xalan_Conformance_Tests/whitespace/whitespace35.xsl -TARGET_RESULTS = Results -MSTEST_RESULTS = testsuite/TESTS/ExpectedResults + TEST_ARCHIVE = xslt-testsuite-03.ZIP -XSLTTEST_RESULTS_ARCHIVE = xslttest-reference-output.zip -MSTEST_RESULTS_ARCHIVE = mono-xslttest-ExpectedResults-20050214.zip +CATALOG = testsuite/TESTS/catalog.xml +FIXED_CATALOG = testsuite/TESTS/catalog-fixed.xml -test : xslttest.exe alltest.exe prepare +TEST_EXE = xslttest.exe +TEST_FLAGS = --report:TestResult.xml --xml --details --outall $(TEST_DOM) -prepare : $(TESTS) prepare-xslt prepare-mstest +ifdef TEST_DOM +REFERENCE_RESULTS_NAME = domresults +else +REFERENCE_RESULTS_NAME = results +endif +REFERENCE_RESULTS_ARCHIVE = xslt-reference-$(REFERENCE_RESULTS_NAME).tar.gz +REFERENCE_RESULTS_URL = http://svn.myrealbox.com/source/trunk/release/$(REFERENCE_RESULTS_ARCHIVE) +REFERENCE_RESULTS = $(REFERENCE_RESULTS_NAME)/timestamp -prepare-xslt : xslttest.exe $(XSLTTEST_RESULTS) testsuite/TESTS/catalog-fixed.xml +test : $(TEST_EXE) $(FIXED_CATALOG) $(REFERENCE_RESULTS) -prepare-mstest : alltest.exe $(MSTEST_RESULTS) testsuite/TESTS/catalog-fixed.xml +run-test : $(TEST_EXE) $(FIXED_CATALOG) + # Redirect stdout to /dev/null because it has only xsl:message garbage + $(RUNTIME) $(RUNTIME_FLAGS) $(TEST_EXE) $(TEST_FLAGS) /dev/null -xslttest.exe : xslttest.cs - $(CSCOMPILE) xslttest.cs +clean : + rm -f TestResult.xml failed.lst missing.lst + rm -f $(TEST_EXE) -xmlnorm.exe : XmlNormalizer.cs - $(CSCOMPILE) XmlNormalizer.cs -out:xmlnorm.exe +# Be careful to use it! +distclean : clean + rm -rf testsuite + rm -f $(TEST_ARCHIVE) $(REFERENCE_RESULTS_ARCHIVE) $(REFERENCE_LIST) -alltest.exe : alltest.cs - $(CSCOMPILE) alltest.cs +# Check that we are running on MS.NET - otherwise the reference output can be +# created on mono - and we will compare mono with mono +must-be-dotnet: + uname | grep CYGWIN + +create-reference-output : must-be-dotnet $(TEST_EXE) + ./$(TEST_EXE) $(TEST_DOM) --generate=$(REFERENCE_RESULTS_NAME) + tar -czf $(REFERENCE_RESULTS_ARCHIVE) $(REFERENCE_RESULTS_NAME) + echo Now you can upload $(REFERENCE_RESULTS_ARCHIVE) to $(REFERENCE_RESULTS_URL) -testsuite/TESTS/catalog-fixed.xml : testsuite/TESTS/catalog.xml catalog.sed - sed -f catalog.sed testsuite/TESTS/catalog.xml testsuite/TESTS/catalog-fixed.xml +.cs.exe : + $(CSCOMPILE) $ -$(TESTS) : $(TEST_ARCHIVE) +$(FIXED_CATALOG) : $(CATALOG) catalog.sed + sed -f catalog.sed $(CATALOG) $(FIXED_CATALOG) + +$(CATALOG) : $(TEST_ARCHIVE) unzip -un $(TEST_ARCHIVE) - touch $(TESTS) + touch $(CATALOG) -$(XSLTTEST_RESULTS) : $(XSLTTEST_RESULTS_ARCHIVE) - unzip -n -d $(XSLTTEST_RESULTS_ARCHIVE) - touch $(XSLTTEST_RESULTS) - -$(MSTEST_RESULTS) : $(MSTEST_RESULTS_ARCHIVE) - unzip -n -d testsuite/TESTS $(MSTEST_RESULTS_ARCHIVE) - touch $(MSTEST_RESULTS) - $(TEST_ARCHIVE) : wget http://www.oasis-open.org/committees/download.php/9584/$(TEST_ARCHIVE) -$(XSLTTEST_RESULTS_ARCHIVE) : - wget http://monkey.workarea.jp/mono/xml/$(XSLTTEST_RESULTS_ARCHIVE) +$(REFERENCE_RESULTS) : $(REFERENCE_RESULTS_ARCHIVE) + tar -xzf $ + touch $@ -$(MSTEST_RESULTS_ARCHIVE) : - wget http://monkey.workarea.jp/mono/xml/$(MSTEST_RESULTS_ARCHIVE) +$(REFERENCE_RESULTS_ARCHIVE) : + wget $(REFERENCE_RESULTS_URL) -run-test : run-test-xslt run-test-ms - -run-test-xslt : xslttest.exe testsuite/TESTS/catalog-fixed.xml - # Redirect stdout to /dev/null because it has only xsl:message garbage - $(RUNTIME) $(RUNTIME_FLAGS) xslttest.exe --report:TestResult.xml --xml --details --outall /dev/null - -run-test-ms : alltest.exe xmlnorm.exe testsuite/TESTS/catalog-fixed.xml - $(RUNTIME) $(RUNTIME_FLAGS) ./alltest.exe $(TARGET_RESULTS) - mono ./xmlnorm.exe -s testsuite/TESTS/$(TARGET_RESULTS) testsuite/TESTS/norm-tmp - rm -rf testsuite/TESTS/$(TARGET_RESULTS) - mv testsuite/TESTS/norm-tmp testsuite/TESTS/$(TARGET_RESULTS) - diff -r -q testsuite/TESTS/ExpectedResults testsuite/TESTS/$(TARGET_RESULTS)
[Mono-devel-list] [Patch] AssemblyName changes
Hey there, I made some changes to at icall.c and AssemblyName.cs to correct some incorrect behavior of AssemblyName class. With these changes, all the tests at AssemblyNameTest.cs run ok, and I even could make a bootstrap. Any comment? Carlos. Index: icall.c === --- icall.c (revisin: 44715) +++ icall.c (copia de trabajo) @@ -3477,11 +3477,14 @@ ves_icall_System_Reflection_Assembly_GetReferencedAssemblies (MonoReflectionAssembly *assembly) { static MonoClass *System_Reflection_AssemblyName; + static MonoClass *System_Version; MonoArray *result; MonoDomain *domain = mono_object_domain (assembly); int i, count = 0; static MonoMethod *create_culture = NULL; + static MonoMethod *create_version = NULL; MonoTableInfo *t; + gpointer args [4]; MONO_ARCH_SAVE_REGS; @@ -3489,6 +3492,12 @@ System_Reflection_AssemblyName = mono_class_from_name ( mono_defaults.corlib, System.Reflection, AssemblyName); + if (!System_Version) { + System_Version = mono_class_from_name ( +mono_defaults.corlib, System, Version); + g_assert (System_Version); + } + t = assembly-assembly-image-tables [MONO_TABLE_ASSEMBLYREF]; count = t-rows; @@ -3502,6 +3511,13 @@ mono_method_desc_free (desc); } + if (count 0 !create_version) { + MonoMethodDesc *desc = mono_method_desc_new (:.ctor(int,int,int,int), FALSE); + create_version = mono_method_desc_search_in_class (desc, System_Version); + g_assert (create_version); + mono_method_desc_free (desc); + } + for (i = 0; i count; i++) { MonoAssembly *assem; MonoReflectionAssemblyName *aname; @@ -3530,6 +3546,13 @@ aname-flags = assem-aname.flags; aname-versioncompat = 1; /* SameMachine (default) */ + args [0] = assem-aname.major; + args [1] = assem-aname.minor; + args [2] = assem-aname.build; + args [3] = assem-aname.revision; + aname-version = mono_object_new (domain, System_Version); + mono_runtime_invoke (create_version, aname-version, args, NULL); + if (create_culture) { gpointer args [1]; args [0] = mono_string_new (domain, assem-aname.culture); @@ -3929,8 +3952,11 @@ static void fill_reflection_assembly_name (MonoDomain *domain, MonoReflectionAssemblyName *aname, MonoAssemblyName *name, const char *absolute) { + static MonoClass *System_Version = NULL; static MonoMethod *create_culture = NULL; + static MonoMethod *create_version = NULL; gpointer args [1]; + gpointer vargs [4]; guint32 pkey_len; const char *pkey_ptr; gchar *codebase; @@ -3944,6 +3970,25 @@ aname-revision = name-revision; aname-hashalg = name-hash_alg; + if (!System_Version) { + System_Version = mono_class_from_name (mono_defaults.corlib, System, Version); + g_assert (System_Version); + } + + if (!create_version) { + MonoMethodDesc *desc = mono_method_desc_new (:.ctor(int,int,int,int), FALSE); + create_version = mono_method_desc_search_in_class (desc, System_Version); + g_assert (create_version); + mono_method_desc_free (desc); + } + + vargs [0] = aname-major; + vargs [1] = aname-minor; + vargs [2] = aname-build; + vargs [3] = aname-revision; + aname-version = mono_object_new (domain, System_Version); + mono_runtime_invoke (create_version, aname-version, vargs, NULL); + codebase = g_filename_to_uri (absolute, NULL, NULL); if (codebase) { aname-codebase = mono_string_new (domain, codebase); Index: AssemblyName.cs === --- AssemblyName.cs (revisin: 44717) +++ AssemblyName.cs (copia de trabajo) @@ -123,7 +123,7 @@ return null; StringBuilder fname = new StringBuilder (); fname.Append (name); -if (Version.ToString () != 0.0.0.0) { +if (Version != null) { fname.Append (, Version=); fname.Append (Version.ToString ()); } @@ -160,27 +160,19 @@ public Version Version { get { -if (version != null) return version; - -if (name == null) - return null; -if (build == -1) - version = new Version (major, minor); -else - if (revision == -1) - version = new Version (major, minor, build); -else - version = new Version (major, minor, build, revision); - return version; } set { -major = value.Major; -minor = value.Minor; -build = value.Build; -revision = value.Revision; version = value; +if (value == null) + major = minor = build = revision = 0; +else { + major = value.Major; + minor = value.Minor; + build = value.Build; + revision = value.Revision; +} } } @@ -272,6 +264,7 @@ an.minor = minor; an.build = build; an.revision = revision; + an.version = version != null ? (Version) version.Clone () : null; an.cultureinfo = cultureinfo; an.flags = flags; an.hashalg = hashalg; ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com
Re: [Mono-devel-list] [Patch] AssemblyName changes
On Wed, 2005-05-18 at 17:25 -0500, Carlos Alberto Cortez wrote: Hey there, I made some changes to at icall.c and AssemblyName.cs to correct some incorrect behavior of AssemblyName class. With these changes, all the tests at AssemblyNameTest.cs run ok, and I even could make a bootstrap. Any comment? + an.version = version != null ? (Version) version.Clone () : null; version is a readonly class (modifications can not be made to an existing Version. So the clone thing is totally unneeded. Does this fix http://bugzilla.ximian.com/show_bug.cgi?id=59891 -- Ben ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] [Patch] AssemblyName changes
Hey, I noticed this too, but in the MS impl, a new Version instance is created. We could however, use the same. Carlos. El mi, 18-05-2005 a las 18:25 -0400, Ben Maurer escribi: On Wed, 2005-05-18 at 17:25 -0500, Carlos Alberto Cortez wrote: Hey there, I made some changes to at icall.c and AssemblyName.cs to correct some incorrect behavior of AssemblyName class. With these changes, all the tests at AssemblyNameTest.cs run ok, and I even could make a bootstrap. Any comment? + an.version = version != null ? (Version) version.Clone () : null; version is a readonly class (modifications can not be made to an existing Version. So the clone thing is totally unneeded. Does this fix http://bugzilla.ximian.com/show_bug.cgi?id=59891 -- Ben ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] Current Mono Version
Hi guys, I've just signed up to the lists, and was wondering what version the unstable nightly source code is at at the minute, as I can't seem to find it anywhere...? Is it even kept up to date with a specific version number along the same kind of roadmap as the stable releases, or does it not have one? (If I've missed it in a really obvious location, please let me know :-) Also, what is the state of play with the DotNet 2.0 feature list being implemented within Mono so far? I'm just interested to find out what's been done already, and what's still to do on that side of things :-) Sorry for the noob questions, thanks for any help you can offer. Regards, -= El =- ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Patch for generating debug info in System.Reflection.Emit
Miguel asked me to look at the memory impact of this patch. My only complaint is the amount of boxing that goes on in the sequence-point list. Can you turn this into an array of structs that you grow youself? As far as I can tell, the list of sequence points is kept in memory for *all* methods until the debug info is emitted. However, as far as I know, this happens in many other places (eg, ILGenerator's are kept for all members until the assembly is saved). So, this is probably ok. -- Ben ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Current Mono Version
On Thu, 2005-05-19 at 01:49 +0100, El Draper wrote: Hi guys, I've just signed up to the lists, and was wondering what version the unstable nightly source code is at at the minute, as I can't seem to find it anywhere...? The current version is kept in configure.in -- Ben ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] Raw socket sniffer with Mono on Linux
Hi, I got an exception when doing socket.IOControl(SIO_RCVALL, IN, OUT) with Mono on Linux, It works well on Windows platform, It seems int SIO_RCVALL = unchecked((int)0x9801) is not in Linux ioctl_list, How can I fix the code below to work on Linux? Thanks. //This file contains the RawSocket class. The goal of this class is to have a generic packet //sniffing kind of class that fires events when an incoming IP packet is received. The event //gives the user access to everything contained in the IP packet and hopefully makes creating //your own packet sniffer quite easy. The event args returned with the event give the user of //the class access to things like the from and to IP address, ports, protocol, etc. and even the //contents of the message in the form of a byte array. namespace ReceiveAll { using System; using System.Net; using System.Net.Sockets; using System.Runtime.InteropServices; [StructLayout(LayoutKind.Explicit)] public struct IPHeader { [FieldOffset(0)] public byteip_verlen; //IP version and IP Header length Combined [FieldOffset(1)] public byteip_tos; //Type of Service [FieldOffset(2)] public ushort ip_totallength; //Total Packet Length [FieldOffset(4)] public ushort ip_id; //Unique ID [FieldOffset(6)] public ushort ip_offset; //Flags and Offset [FieldOffset(8)] public byteip_ttl; //Time To Live [FieldOffset(9)] public byteip_protocol; //Protocol (TCP, UDP, ICMP, Etc.) [FieldOffset(10)] public ushort ip_checksum; //IP Header Checksum [FieldOffset(12)] public uint ip_srcaddr; //Source IP Address [FieldOffset(16)] public uint ip_destaddr; //Destination IP Address } public class RawSocket { private bool error_occurred; public bool KeepRunning; private static int len_receive_buf; byte [] receive_buf_bytes; private Socket socket = null; public RawSocket() { error_occurred=false; len_receive_buf = 4096; receive_buf_bytes = new byte[len_receive_buf]; } public void CreateAndBindSocket(string IP) { socket = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.IP); socket.Blocking = false; socket.Bind(new IPEndPoint(IPAddress.Parse(IP), 0)); if (SetSocketOption()==false) error_occurred=true; } public void Shutdown() { if(socket != null) { socket.Shutdown(SocketShutdown.Both); socket.Close(); } } private bool SetSocketOption() { bool ret_value = true; try { socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.HeaderIncluded, 1); byte []IN = new byte[4]{1, 0, 0, 0}; byte []OUT = new byte[4]; int SIO_RCVALL = unchecked((int)0x9801); int ret_code = socket.IOControl(SIO_RCVALL, IN, OUT); ret_code = OUT[0] + OUT[1] + OUT[2] + OUT[3]; if(ret_code != 0) ret_value = false; } catch(SocketException) { ret_value = false; } return ret_value; } public bool ErrorOccurred { get { return error_occurred; } } unsafe private void Receive(byte [] buf, int len) { byte temp_protocol=0; uint temp_version=0; uint temp_ip_srcaddr=0; uint temp_ip_destaddr=0; short temp_srcport=0; short temp_dstport=0; IPAddress temp_ip; PacketArrivedEventArgs e=new PacketArrivedEventArgs(); fixed(byte *fixed_buf = buf) { IPHeader * head = (IPHeader *) fixed_buf; e.HeaderLength=(uint)(head-ip_verlen 0x0F)