diff options
81 files changed, 618 insertions, 467 deletions
diff --git a/ChangeLog b/ChangeLog index 784b767dcf9..cd83c2e4c33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2004-07-27 John Merryweather Cooper <john_m_cooper@yahoo.com> + * configure.in: Disable __thread test (TLS) for FreeBSD as + it succeeds on FreeBSD 5.x when it should fail. Fix pthread + library detection for FreeBSD 4.x since pthread is embedded + in libc_r on this platform. Fix some typos in my host + regexes for freebsd. + +2004-07-23 Dick Porter <dick@ximian.com> + + * configure.in: Changes for FreeBSD thread support by John + Merryweather Cooper <john_m_cooper@yahoo.com>. + 2004-07-03 Zoltan Varga <vargaz@freemail.hu> * configure.in: Add --with-tls option to replace the misnamed diff --git a/configure.in b/configure.in index 962304855f6..9e5f7d431e8 100644 --- a/configure.in +++ b/configure.in @@ -67,7 +67,62 @@ case "$host" in libdl= libgc_threads=no ;; - *-*-*freebsd*|*-*-*openbsd*) +# these flags will work for all versions of -STABLE +# + *-*-*freebsd4*) + platform_win32=no + if test "x$PTHREAD_CFLAGS" = "x"; then + CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS" + libmono_cflags="-D_THREAD_SAFE" + else + CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS" + libmono_cflags="$PTHREAD_CFLAGS" + fi + if test "x$PTHREAD_LIBS" = "x"; then + LDFLAGS="$LDFLAGS -pthread" + libmono_ldflags="-pthread" + else + LDFLAGS="$LDFLAGS $PTHREAD_LIBS" + libmono_ldflags="$PTHREAD_LIBS" + fi + need_link_unlink=yes + AC_DEFINE(PTHREAD_POINTER_ID) + libdl= + libgc_threads=pthreads +# TLS isn't implemented at all on -STABLE + with_nptl=no + with_tls=pthread + ;; +# older versions of -CURRENT will break with these flags but testing +# indicates these older versions won't run Mono anyway +# + *-*-*freebsd5*) + platform_win32=no + if test "x$PTHREAD_CFLAGS" = "x"; then + CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS" + libmono_cflags= + else + CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS" + libmono_cflags="$PTHREAD_CFLAGS" + fi + if test "x$PTHREAD_LIBS" = "x"; then + LDFLAGS="$LDFLAGS -lpthread" + libmono_ldflags="-lpthread" + else + LDFLAGS="$LDFLAGS $PTHREAD_LIBS" + libmono_ldflags="$PTHREAD_LIBS" + fi + need_link_unlink=yes + AC_DEFINE(PTHREAD_POINTER_ID) + libdl= + libgc_threads=pthreads +# TLS is only partially implemented on -CURRENT (compiler support +# but NOT library support) +# + with_nptl=no + with_tls=pthread + ;; + *-*-*openbsd*) platform_win32=no CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS" libmono_cflags="-D_THREAD_SAFE" @@ -653,7 +708,17 @@ if test x$platform_win32 = xno; then dnl ***************************** dnl *** Checks for libpthread *** dnl ***************************** - AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread") +# on FreeBSD -STABLE, the pthreads functions all reside in libc_r +# and libpthread does not exist +# + case "${host}" in + *-*-*freebsd4*) + AC_CHECK_LIB(pthread, main, LIBS="$LIBS -pthread") + ;; + *) + AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread") + ;; + esac AC_CHECK_HEADERS(pthread.h) AC_CHECK_FUNCS(pthread_mutex_timedlock) AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np) diff --git a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/ChangeLog b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/ChangeLog index bcf7dd8b1f8..42df9e1632a 100644 --- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/ChangeLog +++ b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/ChangeLog @@ -1,3 +1,7 @@ +2004-06-30 Umadevi S <sumadevi@novell.com> + * Tds.cs - In the NextResult method handling TdsPacketSubType. TableName. + + 2004-04-22 Sebastien Pouliot <sebastien@ximian.com> * Tds70.cs: Updated to match changes in Mono.Security.dll. diff --git a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs index 1a917399a3f..e1cf4697ee7 100644 --- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs +++ b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs @@ -293,6 +293,12 @@ namespace Mono.Data.Tds.Protocol { break; case TdsPacketSubType.TableName: + // done = true; + peek = Comm.Peek (); + done = (peek != (byte) TdsPacketSubType.ColumnDetail); + + break; + case TdsPacketSubType.ColumnDetail: done = true; break; default: diff --git a/mcs/class/System.Data/System.Data.Common/ChangeLog b/mcs/class/System.Data/System.Data.Common/ChangeLog index 6eab05f5fde..0db883a625e 100755 --- a/mcs/class/System.Data/System.Data.Common/ChangeLog +++ b/mcs/class/System.Data/System.Data.Common/ChangeLog @@ -1,7 +1,4 @@ -2004-07-07 Umadevi S <sumadevi@novell.com> - * DataContainer.cs :CheckedforNull before calling the relavant setmethods in each of the - SetItemForDataRecord method for the DateTimeClass - 2004-06-24 Atsushi Enomoto <atsushi@ximian.com> +2004-06-24 Atsushi Enomoto <atsushi@ximian.com> * DataColumnMappingCollection.cs : fixed typo. * DbDataAdapter.cs : column mappings were not filled. diff --git a/mcs/class/System.Data/System.Data.Common/DataContainer.cs b/mcs/class/System.Data/System.Data.Common/DataContainer.cs index de0d64bc598..5b627d7d8ba 100644 --- a/mcs/class/System.Data/System.Data.Common/DataContainer.cs +++ b/mcs/class/System.Data/System.Data.Common/DataContainer.cs @@ -1098,8 +1098,8 @@ namespace System.Data.Common { // if exception thrown, it should be caught // in the caller method - if (!CheckAndSetNull(index,record,field)) - base.SetValue(index,record.GetDateTime(field)); + base.SetValue(index,record.GetDateTime(field)); + base.SetItemFromDataRecord(index,record,field); } internal override int CompareValues(int index1, int index2) diff --git a/mcs/class/System.Data/System.Data.Odbc/ChangeLog b/mcs/class/System.Data/System.Data.Odbc/ChangeLog index fc8ee0c9ec0..d8581c1975b 100644 --- a/mcs/class/System.Data/System.Data.Odbc/ChangeLog +++ b/mcs/class/System.Data/System.Data.Odbc/ChangeLog @@ -1,13 +1,3 @@ -2004-07-07 Umadevi S (sumadevi@novell.com) - * OdbcConnection.cs - Allowed Close to be called multiple times - - Implementation of Dispose method - -2004-07-07 Umadevi S (sumadevi@novell.com) - * OdbcCommand.cs : fixed set method for Transaction - -2004-07-01 Sureshkumar T (tsureshkumar@novell.com) - * OdbcCommand.cs : fixed reader problem with ExecuteScalar - 2004-06-23 Sureshkumar T (tsureshkumar@novell.com) * OdbcConnection.cs: Fix: Moved env allocation to Open method. Disconnection & freeing handles are done in Close diff --git a/mcs/class/System.Data/System.Data.Odbc/OdbcCommand.cs b/mcs/class/System.Data/System.Data.Odbc/OdbcCommand.cs index c414b38fee0..fe242f3bf8f 100644 --- a/mcs/class/System.Data/System.Data.Odbc/OdbcCommand.cs +++ b/mcs/class/System.Data/System.Data.Odbc/OdbcCommand.cs @@ -223,14 +223,7 @@ namespace System.Data.Odbc return (IDbTransaction) Transaction;
}
set {
- if (value is OdbcTransaction) - { - Transaction = (OdbcTransaction)value; - } - else - { - throw new ArgumentException (); - } + throw new NotImplementedException ();
}
}
@@ -349,12 +342,11 @@ namespace System.Data.Odbc public object ExecuteScalar ()
{
- object val = null;
+ object val;
OdbcDataReader reader=ExecuteReader();
try
{
- if (reader.Read ())
- val=reader[0];
+ val=reader[0];
}
finally
{
diff --git a/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs b/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs index 919ee0606d7..e6bd6ff0441 100644 --- a/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs +++ b/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs @@ -46,7 +46,6 @@ namespace System.Data.Odbc int connectionTimeout; internal OdbcTransaction transaction; IntPtr henv=IntPtr.Zero, hdbc=IntPtr.Zero; - bool disposed = false; #endregion @@ -217,6 +216,8 @@ namespace System.Data.Odbc transaction = null; } + else + throw new InvalidOperationException (); } public OdbcCommand CreateCommand () @@ -230,23 +231,10 @@ namespace System.Data.Odbc throw new NotImplementedException (); } + [MonoTODO] protected override void Dispose (bool disposing) - { - if (!this.disposed) { - try - { - // release the native unmananged resources - this.Close(); - this.disposed = true; - } - finally - { - // call Dispose on the base class - base.Dispose(disposing); - } - } - } - + { + } [MonoTODO] object ICloneable.Clone () diff --git a/mcs/class/System.Data/System.Data.SqlClient/ChangeLog b/mcs/class/System.Data/System.Data.SqlClient/ChangeLog index 14efc7d3b1e..5576c7f7c6b 100755 --- a/mcs/class/System.Data/System.Data.SqlClient/ChangeLog +++ b/mcs/class/System.Data/System.Data.SqlClient/ChangeLog @@ -1,3 +1,7 @@ +2004-06-30 Umadevi S <sumadevi@novell.com> + * SqlCommand.cs : In the Execute Method the commandbehavior parameters were ignored correct +these + 2004-06-22 Atsushi Enomoto <atsushi@ximian.com> * SqlCommandBuilder.cs : Avoid cast exception caused by DbNull. diff --git a/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs b/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs index 366b381b54d..21978c14cf2 100644 --- a/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs +++ b/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs @@ -268,8 +268,8 @@ namespace System.Data.SqlClient { { TdsMetaParameterCollection parms = Parameters.MetaParameters; if (preparedStatement == null) { - bool schemaOnly = ((CommandBehavior & CommandBehavior.SchemaOnly) > 0); - bool keyInfo = ((CommandBehavior & CommandBehavior.KeyInfo) > 0); + bool schemaOnly = ((behavior & CommandBehavior.SchemaOnly) > 0); + bool keyInfo = ((behavior & CommandBehavior.KeyInfo) > 0); StringBuilder sql1 = new StringBuilder (); StringBuilder sql2 = new StringBuilder (); diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog b/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog index 8df7a0151f2..bd7b77d4f19 100644 --- a/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog +++ b/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog @@ -1,8 +1,3 @@ -2004-07-01 Sureshkumar T <tsureshkumar@novell.com> - * Added test case for OdbcCommand.ExecuteScalar Method - * New files: - OdbcCommandTest.cs - test suite for OdbcCommand class. - 2004-06-23 Sureshkumar T <TSureshkumar@novell.com> * Added test to check whether the OdbcConnection.Close method closes all the handles. diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs deleted file mode 100644 index 8b3968c7062..00000000000 --- a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs +++ /dev/null @@ -1,70 +0,0 @@ -//
-// OdbcCommandTest.cs - NUnit Test Cases for testing the
-// OdbcCommand class
-//
-// Author:
-// Sureshkumar T (TSureshkumar@novell.com)
-//
-// Copyright (c) 2004 Novell Inc., and the individuals listed
-// on the ChangeLog entries.
-//
-// 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.Data;
-using System.Data.Odbc;
-
-using NUnit.Framework;
-
-namespace MonoTests.System.Data.Odbc
-{
-
- [TestFixture]
- public class OdbcCommandTest : MySqlOdbcBaseClient
- {
-
- [SetUp]
- public void GetReady () {
- OpenConnection ();
- CreateTestSetup (); // create database & test tables
- }
-
- [TearDown]
- public void Clean () {
- CleanTestSetup (); // clean test database;
- CloseConnection ();
- }
-
- /// <summary>
- /// Test Execute Scalar Method
- /// </summary>
- [Test]
- public void ExecuteScalarTest ()
- {
- OdbcCommand cmd = conn.CreateCommand ();
- string query = "select count(*) from test order by col_int;";
- cmd.CommandText = query;
- object objCount = cmd.ExecuteScalar ();
- Assertion.AssertEquals( "ExecuteScalar does not return int type", 5, Convert.ToInt32(objCount));
- }
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/ChangeLog b/mcs/class/System.Drawing/System.Drawing/ChangeLog index ee4e72e3e57..941f5db4a6c 100644 --- a/mcs/class/System.Drawing/System.Drawing/ChangeLog +++ b/mcs/class/System.Drawing/System.Drawing/ChangeLog @@ -1,7 +1,3 @@ -2004-07-02 Jordi Mas i Hernandez <jordi@ximian.com> - - * gdipFunctions.cs: fixes bug 61050 - 2004-06-24 Sanjay Gupta <gsanjay@novell.com> * ImageAnimator.cs: Rewrote complete implementation. diff --git a/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs b/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs index 5244cd50235..8db7223a85c 100644 --- a/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs +++ b/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs @@ -1418,11 +1418,7 @@ namespace System.Drawing { public Stream stream; - public GdiPlusStreamHelper (Stream s) - { - stream = s; - stream.Seek(0, SeekOrigin.Begin); - } + public GdiPlusStreamHelper (Stream s) { stream = s; } public int StreamGetBytesImpl (IntPtr buf, int bufsz, bool peek) { diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/ChangeLog b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/ChangeLog index 0c9e3f66918..c2ea35962b2 100644 --- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/ChangeLog +++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/ChangeLog @@ -1,9 +1,3 @@ -2004-07-06 Lluis Sanchez Gual <lluis@ximian.com> - - * SoapMessageFormatter.cs: In BuildMethodCallFromSoapMessage, set get the - parameters from the SoapMessage by position, not by name, since names - may be different. This fixes bug #60427. - 2004-06-16 Lluis Sanchez Gual <lluis@ximian.com> * SoapServerFormatterSink.cs: Removed unneded method. diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/SoapMessageFormatter.cs b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/SoapMessageFormatter.cs index c4624a89246..e0508f1cb82 100644 --- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/SoapMessageFormatter.cs +++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/SoapMessageFormatter.cs @@ -222,21 +222,21 @@ namespace System.Runtime.Remoting.Channels { // have to add them here
_methodCallParameters = _methodCallInfo.GetParameters();
object[] args = new object[_methodCallParameters.Length];
- int sn = 0;
- for (int n=0; n<_methodCallParameters.Length; n++)
+
+ foreach(ParameterInfo paramInfo in _methodCallParameters)
{
- ParameterInfo paramInfo = _methodCallParameters [n];
Type paramType = (paramInfo.ParameterType.IsByRef ? paramInfo.ParameterType.GetElementType() : paramInfo.ParameterType);
if (paramInfo.IsOut && paramInfo.ParameterType.IsByRef) {
- args [n] = GetNullValue (paramType);
+ args [paramInfo.Position] = GetNullValue (paramType);
}
else{
- object val = soapMessage.ParamValues[sn++];
- if(val is IConvertible)
- args [n] = Convert.ChangeType (val, paramType);
- else
- args [n] = val;
+ int index = Array.IndexOf(soapMessage.ParamNames, paramInfo.Name);
+ if(soapMessage.ParamValues[index] is IConvertible)
+ soapMessage.ParamValues[index] = Convert.ChangeType(
+ soapMessage.ParamValues[index],
+ paramType);
+ args [paramInfo.Position] = soapMessage.ParamValues[index];
}
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs index c5f1c410923..5036f5db094 100644 --- a/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs +++ b/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs @@ -309,7 +309,7 @@ namespace System.Web.Compilation bool keepFiles = (Environment.GetEnvironmentVariable ("MONO_ASPNET_NODELETE") != null); TempFileCollection tempcoll = new TempFileCollection (config.TempDirectory, keepFiles); compilerParameters.TempFiles = tempcoll; - string dllfilename = Path.GetFileName (tempcoll.AddExtension ("dll", true)); + string dllfilename = tempcoll.AddExtension ("dll", true); if (!Directory.Exists (dynamicBase)) Directory.CreateDirectory (dynamicBase); diff --git a/mcs/class/System.Web/System.Web.Compilation/ChangeLog b/mcs/class/System.Web/System.Web.Compilation/ChangeLog index e001d2802c8..1bd493966e2 100644 --- a/mcs/class/System.Web/System.Web.Compilation/ChangeLog +++ b/mcs/class/System.Web/System.Web.Compilation/ChangeLog @@ -1,8 +1,3 @@ -2004-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * BaseCompiler.cs: - * WebServiceCompiler.cs: really create the dlls under DynamicBase - 2004-06-19 Gonzalo Paniagua Javier <gonzalo@ximian.com> * TemplateControlCompiler.cs: for system colors, use SystemColors class diff --git a/mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs index f6884bf428b..20b87415730 100644 --- a/mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs +++ b/mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs @@ -93,7 +93,7 @@ namespace System.Web.Compilation sw.WriteLine (parser.Program); sw.Close (); - string dllfilename = Path.GetFileName (tempcoll.AddExtension ("dll", true)); + string dllfilename = tempcoll.AddExtension ("dll", true); if (!Directory.Exists (dynamicBase)) Directory.CreateDirectory (dynamicBase); diff --git a/mcs/class/System.Web/System.Web.Handlers/ChangeLog b/mcs/class/System.Web/System.Web.Handlers/ChangeLog index 50459bd9024..ebddbc1e4ba 100644 --- a/mcs/class/System.Web/System.Web.Handlers/ChangeLog +++ b/mcs/class/System.Web/System.Web.Handlers/ChangeLog @@ -1,7 +1,3 @@ -2004-07-02 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * TraceHandler.cs: check that trace is enabled or throw. - 2004-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com> * TraceHandler.cs: Added protected missing members and attributes. diff --git a/mcs/class/System.Web/System.Web.Handlers/TraceHandler.cs b/mcs/class/System.Web/System.Web.Handlers/TraceHandler.cs index 343aa5957a7..33385dbf5fb 100644 --- a/mcs/class/System.Web/System.Web.Handlers/TraceHandler.cs +++ b/mcs/class/System.Web/System.Web.Handlers/TraceHandler.cs @@ -39,27 +39,16 @@ using System.Web.UI.WebControls; namespace System.Web.Handlers { -#if NET_2_0 - [Serializable] -#endif - class TraceNotAvailableException : HttpException - { - public TraceNotAvailableException () : - base ("Trace Error") {} - - internal override string Description { - get { return "Trace.axd is not enabled in the configuration file for this application."; } - } - } - public class TraceHandler : IHttpHandler { void IHttpHandler.ProcessRequest (HttpContext context) { TraceManager manager = HttpRuntime.TraceManager; - if (!manager.Enabled || manager.LocalOnly && !context.Request.IsLocal) { - throw new TraceNotAvailableException (); + if (manager.LocalOnly && !context.Request.IsLocal) { + // Need to figure out the error message that goes here + // but I only have cassini for testing + return; } HtmlTextWriter output = new HtmlTextWriter (context.Response.Output); diff --git a/mcs/class/System.Web/System.Web.SessionState/ChangeLog b/mcs/class/System.Web/System.Web.SessionState/ChangeLog index 3e70b628dc9..58135e9f7d0 100644 --- a/mcs/class/System.Web/System.Web.SessionState/ChangeLog +++ b/mcs/class/System.Web/System.Web.SessionState/ChangeLog @@ -1,8 +1,3 @@ -2004-07-07 Juraj Skripsky <juraj@hotfeet.ch> - - * SessionStateModule.cs: set path in session cookie to application - path. - 2004-06-18 Gert Driesen <drieseng@users.sourceforge.net> * IStateRuntime.cs: added missing marshalling attributes diff --git a/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs b/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs index cbee9af88f8..70c4a566129 100644 --- a/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs +++ b/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs @@ -158,7 +158,7 @@ namespace System.Web.SessionState } else if (isNew) { string id = context.Session.SessionID; HttpCookie cookie = new HttpCookie (CookieName, id); - cookie.Path = UrlUtils.GetDirectory (context.Request.ApplicationPath); + cookie.Path = UrlUtils.GetDirectory (context.Request.Path); context.Response.AppendCookie (cookie); } } diff --git a/mcs/class/System.Web/System.Web.UI/ChangeLog b/mcs/class/System.Web/System.Web.UI/ChangeLog index b95600340d0..07d62fd2c33 100644 --- a/mcs/class/System.Web/System.Web.UI/ChangeLog +++ b/mcs/class/System.Web/System.Web.UI/ChangeLog @@ -1,14 +1,3 @@ -2004-07-08 Pablo Baena <pbaena@gmail.com> - - * Page.cs: added workaround for __doPostBack script on Netscape 4.xx - -2004-07-02 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * Page.cs: added additional checks for saving/displaying trace data. - - * PageParser.cs: removed checks for trace enabled in configuration - files. - 2004-06-29 Gonzalo Paniagua Javier <gonzalo@ximian.com> * ControlCollection.cs: when clearing the control collection, tell the diff --git a/mcs/class/System.Web/System.Web.UI/Page.cs b/mcs/class/System.Web/System.Web.UI/Page.cs index 53b89d28854..3887c9c35e0 100755 --- a/mcs/class/System.Web/System.Web.UI/Page.cs +++ b/mcs/class/System.Web/System.Web.UI/Page.cs @@ -526,12 +526,7 @@ public class Page : TemplateControl, IHttpHandler writer.WriteLine ("<script language=\"javascript\">"); writer.WriteLine ("<!--"); writer.WriteLine ("\tfunction __doPostBack(eventTarget, eventArgument) {"); - - if (Request.Browser.Browser == ("Netscape") && Request.Browser.MajorVersion == 4) - writer.WriteLine ("\t\tvar theform = document.{0};", formUniqueID); - else - writer.WriteLine ("\t\tvar theform = document.getElementById ('{0}');", formUniqueID); - + writer.WriteLine ("\t\tvar theform = document.getElementById ('{0}');", formUniqueID); writer.WriteLine ("\t\ttheform.{0}.value = eventTarget;", postEventSourceID); writer.WriteLine ("\t\ttheform.{0}.value = eventArgument;", postEventArgumentID); writer.WriteLine ("\t\ttheform.submit();"); @@ -774,18 +769,11 @@ public class Page : TemplateControl, IHttpHandler private void RenderTrace (HtmlTextWriter output) { - TraceManager traceManager = HttpRuntime.TraceManager; - - if (Trace.HaveTrace && !Trace.IsEnabled || !Trace.HaveTrace && !traceManager.Enabled) + if (!Trace.IsEnabled) return; Trace.SaveData (); - - if (!Trace.HaveTrace && traceManager.Enabled && !traceManager.PageOutput) - return; - - if (!traceManager.LocalOnly || Context.Request.IsLocal) - Trace.Render (output); + Trace.Render (output); } internal void RaisePostBackEvents () diff --git a/mcs/class/System.Web/System.Web.UI/PageParser.cs b/mcs/class/System.Web/System.Web.UI/PageParser.cs index 571edf2997a..816d83c0bc8 100644 --- a/mcs/class/System.Web/System.Web.UI/PageParser.cs +++ b/mcs/class/System.Web/System.Web.UI/PageParser.cs @@ -199,6 +199,13 @@ namespace System.Web.UI } } + TraceConfig traceConfig = (TraceConfig) Context.GetConfig ("system.web/trace"); + if (traceConfig != null) { + trace = traceConfig.Enabled; + if (trace) + haveTrace = true; + } + string tracestr = GetString (atts, "Trace", null); if (tracestr != null) { haveTrace = true; @@ -220,6 +227,13 @@ namespace System.Web.UI "one of the following values: SortByTime, SortByCategory."); } + if (traceConfig != null) { + if (traceConfig.LocalOnly && !Context.Request.IsLocal) { + haveTrace = false; + trace = false; + } + } + errorPage = GetString (atts, "ErrorPage", null); validateRequest = GetBool (atts, "ValidateRequest", PagesConfig.ValidateRequest); clientTarget = GetString (atts, "ClientTarget", null); diff --git a/mcs/class/System.Web/System.Web/ChangeLog b/mcs/class/System.Web/System.Web/ChangeLog index 2df8ba42b74..93cc846bb86 100644 --- a/mcs/class/System.Web/System.Web/ChangeLog +++ b/mcs/class/System.Web/System.Web/ChangeLog @@ -1,18 +1,3 @@ -2004-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * HttpApplication.cs: don't keep the session around if we got it from - the context. Fixes bug #61232. - -2004-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * HttpUtility.cs: fixed stupid bug in UrlDecode from bytes. Closes bug - #61181. - -2004-07-02 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * TraceContext.cs: added internal HaveTrace property whose - value is true when the page has a Trace attribute. - 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com> * TraceData.cs: fixed <br> output. Closes bug #60181. diff --git a/mcs/class/System.Web/System.Web/HttpApplication.cs b/mcs/class/System.Web/System.Web/HttpApplication.cs index 7d227afc4d3..0f8aaa3759b 100644 --- a/mcs/class/System.Web/System.Web/HttpApplication.cs +++ b/mcs/class/System.Web/System.Web/HttpApplication.cs @@ -1145,8 +1145,10 @@ namespace System.Web if (null != _Session) return _Session; - if (null != _Context && null != _Context.Session) - return _Context.Session; + if (null != _Context && null != _Context.Session) { + _Session = _Context.Session; + return _Session; + } throw new HttpException ("Failed to get session object"); } diff --git a/mcs/class/System.Web/System.Web/HttpUtility.cs b/mcs/class/System.Web/System.Web/HttpUtility.cs index d1a2d0dbb07..d70b32d8f92 100644 --- a/mcs/class/System.Web/System.Web/HttpUtility.cs +++ b/mcs/class/System.Web/System.Web/HttpUtility.cs @@ -444,7 +444,7 @@ namespace System.Web { int value = 0;
int end = length + offset;
for (int i = offset; i < end; i++)
- value = (value << 4) + GetInt (bytes [i]);
+ value = (value << 4) + GetInt (bytes [offset]);
return (char) value;
}
@@ -474,10 +474,10 @@ namespace System.Web { output.Append (GetChars (acc, e));
acc.SetLength (0);
}
- output.Append (GetChar (bytes, i + 2, 4));
+ output.Append (GetChar (bytes, offset + 2, 4));
i += 5;
} else {
- acc.WriteByte ((byte) GetChar (bytes, i + 1, 2));
+ acc.WriteByte ((byte) GetChar (bytes, offset + 1, 2));
i += 2;
}
continue;
diff --git a/mcs/class/System.Web/System.Web/TraceContext.cs b/mcs/class/System.Web/System.Web/TraceContext.cs index f939add498b..6d7a7c68608 100644 --- a/mcs/class/System.Web/System.Web/TraceContext.cs +++ b/mcs/class/System.Web/System.Web/TraceContext.cs @@ -42,19 +42,11 @@ namespace System.Web { private TraceMode _Mode;
private TraceData data;
private bool data_saved;
- private bool _haveTrace = false; public TraceContext(HttpContext Context) {
_Context = Context;
_Enabled = false;
}
- - - internal bool HaveTrace { - get { - return _haveTrace; - } - } public bool IsEnabled {
get {
@@ -64,7 +56,6 @@ namespace System.Web { set {
if (value && data == null)
data = new TraceData ();
- _haveTrace = true; _Enabled = value;
}
}
diff --git a/mcs/class/System/System.Net/ChangeLog b/mcs/class/System/System.Net/ChangeLog index af2f720eeb5..2b470e6423b 100644 --- a/mcs/class/System/System.Net/ChangeLog +++ b/mcs/class/System/System.Net/ChangeLog @@ -1,9 +1,3 @@ -2004-07-09 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * HttpWebRequest.cs: removed bogus Monitor.Exit. - * WebConnection.cs: use Address instead of RequestUri when checking for - the scheme in order to select the stream type. Fixes bug #61218. - 2004-06-06 Gonzalo Paniagua Javier <gonzalo@ximian.com> * ChunkStream.cs: added ChunkLeft property. diff --git a/mcs/class/System/System.Net/HttpWebRequest.cs b/mcs/class/System/System.Net/HttpWebRequest.cs index 3975a04d6f4..40dfe26a546 100644 --- a/mcs/class/System/System.Net/HttpWebRequest.cs +++ b/mcs/class/System/System.Net/HttpWebRequest.cs @@ -584,6 +584,7 @@ namespace System.Net initialMethod = method; if (haveRequest) { if (writeStream != null) { + Monitor.Exit (this); asyncWrite.SetCompleted (true, writeStream); asyncWrite.DoCallback (); return asyncWrite; diff --git a/mcs/class/System/System.Net/WebConnection.cs b/mcs/class/System/System.Net/WebConnection.cs index e4026a68fdb..c4b08a363d1 100644 --- a/mcs/class/System/System.Net/WebConnection.cs +++ b/mcs/class/System/System.Net/WebConnection.cs @@ -131,7 +131,7 @@ namespace System.Net { try { NetworkStream serverStream = new NetworkStream (socket, false); - if (request.Address.Scheme == Uri.UriSchemeHttps) { + if (request.RequestUri.Scheme == Uri.UriSchemeHttps) { ssl = true; if (!sslCheck) { lock (typeof (WebConnection)) { diff --git a/mcs/class/corlib/System.Globalization/ChangeLog b/mcs/class/corlib/System.Globalization/ChangeLog index 95392d51e96..533cc9d4dc7 100644 --- a/mcs/class/corlib/System.Globalization/ChangeLog +++ b/mcs/class/corlib/System.Globalization/ChangeLog @@ -1,3 +1,8 @@ + +Wed Jun 30 17:06:43 CEST 2004 Paolo Molaro <lupus@ximian.com> + + * NumberFormatInfo.cs: workaround for bug 55978. + 2004-06-17 Atsushi Enomoto <atsushi@ximian.com> * DateTimeFormatInfo.cs : check if pattern array is empty or not. Now diff --git a/mcs/class/corlib/System.Globalization/NumberFormatInfo.cs b/mcs/class/corlib/System.Globalization/NumberFormatInfo.cs index 169ad6c2f9e..e884daad5a7 100644 --- a/mcs/class/corlib/System.Globalization/NumberFormatInfo.cs +++ b/mcs/class/corlib/System.Globalization/NumberFormatInfo.cs @@ -851,7 +851,10 @@ throw new Exception ("HERE the value was modified"); public object GetFormat (Type formatType) { - return (formatType == typeof (NumberFormatInfo)) ? this : null; + // work around http://bugzilla.ximian.com/show_bug.cgi?id=55978 + // the comparison fails because formatType likely comes from another domain + //return (formatType == typeof (NumberFormatInfo)) ? this : null; + return this; } public object Clone () diff --git a/mcs/class/corlib/System.IO/ChangeLog b/mcs/class/corlib/System.IO/ChangeLog index 2c281d7651c..6818c37ad82 100644 --- a/mcs/class/corlib/System.IO/ChangeLog +++ b/mcs/class/corlib/System.IO/ChangeLog @@ -1,25 +1,3 @@ -2004-07-06 Dick Porter <dick@ximian.com> - - * MonoIO.cs: Add ERROR_INVALID_PARAMETER to the exception list. - Don't blow away the SetFileTime() error before the caller gets to - see it. Part of the bug fix to 60970. - -2004-07-05 Dick Porter <dick@ximian.com> - - * CheckPermission.cs: - * File.cs: - * FileInfo.cs: - * MonoIO.cs: - * FileStream.cs: Give the filename when throwing - FileNotFoundException. Fixes bug 61120, based on patch from - Carlos Alberto Cesario <carloscesario@gmail.com>. - -2004-07-05 Dick Porter <dick@ximian.com> - - * File.cs: File.Move() should check that the destination doesn't - already exist. Fixes bug 60915, patch based on one from Carlos - Alberto Cesario <carloscesario@gmail.com>. - 2004-06-24 Gonzalo Paniagua Javier <gonzalo@ximian.com> * Directory.cs: implemented GetLogicalDrives. diff --git a/mcs/class/corlib/System.IO/CheckPermission.cs b/mcs/class/corlib/System.IO/CheckPermission.cs index 232b1350af4..2b31cab7e01 100644 --- a/mcs/class/corlib/System.IO/CheckPermission.cs +++ b/mcs/class/corlib/System.IO/CheckPermission.cs @@ -102,7 +102,7 @@ namespace System.IO } else { - throw new FileNotFoundException("File not found", path); + throw new FileNotFoundException(); } #endif } diff --git a/mcs/class/corlib/System.IO/File.cs b/mcs/class/corlib/System.IO/File.cs index 3dcf8213759..c45dea6aecb 100644 --- a/mcs/class/corlib/System.IO/File.cs +++ b/mcs/class/corlib/System.IO/File.cs @@ -70,7 +70,7 @@ namespace System.IO if (dest.Trim () == "" || dest.IndexOfAny (Path.InvalidPathChars) != -1) throw new ArgumentException ("dest"); if (!Exists (src)) - throw new FileNotFoundException (src + " does not exist", src); + throw new FileNotFoundException (src + " does not exist"); if ((GetAttributes(src) & FileAttributes.Directory) == FileAttributes.Directory){ throw new ArgumentException(src + " is a directory"); @@ -261,11 +261,9 @@ namespace System.IO if (dest.Trim () == "" || dest.IndexOfAny (Path.InvalidPathChars) != -1) throw new ArgumentException ("dest"); if (!MonoIO.Exists (src, out error)) - throw new FileNotFoundException (src + " does not exist", src); + throw new FileNotFoundException (src + " does not exist"); if (MonoIO.ExistsDirectory (dest, out error)) throw new IOException (dest + " is a directory"); - if (MonoIO.Exists (dest, out error)) - throw new IOException (dest + " already exists"); string DirName; DirName = Path.GetDirectoryName(src); diff --git a/mcs/class/corlib/System.IO/FileInfo.cs b/mcs/class/corlib/System.IO/FileInfo.cs index 3345f61dc79..c98cf6feaec 100644 --- a/mcs/class/corlib/System.IO/FileInfo.cs +++ b/mcs/class/corlib/System.IO/FileInfo.cs @@ -81,7 +81,7 @@ namespace System.IO { public long Length {
get {
if (!Exists)
- throw new FileNotFoundException ("Could not find file \"" + OriginalPath + "\".", OriginalPath);
+ throw new FileNotFoundException ("Could not find file \"" + OriginalPath + "\".");
return stat.Length;
}
diff --git a/mcs/class/corlib/System.IO/FileStream.cs b/mcs/class/corlib/System.IO/FileStream.cs index 01b726a0b92..3024bf35d04 100644 --- a/mcs/class/corlib/System.IO/FileStream.cs +++ b/mcs/class/corlib/System.IO/FileStream.cs @@ -155,7 +155,7 @@ namespace System.IO if (access == FileAccess.Read && mode != FileMode.Create && mode != FileMode.OpenOrCreate && mode != FileMode.CreateNew && !File.Exists (name)) - throw new FileNotFoundException ("Could not find file \"" + name + "\".", name); + throw new FileNotFoundException ("Could not find file \"" + name + "\"."); if (mode == FileMode.CreateNew) { string dname = Path.GetDirectoryName (name); diff --git a/mcs/class/corlib/System.IO/MonoIO.cs b/mcs/class/corlib/System.IO/MonoIO.cs index a32e6ed5408..47fd104fdc3 100644 --- a/mcs/class/corlib/System.IO/MonoIO.cs +++ b/mcs/class/corlib/System.IO/MonoIO.cs @@ -63,8 +63,7 @@ namespace System.IO // FIXME: add more exception mappings here case MonoIOError.ERROR_FILE_NOT_FOUND: message = String.Format ("Could not find file \"{0}\"", path); - return new FileNotFoundException (message, - path); + return new FileNotFoundException (message); case MonoIOError.ERROR_PATH_NOT_FOUND: message = String.Format ("Could not find a part of the path \"{0}\"", path); @@ -82,10 +81,6 @@ namespace System.IO message = String.Format ("Path is too long. Path: {0}", path); return new PathTooLongException (message); - case MonoIOError.ERROR_INVALID_PARAMETER: - message = String.Format ("Invalid parameter"); - return new IOException (message); - default: message = String.Format ("Win32 IO returned {0}. Path: {1}", error, path); return new IOException (message); @@ -309,9 +304,7 @@ namespace System.IO result = SetFileTime (handle, creation_time, last_access_time, last_write_time, out error); - - MonoIOError ignore_error; - Close (handle, out ignore_error); + Close (handle, out error); return result; } diff --git a/mcs/class/corlib/System.Reflection/ChangeLog b/mcs/class/corlib/System.Reflection/ChangeLog index d2fd0f4ac62..8a7945e688e 100644 --- a/mcs/class/corlib/System.Reflection/ChangeLog +++ b/mcs/class/corlib/System.Reflection/ChangeLog @@ -1,7 +1,3 @@ -2004-07-03 Zoltan Varga <vargaz@freemail.hu> - - * Module.cs: Initialize FilterTypeName[IgnoreCase]. Fixes #61048. - 2004-06-17 Gert Driesen <drieseng@users.sourceforge.net> * Pointer.cs: remove serializable attribute to match MS.NET diff --git a/mcs/class/corlib/System.Reflection/Module.cs b/mcs/class/corlib/System.Reflection/Module.cs index d45802fa3b3..01dc55f9be6 100644 --- a/mcs/class/corlib/System.Reflection/Module.cs +++ b/mcs/class/corlib/System.Reflection/Module.cs @@ -55,11 +55,6 @@ namespace System.Reflection { const BindingFlags defaultBindingFlags = BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance; - static Module () { - FilterTypeName = new TypeFilter (filter_by_type_name); - FilterTypeNameIgnoreCase = new TypeFilter (filter_by_type_name_ignore_case); - } - internal Module () { } ~Module () { @@ -220,22 +215,6 @@ namespace System.Reflection { return new Guid (GetGuidInternal ()); } - private static bool filter_by_type_name (Type m, object filterCriteria) { - string s = (string)filterCriteria; - if (s.EndsWith ("*")) - return m.Name.StartsWith (s.Substring (0, s.Length - 1)); - else - return m.Name == s; - } - - private static bool filter_by_type_name_ignore_case (Type m, object filterCriteria) { - string s = (string)filterCriteria; - if (s.EndsWith ("*")) - return m.Name.ToLower ().StartsWith (s.Substring (0, s.Length - 1).ToLower ()); - else - return String.Compare (m.Name, s, true) == 0; - } - [MethodImplAttribute (MethodImplOptions.InternalCall)] private extern string GetGuidInternal (); diff --git a/mcs/class/corlib/System.Reflection/common.src b/mcs/class/corlib/System.Reflection/common.src new file mode 100644 index 00000000000..022b6768fcc --- /dev/null +++ b/mcs/class/corlib/System.Reflection/common.src @@ -0,0 +1,25 @@ +Assembly.cs +AssemblyNameFlags.cs +BindingFlags.cs +CallingConventions.cs +ConstructorInfo.cs +DefaultMemberAttribute.cs +EventAttributes.cs +EventInfo.cs +FieldAttributes.cs +FieldInfo.cs +ICustomAttributeProvider.cs +MemberFilter.cs +MemberInfo.cs +MemberTypes.cs +MethodAttributes.cs +MethodBase.cs +MethodImplAttributes.cs +MethodInfo.cs +Module.cs +ParameterAttributes.cs +PropertyAttributes.cs +PropertyInfo.cs +ResourceAttributes.cs +ResourceLocation.cs +TypeAttributes.cs diff --git a/mcs/class/corlib/System.Runtime.Remoting/ChangeLog b/mcs/class/corlib/System.Runtime.Remoting/ChangeLog index de3e2e619b5..1fc62be042d 100755 --- a/mcs/class/corlib/System.Runtime.Remoting/ChangeLog +++ b/mcs/class/corlib/System.Runtime.Remoting/ChangeLog @@ -1,10 +1,3 @@ -2004-07-02 Lluis Sanchez Gual <lluis@ximian.com> - - * RemotingConfiguration.cs: Avoid adding "id" and "type" as custom - properties of providers. This fixes bug #60934. - * ServerIdentity.cs, RemotingServices.cs: When disposing an identity, detach - the identity from the object, so it can be safely marshalled again. - 2004-06-15 Gert Driesen <drieseng@users.sourceforge.net> * RemotingTimeoutException.cs: added missing serialization ctor diff --git a/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs b/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs index 2cbe62dff51..204bc6b4368 100644 --- a/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs +++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs @@ -721,9 +721,9 @@ namespace System.Runtime.Remoting if (at == "id" && isTemplate) prov.Id = val; - else if (at == "type") + if (at == "type") prov.Type = val; - else if (at == "ref" && !isTemplate) + if (at == "ref" && !isTemplate) prov.Ref = val; else prov.CustomProperties.Add (at, val); diff --git a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs index 475164d981a..aa694cbb3b6 100644 --- a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs +++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs @@ -159,10 +159,8 @@ namespace System.Runtime.Remoting else throw new ArgumentException ("The obj parameter is a proxy."); } - else { + else identity = obj.ObjectIdentity; - obj.ObjectIdentity = null; - } if (identity == null || !identity.IsConnected) return false; diff --git a/mcs/class/corlib/System.Runtime.Remoting/ServerIdentity.cs b/mcs/class/corlib/System.Runtime.Remoting/ServerIdentity.cs index 72c025121d0..f5ed96a066b 100644 --- a/mcs/class/corlib/System.Runtime.Remoting/ServerIdentity.cs +++ b/mcs/class/corlib/System.Runtime.Remoting/ServerIdentity.cs @@ -136,13 +136,7 @@ namespace System.Runtime.Remoting protected void DisposeServerObject() { - // Detach identity from server object to avoid problems if the - // object is marshalled again. - - if (_serverObject != null) { - _serverObject.ObjectIdentity = null; - _serverObject = null; - } + _serverObject = null; } } diff --git a/mcs/class/corlib/System/ChangeLog b/mcs/class/corlib/System/ChangeLog index 8e4560b1bea..b345b93f069 100644 --- a/mcs/class/corlib/System/ChangeLog +++ b/mcs/class/corlib/System/ChangeLog @@ -1,13 +1,3 @@ -2004-07-07 Geoff Norton <gnorton@customerdna.com> - - * Monotype.cs: Patch for bug #58844. Dont throw exceptions right away; - pass through all the possibly BindingInfo's and keep a bool value as to the type - of exception we might need to throw; - -2004-07-07 Geoff Norton <gnorton@customerdna.com> - - * Patch to fix bug #58973 - 2004-06-25 Ben Maurer <bmaurer@ximian.com> * Environment.cs: GetFolderPath has new behavior. r=miguel diff --git a/mcs/class/corlib/System/Double.cs b/mcs/class/corlib/System/Double.cs index 47f0d406531..a52c482792a 100644 --- a/mcs/class/corlib/System/Double.cs +++ b/mcs/class/corlib/System/Double.cs @@ -207,10 +207,6 @@ namespace System { for (; sidx < len; sidx++){ c = s [sidx]; - if (c == '\0') { - sidx = len; - continue; - } switch (state){ case State_AllowSign: if ((style & NumberStyles.AllowLeadingSign) != 0){ diff --git a/mcs/class/corlib/System/MonoType.cs b/mcs/class/corlib/System/MonoType.cs index 395332cf459..a04eeb93877 100644 --- a/mcs/class/corlib/System/MonoType.cs +++ b/mcs/class/corlib/System/MonoType.cs @@ -340,26 +340,22 @@ namespace System name = attr.MemberName; } bool ignoreCase = (invokeAttr & BindingFlags.IgnoreCase) != 0; - bool throwMissingMethodException = false; - bool throwMissingFieldException = false; if ((invokeAttr & BindingFlags.InvokeMethod) != 0) { MethodInfo[] methods = GetMethodsByName (name, invokeAttr, ignoreCase, this); object state = null; MethodBase m = binder.BindToMethod (invokeAttr, methods, ref args, modifiers, culture, namedParameters, out state); - if (m == null) { - throwMissingMethodException = true; - } else { - object result = m.Invoke (target, invokeAttr, binder, args, culture); - binder.ReorderArgumentArray (ref args, state); - return result; - } + if (m == null) + throw new MissingMethodException (); + object result = m.Invoke (target, invokeAttr, binder, args, culture); + binder.ReorderArgumentArray (ref args, state); + return result; } if ((invokeAttr & BindingFlags.GetField) != 0) { FieldInfo f = GetField (name, invokeAttr); if (f != null) { return f.GetValue (target); } else if ((invokeAttr & BindingFlags.GetProperty) == 0) { - throwMissingFieldException = true; + throw new MissingFieldException (); } /* try GetProperty */ } else if ((invokeAttr & BindingFlags.SetField) != 0) { @@ -368,7 +364,7 @@ namespace System f.SetValue (target, args [0]); return null; } else if ((invokeAttr & BindingFlags.SetProperty) == 0) { - throwMissingFieldException = true; + throw new MissingFieldException (); } /* try SetProperty */ } @@ -388,13 +384,11 @@ namespace System smethods [count++] = mb; } MethodBase m = binder.BindToMethod (invokeAttr, smethods, ref args, modifiers, culture, namedParameters, out state); - if (m == null) { - throwMissingFieldException = true; - } else { - object result = m.Invoke (target, invokeAttr, binder, args, culture); - binder.ReorderArgumentArray (ref args, state); - return result; - } + if (m == null) + throw new MissingFieldException (); + object result = m.Invoke (target, invokeAttr, binder, args, culture); + binder.ReorderArgumentArray (ref args, state); + return result; } else if ((invokeAttr & BindingFlags.SetProperty) != 0) { PropertyInfo[] properties = GetPropertiesByName (name, invokeAttr, ignoreCase, this); object state = null; @@ -411,19 +405,12 @@ namespace System smethods [count++] = mb; } MethodBase m = binder.BindToMethod (invokeAttr, smethods, ref args, modifiers, culture, namedParameters, out state); - if (m == null) { - throwMissingFieldException = true; - } else { - object result = m.Invoke (target, invokeAttr, binder, args, culture); - binder.ReorderArgumentArray (ref args, state); - return result; - } + if (m == null) + throw new MissingFieldException (); + object result = m.Invoke (target, invokeAttr, binder, args, culture); + binder.ReorderArgumentArray (ref args, state); + return result; } - if (throwMissingMethodException) - throw new MissingMethodException(); - if (throwMissingFieldException) - throw new MissingFieldException(); - return null; } diff --git a/mcs/class/corlib/Test/System.Reflection/ChangeLog b/mcs/class/corlib/Test/System.Reflection/ChangeLog index fd367c75537..2c5110a6ee3 100644 --- a/mcs/class/corlib/Test/System.Reflection/ChangeLog +++ b/mcs/class/corlib/Test/System.Reflection/ChangeLog @@ -1,7 +1,3 @@ -2004-07-03 Zoltan Varga <vargaz@freemail.hu> - - * ModuleTest.cs: New tests for FindTypes. - 2004-06-10 Lluis Sanchez <lluis@ximian.com> * AssemblyNameTest.cs: AssertEqualsByteArrays(): don't crash if arrays are diff --git a/mcs/errors/cs0502.cs b/mcs/errors/cs0502.cs index e2232ec0c29..b589cba2f75 100644 --- a/mcs/errors/cs0502.cs +++ b/mcs/errors/cs0502.cs @@ -1,6 +1,5 @@ -// cs0502.cs: The class 'Sample' is abstract and sealed
-// Line: 4
-
-abstract sealed class Sample {
-}
-
+// cs0502.cs: 'Sample' cannot be both abstract and sealed +// Line: 4 + +abstract sealed class Sample { +} diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog index 33efccf25f8..0e090e70feb 100755 --- a/mcs/mcs/ChangeLog +++ b/mcs/mcs/ChangeLog @@ -1,8 +1,3 @@ -2004-07-08 Martin Baulig <martin@ximian.com> - - * statement.cs (Lock.Resolve): Set ec.NeedReturnLabel() if we do - not always return, just like we're doing in Using.Resolve(). - 2004-06-24 Raja R Harinath <rharinath@novell.com> * expression.cs (BetterConversion): Remove buggy special-case diff --git a/mcs/mcs/statement.cs b/mcs/mcs/statement.cs index 8b0db129f82..7b0bcca47ea 100755 --- a/mcs/mcs/statement.cs +++ b/mcs/mcs/statement.cs @@ -2734,22 +2734,9 @@ namespace Mono.CSharp { ec.StartFlowBranching (FlowBranching.BranchingType.Exception, loc); bool ok = Statement.Resolve (ec); - if (!ok) { - ec.KillFlowBranching (); - return false; - } - - FlowBranching.Reachability reachability = ec.EndFlowBranching (); - if (reachability.Returns != FlowBranching.FlowReturns.Always) { - // Unfortunately, System.Reflection.Emit automatically emits - // a leave to the end of the finally block. - // This is a problem if `returns' is true since we may jump - // to a point after the end of the method. - // As a workaround, emit an explicit ret here. - ec.NeedReturnLabel (); - } + ec.EndFlowBranching (); - return true; + return ok; } protected override void DoEmit (EmitContext ec) diff --git a/mono/io-layer/ChangeLog b/mono/io-layer/ChangeLog index 42fde43fdc9..fec9ca9fbe0 100644 --- a/mono/io-layer/ChangeLog +++ b/mono/io-layer/ChangeLog @@ -1,3 +1,18 @@ +2004-07-22 Dick Porter <dick@ximian.com> + + * timed-thread.c: + * threads.c: Move the destruction of the internal thread data to + after the thread has been joined. Fixes bug 61418. + +2004-07-14 Dick Porter <dick@ximian.com> + + * wait.c (test_and_own): When not waiting for all handles to + become signalled, only own and return the lowest. All the + documentation suggests that the old way was correct, but + experimentation shows it actually works like this. Patch by + Sébastien Robitaille + (sebastien.robitaille@croesus.com), fixes bug 61511. + 2004-07-08 Dick Porter <dick@ximian.com> * io.c (file_seek): If there is a high 32bit offset part, make diff --git a/mono/io-layer/threads.c b/mono/io-layer/threads.c index b9ddc6aa3dc..31c1176a12c 100644 --- a/mono/io-layer/threads.c +++ b/mono/io-layer/threads.c @@ -99,9 +99,7 @@ static void thread_close_private (gpointer handle) thread_handle->thread->id); #endif - if(thread_handle->thread!=NULL) { - _wapi_timed_thread_destroy (thread_handle->thread); - } + thread_handle->thread=NULL; } static void thread_own (gpointer handle) @@ -628,6 +626,10 @@ guint32 ResumeThread(gpointer handle) return(0xFFFFFFFF); } + if (thread_private_handle->thread == NULL) { + return(0xFFFFFFFF); + } + #ifdef WITH_INCLUDED_LIBGC if (thread_private_handle->thread->suspend_count <= 1) _wapi_timed_thread_resume (thread_private_handle->thread); @@ -670,6 +672,10 @@ guint32 SuspendThread(gpointer handle) return(0xFFFFFFFF); } + if (thread_private_handle->thread == NULL) { + return(0xFFFFFFFF); + } + if (!thread_private_handle->thread->suspend_count) { if (handle == current) _wapi_timed_thread_suspend (thread_private_handle->thread); diff --git a/mono/io-layer/timed-thread.c b/mono/io-layer/timed-thread.c index c0d737862a2..6599e0660f3 100644 --- a/mono/io-layer/timed-thread.c +++ b/mono/io-layer/timed-thread.c @@ -254,6 +254,8 @@ int _wapi_timed_thread_join(TimedThread *thread, struct timespec *timeout, if(exitstatus!=NULL) { *exitstatus = thread->exitstatus; } + + _wapi_timed_thread_destroy (thread); } return(result); } diff --git a/mono/io-layer/wait.c b/mono/io-layer/wait.c index e3d07b3a255..a236d17ed3e 100644 --- a/mono/io-layer/wait.c +++ b/mono/io-layer/wait.c @@ -354,9 +354,15 @@ static gboolean test_and_own (guint32 numobjects, gpointer *handles, done = _wapi_handle_count_signalled_handles (numobjects, handles, waitall, count, lowest); if (done == TRUE) { - for (i = 0; i < numobjects; i++) { - if (_wapi_handle_issignalled (handles[i])) { - _wapi_handle_ops_own (handles[i]); + if (waitall == TRUE) { + for (i = 0; i < numobjects; i++) { + if (_wapi_handle_issignalled (handles[i])) { + _wapi_handle_ops_own (handles[i]); + } + } + } else { + if (_wapi_handle_issignalled (handles[*lowest])) { + _wapi_handle_ops_own (handles[*lowest]); } } } diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog index 9ae7ea41c64..4aad6add664 100644 --- a/mono/metadata/ChangeLog +++ b/mono/metadata/ChangeLog @@ -1,3 +1,68 @@ + +Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com> + + * gc.c: make GC warning messages use the trace API, they are just + noise to most of the users. + +Tue Aug 3 16:40:17 CEST 2004 Paolo Molaro <lupus@ximian.com> + + * gc.c, object.h: mono_gc_handle_*() interface and + AddrOfPinnedObject fixes. GC handle support even without GC. + +Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com> + + * object.c: always create an object if null is passed + to Invoke() where a valuetype is expected. + +2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * appdomain.c: hack to build correctly the private bin path on windows. + Fixes bug #61991. + +2004-07-28 Dick Porter <dick@ximian.com> + + * socket-io.c + (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check + returned sockaddr size before creating the remote address object. + Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug + 61608. + +2004-07-28 Dick Porter <dick@ximian.com> + + * locales.c (string_invariant_compare_char): Fix invariant char + compares between upper and lower cases. Fixes bug 61458. + +Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com> + + * debug-mono-symfile.c: fix one more endianess issue, from a patch + by Geoff Norton (<gnorton@customerdna.com>). + +Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com> + + * class.c: fix class loads for pointer types (typeof(int) != + typeof(int*)). + +2004-07-24 Martin Baulig <martin@ximian.com> + + * reflection.c (mono_image_get_type_info): Only write a class + layout entry if we actually have a size or a packing size. + +2004-07-13 Peter Williams <peter@newton.cx> + + * process.c (complete_path): Make sure we don't attempt to execute + directories. + +2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * debug-helpers.c: undo my previous patch and fixed the real issue in + ../mini/exceptions-x86.c + +2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc + when no HOME env. variable was set and a NullRef was thrown in a .cctor + called from other .cctors. + 2004-07-09 Dick Porter <dick@ximian.com> * locales.c (ves_icall_System_String_InternalReplace_Str_Comp): diff --git a/mono/metadata/appdomain.c b/mono/metadata/appdomain.c index a917a9ecd19..af00a3510d2 100644 --- a/mono/metadata/appdomain.c +++ b/mono/metadata/appdomain.c @@ -547,9 +547,17 @@ reduce_path (const gchar *dirname) for (tmp = list; tmp; tmp = tmp->next) { gchar *data = (gchar *) tmp->data; - if (data && *data) - g_string_append_printf (result, "%c%s", G_DIR_SEPARATOR, - (char *) tmp->data); + if (data && *data) { +#ifdef PLATFORM_WIN32 + if (result->len == 0) + g_string_append_printf (result, "%s\\", data); + else if (result->str [result->len - 1] == '\\') + g_string_append_printf (result, "%s", data); + else +#endif + g_string_append_printf (result, "%c%s", + G_DIR_SEPARATOR, data); + } } res = result->str; diff --git a/mono/metadata/class.c b/mono/metadata/class.c index 7f434b5c734..2814e47d255 100644 --- a/mono/metadata/class.c +++ b/mono/metadata/class.c @@ -2124,7 +2124,7 @@ mono_class_create_from_typespec (MonoImage *image, guint32 type_spec, class = mono_array_class_get (type->data.klass, 1); break; case MONO_TYPE_PTR: - class = mono_class_from_mono_type (type->data.type); + class = mono_ptr_class_get (type->data.type); break; case MONO_TYPE_GENERICINST: g_assert (type->data.generic_inst->klass); diff --git a/mono/metadata/debug-mono-symfile.c b/mono/metadata/debug-mono-symfile.c index 4f39e6827f1..612eb39babf 100644 --- a/mono/metadata/debug-mono-symfile.c +++ b/mono/metadata/debug-mono-symfile.c @@ -136,7 +136,7 @@ mono_debug_close_mono_symbol_file (MonoSymbolFile *symfile) static gchar * read_string (const char *ptr) { - int len = *((guint32 *) ptr); + int len = read32 (ptr); ptr += sizeof(guint32); return g_filename_from_utf8 (ptr, len, NULL, NULL, NULL); } diff --git a/mono/metadata/gc.c b/mono/metadata/gc.c index 4695c8c1a2a..73167d0e9dc 100644 --- a/mono/metadata/gc.c +++ b/mono/metadata/gc.c @@ -16,6 +16,7 @@ #include <mono/metadata/exception.h> #include <mono/metadata/domain-internals.h> #include <mono/metadata/class-internals.h> +#include <mono/utils/mono-logger.h> #define GC_I_HIDE_POINTERS #include <mono/os/gc_wrapper.h> @@ -347,13 +348,17 @@ ves_icall_System_GCHandle_GetTargetHandle (MonoObject *obj, guint32 handle, gint /* Indexes start from 1 since 0 means the handle is not allocated */ idx = ++next_handle; if (idx >= array_size) { -#if HAVE_BOEHM_GC gpointer *new_array; guint8 *new_type_array; if (!array_size) array_size = 16; +#if HAVE_BOEHM_GC new_array = GC_MALLOC (sizeof (gpointer) * (array_size * 2)); new_type_array = GC_MALLOC (sizeof (guint8) * (array_size * 2)); +#else + new_array = g_malloc0 (sizeof (gpointer) * (array_size * 2)); + new_type_array = g_malloc0 (sizeof (guint8) * (array_size * 2)); +#endif if (gc_handles) { int i; memcpy (new_array, gc_handles, sizeof (gpointer) * array_size); @@ -370,20 +375,22 @@ ves_icall_System_GCHandle_GetTargetHandle (MonoObject *obj, guint32 handle, gint #else if (((gulong)new_array [i]) & 0x1) { #endif +#if HAVE_BOEHM_GC if (gc_handles [i] != (gpointer)-1) GC_unregister_disappearing_link (&(gc_handles [i])); if (new_array [i] != (gpointer)-1) GC_GENERAL_REGISTER_DISAPPEARING_LINK (&(new_array [i]), REVEAL_POINTER (new_array [i])); +#endif } } } array_size *= 2; +#ifndef HAVE_BOEHM_GC + g_free (gc_handles); + g_free (gc_handle_types); +#endif gc_handles = new_array; gc_handle_types = new_type_array; -#else - LeaveCriticalSection (&handle_section); - mono_raise_exception (mono_get_exception_execution_engine ("No GCHandle support built-in")); -#endif } /* resuse the type from the old target */ @@ -399,9 +406,6 @@ ves_icall_System_GCHandle_GetTargetHandle (MonoObject *obj, guint32 handle, gint #if HAVE_BOEHM_GC if (gc_handles [idx] != (gpointer)-1) GC_GENERAL_REGISTER_DISAPPEARING_LINK (&(gc_handles [idx]), obj); -#else - LeaveCriticalSection (&handle_section); - mono_raise_exception (mono_get_exception_execution_engine ("No weakref support")); #endif break; default: @@ -429,9 +433,6 @@ ves_icall_System_GCHandle_FreeHandle (guint32 handle) if (gc_handles [idx] != (gpointer)-1) GC_unregister_disappearing_link (&(gc_handles [idx])); } -#else - LeaveCriticalSection (&handle_section); - mono_raise_exception (mono_get_exception_execution_engine ("No GCHandle support")); #endif gc_handles [idx] = (gpointer)-1; @@ -457,11 +458,50 @@ ves_icall_System_GCHandle_GetAddrOfPinnedObject (guint32 handle) if (obj == (MonoObject *) -1) return NULL; } - return obj; + if (obj) { + MonoClass *klass = mono_object_class (obj); + if (klass == mono_defaults.string_class) { + return mono_string_chars ((MonoString*)obj); + } else if (klass->rank) { + return mono_array_addr ((MonoArray*)obj, char, 0); + } else { + /* the C# code will check and throw the exception */ + /* FIXME: missing !klass->blittable test, see bug #61134, + * disabled in 1.0 untill the blittable-using code is audited. + if ((klass->flags & TYPE_ATTRIBUTE_LAYOUT_MASK) == TYPE_ATTRIBUTE_AUTO_LAYOUT) + return (gpointer)-1; */ + return (char*)obj + sizeof (MonoObject); + } + } } return NULL; } +guint32 +mono_gchandle_new (MonoObject *obj, gboolean pinned) +{ + return ves_icall_System_GCHandle_GetTargetHandle (obj, 0, pinned? HANDLE_PINNED: HANDLE_NORMAL); +} + +guint32 +mono_gchandle_new_weakref (MonoObject *obj, gboolean track_resurrection) +{ + return ves_icall_System_GCHandle_GetTargetHandle (obj, 0, track_resurrection? HANDLE_WEAK_TRACK: HANDLE_WEAK); +} + +/* This will return NULL for a collected object if using a weakref handle */ +MonoObject* +mono_gchandle_get_target (guint32 gchandle) +{ + return ves_icall_System_GCHandle_GetTarget (gchandle); +} + +void +mono_gchandle_free (guint32 gchandle) +{ + ves_icall_System_GCHandle_FreeHandle (gchandle); +} + #if HAVE_BOEHM_GC static HANDLE finalizer_event; @@ -606,6 +646,12 @@ static GCThreadFunctions mono_gc_thread_vtable = { }; #endif /* WITH_INCLUDED_LIBGC */ +static void +mono_gc_warning (char *msg, GC_word arg) +{ + mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_GC, msg, (unsigned long)arg); +} + void mono_gc_init (void) { InitializeCriticalSection (&handle_section); diff --git a/mono/metadata/locales.c b/mono/metadata/locales.c index 8c24cc7172f..1210965a70a 100644 --- a/mono/metadata/locales.c +++ b/mono/metadata/locales.c @@ -25,7 +25,7 @@ #include <locale.h> -//#undef DEBUG +#undef DEBUG static gint32 string_invariant_compare_char (gunichar2 c1, gunichar2 c2, gint32 options); @@ -1875,15 +1875,6 @@ static gint32 string_invariant_compare_char (gunichar2 c1, gunichar2 c2, /* No options. Kana, symbol and spacing options don't * apply to the invariant culture. */ - if (c1type == G_UNICODE_UPPERCASE_LETTER && - c2type == G_UNICODE_LOWERCASE_LETTER) { - return(1); - } - - if (c1type == G_UNICODE_LOWERCASE_LETTER && - c2type == G_UNICODE_UPPERCASE_LETTER) { - return(-1); - } result = (gint32) c1 - c2; } diff --git a/mono/metadata/object.c b/mono/metadata/object.c index bdf832baa6d..65176ce2435 100644 --- a/mono/metadata/object.c +++ b/mono/metadata/object.c @@ -1586,13 +1586,9 @@ mono_runtime_invoke_array (MonoMethod *method, void *obj, MonoArray *params, case MONO_TYPE_R4: case MONO_TYPE_R8: case MONO_TYPE_VALUETYPE: - if (sig->params [i]->byref) { - /* MS seems to create the objects if a null is passed in */ - if (! ((gpointer *)params->vector)[i]) - ((gpointer*)params->vector)[i] = mono_object_new (mono_domain_get (), mono_class_from_mono_type (sig->params [i])); - } - else - g_assert (((gpointer*)params->vector) [i]); + /* MS seems to create the objects if a null is passed in */ + if (! ((gpointer *)params->vector)[i]) + ((gpointer*)params->vector)[i] = mono_object_new (mono_domain_get (), mono_class_from_mono_type (sig->params [i])); pa [i] = (char *)(((gpointer *)params->vector)[i]) + sizeof (MonoObject); break; case MONO_TYPE_STRING: diff --git a/mono/metadata/object.h b/mono/metadata/object.h index c1ffc3c4c2d..2413cc7a346 100644 --- a/mono/metadata/object.h +++ b/mono/metadata/object.h @@ -252,5 +252,11 @@ mono_property_set_value (MonoProperty *prop, void *obj, void **params, MonoObjec MonoObject* mono_property_get_value (MonoProperty *prop, void *obj, void **params, MonoObject **exc); +/* GC handles support */ +guint32 mono_gchandle_new (MonoObject *obj, gboolean pinned); +guint32 mono_gchandle_new_weakref (MonoObject *obj, gboolean track_resurrection); +MonoObject* mono_gchandle_get_target (guint32 gchandle); +void mono_gchandle_free (guint32 gchandle); + #endif diff --git a/mono/metadata/process.c b/mono/metadata/process.c index 5e7cce9de7b..90edc4023e5 100644 --- a/mono/metadata/process.c +++ b/mono/metadata/process.c @@ -738,7 +738,7 @@ complete_path (const gunichar2 *appname, gunichar2 **completed) return FALSE; } - if (g_file_test (utf8app, G_FILE_TEST_IS_EXECUTABLE)) { + if (g_file_test (utf8app, G_FILE_TEST_IS_EXECUTABLE) && !g_file_test (utf8app, G_FILE_TEST_IS_DIR)) { g_free (utf8app); return FALSE; } diff --git a/mono/metadata/reflection.c b/mono/metadata/reflection.c index 9640136c0eb..f47150bd1ef 100644 --- a/mono/metadata/reflection.c +++ b/mono/metadata/reflection.c @@ -2716,7 +2716,8 @@ mono_image_get_type_info (MonoDomain *domain, MonoReflectionTypeBuilder *tb, Mon * if we have explicitlayout or sequentiallayouts, output data in the * ClassLayout table. */ - if (((tb->attrs & TYPE_ATTRIBUTE_LAYOUT_MASK) != TYPE_ATTRIBUTE_AUTO_LAYOUT) && (tb->class_size != -1)) { + if (((tb->attrs & TYPE_ATTRIBUTE_LAYOUT_MASK) != TYPE_ATTRIBUTE_AUTO_LAYOUT) && + ((tb->class_size > 0) || (tb->packing_size > 0))) { table = &assembly->tables [MONO_TABLE_CLASSLAYOUT]; table->rows++; alloc_table (table, table->rows); diff --git a/mono/metadata/socket-io.c b/mono/metadata/socket-io.c index 1bb44ea75b2..1ef49278ea9 100644 --- a/mono/metadata/socket-io.c +++ b/mono/metadata/socket-io.c @@ -1160,7 +1160,15 @@ gint32 ves_icall_System_Net_Sockets_Socket_RecvFrom_internal(SOCKET sock, MonoAr return(0); } - *sockaddr=create_object_from_sockaddr(sa, sa_size, error); + /* If we didn't get a socket size, then we're probably a + * connected connection-oriented socket and the stack hasn't + * returned the remote address. All we can do is return null. + */ + if ( sa_size != 0 ) + *sockaddr=create_object_from_sockaddr(sa, sa_size, error); + else + *sockaddr=NULL; + g_free(sa); return(ret); diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog index dad985c6904..bd12b2ad5e5 100644 --- a/mono/mini/ChangeLog +++ b/mono/mini/ChangeLog @@ -1,3 +1,34 @@ + +Tue Aug 3 11:20:09 CEST 2004 Paolo Molaro <lupus@ximian.com> + + * mini-ppc.c: mul.ovf.un exception name fix. + +Tue Aug 3 11:19:07 CEST 2004 Paolo Molaro <lupus@ximian.com> + + * mini-ppc.c: reg allocator fix. + +Tue Aug 3 11:17:07 CEST 2004 Paolo Molaro <lupus@ximian.com> + + * mini-ppc.c: make sure temp regs are not used for global reg + allocation. + +Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com> + + * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line + numbers in the debug info (spotted by Geoff Norton, + <gnorton@customerdna.com>). + +Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com> + + * inssel-ppc.brg: arguments on the stack are always + relative to the stack pointer (spotted by Neale Ferguson). + +2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * exceptions-x86.c: delay appending the method name to the trace until + after mono_jit_info_table_find is called, as this gets the real + MonoMethod. + 2004-07-08 Zoltan Varga <vargaz@freemail.hu> * mini.c (handle_stack_args): Handle some corner cases. Fixes diff --git a/mono/mini/exceptions-x86.c b/mono/mini/exceptions-x86.c index b0783ae39b1..c0961c485d2 100644 --- a/mono/mini/exceptions-x86.c +++ b/mono/mini/exceptions-x86.c @@ -462,9 +462,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInf if (!(*lmf)->method) return (gpointer)-1; - if (trace) - *trace = g_strdup_printf ("in (unmanaged) %s", mono_method_full_name ((*lmf)->method, TRUE)); - if ((ji = mono_jit_info_table_find (domain, (gpointer)(*lmf)->eip))) { *res = *ji; } else { @@ -472,6 +469,9 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInf res->method = (*lmf)->method; } + if (trace) + *trace = g_strdup_printf ("in (unmanaged) %s", mono_method_full_name (res->method, TRUE)); + new_ctx->SC_ESI = (*lmf)->esi; new_ctx->SC_EDI = (*lmf)->edi; new_ctx->SC_EBX = (*lmf)->ebx; diff --git a/mono/mini/inssel-ppc.brg b/mono/mini/inssel-ppc.brg index a4043e1d797..38eced8c0dc 100644 --- a/mono/mini/inssel-ppc.brg +++ b/mono/mini/inssel-ppc.brg @@ -131,7 +131,7 @@ stmt: OP_SETRET (OP_ICONST) { stmt: OP_OUTARG (reg) { if (tree->inst_imm) { - MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, s->frame_reg, tree->inst_imm, state->left->reg1); + MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, ppc_r1, tree->inst_imm, state->left->reg1); return; } tree->opcode = OP_SETREG; @@ -142,7 +142,7 @@ stmt: OP_OUTARG (reg) { stmt: OP_OUTARG (OP_REGVAR) { if (tree->inst_imm) { - MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, s->frame_reg, tree->inst_imm, state->left->tree->dreg); + MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, ppc_r1, tree->inst_imm, state->left->tree->dreg); return; } tree->opcode = OP_SETREG; @@ -153,8 +153,8 @@ stmt: OP_OUTARG (OP_REGVAR) { stmt: OP_OUTARG (lreg) { if (tree->inst_imm) { - MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, s->frame_reg, tree->inst_imm, state->left->reg2); - MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, s->frame_reg, tree->inst_imm + 4, state->left->reg1); + MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, ppc_r1, tree->inst_imm, state->left->reg2); + MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, ppc_r1, tree->inst_imm + 4, state->left->reg1); return; } MONO_EMIT_NEW_UNALU (s, OP_SETREG, tree->unused, state->left->reg2); @@ -166,7 +166,7 @@ stmt: OP_OUTARG (lreg) { stmt: OP_OUTARG (OP_ICONST) { if (tree->inst_imm) { - MONO_EMIT_NEW_STORE_MEMBASE_IMM (s, OP_STORE_MEMBASE_IMM, s->frame_reg, tree->inst_imm, state->left->tree->inst_c0); + MONO_EMIT_NEW_STORE_MEMBASE_IMM (s, OP_STORE_MEMBASE_IMM, ppc_r1, tree->inst_imm, state->left->tree->inst_c0); return; } tree->opcode = OP_SETREGIMM; @@ -205,7 +205,7 @@ stmt: OP_OUTARG (OP_ICONST) { stmt: OP_OUTARG (CEE_LDIND_REF (OP_REGVAR)) { if (tree->inst_imm) { - MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, s->frame_reg, tree->inst_imm, state->left->left->tree->dreg); + MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, ppc_r1, tree->inst_imm, state->left->left->tree->dreg); return; } tree->opcode = OP_SETREG; @@ -223,7 +223,7 @@ stmt: OP_OUTARG (CEE_LDIND_REF (OP_REGVAR)) { stmt: OP_OUTARG (freg) { if (tree->inst_imm) { int opcode = (tree->unused & 0xff00) == 0x0400? OP_STORER4_MEMBASE_REG: OP_STORER8_MEMBASE_REG; - MONO_EMIT_NEW_STORE_MEMBASE (s, opcode, s->frame_reg, tree->inst_imm, state->left->reg1); + MONO_EMIT_NEW_STORE_MEMBASE (s, opcode, ppc_r1, tree->inst_imm, state->left->reg1); return; } tree->opcode = OP_SETFREG; @@ -234,7 +234,7 @@ stmt: OP_OUTARG (freg) { stmt: OP_OUTARG_R4 (freg) { if (tree->inst_imm) { - MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORER4_MEMBASE_REG, s->frame_reg, tree->inst_imm, state->left->reg1); + MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORER4_MEMBASE_REG, ppc_r1, tree->inst_imm, state->left->reg1); return; } tree->opcode = OP_SETFREG; @@ -245,7 +245,7 @@ stmt: OP_OUTARG_R4 (freg) { stmt: OP_OUTARG_R8 (freg) { if (tree->inst_imm) { - MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORER8_MEMBASE_REG, s->frame_reg, tree->inst_imm, state->left->reg1); + MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORER8_MEMBASE_REG, ppc_r1, tree->inst_imm, state->left->reg1); return; } tree->opcode = OP_SETFREG; @@ -269,7 +269,7 @@ stmt: OP_OUTARG_VT (CEE_LDOBJ (base)) { } //g_print ("vt size: %d at R%d + %d\n", tree->inst_imm, vt->inst_basereg, vt->inst_offset); if (ovf_size != 0) { - mini_emit_memcpy (s, s->frame_reg, tree->inst_imm + (soffset - vt->inst_offset), vt->inst_basereg, soffset, ovf_size * sizeof (gpointer), 0); + mini_emit_memcpy (s, ppc_r1, tree->inst_imm + (soffset - vt->inst_offset), vt->inst_basereg, soffset, ovf_size * sizeof (gpointer), 0); } } diff --git a/mono/mini/mini-ppc.c b/mono/mini/mini-ppc.c index a62d49bd453..537cefb50a7 100644 --- a/mono/mini/mini-ppc.c +++ b/mono/mini/mini-ppc.c @@ -209,7 +209,7 @@ mono_arch_get_global_int_regs (MonoCompile *cfg) if (cfg->frame_reg != ppc_sp) top = 31; #if USE_EXTRA_TEMPS - top -= 2; + top = 29; #endif for (i = 13; i < top; ++i) regs = g_list_prepend (regs, GUINT_TO_POINTER (i)); @@ -1296,7 +1296,11 @@ mono_spillvar_offset_float (MonoCompile *cfg, int spillvar) #undef DEBUG #define DEBUG(a) if (cfg->verbose_level > 1) a //#define DEBUG(a) -#define reg_is_freeable(r) ((r) >= 3 && (r) <= 10) +/* use ppc_r3-ppc_10,ppc_r12 as temp registers, f1-f13 for FP registers */ +#define PPC_CALLER_REGS ((0xff<<3) | (1<<12) | USE_EXTRA_TEMPS) +#define PPC_CALLER_FREGS (0x3ffe) + +#define reg_is_freeable(r) (PPC_CALLER_REGS & 1 << (r)) #define freg_is_freeable(r) ((r) >= 1 && (r) <= 13) typedef struct { @@ -1631,10 +1635,6 @@ alloc_int_reg (MonoCompile *cfg, InstList *curinst, MonoInst *ins, int sym_reg, return val; } -/* use ppc_r3-ppc_10,ppc_r12 as temp registers, f1-f13 for FP registers */ -#define PPC_CALLER_REGS ((0xff<<3) | (1<<12) | USE_EXTRA_TEMPS) -#define PPC_CALLER_FREGS (0x3ffe) - /* * Local register allocation. * We first scan the list of instructions and we save the liveness info of @@ -2275,6 +2275,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) } // if (ins->cil_code) // g_print ("cil code\n"); + mono_debug_record_line_number (cfg, ins, offset); switch (ins->opcode) { case OP_BIGMUL: @@ -2686,7 +2687,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) */ ppc_mulhwu (code, ppc_r0, ins->sreg1, ins->sreg2); ppc_cmpi (code, 0, 0, ppc_r0, 0); - EMIT_COND_SYSTEM_EXCEPTION (CEE_BNE_UN - CEE_BEQ, ins->inst_p1); + EMIT_COND_SYSTEM_EXCEPTION (CEE_BNE_UN - CEE_BEQ, "OverflowException"); ppc_mullw (code, ins->dreg, ins->sreg1, ins->sreg2); break; case OP_ICONST: @@ -3409,6 +3410,8 @@ mono_arch_emit_prolog (MonoCompile *cfg) ArgInfo *ainfo = cinfo->args + i; inst = cfg->varinfo [pos]; + if (cfg->verbose_level > 2) + g_print ("Saving argument %d (type: %d)\n", i, ainfo->regtype); if (inst->opcode == OP_REGVAR) { if (ainfo->regtype == RegTypeGeneral) ppc_mr (code, inst->dreg, ainfo->reg); diff --git a/mono/mini/mini-s390.c b/mono/mini/mini-s390.c index 101c5c7ec76..0a7db247fa2 100644 --- a/mono/mini/mini-s390.c +++ b/mono/mini/mini-s390.c @@ -2944,6 +2944,8 @@ guint8 cond; code = cfg->native_code + offset; } + mono_debug_record_line_number (cfg, ins, offset); + switch (ins->opcode) { case OP_STOREI1_MEMBASE_IMM: { s390_lhi (code, s390_r14, ins->inst_imm); diff --git a/mono/mini/mini-sparc.c b/mono/mini/mini-sparc.c index 54fd7fda138..d0f58dc84cf 100644 --- a/mono/mini/mini-sparc.c +++ b/mono/mini/mini-sparc.c @@ -2546,6 +2546,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) code_start = (guint8*)code; // if (ins->cil_code) // g_print ("cil code\n"); + mono_debug_record_line_number (cfg, ins, offset); switch (ins->opcode) { case OP_STOREI1_MEMBASE_IMM: diff --git a/mono/tests/Makefile.am b/mono/tests/Makefile.am index 23cc36cc3cc..2ac008e74c4 100644 --- a/mono/tests/Makefile.am +++ b/mono/tests/Makefile.am @@ -41,6 +41,7 @@ TEST_CS_SRC= \ exception16.cs \ struct.cs \ valuetype-gettype.cs \ + typeof-ptr.cs \ static-constructor.cs \ pinvoke.cs \ pinvoke1.cs \ diff --git a/mono/tests/typeof-ptr.cs b/mono/tests/typeof-ptr.cs new file mode 100644 index 00000000000..eea3d1072db --- /dev/null +++ b/mono/tests/typeof-ptr.cs @@ -0,0 +1,20 @@ +using System; +using System.Reflection; + +class T { + public static unsafe void meth (int a, int* b) { + } + static int Main () { + ParameterInfo[] args = typeof (T).GetMethod ("meth").GetParameters (); + if (args[0].ParameterType == args[1].ParameterType) + return 1; + + if (typeof(int) == typeof (int*)) + return 2; + if (args[0].ParameterType != typeof(int)) + return 3; + if (args[1].ParameterType != typeof(int*)) + return 4; + return 0; + } +} diff --git a/web/download b/web/download index 6a9789d3744..3992312f61f 100644 --- a/web/download +++ b/web/download @@ -14,21 +14,123 @@ Online API documentation for Mono is available in the `monodoc' package. - Gtk-sharp is package to build GUI applications with the Gtk toolkit. - + Gtk# is package to build GUI applications with the Gtk+ toolkit. The software is also available on the `Mono' channel in <a href="http://www.ximian.com/products/redcarpet/">Red Carpet</a>. - Some useful links: the <a - href="http://www.go-mono.org/faq.html">FAQ</a>. - - Packages can find RPM Spec files and other resources in the <a + Packagers can find RPM Spec files and other resources in the <a href="http://www.go-mono.com/packagers/">packagers page</a>. <table> <tbody> <tr bgcolor="#DDDDDD"> <td> + <b>Mono 1.0</b><br> + <a href="archive/1.0/index.html">Release notes</a><br> + June 30th, 2004 + </td> + <td> + <table cellspacing="1" cellpadding="3"> + <tr bgcolor="#BBBBBB"> + <td> + <b>Source Code</b> + </td> + <td> + <ul> + <li><a href="archive/1.0/mono-1.0.tar.gz">Mono Runtime 1.0</a> + <li><a href="archive/1.0/mcs-1.0.tar.gz">Mono Class Libraries and C# Compiler 1.0</a> + <li><a href="archive/1.0/libgdiplus-1.0.tar.gz">libgdiplus 1.0</a> + <p> + <li><a href="archive/1.0/monodoc-1.0.tar.gz">MonoDoc 1.0</a> + <li><a href="archive/1.0/xsp-1.0.tar.gz">XSP web server 1.0</a> + <li><a href="archive/1.0/mod_mono-1.0.tar.gz">Apache Mono module 1.0</a> + <p> + <li><a href="archive/1.0/winelib-0.3.tar.gz">Winelib 0.3</a> + <p> + <li><a href="archive/1.0/gtk-sharp-1.0.tar.gz">Gtk# 1.0</a> + <li><a href="archive/1.0/gecko-sharp-0.5.tar.gz">Gecko# 0.5</a> + <li><a href="archive/1.0/gtksourceview-sharp-0.5.tar.gz">Gtk SourceView# 0.5</a> + <li><a href="archive/1.0/monodevelop-0.5.tar.gz">MonoDevelop IDE 0.5</a> + </ul> + </td> + </tr> + <tr bgcolor="#bbbbbb"> + <td bgcolor="#999999"> + <img src="images/redhat-36.gif"><b>Red Hat 9.0/x86</b><br> + </td> + <td> + <a href="archive/1.0/redhat-9-i386">Packages</a> + </td> + </tr> + <tr bgcolor="#bbbbbb"> + <td bgcolor="#999999"> + <img src="images/redhat-36.gif"><b>Fedora Core 1/x86</b><br> + </td> + <td> + <a href="archive/1.0/fedora-1-i386">Packages</a> + <p><a href="http://www.go-mono.com/archive/yum-repository/fedora-1-i386">YUM Repository</a> + </td> + </tr> + <tr bgcolor="#bbbbbb"> + <td bgcolor="#999999"> + <img src="images/redhat-36.gif"><b>Fedora Core 2/x86</b><br> + </td> + <td> + <a href="archive/1.0/fedora-2-i386">Packages</a> + <p><a href="http://www.go-mono.com/archive/yum-repository/fedora-2-i386">YUM Repository</a> + </td> + </tr> + <tr bgcolor="#bbbbbb"> + <td bgcolor="#999999"> + <img src="images/suse-36.gif"><b>SLES 8/x86</b><br> + </td> + <td> + <a href="archive/1.0/sles-8-i386/">Packages</a> + </td> + </tr> + <tr bgcolor="#bbbbbb"> + <td bgcolor="#999999"> + <img src="images/suse-36.gif"><b>SUSE 9/x86</b><br> + </td> + <td> + <a href="archive/1.0/suse-90-i586/">Packages</a> + </td> + </tr> + <tr bgcolor="#bbbbbb"> + <td bgcolor="#999999"> + <img src="images/suse-36.gif"><b>SUSE 9.1/x86</b><br> + </td> + <td> + <a href="archive/1.0/suse-91-i586/">Packages</a> + </td> + </tr> + <tr> + <td bgcolor="#999999"> + <div align="left"><img src="images/windows-36.gif"></div> + <div align="right"><b>Windows installer</b><br><small>Win2k and above</small></div> + </td> + <td> + <a href="archive/1.0/windows/mono-1.0-win32-1.exe">Mono Setup</a> + </td> + </tr> + <tr> + <td bgcolor="#999999"> + <img src="images/macos-36.gif"><b>Mac OS X package</b> + </td> + <td> + <a href="archive/1.0/macos/MonoFramework-1.0.dmg">MonoFramework-1.0.dmg</a> in /Library/Framework + </td> + </tr> + </table> + </td> + </table> + + <hr> + + <table> + <tbody> + <tr bgcolor="#DDDDDD"> + <td> <b>Release Candidate</b><br> <!-- <a href="archive/beta3/beta3.html">Release notes</a><br> --> June 25th, 2004 diff --git a/web/index b/web/index index d701c09c4d5..52a8ced8b09 100644 --- a/web/index +++ b/web/index @@ -1,3 +1,4 @@ +<meta http-equiv="Refresh" content="0"; URL=http://www.mono-project.com/"> <link rel="alternate" type="application/rss+xml" title="RSS" href="index.rss"/> @@ -174,6 +175,26 @@ </a> Wikis. </p> +@item Jun 30th, 2004: Mono 1.0 + + <table> + <tr> + <td> + <img + src="http://www.go-mono.com/archive/1.0/mono1.gif"></td> + <td> + <b>Mono 1.0 has been released!</b><br/> + + <p>Be the first kid in your block to install the + <i>it-took-us-three-years-but-we-did-it</i> development platform. + + <p>Read the <a + href="http://www.go-mono.com/archive/1.0/index.html">release notes</a> + or <a href="http://www.go-mono.com/download.html">download it</a></p> + </td> + </tr> + </table> + @item Jun 23rd, 2004: The Mono Hackers Hall of Fame welcomes John Luke, Dan Morgan and Tim Coleman. The <a href="http://www.go-mono.com/hackers.html">Mono Hackers Hall Of Fame</a> |