Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--configure.in3
-rw-r--r--mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/ChangeLog5
-rw-r--r--mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/Constants.cs272
-rw-r--r--mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/ChangeLog5
-rw-r--r--mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs6
-rw-r--r--mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs4
-rw-r--r--mcs/class/Mono.Posix/Mono.Posix.dll.sources3
-rw-r--r--mcs/class/Mono.Posix/Mono.Posix/ChangeLog4
-rw-r--r--mcs/class/Mono.Posix/Mono.Posix/PeerCred.cs78
-rw-r--r--mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog12
-rw-r--r--mcs/class/Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs12
-rw-r--r--mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs6
-rw-r--r--mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs4
-rw-r--r--mcs/class/Mono.Security/Mono.Security.X509.Extensions/ChangeLog5
-rw-r--r--mcs/class/Mono.Security/Mono.Security.X509.Extensions/KeyUsageExtension.cs17
-rw-r--r--mcs/class/Mono.Security/Mono.Security.X509/ChangeLog6
-rw-r--r--mcs/class/Mono.Security/Mono.Security.X509/X501Name.cs2
-rw-r--r--mcs/class/Mono.Security/Mono.Security.X509/X520Attributes.cs12
-rw-r--r--mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog3
-rw-r--r--mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs2
-rwxr-xr-xmcs/class/System.Data/System.Data.Common/ChangeLog8
-rw-r--r--mcs/class/System.Data/System.Data.Common/DataContainer.cs4
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbDataRecord.cs2
-rw-r--r--mcs/class/System.Data/System.Data.Odbc/ChangeLog30
-rw-r--r--mcs/class/System.Data/System.Data.Odbc/OdbcCommand.cs51
-rw-r--r--mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs28
-rw-r--r--mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs38
-rw-r--r--mcs/class/System.Data/System.Data.Odbc/OdbcParameter.cs3
-rwxr-xr-xmcs/class/System.Data/System.Data.SqlClient/ChangeLog6
-rw-r--r--mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs4
-rw-r--r--mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs3
-rw-r--r--mcs/class/System.Data/System.Data/ChangeLog15
-rw-r--r--mcs/class/System.Data/System.Data/DataSet.cs81
-rwxr-xr-xmcs/class/System.Data/System.Data/XmlConstants.cs2
-rw-r--r--mcs/class/System.Data/Test/ChangeLog7
-rw-r--r--mcs/class/System.Data/Test/MSSqlTestBed.cs100
-rw-r--r--mcs/class/System.Data/Test/System.Data.Common/ChangeLog3
-rw-r--r--mcs/class/System.Data/Test/System.Data.Common/DataContainerTest.cs104
-rw-r--r--mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog11
-rw-r--r--mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs113
-rw-r--r--mcs/class/System.Drawing/System.Drawing/ChangeLog4
-rw-r--r--mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs6
-rw-r--r--mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/ChangeLog5
-rw-r--r--mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs3
-rw-r--r--mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/ChangeLog11
-rw-r--r--mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/SoapMessageFormatter.cs28
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog5
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.Xml/Signature.cs5
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog5
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpWebClientProtocol.cs36
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs12
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/AspParser.cs9
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/ChangeLog15
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/IImplicitResourceProvider.cs42
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/IResourceReader.cs39
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/ImplicitResourceKey.cs43
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Configuration/ChangeLog5
-rw-r--r--mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs14
-rw-r--r--mcs/class/System.Web/System.Web.Handlers/ChangeLog4
-rw-r--r--mcs/class/System.Web/System.Web.Handlers/TraceHandler.cs19
-rw-r--r--mcs/class/System.Web/System.Web.Mail/ChangeLog6
-rw-r--r--mcs/class/System.Web/System.Web.Mail/SmtpClient.cs3
-rw-r--r--mcs/class/System.Web/System.Web.Security/ChangeLog5
-rw-r--r--mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs7
-rw-r--r--mcs/class/System.Web/System.Web.SessionState/ChangeLog5
-rw-r--r--mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs2
-rwxr-xr-xmcs/class/System.Web/System.Web.UI.WebControls/BaseValidator.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog15
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/ChangeLog16
-rwxr-xr-xmcs/class/System.Web/System.Web.UI/Page.cs18
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageParser.cs14
-rwxr-xr-xmcs/class/System.Web/System.Web.UI/TemplateControl.cs6
-rw-r--r--mcs/class/System.Web/System.Web.Util/ChangeLog5
-rw-r--r--mcs/class/System.Web/System.Web.Util/UrlUtils.cs6
-rw-r--r--mcs/class/System.Web/System.Web/ChangeLog29
-rw-r--r--mcs/class/System.Web/System.Web/HttpApplication.cs13
-rw-r--r--mcs/class/System.Web/System.Web/HttpCookie.cs5
-rw-r--r--mcs/class/System.Web/System.Web/HttpServerUtility.cs3
-rw-r--r--mcs/class/System.Web/System.Web/HttpUtility.cs6
-rw-r--r--mcs/class/System.Web/System.Web/TraceContext.cs9
-rw-r--r--mcs/class/System.XML/Mono.Xml.XPath/ChangeLog7
-rw-r--r--mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs15
-rwxr-xr-xmcs/class/System.XML/System.Xml.Serialization/ChangeLog6
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs1
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/XmlCustomFormatter.cs4
-rw-r--r--mcs/class/System.XML/System.Xml/ChangeLog31
-rw-r--r--mcs/class/System.XML/System.Xml/XmlElement.cs8
-rw-r--r--mcs/class/System.XML/System.Xml/XmlNode.cs2
-rw-r--r--mcs/class/System.XML/System.Xml/XmlTextReader.cs69
-rw-r--r--mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs4
-rw-r--r--mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs5
-rw-r--r--mcs/class/System/Microsoft.CSharp/ChangeLog10
-rwxr-xr-xmcs/class/System/System.CodeDom.Compiler/ChangeLog11
-rwxr-xr-xmcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs44
-rw-r--r--mcs/class/System/System.CodeDom/ChangeLog5
-rw-r--r--mcs/class/System/System.CodeDom/CodeEntryPointMethod.cs4
-rw-r--r--mcs/class/System/System.Net.Sockets/ChangeLog26
-rw-r--r--mcs/class/System/System.Net.Sockets/Socket.cs61
-rw-r--r--mcs/class/System/System.Net/ChangeLog49
-rw-r--r--mcs/class/System/System.Net/Cookie.cs35
-rw-r--r--mcs/class/System/System.Net/HttpWebRequest.cs6
-rw-r--r--mcs/class/System/System.Net/HttpWebResponse.cs146
-rw-r--r--mcs/class/System/System.Net/WebConnection.cs60
-rw-r--r--mcs/class/System/System.Net/WebConnectionStream.cs15
-rw-r--r--mcs/class/System/System.Net/WebHeaderCollection.cs47
-rw-r--r--mcs/class/System/System.Net/WebProxy.cs2
-rw-r--r--mcs/class/corlib/System.Collections/ChangeLog10
-rwxr-xr-xmcs/class/corlib/System.Collections/DictionaryBase.cs44
-rw-r--r--mcs/class/corlib/System.Collections/Hashtable.cs5
-rw-r--r--mcs/class/corlib/System.Globalization/ChangeLog5
-rw-r--r--mcs/class/corlib/System.Globalization/NumberFormatInfo.cs5
-rw-r--r--mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog4
-rw-r--r--mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageInfo.cs2
-rw-r--r--mcs/class/corlib/System.IO/ChangeLog32
-rw-r--r--mcs/class/corlib/System.IO/CheckPermission.cs2
-rw-r--r--mcs/class/corlib/System.IO/File.cs6
-rw-r--r--mcs/class/corlib/System.IO/FileInfo.cs2
-rw-r--r--mcs/class/corlib/System.IO/FileStream.cs2
-rw-r--r--mcs/class/corlib/System.IO/MonoIO.cs11
-rw-r--r--mcs/class/corlib/System.IO/StreamWriter.cs18
-rwxr-xr-xmcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs8
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ChangeLog9
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/ChangeLog9
-rw-r--r--mcs/class/corlib/System.Reflection/Module.cs23
-rw-r--r--mcs/class/corlib/System.Reflection/common.src25
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting.Channels/ChangeLog5
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting.Channels/ChannelServices.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting.Messaging/ChangeLog5
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs7
-rwxr-xr-xmcs/class/corlib/System.Runtime.Remoting/ChangeLog18
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs4
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs56
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting/ServerIdentity.cs8
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/ChangeLog6
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/DES.cs6
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/RC2.cs6
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/TripleDES.cs6
-rw-r--r--mcs/class/corlib/System.Threading/ChangeLog12
-rwxr-xr-xmcs/class/corlib/System.Threading/Thread.cs25
-rwxr-xr-xmcs/class/corlib/System.Threading/Timer.cs5
-rw-r--r--mcs/class/corlib/System/ChangeLog21
-rw-r--r--mcs/class/corlib/System/DateTime.cs4
-rw-r--r--mcs/class/corlib/System/Double.cs4
-rw-r--r--mcs/class/corlib/System/MonoType.cs47
-rw-r--r--mcs/class/corlib/System/Version.cs7
-rw-r--r--mcs/class/corlib/Test/System.Collections/ChangeLog4
-rw-r--r--mcs/class/corlib/Test/System.Collections/ComparerTest.cs11
-rw-r--r--mcs/class/corlib/Test/System.Reflection/ChangeLog4
-rw-r--r--mcs/class/corlib/Test/System/ChangeLog5
-rw-r--r--mcs/class/corlib/Test/System/VersionTest.cs6
-rw-r--r--mcs/errors/cs0502.cs11
-rw-r--r--mcs/ilasm/AssemblyInfo.cs2
-rw-r--r--mcs/mcs/AssemblyInfo.cs2
-rwxr-xr-xmcs/mcs/ChangeLog102
-rwxr-xr-xmcs/mcs/assign.cs62
-rwxr-xr-xmcs/mcs/cfold.cs3
-rwxr-xr-xmcs/mcs/class.cs6
-rwxr-xr-xmcs/mcs/cs-tokenizer.cs4
-rw-r--r--mcs/mcs/delegate.cs78
-rwxr-xr-xmcs/mcs/ecore.cs35
-rwxr-xr-xmcs/mcs/enum.cs1
-rwxr-xr-xmcs/mcs/expression.cs26
-rw-r--r--mcs/mcs/iterators.cs24
-rwxr-xr-xmcs/mcs/statement.cs17
-rwxr-xr-xmcs/mcs/typemanager.cs2
-rwxr-xr-xmcs/tests/ChangeLog6
-rw-r--r--mcs/tests/Makefile5
-rw-r--r--mcs/tests/test-280.cs23
-rw-r--r--mcs/tests/test-283.cs33
-rw-r--r--mcs/tests/test-284.cs7
-rw-r--r--mcs/tools/mono-rpm-helpers/ChangeLog11
-rw-r--r--mcs/tools/mono-rpm-helpers/mono-find-provides/mono-find-provides.cs9
-rw-r--r--mcs/tools/mono-rpm-helpers/mono-find-requires/mono-find-requires.cs4
-rw-r--r--mcs/tools/mono-xsd/ChangeLog15
-rwxr-xr-xmcs/tools/mono-xsd/NewMonoXSD.cs45
-rw-r--r--mcs/tools/security/AssemblyInfo.cs2
-rw-r--r--mcs/tools/security/ChangeLog5
-rw-r--r--mcs/tools/security/sn.cs12
-rw-r--r--mono/io-layer/ChangeLog79
-rw-r--r--mono/io-layer/daemon.c52
-rw-r--r--mono/io-layer/error.c8
-rw-r--r--mono/io-layer/handles-private.h80
-rw-r--r--mono/io-layer/handles.c166
-rw-r--r--mono/io-layer/io-private.h6
-rw-r--r--mono/io-layer/io.c660
-rw-r--r--mono/io-layer/socket-private.h2
-rw-r--r--mono/io-layer/sockets.c381
-rw-r--r--mono/io-layer/wapi-private.h16
-rw-r--r--mono/metadata/ChangeLog123
-rw-r--r--mono/metadata/appdomain.c32
-rw-r--r--mono/metadata/assembly.c14
-rw-r--r--mono/metadata/culture-info-tables.h450
-rw-r--r--mono/metadata/debug-mono-symfile.c35
-rw-r--r--mono/metadata/filewatcher.c13
-rw-r--r--mono/metadata/gc.c2
-rw-r--r--mono/metadata/image.c21
-rw-r--r--mono/metadata/loader.c70
-rw-r--r--mono/metadata/locales.c1
-rw-r--r--mono/metadata/marshal.c25
-rw-r--r--mono/metadata/mono-debug.c66
-rw-r--r--mono/metadata/object.c29
-rw-r--r--mono/metadata/process.c4
-rw-r--r--mono/metadata/reflection.c44
-rw-r--r--mono/metadata/reflection.h1
-rw-r--r--mono/metadata/threadpool.c45
-rw-r--r--mono/metadata/threads.c5
-rw-r--r--mono/mini/ChangeLog19
-rw-r--r--mono/mini/basic-long.cs6
-rw-r--r--mono/mini/cpu-g4.md2
-rw-r--r--mono/mini/cpu-pentium.md2
-rw-r--r--mono/mini/cpu-s390.md2
-rw-r--r--mono/mini/cpu-sparc.md2
-rw-r--r--mono/mini/inssel-long32.brg23
-rw-r--r--mono/mini/inssel.brg9
-rw-r--r--mono/mini/mini-ops.h2
-rw-r--r--mono/mini/mini-ppc.c14
-rw-r--r--mono/mini/mini-s390.c2
-rw-r--r--mono/mini/mini-sparc.c2
-rw-r--r--mono/mini/mini-x86.c2
-rw-r--r--mono/mini/mini.c8
-rw-r--r--mono/tests/ChangeLog6
-rw-r--r--mono/tests/typeof-ptr.cs16
-rwxr-xr-xtools/locale-builder/supp/ChangeLog6
-rwxr-xr-xtools/locale-builder/supp/pt.xml12
-rwxr-xr-xtools/locale-builder/supp/pt_BR.xml2
-rw-r--r--web/download114
-rw-r--r--web/index21
233 files changed, 2757 insertions, 3254 deletions
diff --git a/ChangeLog b/ChangeLog
index cd09bef3dcd..bf710d6e16c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * configure.in: added check for kqueue. Patch from Geoff Norton
+ in HEAD.
+
2004-08-17 Dick Porter <dick@ximian.com>
* configure.in: Correct intl library for FreeBSD and OpenBSD.
diff --git a/configure.in b/configure.in
index 94361a0cb06..93d6bce8f8c 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(mono,1.0.1)
+AM_INIT_AUTOMAKE(mono,1.0.3)
AM_MAINTAINER_MODE
AC_PROG_LN_S
@@ -466,6 +466,7 @@ if test x$platform_win32 = xno; then
AC_CHECK_FUNCS(getpwuid_r)
AC_CHECK_FUNCS(getresuid)
AC_CHECK_FUNCS(setresuid)
+ AC_CHECK_FUNCS(kqueue)
dnl ******************************************************************
dnl *** Check for large file support ***
diff --git a/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/ChangeLog b/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/ChangeLog
index 594c2b007f8..e0aaa445669 100644
--- a/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/ChangeLog
+++ b/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/ChangeLog
@@ -1,8 +1,3 @@
-2004-07-22 Jambunathan K <kjambunathan@novell.com>
-
- * Constants.cs: Fixed definitions of vbCr, vbLf, vbCrLf and
- vbNewLine
-
2004-06-24 Jambunathan K <kjambunathan@novell.com>
* RandomVBFile.cs: Fixed FileGet() for Date and Decimal types
* FileSystem.cs: Fixed ChDir, FileCopy
diff --git a/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/Constants.cs b/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/Constants.cs
index 16fc0d5da8f..310051ccf03 100644
--- a/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/Constants.cs
+++ b/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/Constants.cs
@@ -1,11 +1,11 @@
-//
-// Constants.cs
-//
-// Author:
-// Chris J Breisch (cjbreisch@altavista.net)
-//
-// (C) 2002 Chris J Breisch
-//
+//
+// Constants.cs
+//
+// Author:
+// Chris J Breisch (cjbreisch@altavista.net)
+//
+// (C) 2002 Chris J Breisch
+//
//
// Copyright (c) 2002-2003 Mainsoft Corporation.
@@ -30,131 +30,131 @@
// 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;
-
-namespace Microsoft.VisualBasic {
- [Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
- sealed public class Constants {
- // Declarations
- public const System.Int32 vbObjectError = (System.Int32)(-2147221504);
- public const System.String vbCrLf = "\r\n";
- public const System.String vbNewLine = "\r\n";
- public const System.String vbCr = "\r";
- public const System.String vbLf = "\n";
- public const System.String vbBack = "\b";
- public const System.String vbFormFeed = "\f";
- public const System.String vbTab = "\t";
- public const System.String vbVerticalTab = "\v";
- public const System.String vbNullChar = "\0";
- public const System.String vbNullString = "";
-
- public const AppWinStyle vbHide = AppWinStyle.Hide;
- public const AppWinStyle vbNormalFocus = AppWinStyle.NormalFocus;
- public const AppWinStyle vbMinimizedFocus = AppWinStyle.MinimizedFocus;
- public const AppWinStyle vbMaximizedFocus = AppWinStyle.MaximizedFocus;
- public const AppWinStyle vbNormalNoFocus = AppWinStyle.NormalNoFocus;
- public const AppWinStyle vbMinimizedNoFocus = AppWinStyle.MinimizedNoFocus;
-
- public const CallType vbMethod = CallType.Method;
- public const CallType vbGet = CallType.Get;
- public const CallType vbLet = CallType.Let;
- public const CallType vbSet = CallType.Set;
-
- public const CompareMethod vbBinaryCompare = CompareMethod.Binary;
- public const CompareMethod vbTextCompare = CompareMethod.Text;
-
- public const DateFormat vbGeneralDate = DateFormat.GeneralDate;
- public const DateFormat vbLongDate = DateFormat.LongDate;
- public const DateFormat vbShortDate = DateFormat.ShortDate;
- public const DateFormat vbLongTime = DateFormat.LongTime;
- public const DateFormat vbShortTime = DateFormat.ShortTime;
-
- public const FirstDayOfWeek vbUseSystemDayOfWeek = FirstDayOfWeek.System;
- public const FirstDayOfWeek vbSunday = FirstDayOfWeek.Sunday;
- public const FirstDayOfWeek vbMonday = FirstDayOfWeek.Monday;
- public const FirstDayOfWeek vbTuesday = FirstDayOfWeek.Tuesday;
- public const FirstDayOfWeek vbWednesday = FirstDayOfWeek.Wednesday;
- public const FirstDayOfWeek vbThursday = FirstDayOfWeek.Thursday;
- public const FirstDayOfWeek vbFriday = FirstDayOfWeek.Friday;
- public const FirstDayOfWeek vbSaturday = FirstDayOfWeek.Saturday;
-
- public const FileAttribute vbNormal = FileAttribute.Normal;
- public const FileAttribute vbReadOnly = FileAttribute.ReadOnly;
- public const FileAttribute vbHidden = FileAttribute.Hidden;
- public const FileAttribute vbSystem = FileAttribute.System;
- public const FileAttribute vbVolume = FileAttribute.Volume;
- public const FileAttribute vbDirectory = FileAttribute.Directory;
- public const FileAttribute vbArchive = FileAttribute.Archive;
-
- public const FirstWeekOfYear vbUseSystem = FirstWeekOfYear.System;
- public const FirstWeekOfYear vbFirstJan1 = FirstWeekOfYear.Jan1;
- public const FirstWeekOfYear vbFirstFourDays = FirstWeekOfYear.FirstFourDays;
- public const FirstWeekOfYear vbFirstFullWeek = FirstWeekOfYear.FirstFullWeek;
-
- public const VbStrConv vbUpperCase = VbStrConv.UpperCase;
- public const VbStrConv vbLowerCase = VbStrConv.LowerCase;
- public const VbStrConv vbProperCase = VbStrConv.ProperCase;
- public const VbStrConv vbWide = VbStrConv.Wide;
- public const VbStrConv vbNarrow = VbStrConv.Narrow;
- public const VbStrConv vbKatakana = VbStrConv.Katakana;
- public const VbStrConv vbHiragana = VbStrConv.Hiragana;
- public const VbStrConv vbSimplifiedChinese = VbStrConv.SimplifiedChinese;
- public const VbStrConv vbTraditionalChinese = VbStrConv.TraditionalChinese;
- public const VbStrConv vbLinguisticCasing = VbStrConv.LinguisticCasing;
-
- public const TriState vbUseDefault = TriState.UseDefault;
- public const TriState vbTrue = TriState.True;
- public const TriState vbFalse = TriState.False;
-
- public const VariantType vbEmpty = VariantType.Empty;
- public const VariantType vbNull = VariantType.Null;
- public const VariantType vbInteger = VariantType.Integer;
- public const VariantType vbLong = VariantType.Long;
- public const VariantType vbSingle = VariantType.Single;
- public const VariantType vbDouble = VariantType.Double;
- public const VariantType vbCurrency = VariantType.Currency;
- public const VariantType vbDate = VariantType.Date;
- public const VariantType vbString = VariantType.String;
- public const VariantType vbObject = VariantType.Object;
- public const VariantType vbBoolean = VariantType.Boolean;
- public const VariantType vbVariant = VariantType.Variant;
- public const VariantType vbDecimal = VariantType.Decimal;
- public const VariantType vbByte = VariantType.Byte;
- public const VariantType vbUserDefinedType = VariantType.UserDefinedType;
- public const VariantType vbArray = VariantType.Array;
-
- public const MsgBoxResult vbOK = MsgBoxResult.OK;
- public const MsgBoxResult vbCancel = MsgBoxResult.Cancel;
- public const MsgBoxResult vbAbort = MsgBoxResult.Abort;
- public const MsgBoxResult vbRetry = MsgBoxResult.Retry;
- public const MsgBoxResult vbIgnore = MsgBoxResult.Ignore;
- public const MsgBoxResult vbYes = MsgBoxResult.Yes;
- public const MsgBoxResult vbNo = MsgBoxResult.No;
-
- public const MsgBoxStyle vbOKOnly = MsgBoxStyle.OKOnly;
- public const MsgBoxStyle vbOKCancel = MsgBoxStyle.OKCancel;
- public const MsgBoxStyle vbAbortRetryIgnore = MsgBoxStyle.AbortRetryIgnore;
- public const MsgBoxStyle vbYesNoCancel = MsgBoxStyle.YesNoCancel;
- public const MsgBoxStyle vbYesNo = MsgBoxStyle.YesNo;
- public const MsgBoxStyle vbRetryCancel = MsgBoxStyle.RetryCancel;
- public const MsgBoxStyle vbCritical = MsgBoxStyle.Critical;
- public const MsgBoxStyle vbQuestion = MsgBoxStyle.Question;
- public const MsgBoxStyle vbExclamation = MsgBoxStyle.Exclamation;
- public const MsgBoxStyle vbInformation = MsgBoxStyle.Information;
- public const MsgBoxStyle vbDefaultButton1 = MsgBoxStyle.DefaultButton1;
- public const MsgBoxStyle vbDefaultButton2 = MsgBoxStyle.DefaultButton2;
- public const MsgBoxStyle vbDefaultButton3 = MsgBoxStyle.DefaultButton3;
- public const MsgBoxStyle vbApplicationModal = MsgBoxStyle.ApplicationModal;
- public const MsgBoxStyle vbSystemModal = MsgBoxStyle.SystemModal;
- public const MsgBoxStyle vbMsgBoxHelp = MsgBoxStyle.MsgBoxHelp;
- public const MsgBoxStyle vbMsgBoxRight = MsgBoxStyle.MsgBoxRight;
- public const MsgBoxStyle vbMsgBoxRtlReading = MsgBoxStyle.MsgBoxRtlReading;
- public const MsgBoxStyle vbMsgBoxSetForeground = MsgBoxStyle.MsgBoxSetForeground;
-
- // Constructors
- // Properties
- // Methods
- // Events
- };
-}
+
+using System;
+
+namespace Microsoft.VisualBasic {
+ [Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
+ sealed public class Constants {
+ // Declarations
+ public const System.Int32 vbObjectError = (System.Int32)(-2147221504);
+ public const System.String vbCrLf = "\n\r";
+ public const System.String vbNewLine = "\n\r";
+ public const System.String vbCr = "\n";
+ public const System.String vbLf = "\r";
+ public const System.String vbBack = "\b";
+ public const System.String vbFormFeed = "\f";
+ public const System.String vbTab = "\t";
+ public const System.String vbVerticalTab = "\v";
+ public const System.String vbNullChar = "\0";
+ public const System.String vbNullString = "";
+
+ public const AppWinStyle vbHide = AppWinStyle.Hide;
+ public const AppWinStyle vbNormalFocus = AppWinStyle.NormalFocus;
+ public const AppWinStyle vbMinimizedFocus = AppWinStyle.MinimizedFocus;
+ public const AppWinStyle vbMaximizedFocus = AppWinStyle.MaximizedFocus;
+ public const AppWinStyle vbNormalNoFocus = AppWinStyle.NormalNoFocus;
+ public const AppWinStyle vbMinimizedNoFocus = AppWinStyle.MinimizedNoFocus;
+
+ public const CallType vbMethod = CallType.Method;
+ public const CallType vbGet = CallType.Get;
+ public const CallType vbLet = CallType.Let;
+ public const CallType vbSet = CallType.Set;
+
+ public const CompareMethod vbBinaryCompare = CompareMethod.Binary;
+ public const CompareMethod vbTextCompare = CompareMethod.Text;
+
+ public const DateFormat vbGeneralDate = DateFormat.GeneralDate;
+ public const DateFormat vbLongDate = DateFormat.LongDate;
+ public const DateFormat vbShortDate = DateFormat.ShortDate;
+ public const DateFormat vbLongTime = DateFormat.LongTime;
+ public const DateFormat vbShortTime = DateFormat.ShortTime;
+
+ public const FirstDayOfWeek vbUseSystemDayOfWeek = FirstDayOfWeek.System;
+ public const FirstDayOfWeek vbSunday = FirstDayOfWeek.Sunday;
+ public const FirstDayOfWeek vbMonday = FirstDayOfWeek.Monday;
+ public const FirstDayOfWeek vbTuesday = FirstDayOfWeek.Tuesday;
+ public const FirstDayOfWeek vbWednesday = FirstDayOfWeek.Wednesday;
+ public const FirstDayOfWeek vbThursday = FirstDayOfWeek.Thursday;
+ public const FirstDayOfWeek vbFriday = FirstDayOfWeek.Friday;
+ public const FirstDayOfWeek vbSaturday = FirstDayOfWeek.Saturday;
+
+ public const FileAttribute vbNormal = FileAttribute.Normal;
+ public const FileAttribute vbReadOnly = FileAttribute.ReadOnly;
+ public const FileAttribute vbHidden = FileAttribute.Hidden;
+ public const FileAttribute vbSystem = FileAttribute.System;
+ public const FileAttribute vbVolume = FileAttribute.Volume;
+ public const FileAttribute vbDirectory = FileAttribute.Directory;
+ public const FileAttribute vbArchive = FileAttribute.Archive;
+
+ public const FirstWeekOfYear vbUseSystem = FirstWeekOfYear.System;
+ public const FirstWeekOfYear vbFirstJan1 = FirstWeekOfYear.Jan1;
+ public const FirstWeekOfYear vbFirstFourDays = FirstWeekOfYear.FirstFourDays;
+ public const FirstWeekOfYear vbFirstFullWeek = FirstWeekOfYear.FirstFullWeek;
+
+ public const VbStrConv vbUpperCase = VbStrConv.UpperCase;
+ public const VbStrConv vbLowerCase = VbStrConv.LowerCase;
+ public const VbStrConv vbProperCase = VbStrConv.ProperCase;
+ public const VbStrConv vbWide = VbStrConv.Wide;
+ public const VbStrConv vbNarrow = VbStrConv.Narrow;
+ public const VbStrConv vbKatakana = VbStrConv.Katakana;
+ public const VbStrConv vbHiragana = VbStrConv.Hiragana;
+ public const VbStrConv vbSimplifiedChinese = VbStrConv.SimplifiedChinese;
+ public const VbStrConv vbTraditionalChinese = VbStrConv.TraditionalChinese;
+ public const VbStrConv vbLinguisticCasing = VbStrConv.LinguisticCasing;
+
+ public const TriState vbUseDefault = TriState.UseDefault;
+ public const TriState vbTrue = TriState.True;
+ public const TriState vbFalse = TriState.False;
+
+ public const VariantType vbEmpty = VariantType.Empty;
+ public const VariantType vbNull = VariantType.Null;
+ public const VariantType vbInteger = VariantType.Integer;
+ public const VariantType vbLong = VariantType.Long;
+ public const VariantType vbSingle = VariantType.Single;
+ public const VariantType vbDouble = VariantType.Double;
+ public const VariantType vbCurrency = VariantType.Currency;
+ public const VariantType vbDate = VariantType.Date;
+ public const VariantType vbString = VariantType.String;
+ public const VariantType vbObject = VariantType.Object;
+ public const VariantType vbBoolean = VariantType.Boolean;
+ public const VariantType vbVariant = VariantType.Variant;
+ public const VariantType vbDecimal = VariantType.Decimal;
+ public const VariantType vbByte = VariantType.Byte;
+ public const VariantType vbUserDefinedType = VariantType.UserDefinedType;
+ public const VariantType vbArray = VariantType.Array;
+
+ public const MsgBoxResult vbOK = MsgBoxResult.OK;
+ public const MsgBoxResult vbCancel = MsgBoxResult.Cancel;
+ public const MsgBoxResult vbAbort = MsgBoxResult.Abort;
+ public const MsgBoxResult vbRetry = MsgBoxResult.Retry;
+ public const MsgBoxResult vbIgnore = MsgBoxResult.Ignore;
+ public const MsgBoxResult vbYes = MsgBoxResult.Yes;
+ public const MsgBoxResult vbNo = MsgBoxResult.No;
+
+ public const MsgBoxStyle vbOKOnly = MsgBoxStyle.OKOnly;
+ public const MsgBoxStyle vbOKCancel = MsgBoxStyle.OKCancel;
+ public const MsgBoxStyle vbAbortRetryIgnore = MsgBoxStyle.AbortRetryIgnore;
+ public const MsgBoxStyle vbYesNoCancel = MsgBoxStyle.YesNoCancel;
+ public const MsgBoxStyle vbYesNo = MsgBoxStyle.YesNo;
+ public const MsgBoxStyle vbRetryCancel = MsgBoxStyle.RetryCancel;
+ public const MsgBoxStyle vbCritical = MsgBoxStyle.Critical;
+ public const MsgBoxStyle vbQuestion = MsgBoxStyle.Question;
+ public const MsgBoxStyle vbExclamation = MsgBoxStyle.Exclamation;
+ public const MsgBoxStyle vbInformation = MsgBoxStyle.Information;
+ public const MsgBoxStyle vbDefaultButton1 = MsgBoxStyle.DefaultButton1;
+ public const MsgBoxStyle vbDefaultButton2 = MsgBoxStyle.DefaultButton2;
+ public const MsgBoxStyle vbDefaultButton3 = MsgBoxStyle.DefaultButton3;
+ public const MsgBoxStyle vbApplicationModal = MsgBoxStyle.ApplicationModal;
+ public const MsgBoxStyle vbSystemModal = MsgBoxStyle.SystemModal;
+ public const MsgBoxStyle vbMsgBoxHelp = MsgBoxStyle.MsgBoxHelp;
+ public const MsgBoxStyle vbMsgBoxRight = MsgBoxStyle.MsgBoxRight;
+ public const MsgBoxStyle vbMsgBoxRtlReading = MsgBoxStyle.MsgBoxRtlReading;
+ public const MsgBoxStyle vbMsgBoxSetForeground = MsgBoxStyle.MsgBoxSetForeground;
+
+ // Constructors
+ // Properties
+ // Methods
+ // Events
+ };
+}
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 8b10478d15b..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,5 +1,6 @@
-2004-08-09 Sureshkumar T <tsureshkumar@novell.com>
- * Tds70.cs - Prepare Method stored procedure handle read problem fixed.
+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>
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/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs
index 010283fb929..0b55a30abe3 100644
--- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs
+++ b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs
@@ -457,9 +457,9 @@ namespace Mono.Data.Tds.Protocol {
parms.Add (new TdsMetaParameter ("@P3", "nvarchar", commandText));
ExecProc ("sp_prepare", parms, 0, true);
- SkipToEnd ();
- if (ColumnValues [0] == null || ColumnValues [0] == DBNull.Value)
+ if (!NextResult () || !NextRow () || ColumnValues [0] == null || ColumnValues [0] == DBNull.Value)
throw new TdsInternalException ();
+ SkipToEnd ();
return ColumnValues [0].ToString ();
}
diff --git a/mcs/class/Mono.Posix/Mono.Posix.dll.sources b/mcs/class/Mono.Posix/Mono.Posix.dll.sources
index b426c78e14a..cf4150a2efb 100644
--- a/mcs/class/Mono.Posix/Mono.Posix.dll.sources
+++ b/mcs/class/Mono.Posix/Mono.Posix.dll.sources
@@ -4,5 +4,4 @@
./Mono.Posix/Syscall.cs
./Mono.Posix/MapAttribute.cs
./Mono.Posix/IncludeAttribute.cs
-./Mono.Posix/Catalog.cs
-./Mono.Posix/PeerCred.cs
+./Mono.Posix/Catalog.cs \ No newline at end of file
diff --git a/mcs/class/Mono.Posix/Mono.Posix/ChangeLog b/mcs/class/Mono.Posix/Mono.Posix/ChangeLog
index c38db5ee850..b6fd766afdc 100644
--- a/mcs/class/Mono.Posix/Mono.Posix/ChangeLog
+++ b/mcs/class/Mono.Posix/Mono.Posix/ChangeLog
@@ -1,7 +1,3 @@
-2004-07-09 Dick Porter <dick@ximian.com>
-
- * PeerCred.cs: Get the unix socket peer credentials.
-
2004-05-26 Miguel de Icaza <miguel@ximian.com>
* Syscall.cs: Do not let the runtime handle strings, as we do not
diff --git a/mcs/class/Mono.Posix/Mono.Posix/PeerCred.cs b/mcs/class/Mono.Posix/Mono.Posix/PeerCred.cs
deleted file mode 100644
index 76071bcbca5..00000000000
--- a/mcs/class/Mono.Posix/Mono.Posix/PeerCred.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// Mono.Posix.PeerCred: Peer credentials class for AF_UNIX sockets
-//
-// Authors:
-// Dick Porter (dick@ximian.com)
-//
-// (C) 2004 Novell, Inc (http://www.novell.com)
-//
-
-//
-// 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.Net.Sockets;
-
-namespace Mono.Posix
-{
- public class PeerCred
- {
- private struct PeerCredData {
- public int pid;
- public int uid;
- public int gid;
- }
-
- /* Make sure this doesn't clash with anything in
- * SocketOptionName, and keep it synchronised with the
- * runtime
- */
- private const int so_peercred=10001;
- private PeerCredData data;
-
- public PeerCred (Socket sock) {
- if (sock.AddressFamily != AddressFamily.Unix) {
- throw new ArgumentException ("Only Unix sockets are supported", "sock");
- }
-
- data = (PeerCredData)sock.GetSocketOption (SocketOptionLevel.Socket, (SocketOptionName)so_peercred);
- }
-
- public int ProcessID {
- get {
- return(data.pid);
- }
- }
-
- public int UserID {
- get {
- return(data.uid);
- }
- }
-
- public int GroupID {
- get {
- return(data.gid);
- }
- }
- }
-}
-
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog
index a5a20358101..e55f1f5ecd8 100644
--- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog
+++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog
@@ -1,15 +1,3 @@
-2004-07-14 Sebastien Pouliot <sebastien@ximian.com>
-
- * SslClientStream.cs: Changed lock to "new object()" and not
- String.Empty (as the read/write locks points becomes the same).
- * SslServerStream.cs: Changed lock to "new object()" and not
- String.Empty (as the read/write locks points becomes the same).
-
-2004-07-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * HttpsClientStream.cs: get an HttpWebRequest so that we can use the
- ServicePoint it has. No need to get the host now.
-
2004-05-09 Carlos Guzman Alvarez <carlosga@telefonica.net>
* Mono.Security.Protocol.Tls/Alert.cs:
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs
index 678cf83163c..1da66f06849 100644
--- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs
@@ -40,13 +40,14 @@ namespace Mono.Security.Protocol.Tls {
internal class HttpsClientStream : SslClientStream {
- private HttpWebRequest _request;
+ private string _host;
+ private WebRequest _request;
- public HttpsClientStream (Stream stream, X509CertificateCollection clientCertificates,
- HttpWebRequest request)
- : base (stream, request.RequestUri.Host, false, SecurityProtocolType.Default, clientCertificates)
+ public HttpsClientStream (Stream stream, string targetHost, X509CertificateCollection clientCertificates, WebRequest request)
+ : base (stream, targetHost, false, SecurityProtocolType.Default, clientCertificates)
{
+ _host = targetHost;
// this constructor permit access to the WebRequest to call
// ICertificatePolicy.CheckValidationResult
_request = request;
@@ -60,7 +61,8 @@ namespace Mono.Security.Protocol.Tls {
{
bool failed = (certificateErrors.Length > 0);
if (ServicePointManager.CertificatePolicy != null) {
- ServicePoint sp = _request.ServicePoint;
+ Uri target = new Uri ("https://" + _host);
+ ServicePoint sp = ServicePointManager.FindServicePoint (target);
// only one problem can be reported by this interface
int problem = ((failed) ? certificateErrors [0] : 0);
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs
index fccfb9902b3..068a24f68c7 100644
--- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs
@@ -349,8 +349,8 @@ namespace Mono.Security.Protocol.Tls
this.inputBuffer = new BufferedStream(new MemoryStream());
this.innerStream = stream;
this.ownsStream = ownsStream;
- this.read = new object ();
- this.write = new object ();
+ this.read = String.Empty;
+ this.write = String.Empty;
this.protocol = new ClientRecordProtocol(innerStream, context);
}
@@ -821,4 +821,4 @@ namespace Mono.Security.Protocol.Tls
#endregion
}
-}
+} \ No newline at end of file
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs
index f2786f7554b..53b3d095def 100644
--- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs
@@ -306,8 +306,8 @@ namespace Mono.Security.Protocol.Tls
this.inputBuffer = new BufferedStream(new MemoryStream());
this.innerStream = stream;
this.ownsStream = ownsStream;
- this.read = new object ();
- this.write = new object ();
+ this.read = String.Empty;
+ this.write = String.Empty;
this.protocol = new ServerRecordProtocol(innerStream, context);
}
diff --git a/mcs/class/Mono.Security/Mono.Security.X509.Extensions/ChangeLog b/mcs/class/Mono.Security/Mono.Security.X509.Extensions/ChangeLog
index b8d2dc9942e..f00dcacd041 100644
--- a/mcs/class/Mono.Security/Mono.Security.X509.Extensions/ChangeLog
+++ b/mcs/class/Mono.Security/Mono.Security.X509.Extensions/ChangeLog
@@ -1,8 +1,3 @@
-2004-07-15 Sebastien Pouliot <sebastien@ximian.com>
-
- * KeyUsageExtension.cs: Added Encode to extension so it can be used
- by makecert. Fix bug # 61240. Patch provided by Ianier Munoz.
-
2004-04-28 Sebastien Pouliot <sebastien@ximian.com>
* KeyUsageExtension.cs: Added missing INSIDE_CORLIB to enum.
diff --git a/mcs/class/Mono.Security/Mono.Security.X509.Extensions/KeyUsageExtension.cs b/mcs/class/Mono.Security/Mono.Security.X509.Extensions/KeyUsageExtension.cs
index 0c5d3b0cf38..a8c5553ed58 100644
--- a/mcs/class/Mono.Security/Mono.Security.X509.Extensions/KeyUsageExtension.cs
+++ b/mcs/class/Mono.Security/Mono.Security.X509.Extensions/KeyUsageExtension.cs
@@ -86,11 +86,6 @@ namespace Mono.Security.X509.Extensions {
public KeyUsageExtension (X509Extension extension) : base (extension) {}
- public KeyUsageExtension () : base ()
- {
- extnOid = "2.5.29.15";
- }
-
protected override void Decode ()
{
ASN1 bitString = new ASN1 (extnValue.Value);
@@ -101,18 +96,6 @@ namespace Mono.Security.X509.Extensions {
kubits = (kubits << 8) + bitString.Value [i++];
}
- protected override void Encode ()
- {
- if (extnValue == null) {
- extnValue = new ASN1 (0x03, new byte[] { 0x00, (byte)kubits });
- }
- }
-
- public KeyUsages KeyUsage {
- get { return (KeyUsages) kubits; }
- set { kubits = Convert.ToInt32 (value, CultureInfo.InvariantCulture); }
- }
-
public override string Name {
get { return "Key Usage"; }
}
diff --git a/mcs/class/Mono.Security/Mono.Security.X509/ChangeLog b/mcs/class/Mono.Security/Mono.Security.X509/ChangeLog
index 38b3d393aa5..14d6852db71 100644
--- a/mcs/class/Mono.Security/Mono.Security.X509/ChangeLog
+++ b/mcs/class/Mono.Security/Mono.Security.X509/ChangeLog
@@ -1,9 +1,3 @@
-2004-07-15 Sebastien Pouliot <sebastien@ximian.com>
-
- * X501Name.cs: Support for E (email) in FromString.
- * X520Attributes.cs: Added X520.EmailAddress.
- Both patches fix bug #61241 and were contributed by Ianier Munoz.
-
2004-05-27 Sebastien Pouliot <sebastien@ximian.com>
* X509Certificate.cs: Rethrow original exception when parsing X.509
diff --git a/mcs/class/Mono.Security/Mono.Security.X509/X501Name.cs b/mcs/class/Mono.Security/Mono.Security.X509/X501Name.cs
index 22e3ea30169..515e24c0b9b 100644
--- a/mcs/class/Mono.Security/Mono.Security.X509/X501Name.cs
+++ b/mcs/class/Mono.Security/Mono.Security.X509/X501Name.cs
@@ -162,8 +162,6 @@ namespace Mono.Security.X509 {
case "S": // Microsoft
case "ST": // RFC2253
return new X520.StateOrProvinceName ();
- case "E": // NOTE: Not part of RFC2253
- return new X520.EmailAddress ();
case "DC":
// return streetAddress;
case "UID":
diff --git a/mcs/class/Mono.Security/Mono.Security.X509/X520Attributes.cs b/mcs/class/Mono.Security/Mono.Security.X509/X520Attributes.cs
index b8feb6a2db6..54a8af9ba23 100644
--- a/mcs/class/Mono.Security/Mono.Security.X509/X520Attributes.cs
+++ b/mcs/class/Mono.Security/Mono.Security.X509/X520Attributes.cs
@@ -101,10 +101,6 @@ namespace Mono.Security.X509 {
// PRINTABLESTRING
asn1.Add (new ASN1 (0x13, Encoding.ASCII.GetBytes (attrValue)));
break;
- case 0x16:
- // IA5STRING
- asn1.Add (new ASN1 (0x16, Encoding.ASCII.GetBytes (attrValue)));
- break;
case 0x1E:
// BMPSTRING
asn1.Add (new ASN1 (0x1E, Encoding.BigEndianUnicode.GetBytes (attrValue)));
@@ -180,14 +176,6 @@ namespace Mono.Security.X509 {
}
}
- // NOTE: Not part of RFC2253
- public class EmailAddress : AttributeTypeAndValue
- {
- public EmailAddress () : base ("1.2.840.113549.1.9.1", 128, 0x16)
- {
- }
- }
-
/* -- Naming attributes of type X520Title
* id-at-title AttributeType ::= { id-at 12 }
*
diff --git a/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog b/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog
index f633f97c624..e4266e2d3cd 100644
--- a/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog
+++ b/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog
@@ -1,6 +1,3 @@
-2004-07-12 Umadevi S <sumadevi@novell.com>
- * Tokenizer.cs - read an Int64 from the text instead of Int32. Resolves bug 61203
-
2004-06-17 Boris Kirzner <borisk@mainsoft.com>
* Comparison.cs - use 'as' to avoid NullReferenceExeption in casting.
diff --git a/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs b/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs
index c3b4eb1faf8..a9b427d1bf0 100644
--- a/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs
+++ b/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs
@@ -122,7 +122,7 @@ namespace Mono.Data.SqlExpressions {
string str = sb.ToString ();
if (str.IndexOf(".") == -1)
- return Int64.Parse (str);
+ return int.Parse (str);
else
return double.Parse (str);
}
diff --git a/mcs/class/System.Data/System.Data.Common/ChangeLog b/mcs/class/System.Data/System.Data.Common/ChangeLog
index 6af8fca9b77..0db883a625e 100755
--- a/mcs/class/System.Data/System.Data.Common/ChangeLog
+++ b/mcs/class/System.Data/System.Data.Common/ChangeLog
@@ -1,11 +1,5 @@
-2004-07-21 Umadevi S <sumadevi@novell.com>
- * DbDataRecord.cs - Fix for bug 58163. Return DBNull instead of null
-
-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>
+
* 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.Common/DbDataRecord.cs b/mcs/class/System.Data/System.Data.Common/DbDataRecord.cs
index 69a2013f64d..0a6fa0e868d 100644
--- a/mcs/class/System.Data/System.Data.Common/DbDataRecord.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbDataRecord.cs
@@ -340,7 +340,7 @@ namespace System.Data.Common {
public bool IsDBNull (int i)
{
- return GetValue (i) == DBNull.Value;
+ return GetValue (i) == null;
}
#if NET_2_0
public virtual bool IsSetAsDefault (int i)
diff --git a/mcs/class/System.Data/System.Data.Odbc/ChangeLog b/mcs/class/System.Data/System.Data.Odbc/ChangeLog
index 8994109ad2c..d8581c1975b 100644
--- a/mcs/class/System.Data/System.Data.Odbc/ChangeLog
+++ b/mcs/class/System.Data/System.Data.Odbc/ChangeLog
@@ -1,33 +1,3 @@
-2004-08-20 Sureshkumar T (tsureshkumar@novell.com)
- * OdbcConnection.cs - correct handles are passed to OdbcError exception to trap the correct error
-
-2004-08-04 Umadevi S (sumadevi@novell.com)
- * OdbcDataReader.cs - Fixed bug 61832 - Column names were not filled, due to which name based lookup of columns failed.
-
-2004-08-04 Umadevi S (sumadevi@novell.com)
- * OdbcDataReader.cs - Fixed bug 61405 - Handling smallint column type.
-
-2004-07-30 Sureshkumar T (tsureshkumar@novell.com)
- * OdbcCommand.cs: ExecuteNonQuery Closed statement handle to fix memory leak
- * OdbcDataReader.cs: Closed statement handle to fix memory leak
- Removed SQLState login in GetBytes coz OdbcError provides the same.
-
-2004-07-29 Umadevi S (sumadevi@novell.com)
- * OdbcCommand.cs - Fixed bug 62046. ExecuteNonQuery implemented correctly
-
-2004-07-28 Umadevi S (sumadevi@novell.com)
- * OdbcParameter.cs - fixed bug 61968. String values passed with quotes
-
-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 64c4fcfe661..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 ();
}
}
@@ -292,12 +285,6 @@ namespace System.Data.Odbc
public int ExecuteNonQuery ()
{
- return ExecuteNonQuery (true);
- }
-
- private int ExecuteNonQuery (bool freeHandle)
- {
- int records = 0;
if (connection == null)
throw new InvalidOperationException ();
if (connection.State == ConnectionState.Closed)
@@ -305,29 +292,12 @@ namespace System.Data.Odbc
// FIXME: a third check is mentioned in .NET docs
ExecSQL(CommandText);
-
- // .NET documentation says that except for INSERT, UPDATE and
- // DELETE where the return value is the number of rows affected
- // for the rest of the commands the return value is -1.
- if ((CommandText.ToUpper().IndexOf("UPDATE")!=-1) ||
- (CommandText.ToUpper().IndexOf("INSERT")!=-1) ||
- (CommandText.ToUpper().IndexOf("DELETE")!=-1)) {
-
- int numrows = 0;
- OdbcReturn ret = libodbc.SQLRowCount(hstmt,ref numrows);
- records = numrows;
- }
- else
- records = -1;
-
- if (freeHandle && !prepared) {
- OdbcReturn ret = libodbc.SQLFreeHandle( (ushort) OdbcHandleType.Stmt, hstmt);
- if ((ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo))
- throw new OdbcException(new OdbcError("SQLFreeHandle",OdbcHandleType.Stmt,hstmt));
- }
- return records;
- }
-
+
+// if (!prepared)
+// libodbc.SQLFreeHandle( (ushort) OdbcHandleType.Stmt, hstmt);
+ return 0;
+ }
+
public void Prepare()
{
OdbcReturn ret=libodbc.SQLAllocHandle(OdbcHandleType.Stmt, Connection.hDbc, ref hstmt);
@@ -360,7 +330,7 @@ namespace System.Data.Odbc
public OdbcDataReader ExecuteReader (CommandBehavior behavior)
{
- ExecuteNonQuery(false);
+ ExecuteNonQuery();
dataReader=new OdbcDataReader(this,behavior);
return dataReader;
}
@@ -372,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 b40eb86c8d2..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
@@ -198,25 +197,27 @@ namespace System.Data.Odbc
// disconnect
ret = libodbc.SQLDisconnect (hdbc);
if ( (ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo))
- throw new OdbcException (new OdbcError ("SQLDisconnect", OdbcHandleType.Dbc,hdbc));
+ throw new OdbcException (new OdbcError ("SQLConnect", OdbcHandleType.Dbc,hdbc));
// free handles
if (hdbc != IntPtr.Zero) {
ret = libodbc.SQLFreeHandle ( (ushort) OdbcHandleType.Dbc, hdbc);
if ( (ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo))
- throw new OdbcException (new OdbcError ("SQLFreeHandle", OdbcHandleType.Dbc,hdbc));
+ throw new OdbcException (new OdbcError ("SQLConnect", OdbcHandleType.Dbc,hdbc));
}
hdbc = IntPtr.Zero;
if (henv != IntPtr.Zero) {
ret = libodbc.SQLFreeHandle ( (ushort) OdbcHandleType.Env, henv);
if ( (ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo))
- throw new OdbcException (new OdbcError ("SQLFreeHandle", OdbcHandleType.Env,henv));
+ throw new OdbcException (new OdbcError ("SQLConnect", OdbcHandleType.Dbc,hdbc));
}
henv = IntPtr.Zero;
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.Odbc/OdbcDataReader.cs b/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs
index c65d2bbf0fb..394963734f0 100644
--- a/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs
+++ b/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs
@@ -167,8 +167,25 @@ namespace System.Data.Odbc
return cols[ordinal];
}
+ private string GetSQLState (IntPtr hstmt, ushort recNo)
+ {
+ OdbcReturn ret = OdbcReturn.Error;
+ short bufLength=256, txtLength=0;
+ int nativeError = 1;
+ string sqlState = "", sqlMsg = "";
+ byte [] msgtxtBuffer = new byte [bufLength];
+ byte [] sqlStateBuffer = new byte [bufLength];
+ ret = libodbc.SQLGetDiagRec (OdbcHandleType.Stmt, hstmt, recNo,
+ sqlStateBuffer, ref nativeError, msgtxtBuffer,
+ bufLength, ref txtLength);
+ sqlState = Encoding.Default.GetString (sqlStateBuffer).Replace (
+ (char) 0, ' ').Trim ();
+ return sqlState;
+ }
+
public void Close ()
{
+ // libodbc.SQLFreeHandle((ushort) OdbcHandleType.Stmt, hstmt);
OdbcReturn ret=libodbc.SQLCloseCursor(hstmt);
if ((ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo))
@@ -179,9 +196,6 @@ namespace System.Data.Odbc
if ((behavior & CommandBehavior.CloseConnection)==CommandBehavior.CloseConnection)
this.command.Connection.Close();
- ret = libodbc.SQLFreeHandle( (ushort) OdbcHandleType.Stmt, hstmt);
- if ((ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo))
- throw new OdbcException(new OdbcError("SQLFreeHandle",OdbcHandleType.Stmt,hstmt));
}
~OdbcDataReader ()
@@ -217,10 +231,6 @@ namespace System.Data.Odbc
if ( (ret != OdbcReturn.Success) && (ret != OdbcReturn.SuccessWithInfo))
throw new OdbcException (new OdbcError ("SQLGetData", OdbcHandleType.Stmt, hstmt));
- OdbcError odbcErr = null;
- if ( (ret == OdbcReturn.SuccessWithInfo))
- odbcErr = new OdbcError ("SQLGetData", OdbcHandleType.Stmt, hstmt);
-
if (buffer == null)
return outsize; //if buffer is null,return length of the field
@@ -231,10 +241,11 @@ namespace System.Data.Odbc
copyBuffer = false;
returnVal = -1;
} else {
- string sqlstate = odbcErr.SQLState;
+ string sqlstate = GetSQLState (hstmt, 1);
//SQLState: String Data, Right truncated
if (sqlstate != libodbc.SQLSTATE_RIGHT_TRUNC)
- throw new OdbcException ( odbcErr);
+ throw new OdbcException (new OdbcError ("SQLGetData",
+ OdbcHandleType.Stmt, hstmt));
copyBuffer = true;
}
} else {
@@ -389,6 +400,7 @@ namespace System.Data.Odbc
for (int i = 0; i < cols.Length; i += 1 )
{
OdbcColumn col=GetColumn(i);
+ //Console.WriteLine("{0}:{1}:{2}",col.ColumnName,col.DataType,col.OdbcType);
schemaRow = dataTableSchema.NewRow ();
dataTableSchema.Rows.Add (schemaRow);
@@ -481,11 +493,6 @@ namespace System.Data.Odbc
ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.TinyInt, ref short_data, 0, ref outsize);
DataValue=short_data;
break;
- case OdbcType.SmallInt:
- short sint_data=0;
- ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.SmallInt, ref sint_data, 0, ref outsize);
- DataValue=sint_data;
- break;
case OdbcType.Int:
int int_data=0;
ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.Int, ref int_data, 0, ref outsize);
@@ -532,6 +539,7 @@ namespace System.Data.Odbc
DataValue = buffer;
break;
default:
+ //Console.WriteLine("Fetching unsupported data type as string: "+col.OdbcType.ToString());
bufsize=255;
buffer=new byte[bufsize];
ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.Char, buffer, bufsize, ref outsize);
@@ -604,8 +612,6 @@ namespace System.Data.Odbc
currentRow=-1;
else
currentRow++;
- GetSchemaTable();
-
// Clear cached values from last record
foreach (OdbcColumn col in cols)
{
diff --git a/mcs/class/System.Data/System.Data.Odbc/OdbcParameter.cs b/mcs/class/System.Data/System.Data.Odbc/OdbcParameter.cs
index 11153197ca7..51df821d86f 100644
--- a/mcs/class/System.Data/System.Data.Odbc/OdbcParameter.cs
+++ b/mcs/class/System.Data/System.Data.Odbc/OdbcParameter.cs
@@ -261,9 +261,6 @@ namespace System.Data.Odbc
string paramValueString = ParamValue.ToString();
// Treat everything else as a string
// Init string buffer
- if (ParamValue is String)
- paramValueString = "\'"+paramValueString+"\'";
-
if (buffer == null || buffer.Length < ((size > 20) ? size : 20))
buffer = new byte[(size > 20) ? size : 20];
else
diff --git a/mcs/class/System.Data/System.Data.SqlClient/ChangeLog b/mcs/class/System.Data/System.Data.SqlClient/ChangeLog
index 55a0ce00782..5576c7f7c6b 100755
--- a/mcs/class/System.Data/System.Data.SqlClient/ChangeLog
+++ b/mcs/class/System.Data/System.Data.SqlClient/ChangeLog
@@ -1,6 +1,6 @@
-2004-08-12 Sureshkumar T <tsureshkumar@novell.com>
- * SqlDataReader.cs - In Close method, the remaining resultsets are drained
- out, to read output parameters & to avoid stream overlap
+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>
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/System.Data.SqlClient/SqlDataReader.cs b/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs
index abe23c3aebf..52b6a0a589a 100644
--- a/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs
+++ b/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs
@@ -131,9 +131,6 @@ namespace System.Data.SqlClient {
public void Close ()
{
- // skip to end & read output parameters
- while (NextResult ())
- ;
isClosed = true;
command.Connection.DataReader = null;
command.CloseDataReader (moreResults);
diff --git a/mcs/class/System.Data/System.Data/ChangeLog b/mcs/class/System.Data/System.Data/ChangeLog
index 78cc45ac101..5477819e402 100644
--- a/mcs/class/System.Data/System.Data/ChangeLog
+++ b/mcs/class/System.Data/System.Data/ChangeLog
@@ -1,18 +1,3 @@
-2004-08-06 Atsushi Enomoto <atsushi@ximian.com>
-
- * DataSet.cs : DataSet's ExtendedProperties were not XmlConverted.
-
-2004-08-05 Atsushi Enomoto <atsushi@ximian.com>
-
- * XmlConstants.cs : Added constants for "msprop" support.
- * DataSet.cs : ExtendedProperties should be written in the schema.
- This fixes bug #61233.
-
-2004-07-27 Atsushi Enomoto <atsushi@ximian.com>
-
- * DataSet.cs : on serialization to XmlWriter, XmlConvert should be
- used. There were also some culture dependency problems to write int.
-
2004-06-27 Atsushi Enomoto <atsushi@ximian.com>
* XmlDataInferenceLoader.cs : It was not always filling relation
diff --git a/mcs/class/System.Data/System.Data/DataSet.cs b/mcs/class/System.Data/System.Data/DataSet.cs
index 8ac4d34836b..34f9f8f4c80 100644
--- a/mcs/class/System.Data/System.Data/DataSet.cs
+++ b/mcs/class/System.Data/System.Data/DataSet.cs
@@ -1270,7 +1270,7 @@ namespace System.Data {
private void WriteColumnAsAttribute (XmlWriter writer, XmlWriteMode mode, DataColumn col, DataRow row, DataRowVersion version)
{
- WriteAttributeString (writer, mode, col.Namespace, col.Prefix, XmlConvert.EncodeLocalName (col.ColumnName), WriteObjectXml (row[col, version]));
+ WriteAttributeString (writer, mode, col.Namespace, col.Prefix, XmlConvert.EncodeLocalName (col.ColumnName), row[col, version].ToString ());
}
private void WriteTableElement (XmlWriter writer, XmlWriteMode mode, DataTable table, DataRow row, DataRowVersion version)
@@ -1282,7 +1282,7 @@ namespace System.Data {
if (mode == XmlWriteMode.DiffGram) {
WriteAttributeString (writer, mode, XmlConstants.DiffgrNamespace, XmlConstants.DiffgrPrefix, "id", table.TableName + (row.XmlRowID + 1));
- WriteAttributeString (writer, mode, XmlConstants.MsdataNamespace, XmlConstants.MsdataPrefix, "rowOrder", XmlConvert.ToString (row.XmlRowID));
+ WriteAttributeString (writer, mode, XmlConstants.MsdataNamespace, XmlConstants.MsdataPrefix, "rowOrder", row.XmlRowID.ToString());
string modeName = null;
if (row.RowState == DataRowState.Modified)
modeName = "modified";
@@ -1390,8 +1390,6 @@ namespace System.Data {
nsmgr.AddNamespace (XmlConstants.TnsPrefix, Namespace);
nsmgr.AddNamespace (String.Empty, Namespace);
}
- if (CheckExtendedPropertyExists ())
- nsmgr.AddNamespace (XmlConstants.MspropPrefix, XmlConstants.MspropNamespace);
if (atts.Count > 0)
schema.UnhandledAttributes = atts.ToArray (typeof (XmlAttribute)) as XmlAttribute [];
@@ -1418,8 +1416,6 @@ namespace System.Data {
elem.UnhandledAttributes = atts.ToArray (typeof (XmlAttribute)) as XmlAttribute [];
- AddExtendedPropertyAttributes (elem, ExtendedProperties, doc);
-
XmlSchemaComplexType complex = new XmlSchemaComplexType ();
elem.SchemaType = complex;
@@ -1450,7 +1446,7 @@ namespace System.Data {
schema.Items.Add (elem);
- AddConstraintsToSchema (elem, constraintPrefix, tables, relations, doc);
+ AddConstraintsToSchema (elem, constraintPrefix, tables, relations);
foreach (string prefix in nsmgr) {
string ns = nsmgr.LookupNamespace (nsmgr.NameTable.Get (prefix));
if (prefix != "xmlns" && prefix != "xml" && ns != null && ns != String.Empty)
@@ -1459,48 +1455,29 @@ namespace System.Data {
return schema;
}
- private bool CheckExtendedPropertyExists ()
- {
- if (ExtendedProperties.Count > 0)
- return true;
- foreach (DataTable dt in Tables) {
- if (dt.ExtendedProperties.Count > 0)
- return true;
- foreach (DataColumn col in dt.Columns)
- if (col.ExtendedProperties.Count > 0)
- return true;
- foreach (Constraint c in dt.Constraints)
- if (c.ExtendedProperties.Count > 0)
- return true;
- }
- foreach (DataRelation rel in Relations)
- if (rel.ExtendedProperties.Count > 0)
- return true;
- return false;
- }
-
// Add all constraints in all tables to the schema.
- private void AddConstraintsToSchema (XmlSchemaElement elem, string constraintPrefix, DataTableCollection tables, DataRelationCollection relations, XmlDocument doc)
+ private void AddConstraintsToSchema (XmlSchemaElement elem, string constraintPrefix, DataTableCollection tables, DataRelationCollection relations)
{
// first add all unique constraints.
- Hashtable uniqueNames = AddUniqueConstraints (elem, constraintPrefix, tables, doc);
+ Hashtable uniqueNames = AddUniqueConstraints (elem, constraintPrefix, tables);
// Add all foriegn key constraints.
- AddForeignKeys (uniqueNames, elem, constraintPrefix, relations, doc);
+ AddForeignKeys (uniqueNames, elem, constraintPrefix, relations);
}
// Add unique constaraints to the schema.
// return hashtable with the names of all XmlSchemaUnique elements we created.
- private Hashtable AddUniqueConstraints (XmlSchemaElement elem, string constraintPrefix, DataTableCollection tables, XmlDocument doc)
+ private Hashtable AddUniqueConstraints (XmlSchemaElement elem, string constraintPrefix, DataTableCollection tables)
{
+ XmlDocument doc = new XmlDocument();
Hashtable uniqueNames = new Hashtable();
foreach (DataTable table in tables) {
- foreach (Constraint constraint in table.Constraints) {
+ foreach (Constraint constaint in table.Constraints) {
- if (constraint is UniqueConstraint) {
+ if (constaint is UniqueConstraint) {
ArrayList attrs = new ArrayList ();
XmlAttribute attrib;
- UniqueConstraint uqConst = (UniqueConstraint) constraint;
+ UniqueConstraint uqConst = (UniqueConstraint)constaint;
XmlSchemaUnique uniq = new XmlSchemaUnique ();
// if column of the constraint is hidden do not write the constraint.
@@ -1543,8 +1520,6 @@ namespace System.Data {
uniq.Fields.Add(field);
}
- AddExtendedPropertyAttributes (uniq, constraint.ExtendedProperties, doc);
-
elem.Constraints.Add (uniq);
uniqueNames.Add (uniq.Name, null);
}
@@ -1554,10 +1529,11 @@ namespace System.Data {
}
// Add the foriegn keys to the schema.
- private void AddForeignKeys (Hashtable uniqueNames, XmlSchemaElement elem, string constraintPrefix, DataRelationCollection relations, XmlDocument doc)
+ private void AddForeignKeys (Hashtable uniqueNames, XmlSchemaElement elem, string constraintPrefix, DataRelationCollection relations)
{
if (relations == null) return;
+ XmlDocument doc = new XmlDocument();
foreach (DataRelation rel in relations) {
if (rel.ParentKeyConstraint == null || rel.ChildKeyConstraint == null)
@@ -1609,10 +1585,7 @@ namespace System.Data {
field.XPath = constraintPrefix+column.ColumnName;
keyRef.Fields.Add(field);
}
-
keyRef.UnhandledAttributes = (XmlAttribute[])attrs.ToArray (typeof (XmlAttribute));
- AddExtendedPropertyAttributes (keyRef, rel.ExtendedProperties, doc);
-
elem.Constraints.Add (keyRef);
}
}
@@ -1645,7 +1618,7 @@ namespace System.Data {
// add ordinal attribute
xlmAttrs[1] = doc.CreateAttribute (XmlConstants.MsdataPrefix, XmlConstants.Ordinal, XmlConstants.MsdataNamespace);
- xlmAttrs[1].Value = XmlConvert.ToString (simple.Ordinal);
+ xlmAttrs[1].Value = simple.Ordinal.ToString();
simpleContent.UnhandledAttributes = xlmAttrs;
@@ -1682,12 +1655,12 @@ namespace System.Data {
if (col.AutoIncrementSeed != 0) {
xattr = doc.CreateAttribute (XmlConstants.MsdataPrefix, XmlConstants.AutoIncrementSeed, XmlConstants.MsdataNamespace);
- xattr.Value = XmlConvert.ToString (col.AutoIncrementSeed);
+ xattr.Value = col.AutoIncrementSeed.ToString();
xattrs.Add (xattr);
}
if (col.DefaultValue.ToString () != String.Empty)
- colElem.DefaultValue = WriteObjectXml (col.DefaultValue);
+ colElem.DefaultValue = col.DefaultValue.ToString ();
if (col.MaxLength < 0)
colElem.SchemaTypeName = MapType (col.DataType);
@@ -1714,7 +1687,6 @@ namespace System.Data {
}
colElem.UnhandledAttributes = (XmlAttribute[])xattrs.ToArray(typeof (XmlAttribute));
- AddExtendedPropertyAttributes (colElem, col.ExtendedProperties, doc);
seq.Items.Add (colElem);
}
@@ -1754,33 +1726,12 @@ namespace System.Data {
schemaToAdd.Namespaces.Add (prefix, col.Namespace);
}
att.SchemaTypeName = MapType (col.DataType);
- // FIXME: what happens if extended properties are set on attribute columns??
schemaAttributes.Add (att);
}
- AddExtendedPropertyAttributes (elem, table.ExtendedProperties, doc);
-
return elem;
}
- private void AddExtendedPropertyAttributes (XmlSchemaAnnotated xsobj, PropertyCollection props, XmlDocument doc)
- {
- ArrayList attList = new ArrayList ();
- XmlAttribute xmlAttr;
-
- if (xsobj.UnhandledAttributes != null)
- attList.AddRange (xsobj.UnhandledAttributes);
-
- // add extended properties to xs:element
- foreach (DictionaryEntry de in props) {
- xmlAttr = doc.CreateAttribute (XmlConstants.MspropPrefix, XmlConvert.EncodeName (de.Key.ToString ()), XmlConstants.MspropNamespace);
- xmlAttr.Value = de.Value != null ? WriteObjectXml (de.Value) : String.Empty;
- attList.Add (xmlAttr);
- }
- if (attList.Count > 0)
- xsobj.UnhandledAttributes = attList.ToArray (typeof (XmlAttribute)) as XmlAttribute [];
- }
-
private string SafeNS (string ns)
{
return ns != null ? ns : String.Empty;
diff --git a/mcs/class/System.Data/System.Data/XmlConstants.cs b/mcs/class/System.Data/System.Data/XmlConstants.cs
index 1d459157606..b50a80bc6d5 100755
--- a/mcs/class/System.Data/System.Data/XmlConstants.cs
+++ b/mcs/class/System.Data/System.Data/XmlConstants.cs
@@ -83,8 +83,6 @@ internal class XmlConstants
//ms schema objects
public const string MsdataPrefix = "msdata";
public const string MsdataNamespace = "urn:schemas-microsoft-com:xml-msdata";
- public const string MspropPrefix = "msprop";
- public const string MspropNamespace = "urn:schemas-microsoft-com:xml-msprop";
public const string DiffgrPrefix = "diffgr";
public const string DiffgrNamespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
public const string TnsPrefix = "mstns";
diff --git a/mcs/class/System.Data/Test/ChangeLog b/mcs/class/System.Data/Test/ChangeLog
index f519b6dce99..49630c2d5d8 100644
--- a/mcs/class/System.Data/Test/ChangeLog
+++ b/mcs/class/System.Data/Test/ChangeLog
@@ -1,10 +1,3 @@
-2004-08-13 Umadevi S <sumadevi@novell.com>
- * Added standalone nunit testcases for datacontainer class.
- * Currently will use MSSQL server
- * New File
- MSSqlTestBed.cs - Base class for MSSql testing
- (similar to the mysqltestbed)
-
2004-06-16 Sureshkumar T <TSureshkumar@novell.com>
* Added standalone NUnit test cases for MySql db related tests.
* Created sub-directory for System.Data.Odbc
diff --git a/mcs/class/System.Data/Test/MSSqlTestBed.cs b/mcs/class/System.Data/Test/MSSqlTestBed.cs
deleted file mode 100644
index bb2ed3bd160..00000000000
--- a/mcs/class/System.Data/Test/MSSqlTestBed.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-//
-// MSSqlTestBed.cs : This is base class which manages the connections to
-// MSSql database. This serves as a base class for all
-// MSSql database dependant tests.
-//
-// To run :
-//
-// * compile using following command
-// mcs /r:System.Data.dll,nunit.framework.dll /t:library /debug
-// /out:MSSqlTestBed.dll MSSqlTestBed.cs System.Data.Common/*.cs
-// * To run the tests
-// mono /usr/local/bin/nunit-console.exe MSSqlTestBed.dll
-//
-// Author:
-// Umadevi S (sumadevi@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.Common;
-using System.Data.SqlClient;
-using System.Collections.Specialized;
-
-namespace MonoTests.System.Data
-{
- public class MSSqlTestClient
- {
- #region protected members
- protected string connectionString = null;
- protected SqlConnection conn = null;
- protected bool isConnAlive = false;
- #endregion
-
- public MSSqlTestClient ()
- {
- connectionString =
- "Server=164.99.168.131;" +
- "Database=Northwind;" +
- "User ID=sa;" +
- "Password=novell";
- conn = new SqlConnection(connectionString);
- }
-
- protected void OpenConnection ()
- {
- conn.ConnectionString = connectionString;
- conn.Open ();
- // run tests only if the connection is open,
- // otherwise make it fail, to setup with correct
- // database settings
- if (conn != null && conn.State != ConnectionState.Closed)
- isConnAlive = true;
- }
-
- protected void CloseConnection ()
- {
- if (conn != null && conn.State != ConnectionState.Closed) {
- conn.Close ();
- isConnAlive = false;
- }
- }
-
- internal void ExecuteQuery (string query)
- {
- SqlCommand cmd = new SqlCommand ();
- cmd.Connection = conn;
- cmd.CommandText = query;
- try {
- int recordsAff = cmd.ExecuteNonQuery ();
- } catch (Exception e) {
- Console.WriteLine("exception");
- Console.WriteLine(e.StackTrace);
- }
- }
-
-
- }
-}
diff --git a/mcs/class/System.Data/Test/System.Data.Common/ChangeLog b/mcs/class/System.Data/Test/System.Data.Common/ChangeLog
index 351489466c7..af4575be732 100644
--- a/mcs/class/System.Data/Test/System.Data.Common/ChangeLog
+++ b/mcs/class/System.Data/Test/System.Data.Common/ChangeLog
@@ -1,6 +1,3 @@
-2004-08-13 Umadevi S <sumadevi@novell.com>
- * Added File DataContainerTest
-
2004-06-10 Umadevi S <sumadevi@novell.com>
* Corrected GetTableMappingBySchemaAction for DataTableMappingCollectionTest
diff --git a/mcs/class/System.Data/Test/System.Data.Common/DataContainerTest.cs b/mcs/class/System.Data/Test/System.Data.Common/DataContainerTest.cs
deleted file mode 100644
index 32e6cfd878c..00000000000
--- a/mcs/class/System.Data/Test/System.Data.Common/DataContainerTest.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-//
-// DataContainerTest.cs - NUnit Test Cases for testing the
-// DataContainer class
-// Author:
-// Umadevi S (sumadevi@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.Common;
-using System.Data.SqlClient;
-
-using NUnit.Framework;
-
-namespace MonoTests.System.Data.Common
-{
-
- [TestFixture]
- public class DataContainerTest : MSSqlTestClient {
-
- [SetUp]
- public void GetReady () {
- OpenConnection ();
- CreateTestSetup (); // create test database & tables
- }
-
- [TearDown]
- public void Clean () {
- CleanTestSetup (); // clean test database
- CloseConnection ();
- }
-
- private void CreateTestSetup()
- {
- if (!isConnAlive)
- return ;
- // Create test database & tables
- string createQuery = "DROP TABLE datetimetest;" ;
- ExecuteQuery (createQuery);
- createQuery = "CREATE TABLE datetimetest (" +
- "col_char CHAR(20)," +
- "col_date DATETIME );";
- ExecuteQuery (createQuery);
- createQuery = "INSERT INTO datetimetest VALUES ('one', '4/12/2004 4:59:00');" ;
- ExecuteQuery (createQuery);
- createQuery = "INSERT INTO datetimetest VALUES ('two',null);" ;
- ExecuteQuery (createQuery);
- createQuery = "INSERT INTO datetimetest (col_char) VALUES ('three');" ;
- ExecuteQuery (createQuery);
-
-
- }
-
- private void CleanTestSetup()
- {
- if (!isConnAlive)
- return;
- // delete test database
- string dropQuery = "DROP table datetimetest";
- ExecuteQuery(dropQuery);
-
- }
-
-
- [Test]
- public void DateTimeTest () {
- try {
-
- SqlDataAdapter myadapter = new SqlDataAdapter("select * from datetimetest;",conn);
-
- DataTable dt = new DataTable();
- myadapter.Fill(dt);
- Assertion.AssertEquals ("Row count must be three", 3, dt.Rows.Count );
- }
-
- finally { // try/catch is necessary to gracefully close connections
- CleanTestSetup (); // clean test database
- CloseConnection ();
- }
- }
- }
-}
diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog b/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog
index 0e26247cecd..bd7b77d4f19 100644
--- a/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog
+++ b/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog
@@ -1,14 +1,3 @@
-2004-07-29 Umadevi S <sumadevi@novell.com>
- * OdbcCommandTest.cs - Added testcase for bug 62046. ExecuteNonQuery
-
-2004-07-28 Umadevi S <sumadevi@novell.com>
- * OdbcCommandTest.cs - Added testcase for bug 61968. String values passed with quotes
-
-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 42702295065..00000000000
--- a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs
+++ /dev/null
@@ -1,113 +0,0 @@
-//
-// OdbcCommandTest.cs - NUnit Test Cases for testing the
-// OdbcCommand class
-//
-// Authors:
-// Sureshkumar T (TSureshkumar@novell.com)
-// Umadevi S (sumadevi@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));
- }
-
- /// <summary>
- /// Test String parameters to ODBC Command
- /// </summary>
- [Test]
- public void ExecuteStringParameterTest()
- {
-
- OdbcCommand dbcmd = new OdbcCommand();
- dbcmd.Connection = conn;
- dbcmd.CommandType = CommandType.Text;
- dbcmd.CommandText = "select count(*) from test where col_char=?;";
- string colvalue = "mono test#1";
- dbcmd.Parameters.Add("@un",colvalue);
- Object obj = dbcmd.ExecuteScalar();
- Assertion.AssertEquals( "String parameter not passed correctly",1,Convert.ToInt32(obj));
-
-
- }
-
- /// <summary>
- /// Test ExecuteNonQuery
- /// </summary>
- [Test]
- public void ExecuteNonQueryTest ()
- {
-
- OdbcCommand dbcmd = new OdbcCommand();
- dbcmd.Connection = conn;
- dbcmd.CommandType = CommandType.Text;
- dbcmd.CommandText = "select count(*) from test where col_char=?;";
- string colvalue = "mono test";
- dbcmd.Parameters.Add("@un",colvalue);
- int ret = dbcmd.ExecuteNonQuery();
- Assertion.AssertEquals( "ExecuteNonQuery not working",-1, ret);
- dbcmd = new OdbcCommand();
- dbcmd.Connection = conn;
- dbcmd.CommandType = CommandType.Text;
- dbcmd.CommandText = "delete from test where (col_int >257);";
- ret = dbcmd.ExecuteNonQuery();
- Assertion.AssertEquals("ExecuteNonQuery not working", 2, ret);}
-
- }
-}
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.Tcp/ChangeLog b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/ChangeLog
index a638962017f..42d69cb17d6 100644
--- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/ChangeLog
+++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/ChangeLog
@@ -1,8 +1,3 @@
-2004-07-15 Lluis Sanchez Gual <lluis@novell.com>
-
- * TcpServerChannel.cs: Set channel name from the provided properties.
- This fixes bug #61592.
-
2004-05-13 Lluis Sanchez Gual <lluis@ximian.com>
* TcpChannel.cs: Made Init private.
diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs
index 6e3aba6f960..945dff1e278 100644
--- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs
+++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs
@@ -106,9 +106,6 @@ namespace System.Runtime.Remoting.Channels.Tcp
{
switch((string)property.Key)
{
- case "name":
- name = property.Value.ToString();
- break;
case "port":
port = Convert.ToInt32(property.Value);
break;
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 47d41efa66e..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,14 +1,3 @@
-2004-07-26 Lluis Sanchez Gual <lluis@ximian.com>
-
- * SoapMessageFormater.cs: In BuildSoapMessageFromMethodResponse, add the
- return value to the SoapMessage even if it is null. This fixes bug #61837.
-
-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 2de868c9bee..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];
}
}
@@ -267,16 +267,10 @@ namespace System.Runtime.Remoting.Channels {
ArrayList paramValues = new ArrayList();
ArrayList paramTypes = new ArrayList();
soapMessage.MethodName = mrm.MethodName+"Response";
-
- Type retType = ((MethodInfo)mrm.MethodBase).ReturnType;
-
- if(retType != typeof(void)) {
+ if(mrm.ReturnValue != null && mrm.ReturnValue.GetType() != typeof(void)) {
paramNames.Add("return");
paramValues.Add(mrm.ReturnValue);
- if (mrm.ReturnValue != null)
- paramTypes.Add(mrm.ReturnValue.GetType());
- else
- paramTypes.Add(retType);
+ paramTypes.Add(mrm.ReturnValue.GetType());
}
for(int i = 0; i < mrm.OutArgCount; i++){
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog b/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog
index 4fbb13a002a..a0b692b21d0 100644
--- a/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog
+++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog
@@ -1,8 +1,3 @@
-2004-07-20 Atsushi Enomoto <atsushi@ximian.com>
-
- * Signature.cs : Fixed NextElementPos() that incorrectly examined
- node matching.
-
2004-06-17 Sebastien Pouliot <sebastien@ximian.com>
* KeyInfoX509Data.cs: Removed old internal IssuerSerial for the
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/Signature.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/Signature.cs
index 9aab99f8386..72e5088ed38 100644
--- a/mcs/class/System.Security/System.Security.Cryptography.Xml/Signature.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/Signature.cs
@@ -192,14 +192,13 @@ namespace System.Security.Cryptography.Xml {
{
while (pos < nl.Count) {
if (nl [pos].NodeType == XmlNodeType.Element) {
- if (nl [pos].LocalName != name || nl [pos].NamespaceURI != ns) {
+ if (nl [pos].LocalName != name && nl [pos].NamespaceURI != ns) {
if (required)
throw new CryptographicException ("Malformed element " + name);
else
return -2;
}
- else
- return pos;
+ return pos;
}
else
pos++;
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog b/mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog
index 3b3ed1be736..01f02c69e94 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog
+++ b/mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog
@@ -1,8 +1,3 @@
-2004-07-20 Lluis Sanchez Gual <lluis@ximian.com>
-
- * HttpWebClientProtocol.cs: Add received cookies to cookieContainer when
- getting the response, do not wait for the next request to do it.
-
2004-06-22 Lluis Sanchez Gual <lluis@ximian.com>
* XmlReturnReader.cs, XmlReturnWriter.cs: Generate the serializer with
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpWebClientProtocol.cs b/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpWebClientProtocol.cs
index 722f1d2a681..3be915cfbc8 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpWebClientProtocol.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpWebClientProtocol.cs
@@ -45,6 +45,7 @@ namespace System.Web.Services.Protocols {
CookieContainer cookieContainer;
IWebProxy proxy;
string userAgent;
+ CookieCollection prevCookies;
#if NET_1_1
bool _unsafeAuthenticated;
@@ -116,25 +117,41 @@ namespace System.Web.Services.Protocols {
#region Methods
- internal virtual void CheckForCookies (HttpWebResponse response)
+ internal virtual void AddCookies (Uri uri)
{
- CookieCollection cookies = response.Cookies;
- if (cookieContainer == null || cookies.Count == 0)
+ if (cookieContainer == null)
+ cookieContainer = new CookieContainer ();
+
+ if (prevCookies == null || prevCookies.Count == 0)
return;
CookieCollection coll = cookieContainer.GetCookies (uri);
- foreach (Cookie c in cookies) {
- bool add = true;
- foreach (Cookie prev in coll) {
+ foreach (Cookie prev in prevCookies) {
+ bool dont = false;
+ foreach (Cookie c in coll) {
if (c.Equals (prev)) {
- add = false;
+ dont = true;
break;
}
}
- if (add)
- cookieContainer.Add (c);
+
+ if (dont == false)
+ cookieContainer.Add (prev);
}
}
+
+ internal virtual void CheckForCookies (HttpWebResponse response)
+ {
+ CookieCollection cookies = response.Cookies;
+ if (cookies.Count == 0)
+ return;
+
+ if (prevCookies == null)
+ prevCookies = new CookieCollection ();
+
+ foreach (Cookie c in cookies)
+ prevCookies.Add (c);
+ }
protected override WebRequest GetWebRequest (Uri uri)
{
@@ -147,6 +164,7 @@ namespace System.Web.Services.Protocols {
if (clientCertificates != null)
request.ClientCertificates.AddRange (clientCertificates);
+ AddCookies (uri);
request.CookieContainer = cookieContainer;
if (proxy != null)
request.Proxy = proxy;
diff --git a/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs b/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
index 9e53465f583..4a2cb6502af 100644
--- a/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
@@ -319,8 +319,8 @@ namespace System.Web.Compilation
if (isvirtual) {
file = tparser.MapPath (file);
- } else {
- file = GetIncludeFilePath (tparser.BaseDir, file);
+ } else if (!Path.IsPathRooted (file)) {
+ file = UrlUtils.Combine (tparser.BaseVirtualDir, file);
}
InitParser (file);
@@ -332,14 +332,6 @@ namespace System.Web.Compilation
//PrintLocation (location);
}
- static string GetIncludeFilePath (string basedir, string filename)
- {
- if (Path.DirectorySeparatorChar == '/')
- filename = filename.Replace ("\\", "/");
-
- return Path.GetFullPath (Path.Combine (basedir, filename));
- }
-
void TextParsed (ILocation location, string text)
{
if (text.IndexOf ("<%") != -1 && !inScript) {
diff --git a/mcs/class/System.Web/System.Web.Compilation/AspParser.cs b/mcs/class/System.Web/System.Web.Compilation/AspParser.cs
index 28c357ce3c5..8f199c12de8 100644
--- a/mcs/class/System.Web/System.Web.Compilation/AspParser.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/AspParser.cs
@@ -184,15 +184,12 @@ namespace System.Web.Compilation
str = str.Substring (2).Trim ();
int len = str.Length;
int lastQuote = str.LastIndexOf ('"');
- if (len < 10 || lastQuote != len - 1)
- return false;
-
- if (!str.ToLower ().StartsWith ("#include "))
+ if (len < 10 || lastQuote != len - 1 || !str.StartsWith ("#include "))
return false;
str = str.Substring (9).Trim ();
- bool isfile = (str.ToLower ().StartsWith ("file"));
- if (!isfile && !str.ToLower ().StartsWith ("virtual"))
+ bool isfile = (str.StartsWith ("file"));
+ if (!isfile && !str.StartsWith ("virtual"))
return false;
pathType = (isfile) ? "file" : "virtual";
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 80ce8459331..1bd493966e2 100644
--- a/mcs/class/System.Web/System.Web.Compilation/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Compilation/ChangeLog
@@ -1,18 +1,3 @@
-2004-07-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * AspGenerator.cs: the path for file was treated as virtual, but it's
- physical. Fixes bug #61524.
-
-2004-07-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * AspParser.cs: fixed case-sensitivity issues with #include and its
- attributes. Closes #61429.
-
-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/IImplicitResourceProvider.cs b/mcs/class/System.Web/System.Web.Compilation/IImplicitResourceProvider.cs
deleted file mode 100644
index 3e2c38ff5db..00000000000
--- a/mcs/class/System.Web/System.Web.Compilation/IImplicitResourceProvider.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// System.Web.Compilation.IImplicitResourceProvider.cs
-//
-// Authors:
-// Duncan Mak (duncan@ximian.com)
-//
-// 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.
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-
-#if NET_2_0
-
-using System.Collections;
-using System.Globalization;
-
-namespace System.Web.Compilation
-{
- public interface IImplicitResourceProvider
- {
- object GetObject (ImplicitResourceKey key, CultureInfo culture);
- ICollection GetResources (string keyPrefix);
- }
-}
-#endif
diff --git a/mcs/class/System.Web/System.Web.Compilation/IResourceReader.cs b/mcs/class/System.Web/System.Web.Compilation/IResourceReader.cs
deleted file mode 100644
index 4cdb8b14784..00000000000
--- a/mcs/class/System.Web/System.Web.Compilation/IResourceReader.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// System.Web.Compilation.IResourceProvider.cs
-//
-// Authors:
-// Duncan Mak (duncan@ximian.com)
-//
-// 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.
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-
-using System.Resources;
-
-#if NET_2_0
-namespace System.Web.Compilation
-{
- public interface IResourceProvider
- {
- IResourceReader ResourceReader { get; }
- }
-}
-#endif
diff --git a/mcs/class/System.Web/System.Web.Compilation/ImplicitResourceKey.cs b/mcs/class/System.Web/System.Web.Compilation/ImplicitResourceKey.cs
deleted file mode 100644
index ac2bab3c256..00000000000
--- a/mcs/class/System.Web/System.Web.Compilation/ImplicitResourceKey.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-// System.Web.Compilation.IImplicitResourceProvider.cs
-//
-// Authors:
-// Duncan Mak (duncan@ximian.com)
-//
-// 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.
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-
-#if NET_2_0
-namespace System.Web.Compilation
-{
- public class ImplicitResourceKey
- {
- public ImplicitResourceKey ()
- {
- }
-
- public string Filter;
- public string KeyPrefix;
- public string Property;
- }
-}
-#endif
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.Configuration/ChangeLog b/mcs/class/System.Web/System.Web.Configuration/ChangeLog
index 1347030a0e7..2f67b0fee83 100644
--- a/mcs/class/System.Web/System.Web.Configuration/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Configuration/ChangeLog
@@ -1,8 +1,3 @@
-2004-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * WebConfigurationSettings.cs: fix bug when processing empty location
- tags. Closes bug #63001.
-
2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* AuthorizationConfig.cs: really fix bug #60482. Thanks David!
diff --git a/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs b/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs
index ee47037cbfa..e00c1921978 100644
--- a/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs
+++ b/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs
@@ -791,13 +791,16 @@ namespace System.Web.Configuration
void StoreLocation (string name, XmlTextReader reader)
{
+ if (locations == null) {
+ locations = new Hashtable ();
+ }
+
string path = null;
bool haveAllow = false;
bool allowOverride = true;
- string att = null;
while (reader.MoveToNextAttribute ()) {
- att = reader.Name;
+ string att = reader.Name;
if (att == "path") {
if (path != null)
@@ -827,13 +830,8 @@ namespace System.Web.Configuration
ThrowException ("Unrecognized attribute.", reader);
}
- if (att == null)
- return; // empty location tag
-
Location loc = new Location (this, path, allowOverride);
- if (locations == null)
- locations = new Hashtable ();
- else if (locations.ContainsKey (loc.Path))
+ if (locations.ContainsKey (loc.Path))
ThrowException ("Duplicated location path: " + loc.Path, reader);
reader.MoveToElement ();
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.Mail/ChangeLog b/mcs/class/System.Web/System.Web.Mail/ChangeLog
index 4ac2bcc035e..21478e29bdf 100644
--- a/mcs/class/System.Web/System.Web.Mail/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Mail/ChangeLog
@@ -1,9 +1,3 @@
-2004-08-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * SmtpClient.cs: multipart mails default body format is now the same as
- the one used for single part mails instead of being forced to
- "text/plain".
-
2004-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* MailMessage.cs: patch by John Luke that initialized the fields in
diff --git a/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs b/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs
index 109f1cf60a8..25569cfc074 100644
--- a/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs
+++ b/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs
@@ -140,7 +140,6 @@ namespace System.Web.Mail {
string boundary = MailUtil.GenerateBoundary();
// set the Content-Type header to multipart/mixed
- string bodyContentType = msg.Header.ContentType;
msg.Header.ContentType =
String.Format( "multipart/mixed;\r\n boundary={0}" , boundary );
@@ -152,7 +151,7 @@ namespace System.Web.Mail {
smtp.WriteBoundary( boundary );
MailHeader partHeader = new MailHeader();
- partHeader.ContentType = bodyContentType;
+ partHeader.ContentType = "text/plain";
smtp.WriteHeader( partHeader );
diff --git a/mcs/class/System.Web/System.Web.Security/ChangeLog b/mcs/class/System.Web/System.Web.Security/ChangeLog
index 18d1dade663..cf7612e3ae3 100644
--- a/mcs/class/System.Web/System.Web.Security/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Security/ChangeLog
@@ -1,8 +1,3 @@
-2004-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * FormsAuthenticationModule.cs: don't renew expired cookies. Only renew
- the cookie if SlidingExpiration is set. Thanks to Jim Pease.
-
2004-06-12 Pedro Martínez Juliá <yoros@wanadoo.es>
* FormsAuthentication.cs: Undo last change.
diff --git a/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs b/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs
index ac9f3c31327..f46923ad5b8 100644
--- a/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs
+++ b/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs
@@ -82,12 +82,7 @@ namespace System.Web.Security
return;
FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt (cookie.Value);
- if (ticket == null || ticket.Expired)
- return;
-
- if (config.SlidingExpiration)
- ticket = FormsAuthentication.RenewTicketIfOld (ticket);
-
+ ticket = FormsAuthentication.RenewTicketIfOld (ticket);
context.User = new GenericPrincipal (new FormsIdentity (ticket), new string [0]);
cookie.Value = FormsAuthentication.Encrypt (ticket);
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.WebControls/BaseValidator.cs b/mcs/class/System.Web/System.Web.UI.WebControls/BaseValidator.cs
index b003e315524..26a081dc3e0 100755
--- a/mcs/class/System.Web/System.Web.UI.WebControls/BaseValidator.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/BaseValidator.cs
@@ -192,9 +192,7 @@ namespace System.Web.UI.WebControls
if(!Visible || (Visible && !Enabled))
{
IsValid = true;
- return;
}
-
Control ctrl = Parent;
while(ctrl != null)
{
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog b/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
index dace1da7b57..cb282d6377a 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
@@ -1,17 +1,6 @@
-2004-08-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * Xml.cs: use MapPath in DocumentSource and documentContent. Fixes
- bug #62726.
-
-2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * BaseValidator.cs: in Validate(), when the control is not visible or
- enabled, return inmediately after setting IsValid to true. Fixes bug
- #61831.
-
2004-06-10 Alon Gazit <along@mainsoft.com>
- * WebControl.cs: fixed LoadViewState().
- Creates new attributes state bag only when the current is null.
+ * WebControl.cs: fixed LoadViewState().
+ Creates new attributes state bag only when the current is null.
2004-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs
index ff9aacac78b..7cdb7e4fea8 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs
@@ -189,19 +189,21 @@ namespace System.Web.UI.WebControls
GetType().Name));
}
+ [MonoTODO("security")]
private void LoadXpathDoc ()
{
if (documentContent != null && documentContent.Length > 0) {
- xpathDoc = new XPathDocument (new StringReader (MapPathSecure (documentContent)));
+ xpathDoc = new XPathDocument (new StringReader (documentContent));
return;
}
if (documentSource != null && documentSource.Length != 0) {
- xpathDoc = new XPathDocument (MapPathSecure (documentSource));
+ xpathDoc = new XPathDocument (documentSource);
return;
}
}
+ [MonoTODO("security")]
private void LoadTransform ()
{
if (transform != null)
diff --git a/mcs/class/System.Web/System.Web.UI/ChangeLog b/mcs/class/System.Web/System.Web.UI/ChangeLog
index dd08b76969d..07d62fd2c33 100644
--- a/mcs/class/System.Web/System.Web.UI/ChangeLog
+++ b/mcs/class/System.Web/System.Web.UI/ChangeLog
@@ -1,19 +1,3 @@
-2004-07-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * TemplateControl.cs: don't include private methods of base classes when
- auto-attaching events. Fixes bug 61569.
-
-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.UI/TemplateControl.cs b/mcs/class/System.Web/System.Web.UI/TemplateControl.cs
index 1014c3792f9..7b1e85f94fb 100755
--- a/mcs/class/System.Web/System.Web.UI/TemplateControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/TemplateControl.cs
@@ -106,12 +106,6 @@ namespace System.Web.UI {
if (method == null)
continue;
- if (method.DeclaringType != type) {
- if (!method.IsPublic && !method.IsFamilyOrAssembly &&
- !method.IsFamilyAndAssembly && !method.IsFamily)
- continue;
- }
-
if (method.ReturnType != typeof (void))
continue;
diff --git a/mcs/class/System.Web/System.Web.Util/ChangeLog b/mcs/class/System.Web/System.Web.Util/ChangeLog
index f293a48cb13..4d57c166561 100644
--- a/mcs/class/System.Web/System.Web.Util/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Util/ChangeLog
@@ -1,8 +1,3 @@
-2004-07-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * UrlUtils.cs: don't pass double slash when the path begins with a
- tilde. Fixes bug #61654.
-
2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* UrlUtils.cs:
diff --git a/mcs/class/System.Web/System.Web.Util/UrlUtils.cs b/mcs/class/System.Web/System.Web.Util/UrlUtils.cs
index a8f60ff3159..955c8d9a17b 100644
--- a/mcs/class/System.Web/System.Web.Util/UrlUtils.cs
+++ b/mcs/class/System.Web/System.Web.Util/UrlUtils.cs
@@ -154,11 +154,7 @@ namespace System.Web.Util
slash = "/";
}
- string appvpath = HttpRuntime.AppDomainAppVirtualPath;
- if (appvpath.EndsWith ("/"))
- slash = "";
-
- return Reduce (appvpath + slash + relPath);
+ return Reduce (HttpRuntime.AppDomainAppVirtualPath + slash + relPath);
}
return Reduce (basePath + slash + relPath);
diff --git a/mcs/class/System.Web/System.Web/ChangeLog b/mcs/class/System.Web/System.Web/ChangeLog
index c7b5b3463cd..93cc846bb86 100644
--- a/mcs/class/System.Web/System.Web/ChangeLog
+++ b/mcs/class/System.Web/System.Web/ChangeLog
@@ -1,32 +1,3 @@
-2004-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * HttpServerUtility.cs: ensure we have a full virtual path for the
- request being executed.
-
-2004-07-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * HttpApplication.cs: the file not found might be a dependency.
-
-2004-07-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * HttpCookie.cs: use invariant when formatting expires date. Fixes bug
- #61690.
-
-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 09288727b8f..0f8aaa3759b 100644
--- a/mcs/class/System.Web/System.Web/HttpApplication.cs
+++ b/mcs/class/System.Web/System.Web/HttpApplication.cs
@@ -805,12 +805,7 @@ namespace System.Web
return ret;
} catch (DirectoryNotFoundException) {
throw new HttpException (404, "Cannot find '" + file + "'.");
- } catch (FileNotFoundException fnf) {
- string fname = fnf.FileName;
- if (fname != null && fname != "") {
- file = Path.GetFileName (fname);
- }
-
+ } catch (FileNotFoundException) {
throw new HttpException (404, "Cannot find '" + file + "'.");
}
}
@@ -1150,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/HttpCookie.cs b/mcs/class/System.Web/System.Web/HttpCookie.cs
index c121772be1b..32fdf84261b 100644
--- a/mcs/class/System.Web/System.Web/HttpCookie.cs
+++ b/mcs/class/System.Web/System.Web/HttpCookie.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
-using System.Globalization;
using System.Text;
using System.Web;
using System.Collections.Specialized;
@@ -99,9 +98,7 @@ namespace System.Web
if (_ExpiresSet && _Expires != DateTime.MinValue) {
oSetCookie.Append ("; expires=");
- DateTime ut = _Expires.ToUniversalTime ();
- oSetCookie.Append (ut.ToString ("ddd, dd-MMM-yyyy HH':'mm':'ss 'GMT'",
- DateTimeFormatInfo.InvariantInfo));
+ oSetCookie.Append (_Expires.ToUniversalTime ().ToString ("ddd, dd-MMM-yyyy HH':'mm':'ss '+0000'"));
}
if (_Secure)
diff --git a/mcs/class/System.Web/System.Web/HttpServerUtility.cs b/mcs/class/System.Web/System.Web/HttpServerUtility.cs
index 29022db8253..5fb510baf46 100644
--- a/mcs/class/System.Web/System.Web/HttpServerUtility.cs
+++ b/mcs/class/System.Web/System.Web/HttpServerUtility.cs
@@ -46,7 +46,6 @@ using System.Collections.Specialized;
using System.IO;
using System.Text;
using System.Web.Hosting;
-using System.Web.Util;
namespace System.Web
{
@@ -200,7 +199,7 @@ namespace System.Web
HttpRequest request = _Context.Request;
string oldFilePath = request.FilePath;
- request.SetFilePath (UrlUtils.Combine (_Context.Request.BaseVirtualDir, path));
+ request.SetFilePath (path);
string oldQuery = request.QueryStringRaw;
if (!preserveQuery) request.QueryStringRaw = query;
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.XML/Mono.Xml.XPath/ChangeLog b/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
index c7d9e126328..053dc02ede2 100644
--- a/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
+++ b/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
@@ -1,10 +1,3 @@
-2004-07-30 Atsushi Enomoto <atsushi@ximian.com>
-
- * DTMXPathNavigator.cs :
- Fixed IsSamePosition(). currentAttr is not always the same as
- that of other when current is not attribute. Ditto for currentNS
- (when current is not namespace).
-
2004-06-06 Atsushi Enomoto <atsushi@ximian.com>
* DTMXPathDocumentBuilder.cs : Close XmlTextReader strictly. It might
diff --git a/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs b/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs
index 6bd8a339a0e..abd904bc987 100644
--- a/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs
+++ b/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs
@@ -366,16 +366,11 @@ namespace Mono.Xml.XPath
if (another == null || another.document != this.document)
return false;
- if (this.currentNode != another.currentNode ||
- this.currentIsAttr != another.currentIsAttr ||
- this.currentIsNode != another.currentIsNode)
- return false;
-
- if (currentIsAttr)
- return this.currentAttr == another.currentAttr;
- else if (!currentIsNode)
- return this.currentNs == another.currentNs;
- return true;
+ return this.currentNode == another.currentNode &&
+ this.currentAttr == another.currentAttr &&
+ this.currentIsAttr == another.currentIsAttr &&
+ this.currentIsNode == another.currentIsNode &&
+ this.currentNs == another.currentNs;
}
public override bool MoveTo (XPathNavigator other)
diff --git a/mcs/class/System.XML/System.Xml.Serialization/ChangeLog b/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
index e542d6a843d..f98edd97e7f 100755
--- a/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
+++ b/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
@@ -1,9 +1,3 @@
-2004-07-15 Lluis Sanchez Gual <lluis@novell.com>
-
- * TypeTranslator.cs, XmlCustomFormatter.cs: Added support for base64. This
- xsd type is not part of the last schema specification, but the google api
- uses it and ms.net accepts it.
-
2004-06-22 Lluis Sanchez Gual <lluis@ximian.com>
* ReflectionHelper.cs: Correctly detect private types.
diff --git a/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs b/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs
index fc71eeea981..cffcb1567a1 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs
@@ -106,7 +106,6 @@ namespace System.Xml.Serialization
primitiveTypes.Add ("token", new TypeData (typeof (string), "token", true));
primitiveTypes.Add ("normalizedString", new TypeData (typeof (string), "normalizedString", true));
primitiveTypes.Add ("anyURI", new TypeData (typeof (string), "anyURI", true));
- primitiveTypes.Add ("base64", new TypeData (typeof (byte[]), "base64", true));
}
public static TypeData GetTypeData (Type type)
diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlCustomFormatter.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlCustomFormatter.cs
index 60b4f282cab..17514268a90 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/XmlCustomFormatter.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/XmlCustomFormatter.cs
@@ -195,7 +195,6 @@ namespace System.Xml.Serialization {
case "unsignedInt": return XmlConvert.ToString ((UInt32)value);
case "unsignedLong": return XmlConvert.ToString ((UInt64)value);
case "guid": return XmlConvert.ToString ((Guid)value);
- case "base64":
case "base64Binary": return Convert.ToBase64String ((byte[])value);
default: return value is IFormattable ? ((IFormattable) value).ToString (null, CultureInfo.InvariantCulture) : value.ToString ();
}
@@ -224,7 +223,6 @@ namespace System.Xml.Serialization {
case "unsignedInt": return XmlConvert.ToUInt32 (value);
case "unsignedLong": return XmlConvert.ToUInt64 (value);
case "guid": return XmlConvert.ToGuid (value);
- case "base64":
case "base64Binary": return Convert.FromBase64String (value);
default:
if (type.Type != null)
@@ -255,7 +253,6 @@ namespace System.Xml.Serialization {
case "unsignedInt": return value + ".ToString(CultureInfo.InvariantCulture)";
case "unsignedLong": return value + ".ToString(CultureInfo.InvariantCulture)";
case "guid": return "XmlConvert.ToString (" + value + ")";
- case "base64":
case "base64Binary": return "Convert.ToBase64String (" + value + ")";
case "NMTOKEN":
case "Name":
@@ -293,7 +290,6 @@ namespace System.Xml.Serialization {
case "unsignedInt": return "UInt32.Parse (" + value + ", CultureInfo.InvariantCulture)";
case "unsignedLong": return "UInt64.Parse (" + value + ", CultureInfo.InvariantCulture)";
case "guid": return "XmlConvert.ToGuid (" + value + ")";
- case "base64:":
case "base64Binary": return "Convert.FromBase64String (" + value + ")";
default: return value;
}
diff --git a/mcs/class/System.XML/System.Xml/ChangeLog b/mcs/class/System.XML/System.Xml/ChangeLog
index c5ea3b2d6f7..04516da68e3 100644
--- a/mcs/class/System.XML/System.Xml/ChangeLog
+++ b/mcs/class/System.XML/System.Xml/ChangeLog
@@ -1,34 +1,3 @@
-2004-08-21 Atsushi Enomoto <atsushi@ximian.com>
-
- * XmlElement.cs : set_InnerText was removing children incompletely.
- This fixes bug #63574.
-
-2004-08-20 Atsushi Enomoto <atsushi@ximian.com>
-
- ResetState() now throws InvalidOperationException() as MS.NET does.
-
-2004-08-20 Atsushi Enomoto <atsushi@ximian.com>
-
- * XmlTextReader.cs : Fixed EOF not to return true when it is just
- closed. Element and EndElement location is now adjusted to be the
- same as MS.NET does. This fixes bug #63505 and #63507.
-
-2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
-
- * XmlTextReader.cs: Stop parsing when a null character is found.
-
-2004-07-20 Atsushi Enomoto <atsushi@ximian.com>
-
- * XmlNode.cs : When the argument node being inserted is the existing
- document element, it should not result in an error (since it should
- be first removed from document, thus no error should happen).
-
-2004-07-16 Atsushi Enomoto <atsushi@ximian.com>
-
- * XmlTextReader.cs : Fixed several problems on ReadBase64();
- Whitespaces should be ignored, and '=' was not skipped correctly.
- It caused "unexpected end of document" error at immediate close tag.
-
2004-06-18 Atsushi Enomoto <atsushi@ximian.com>
* DTDObjectModel.cs, DTDReader.cs, XmlConvert.cs, XmlDocument.cs,
diff --git a/mcs/class/System.XML/System.Xml/XmlElement.cs b/mcs/class/System.XML/System.Xml/XmlElement.cs
index f506853124d..a74d801671c 100644
--- a/mcs/class/System.XML/System.Xml/XmlElement.cs
+++ b/mcs/class/System.XML/System.Xml/XmlElement.cs
@@ -115,11 +115,13 @@ namespace System.Xml
}
set {
// Why its behavior (of MS FCL) is different from InnerXml...?
- if (ChildNodes != null && ChildNodes.Count == 1 && FirstChild.NodeType == XmlNodeType.Text)
+ if (FirstChild != null && FirstChild.NodeType == XmlNodeType.Text)
FirstChild.Value = value;
else {
- while (FirstChild != null)
- this.RemoveChild (FirstChild);
+ if (FirstChild != null) {
+ for (int i = 0; i < ChildNodes.Count; i++)
+ this.RemoveChild (ChildNodes [i]);
+ }
// creates new Text node
AppendChild (OwnerDocument.CreateTextNode (value));
}
diff --git a/mcs/class/System.XML/System.Xml/XmlNode.cs b/mcs/class/System.XML/System.Xml/XmlNode.cs
index 7eaa7285c8e..52c6b21c794 100644
--- a/mcs/class/System.XML/System.Xml/XmlNode.cs
+++ b/mcs/class/System.XML/System.Xml/XmlNode.cs
@@ -524,7 +524,7 @@ namespace System.Xml
throw new ArgumentException ("The reference node is not a child of this node.");
}
- if(this == ownerDoc && ownerDoc.DocumentElement != null && (newChild is XmlElement) && newChild != ownerDoc.DocumentElement)
+ if(this == ownerDoc && ownerDoc.DocumentElement != null && (newChild is XmlElement))
throw new XmlException ("multiple document element not allowed.");
// checking validity finished. then appending...
diff --git a/mcs/class/System.XML/System.Xml/XmlTextReader.cs b/mcs/class/System.XML/System.Xml/XmlTextReader.cs
index 8c21e3d02f8..ea3b4e9cd51 100644
--- a/mcs/class/System.XML/System.Xml/XmlTextReader.cs
+++ b/mcs/class/System.XML/System.Xml/XmlTextReader.cs
@@ -176,8 +176,14 @@ namespace System.Xml
}
#endif
- public override bool EOF {
- get { return readState == ReadState.EndOfFile; }
+ public override bool EOF
+ {
+ get
+ {
+ return
+ readState == ReadState.EndOfFile ||
+ readState == ReadState.Closed;
+ }
}
#if NET_2_0
@@ -525,14 +531,6 @@ namespace System.Xml
return false;
}
- private int SkipIgnorableBase64Chars (char [] chars, int charsLength, int i)
- {
- while (chars [i] == '=' || XmlChar.IsWhitespace (chars [i]))
- if (charsLength == ++i)
- break;
- return i;
- }
-
public int ReadBase64 (byte [] buffer, int offset, int length)
{
if (offset < 0)
@@ -569,9 +567,7 @@ namespace System.Xml
byte b = 0;
byte work = 0;
- for (int i = 0; i < charsLength - 3; i++) {
- if ((i = SkipIgnorableBase64Chars (chars, charsLength, i)) == charsLength)
- break;
+ for (int i = 0; i < charsLength - 3; i += 4) {
b = (byte) (GetBase64Byte (chars [i]) << 2);
if (bufIndex < bufLast)
buffer [bufIndex] = b;
@@ -581,11 +577,9 @@ namespace System.Xml
base64Cache [0] = b;
}
// charsLength mod 4 might not equals to 0.
- if (++i == charsLength)
- break;
- if ((i = SkipIgnorableBase64Chars (chars, charsLength, i)) == charsLength)
+ if (i + 1 == charsLength)
break;
- b = GetBase64Byte (chars [i]);
+ b = GetBase64Byte (chars [i + 1]);
work = (byte) (b >> 4);
if (bufIndex < bufLast) {
buffer [bufIndex] += work;
@@ -604,11 +598,9 @@ namespace System.Xml
base64Cache [1] = work;
}
- if (++i == charsLength)
- break;
- if ((i = SkipIgnorableBase64Chars (chars, charsLength, i)) == charsLength)
+ if (i + 2 == charsLength)
break;
- b = GetBase64Byte (chars [i]);
+ b = GetBase64Byte (chars [i + 2]);
work = (byte) (b >> 2);
if (bufIndex < bufLast) {
buffer [bufIndex] += work;
@@ -625,11 +617,9 @@ namespace System.Xml
base64CacheStartsAt = 2;
base64Cache [2] = work;
}
- if (++i == charsLength)
+ if (i + 3 == charsLength)
break;
- if ((i = SkipIgnorableBase64Chars (chars, charsLength, i)) == charsLength)
- break;
- work = GetBase64Byte (chars [i]);
+ work = GetBase64Byte (chars [i + 3]);
if (bufIndex < bufLast) {
buffer [bufIndex] += work;
bufIndex++;
@@ -682,7 +672,7 @@ namespace System.Xml
public void ResetState ()
{
- throw new InvalidOperationException ("Cannot call ResetState when parsing an XML fragment.");
+ Init ();
}
public override void ResolveEntity ()
@@ -1140,11 +1130,8 @@ namespace System.Xml
return -1;
return PeekChar ();
}
- else {
- char c = peekChars [peekCharsIndex];
- if (c != 0) return c;
- else return -1;
- }
+ else
+ return peekChars [peekCharsIndex];
}
private int ReadChar ()
@@ -1161,8 +1148,6 @@ namespace System.Xml
if (ch == '\n') {
line++;
column = 1;
- } else if (ch == 0) {
- return -1;
} else {
column++;
}
@@ -1298,9 +1283,6 @@ namespace System.Xml
"Multiple document element was detected.");
currentState = XmlNodeType.Element;
- currentLinkedNodeLineNumber = line;
- currentLinkedNodeLinePosition = column;
-
parserContext.NamespaceManager.PushScope ();
string name = ReadName ();
@@ -1403,9 +1385,6 @@ namespace System.Xml
throw new XmlException (this as IXmlLineInfo,
"End tag cannot appear in this state.");
- currentLinkedNodeLineNumber = line;
- currentLinkedNodeLinePosition = column;
-
string name = ReadName ();
if (elementNameStackPos == 0)
throw new XmlException (this as IXmlLineInfo,"closing element without matching opening element");
@@ -2569,8 +2548,6 @@ namespace System.Xml
return;
}
- // Since ReadBase64() is processed for every 4 chars, it does
- // not handle '=' here.
private byte GetBase64Byte (char ch)
{
switch (ch) {
@@ -2578,6 +2555,8 @@ namespace System.Xml
return 62;
case '/':
return 63;
+ case '=':
+ return 0;
default:
if (ch >= 'A' && ch <= 'Z')
return (byte) (ch - 'A');
@@ -2598,6 +2577,8 @@ namespace System.Xml
return 0;
}
+ shouldSkipUntilEndTag = true;
+
if (offset < 0)
throw new ArgumentOutOfRangeException ("offset", offset, "Offset must be non-negative integer.");
else if (length < 0)
@@ -2608,8 +2589,6 @@ namespace System.Xml
if (NodeType != XmlNodeType.Element)
return 0;
- shouldSkipUntilEndTag = true;
-
int bufIndex = offset;
for (int i = 0; i < length; i++) {
int c = PeekChar ();
@@ -2628,9 +2607,9 @@ namespace System.Xml
depth++;
depthUp = false;
}
- ReadEndTag ();
+ ReadEndTag();
shouldSkipUntilEndTag = false;
- Read (); // move to the next node
+ Read ();
return i;
default:
ReadChar ();
diff --git a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
index edc8da68872..a09a812bedc 100644
--- a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
+++ b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
@@ -97,7 +97,7 @@ namespace Mono.CSharp
StringCollection assemblies = options.ReferencedAssemblies;
foreach (CodeCompileUnit e in ea) {
- fileNames [i] = GetTempFileNameWithExtension (options.TempFiles, i.ToString () + ".cs");
+ fileNames [i] = GetTempFileNameWithExtension (options.TempFiles, "cs");
FileStream f=new FileStream(fileNames[i],FileMode.OpenOrCreate);
StreamWriter s=new StreamWriter(f, Encoding.UTF8);
if (e.ReferencedAssemblies != null) {
@@ -183,7 +183,7 @@ namespace Mono.CSharp
string[] fileNames=new string[sources.Length];
int i=0;
foreach (string source in sources) {
- fileNames [i] = GetTempFileNameWithExtension (options.TempFiles, i.ToString () + ".cs");
+ fileNames [i] = GetTempFileNameWithExtension (options.TempFiles, "cs");
FileStream f=new FileStream(fileNames[i],FileMode.OpenOrCreate);
StreamWriter s=new StreamWriter(f);
s.Write(source);
diff --git a/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs b/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs
index c22c8fc653d..4be6da4cf77 100644
--- a/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs
+++ b/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs
@@ -503,10 +503,7 @@ namespace Mono.CSharp
OutputMemberAccessModifier( attributes );
OutputFieldScopeModifier( attributes );
- if (IsCurrentEnum)
- Output.Write(field.Name);
- else
- OutputTypeNamePair( field.Type, GetSafeName (field.Name) );
+ OutputTypeNamePair( field.Type, GetSafeName (field.Name) );
CodeExpression initExpression = field.InitExpression;
if ( initExpression != null ) {
diff --git a/mcs/class/System/Microsoft.CSharp/ChangeLog b/mcs/class/System/Microsoft.CSharp/ChangeLog
index 6fbed3e9cc0..b9e06652430 100644
--- a/mcs/class/System/Microsoft.CSharp/ChangeLog
+++ b/mcs/class/System/Microsoft.CSharp/ChangeLog
@@ -1,13 +1,3 @@
-2004-07-13 Peter Williams <peter@newton.cx>
-
- * CSharpCodeCompiler.cs (CompileAssemblyFromDomBatch): Include
- counter in the extension so that batch compilations work.
- (CompileAssemblyFromSourceBatch): Same.
-
-2004-07-12 Fawad Halim <fawad@fawad.net>
-
- * CSharpCodeGenerator.cs : Have GenerateField generate field sans the type for enums.
-
2004-06-28 Atsushi Enomoto <atsushi@ximian.com>
* CSharpCodeCompiler.cs : (only for windows) First check mcs.bat, then
diff --git a/mcs/class/System/System.CodeDom.Compiler/ChangeLog b/mcs/class/System/System.CodeDom.Compiler/ChangeLog
index a2f6ee391a4..a91f5c6b3f9 100755
--- a/mcs/class/System/System.CodeDom.Compiler/ChangeLog
+++ b/mcs/class/System/System.CodeDom.Compiler/ChangeLog
@@ -1,14 +1,3 @@
-2004-08-09 Atsushi Enomoto <atsushi@ximian.com>
-
- * CodeGenerator.cs :
- Don't initialize output more than once. TextWriter is wrapped twice.
-
-2004-07-15 Peter Williams <peter@newton.cx>
-
- * CodeGenerator.cs: Have the basic generator create line pragmas
- for NamespaceImports, SnippetCompileUnits, and TypeMembers, all of
- which had LinePragma members which were going unused.
-
2004-06-17 Jackson Harper <jackson@ximian.com>
* CompilerError.cs:
diff --git a/mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs b/mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs
index b3f563211bb..7d42931b6d1 100755
--- a/mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs
+++ b/mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs
@@ -392,16 +392,9 @@ namespace System.CodeDom.Compiler {
GenerateNamespaceStart (ns);
- foreach (CodeNamespaceImport import in ns.Imports) {
- if (import.LinePragma != null)
- GenerateLinePragmaStart (import.LinePragma);
-
+ foreach (CodeNamespaceImport import in ns.Imports)
GenerateNamespaceImport (import);
- if (import.LinePragma != null)
- GenerateLinePragmaEnd (import.LinePragma);
- }
-
output.WriteLine();
foreach (CodeTypeDeclaration type in ns.Types) {
@@ -417,15 +410,8 @@ namespace System.CodeDom.Compiler {
protected abstract void GenerateNamespaceImport (CodeNamespaceImport i);
protected void GenerateNamespaceImports (CodeNamespace e)
{
- foreach (CodeNamespaceImport import in e.Imports) {
- if (import.LinePragma != null)
- GenerateLinePragmaStart (import.LinePragma);
-
+ foreach (CodeNamespaceImport import in e.Imports)
GenerateNamespaceImport (import);
-
- if (import.LinePragma != null)
- GenerateLinePragmaEnd (import.LinePragma);
- }
}
protected void GenerateNamespaces (CodeCompileUnit e)
@@ -486,14 +472,7 @@ namespace System.CodeDom.Compiler {
protected virtual void GenerateSnippetCompileUnit (CodeSnippetCompileUnit e)
{
- if (e.LinePragma != null)
- GenerateLinePragmaStart (e.LinePragma);
-
output.WriteLine (e.Value);
-
- if (e.LinePragma != null)
- GenerateLinePragmaEnd (e.LinePragma);
-
}
protected abstract void GenerateSnippetExpression (CodeSnippetExpression e);
@@ -990,17 +969,11 @@ namespace System.CodeDom.Compiler {
private void GenerateType (CodeTypeDeclaration type)
{
- if (type.LinePragma != null)
- GenerateLinePragmaStart (type.LinePragma);
-
CodeTypeDelegate del = type as CodeTypeDelegate;
if (del != null)
GenerateDelegate (del);
else
GenerateNonDelegateType (type);
-
- if (type.LinePragma != null)
- GenerateLinePragmaEnd (type.LinePragma);
}
private void GenerateDelegate (CodeTypeDelegate type)
@@ -1008,6 +981,8 @@ namespace System.CodeDom.Compiler {
CodeTypeDeclaration prevType = this.currentType;
this.currentType = type;
+ InitOutput (output, options);
+
foreach (CodeCommentStatement statement in type.Comments)
GenerateCommentStatement (statement);
@@ -1024,6 +999,8 @@ namespace System.CodeDom.Compiler {
CodeTypeDeclaration prevType = this.currentType;
this.currentType = type;
+ InitOutput (output, options);
+
foreach (CodeCommentStatement statement in type.Comments)
GenerateCommentStatement (statement);
@@ -1047,18 +1024,12 @@ namespace System.CodeDom.Compiler {
CodeTypeMember prevMember = this.currentMember;
this.currentMember = member;
- if (prevMember != null && prevMember.LinePragma != null)
- GenerateLinePragmaEnd (prevMember.LinePragma);
-
if (options.BlankLinesBetweenMembers)
output.WriteLine ();
foreach (CodeCommentStatement statement in member.Comments)
GenerateCommentStatement (statement);
- if (member.LinePragma != null)
- GenerateLinePragmaStart (member.LinePragma);
-
CodeMemberEvent eventm = member as CodeMemberEvent;
if (eventm != null)
{
@@ -1116,9 +1087,6 @@ namespace System.CodeDom.Compiler {
this.currentMember = prevMember;
}
-
- if (currentMember != null && currentMember.LinePragma != null)
- GenerateLinePragmaEnd (currentMember.LinePragma);
GenerateTypeEnd (type);
this.currentType = prevType;
diff --git a/mcs/class/System/System.CodeDom/ChangeLog b/mcs/class/System/System.CodeDom/ChangeLog
index 4db765c3319..2c818373f8c 100644
--- a/mcs/class/System/System.CodeDom/ChangeLog
+++ b/mcs/class/System/System.CodeDom/ChangeLog
@@ -1,8 +1,3 @@
-2004-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * CodeEntryPointMethod.cs: patch by Fawad Halim that makes the entry
- point method public.
-
2004-02-04 Jackson Harper <jackson@ximian.com>
* CodeTypeMember.cs: Name is String.Empty if not set.
diff --git a/mcs/class/System/System.CodeDom/CodeEntryPointMethod.cs b/mcs/class/System/System.CodeDom/CodeEntryPointMethod.cs
index 5a46d2a2a08..4b3b477eb7e 100644
--- a/mcs/class/System/System.CodeDom/CodeEntryPointMethod.cs
+++ b/mcs/class/System/System.CodeDom/CodeEntryPointMethod.cs
@@ -38,9 +38,5 @@ namespace System.CodeDom
public class CodeEntryPointMethod
: CodeMemberMethod
{
- public CodeEntryPointMethod ()
- {
- Attributes = MemberAttributes.Public | MemberAttributes.Static;
- }
}
}
diff --git a/mcs/class/System/System.Net.Sockets/ChangeLog b/mcs/class/System/System.Net.Sockets/ChangeLog
index 7da5dcdae61..3b7aeaf5da9 100644
--- a/mcs/class/System/System.Net.Sockets/ChangeLog
+++ b/mcs/class/System/System.Net.Sockets/ChangeLog
@@ -1,29 +1,3 @@
-2004-08-04 Dick Porter <dick@ximian.com>
-
- * Socket.cs: Update Connected state in Select and Poll; this is
- when we find out that non-blocking Connects succeed. Fixes bug
- 62398.
-
-2004-07-28 Dick Porter <dick@ximian.com>
-
- * Socket.cs: ReceiveFrom might not return a valid EndPoint. Patch
- by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug 61608.
-
-2004-07-15 Dick Porter <dick@ximian.com>
-
- * Socket.cs: Don't try and dereference a null array in Select()
- (possible if a descriptor list of length 0 was passed.) Patch by
- Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug 61595.
-
-2004-07-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * Socket.cs: if'ed RemoveReferences calls.
-
-2004-07-09 Dick Porter <dick@ximian.com>
-
- * Socket.cs: Slight tweak to allow unknown objects to be returned
- by GetSocketOption().
-
2004-06-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Socket.cs: connect on non-blocking sockets returns EINPROGRESS. Fixes
diff --git a/mcs/class/System/System.Net.Sockets/Socket.cs b/mcs/class/System/System.Net.Sockets/Socket.cs
index 88ca77436b5..a7fa184ccae 100644
--- a/mcs/class/System/System.Net.Sockets/Socket.cs
+++ b/mcs/class/System/System.Net.Sockets/Socket.cs
@@ -422,39 +422,24 @@ namespace System.Net.Sockets
throw new SocketException (error);
}
- /* Make sure the connected state is updated
- * for each socket returned from the select;
- * for non blocking Connect()s, this is when
- * we find out that the connect succeeded.
- */
-
if(read_list!=null) {
read_list.Clear();
- if (read_arr != null) {
- for(i=0; i<read_arr.Length; i++) {
- read_list.Add(read_arr[i]);
- read_arr[i].connected = true;
- }
+ for(i=0; i<read_arr.Length; i++) {
+ read_list.Add(read_arr[i]);
}
}
if(write_list!=null) {
write_list.Clear();
- if (write_arr != null) {
- for(i=0; i<write_arr.Length; i++) {
- write_list.Add(write_arr[i]);
- write_arr[i].connected = true;
- }
+ for(i=0; i<write_arr.Length; i++) {
+ write_list.Add(write_arr[i]);
}
}
if(err_list!=null) {
err_list.Clear();
- if (err_arr != null) {
- for(i=0; i<err_arr.Length; i++) {
- err_list.Add(err_arr[i]);
- err_arr[i].connected = true;
- }
+ for(i=0; i<err_arr.Length; i++) {
+ err_list.Add(err_arr[i]);
}
}
}
@@ -1035,9 +1020,7 @@ namespace System.Net.Sockets
if (req == null)
throw new ArgumentException ("Invalid IAsyncResult", "result");
- if (supportsAsync && socket_type == SocketType.Stream)
- RemoveReference (req);
-
+ RemoveReference (req);
if (!result.IsCompleted)
result.AsyncWaitHandle.WaitOne();
@@ -1080,9 +1063,7 @@ namespace System.Net.Sockets
if (req == null)
throw new ArgumentException ("Invalid IAsyncResult", "result");
- if (supportsAsync && socket_type == SocketType.Stream)
- RemoveReference (req);
-
+ RemoveReference (req);
if (!result.IsCompleted)
result.AsyncWaitHandle.WaitOne();
@@ -1150,10 +1131,8 @@ namespace System.Net.Sockets
} else if (name==SocketOptionName.AddMembership ||
name==SocketOptionName.DropMembership) {
return((MulticastOption)obj_val);
- } else if (obj_val is int) {
- return((int)obj_val);
} else {
- return(obj_val);
+ return((int)obj_val);
}
}
@@ -1245,15 +1224,6 @@ namespace System.Net.Sockets
if (error != 0)
throw new SocketException (error);
- if (result == true) {
- /* Update the connected state; for
- * non-blocking Connect()s this is
- * when we can find out that the
- * connect succeeded.
- */
- connected = true;
- }
-
return result;
}
@@ -1402,17 +1372,10 @@ namespace System.Net.Sockets
}
connected = true;
-
- // If sockaddr is null then we're a connection
- // oriented protocol and should ignore the
- // remote_end parameter (see MSDN
- // documentation for Socket.ReceiveFrom(...) )
- if ( sockaddr != null ) {
- // Stupidly, EndPoint.Create() is an
- // instance method
- remote_end = remote_end.Create (sockaddr);
- }
+ // Stupidly, EndPoint.Create() is an
+ // instance method
+ remote_end = remote_end.Create (sockaddr);
return cnt;
}
diff --git a/mcs/class/System/System.Net/ChangeLog b/mcs/class/System/System.Net/ChangeLog
index 92fa9343ef4..2b470e6423b 100644
--- a/mcs/class/System/System.Net/ChangeLog
+++ b/mcs/class/System/System.Net/ChangeLog
@@ -1,52 +1,3 @@
-2004-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * Cookie.cs: don't fail when using default constructor. Fixes bug
- #62890.
-
-2004-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * HttpWebResponse.cs: set-cookie and set-cookie2 can be present more
- than once and have multiple values. Don't rely on string.split when
- parsing cookie values.
-
- * WebHeaderCollection.cs: same thing for set-cookie and set-cookie2.
- Fixed GetValues (it was splitting values that contained a comma) and
- changed SetInternal to handle multi-value headers.
-
- Fixes bug #62744.
-
-2004-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * WebProxy.cs: fix scheme detection. Patch by Konstantin Triger
- (kostat@mainsoft.com).
-
-2004-07-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * HttpWebRequest.cs: detect changes in scheme or port when redirecting.
- Fixes las take on bug 61218.
-
-2004-07-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * WebConnection.cs: moved loading of the ssl stream Type to its own
- method. Don't create a new ssl stream if we're reusing the connection.
-
- * WebConnectionStream.cs: ensure the number of bytes copied in ReadAll
- is the expected even if the dta from the server has extra bytes.
-
-2004-07-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * WebConnection.cs:
- * WebConnectionStream.cs: when the status code is 1xx, 204 or 304,
- "responses MUST NOT include a message-body". We tried to read the
- stream even when getting those codes and considered the 0 length
- read as a failure.
-
-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/Cookie.cs b/mcs/class/System/System.Net/Cookie.cs
index 30ee979fef1..c0235be1f1e 100644
--- a/mcs/class/System/System.Net/Cookie.cs
+++ b/mcs/class/System/System.Net/Cookie.cs
@@ -57,23 +57,24 @@ namespace System.Net {
private static char [] reservedCharsValue = new char [] {';', ','};
private static char [] portSeparators = new char [] {'"', ','};
private static string tspecials = "()<>@,;:\\\"/[]?={} \t"; // from RFC 2965, 2068
-
- public Cookie ()
- {
- expires = DateTime.MinValue;
- timestamp = DateTime.Now;
- domain = "";
- name = "";
- val = "";
- }
-
- public Cookie (string name, string value)
- : this ()
- {
- Name = name;
- Value = value;
- }
-
+
+ public Cookie ()
+ : this (String.Empty, String.Empty) {}
+
+ public Cookie (string name, string value)
+ {
+ Name = name;
+ Value = value;
+
+ discard = false;
+ expired = false;
+ secure = false;
+ expires = DateTime.MinValue;
+ timestamp = DateTime.Now;
+ version = 0;
+ domain = "";
+ }
+
public Cookie (string name, string value, string path)
: this (name, value)
{
diff --git a/mcs/class/System/System.Net/HttpWebRequest.cs b/mcs/class/System/System.Net/HttpWebRequest.cs
index f20a0747a3f..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;
@@ -829,7 +830,7 @@ namespace System.Net
throw new WebException ("No Location header found for " + (int) code,
WebExceptionStatus.ProtocolError);
- Uri prev = actualUri;
+ string host = actualUri.Host;
try {
actualUri = new Uri (actualUri, uriString);
} catch (Exception) {
@@ -838,8 +839,7 @@ namespace System.Net
WebExceptionStatus.ProtocolError);
}
- hostChanged = (actualUri.Scheme != prev.Scheme || actualUri.Host != prev.Host ||
- actualUri.Port != prev.Port);
+ hostChanged = (actualUri.Host != host);
return true;
}
diff --git a/mcs/class/System/System.Net/HttpWebResponse.cs b/mcs/class/System/System.Net/HttpWebResponse.cs
index 9fcdce33fe3..b38108a1597 100644
--- a/mcs/class/System/System.Net/HttpWebResponse.cs
+++ b/mcs/class/System/System.Net/HttpWebResponse.cs
@@ -31,7 +31,6 @@
//
using System;
-using System.Globalization;
using System.IO;
using System.Net.Sockets;
using System.Runtime.Serialization;
@@ -316,17 +315,13 @@ namespace System.Net
if (webHeaders == null)
return;
- string [] values = webHeaders.GetValues ("Set-Cookie");
- if (values != null) {
- foreach (string va in values)
- SetCookie (va);
- }
+ string val = webHeaders ["Set-Cookie"];
+ if (val != null && val.Trim () != "")
+ SetCookie (val);
- values = webHeaders.GetValues ("Set-Cookie2");
- if (values != null) {
- foreach (string va in values)
- SetCookie2 (va);
- }
+ val = webHeaders ["Set-Cookie2"];
+ if (val != null && val.Trim () != "")
+ SetCookie2 (val);
}
static string [] SplitValue (string input)
@@ -343,76 +338,65 @@ namespace System.Net
return result;
}
- void SetCookie (string header)
+ [MonoTODO ("Parse dates")]
+ void SetCookie (string cookie_str)
{
- string [] name_values = header.Trim ().Split (';');
- int length = name_values.Length;
+ string[] parts = null;
+ Collections.Queue options = null;
Cookie cookie = null;
- int pos;
- for (int i = 0; i < length; i++) {
- pos = 0;
- string name_value = name_values [i].Trim ();
- string name = GetCookieName (name_value, name_value.Length, ref pos);
- string value = GetCookieValue (name_value, name_value.Length, ref pos);
- if (cookie == null) {
- cookie = new Cookie (name, value);
- continue;
- }
- name = name.ToUpper ();
- switch (name) {
- case "COMMENT":
- if (cookie.Comment == null)
- cookie.Comment = value;
+ options = new Collections.Queue (cookie_str.Split (';'));
+ parts = SplitValue ((string) options.Dequeue()); // NAME=VALUE must be first
+
+ cookie = new Cookie (parts[0], parts[1]);
+
+ while (options.Count > 0) {
+ parts = SplitValue ((string) options.Dequeue());
+ switch (parts [0]) {
+ case "COMMENT":
+ if (cookie.Comment == null)
+ cookie.Comment = parts[1];
break;
- case "COMMENTURL":
- if (cookie.CommentUri == null)
- cookie.CommentUri = new Uri (value);
+ case "COMMENTURL":
+ if (cookie.CommentUri == null)
+ cookie.CommentUri = new Uri(parts[1]);
break;
- case "DISCARD":
- cookie.Discard = true;
+ case "DISCARD":
+ cookie.Discard = true;
break;
- case "DOMAIN":
- if (cookie.Domain == "")
- cookie.Domain = value;
+ case "DOMAIN":
+ if (cookie.Domain == "")
+ cookie.Domain = parts[1];
break;
- case "MAX-AGE": // RFC Style Set-Cookie2
- if (cookie.Expires == DateTime.MinValue)
- cookie.Expires = cookie.TimeStamp.AddSeconds (Int32.Parse (value));
+ case "MAX-AGE": // RFC Style Set-Cookie2
+ if (cookie.Expires == DateTime.MinValue)
+ cookie.Expires = cookie.TimeStamp.AddSeconds (Int32.Parse (parts[1]));
break;
- case "EXPIRES": // Netscape Style Set-Cookie
- if (cookie.Expires != DateTime.MinValue)
- break;
- try {
- cookie.Expires = DateTime.ParseExact (value, "r", CultureInfo.InvariantCulture);
- } catch {
- try {
- cookie.Expires = DateTime.ParseExact (value,
- "ddd, dd'-'MMM'-'yyyy HH':'mm':'ss 'GMT'",
- CultureInfo.InvariantCulture);
- } catch {
+ case "EXPIRES": // Netscape Style Set-Cookie
+ if (cookie.Expires == DateTime.MinValue) {
+ //FIXME: Does DateTime parse something like: "Sun, 17-Jan-2038 19:14:07 GMT"?
+ //cookie.Expires = DateTime.ParseExact (parts[1]);
cookie.Expires = DateTime.Now.AddDays (1);
}
- }
break;
- case "PATH":
- cookie.Path = value;
+ case "PATH":
+ cookie.Path = parts[1];
break;
- case "PORT":
- if (cookie.Port == null)
- cookie.Port = value;
+ case "PORT":
+ if (cookie.Port == null)
+ cookie.Port = parts[1];
break;
- case "SECURE":
- cookie.Secure = true;
+ case "SECURE":
+ cookie.Secure = true;
break;
- case "VERSION":
- cookie.Version = Int32.Parse (value);
+ case "VERSION":
+ cookie.Version = Int32.Parse (parts[1]);
break;
- }
- }
+ } // switch
+ } // while
if (cookieCollection == null)
- cookieCollection = new CookieCollection ();
+ cookieCollection = new CookieCollection();
if (cookie.Domain == "")
cookie.Domain = uri.Host;
@@ -427,40 +411,6 @@ namespace System.Net
foreach (string cookie_str in cookies)
SetCookie (cookie_str);
}
-
- static string GetCookieValue (string str, int length, ref int i)
- {
- if (i >= length)
- return null;
-
- int k = i;
- while (k < length && Char.IsWhiteSpace (str [k]))
- k++;
-
- int begin = k;
- while (k < length && str [k] != ';')
- k++;
-
- i = k;
- return str.Substring (begin, i - begin).Trim ();
- }
-
- static string GetCookieName (string str, int length, ref int i)
- {
- if (i >= length)
- return null;
-
- int k = i;
- while (k < length && Char.IsWhiteSpace (str [k]))
- k++;
-
- int begin = k;
- while (k < length && str [k] != ';' && str [k] != '=')
- k++;
-
- i = k + 1;
- return str.Substring (begin, k - begin).Trim ();
- }
}
}
diff --git a/mcs/class/System/System.Net/WebConnection.cs b/mcs/class/System/System.Net/WebConnection.cs
index f3ef1d22076..c4b08a363d1 100644
--- a/mcs/class/System/System.Net/WebConnection.cs
+++ b/mcs/class/System/System.Net/WebConnection.cs
@@ -71,7 +71,7 @@ namespace System.Net
bool ssl;
bool certsAvailable;
- static object classLock = new object ();
+ static bool sslCheck;
static Type sslStream;
static PropertyInfo piClient;
static PropertyInfo piServer;
@@ -127,48 +127,36 @@ namespace System.Net
}
}
- static void EnsureSSLStreamAvailable ()
- {
- lock (classLock) {
- if (sslStream != null)
- return;
-
- // HttpsClientStream is an internal glue class in Mono.Security.dll
- sslStream = Type.GetType ("Mono.Security.Protocol.Tls.HttpsClientStream, " +
- Consts.AssemblyMono_Security, false);
-
- if (sslStream == null) {
- string msg = "Missing Mono.Security.dll assembly. " +
- "Support for SSL/TLS is unavailable.";
-
- throw new NotSupportedException (msg);
- }
- piClient = sslStream.GetProperty ("SelectedClientCertificate");
- piServer = sslStream.GetProperty ("ServerCertificate");
- }
- }
-
bool CreateStream (HttpWebRequest request)
{
try {
NetworkStream serverStream = new NetworkStream (socket, false);
- if (request.Address.Scheme == Uri.UriSchemeHttps) {
+ if (request.RequestUri.Scheme == Uri.UriSchemeHttps) {
ssl = true;
- EnsureSSLStreamAvailable ();
- if (!reused || nstream == null || nstream.GetType () != sslStream) {
- object[] args = new object [3] { serverStream,
- request.ClientCertificates,
- request };
- nstream = (Stream) Activator.CreateInstance (sslStream, args);
+ if (!sslCheck) {
+ lock (typeof (WebConnection)) {
+ sslCheck = true;
+ // HttpsClientStream is an internal glue class in Mono.Security.dll
+ sslStream = Type.GetType ("Mono.Security.Protocol.Tls.HttpsClientStream, " + Consts.AssemblyMono_Security, false);
+ if (sslStream != null) {
+ piClient = sslStream.GetProperty ("SelectedClientCertificate");
+ piServer = sslStream.GetProperty ("ServerCertificate");
+ }
+ }
}
+ if (sslStream == null)
+ throw new NotSupportedException ("Missing Mono.Security.dll assembly. Support for SSL/TLS is unavailable.");
+
+ object[] args = new object [4] { serverStream, request.RequestUri.Host, request.ClientCertificates, request };
+ nstream = (Stream) Activator.CreateInstance (sslStream, args);
+
// we also need to set ServicePoint.Certificate
// and ServicePoint.ClientCertificate but this can
// only be done later (after handshake - which is
// done only after a read operation).
- } else {
- ssl = false;
- nstream = serverStream;
}
+ else
+ nstream = serverStream;
} catch (Exception) {
status = WebExceptionStatus.ConnectFailure;
return false;
@@ -280,9 +268,6 @@ namespace System.Net
data.stream = stream;
- if (!ExpectContent (data.StatusCode))
- stream.ForceCompletion ();
-
lock (cnc) {
lock (cnc.queue) {
if (cnc.queue.Count > 0) {
@@ -297,11 +282,6 @@ namespace System.Net
data.request.SetResponseData (data);
}
- static bool ExpectContent (int statusCode)
- {
- return (statusCode >= 200 && statusCode != 204 && statusCode != 304);
- }
-
internal void GetCertificates ()
{
// here the SSL negotiation have been done
diff --git a/mcs/class/System/System.Net/WebConnectionStream.cs b/mcs/class/System/System.Net/WebConnectionStream.cs
index c609455f32f..703f35d42b4 100644
--- a/mcs/class/System/System.Net/WebConnectionStream.cs
+++ b/mcs/class/System/System.Net/WebConnectionStream.cs
@@ -57,7 +57,6 @@ namespace System.Net
byte [] headers;
bool disposed;
bool headersSent;
- bool forceCompletion;
public WebConnectionStream (WebConnection cnc)
{
@@ -114,15 +113,9 @@ namespace System.Net
get { return (int) writeBuffer.Length; }
}
- internal void ForceCompletion ()
- {
- forceCompletion = true;
- }
-
internal void CheckComplete ()
{
- bool nrc = nextReadCalled;
- if (forceCompletion || (!nrc && readBufferSize - readBufferOffset == contentLength)) {
+ if (!nextReadCalled && readBufferSize - readBufferOffset == contentLength) {
nextReadCalled = true;
cnc.NextRead ();
}
@@ -158,12 +151,8 @@ namespace System.Net
} else {
new_size = contentLength - totalRead;
b = new byte [new_size];
- if (readBuffer != null && diff > 0) {
- if (diff > new_size)
- diff = new_size;
-
+ if (readBuffer != null && diff > 0)
Buffer.BlockCopy (readBuffer, readBufferOffset, b, 0, diff);
- }
int remaining = new_size - diff;
int r = -1;
diff --git a/mcs/class/System/System.Net/WebHeaderCollection.cs b/mcs/class/System/System.Net/WebHeaderCollection.cs
index f41105bd5bc..e4ea21688c6 100644
--- a/mcs/class/System/System.Net/WebHeaderCollection.cs
+++ b/mcs/class/System/System.Net/WebHeaderCollection.cs
@@ -96,10 +96,6 @@ namespace System.Net
multiValue.Add ("vary", true);
multiValue.Add ("via", true);
multiValue.Add ("warning", true);
-
- // Extra
- multiValue.Add ("set-cookie", true);
- multiValue.Add ("set-cookie2", true);
}
// Constructors
@@ -155,19 +151,28 @@ namespace System.Net
throw new ArgumentException ("invalid header value: " + headerValue, "headerValue");
base.Add (headerName, headerValue);
}
-
- public override string [] GetValues (string header)
- {
- if (header == null)
- throw new ArgumentNullException ("header");
-
- string [] values = base.GetValues (header);
- if (values == null || values.Length == 0)
- return null;
-
- return values;
- }
-
+
+ public override string [] GetValues (string header)
+ {
+ if (header == null)
+ throw new ArgumentNullException ("header");
+ string [] values = base.GetValues (header);
+ if (values == null || values.Length == 0)
+ return null;
+ if (!IsMultiValue (header))
+ return values;
+ StringCollection col = new StringCollection ();
+ for (int i = 0; i < values.Length; i++) {
+ string [] s = values [i].Split (new char [] {','});
+ for (int j = 0; j < s.Length; j++)
+ s [j] = s [j].Trim ();
+ col.AddRange (s);
+ }
+ values = new string [col.Count];
+ col.CopyTo (values, 0);
+ return values;
+ }
+
public static bool IsRestricted (string headerName)
{
if (headerName == null)
@@ -260,12 +265,8 @@ namespace System.Net
if (!IsHeaderValue (value))
throw new ArgumentException ("invalid header value");
- if (IsMultiValue (name)) {
- base.Add (name, value);
- } else {
- base.Remove (name);
- base.Set (name, value);
- }
+ base.Remove (name);
+ base.Set (name, value);
}
internal void RemoveInternal (string name)
diff --git a/mcs/class/System/System.Net/WebProxy.cs b/mcs/class/System/System.Net/WebProxy.cs
index df8976c6966..b0299575f60 100644
--- a/mcs/class/System/System.Net/WebProxy.cs
+++ b/mcs/class/System/System.Net/WebProxy.cs
@@ -208,7 +208,7 @@ namespace System.Net
if (address == null)
return null;
- if (address.IndexOf ("://") == -1)
+ if (address.IndexOf (':') == -1)
address = "http://" + address;
return new Uri (address);
diff --git a/mcs/class/corlib/System.Collections/ChangeLog b/mcs/class/corlib/System.Collections/ChangeLog
index f269e646470..8782bc457f8 100644
--- a/mcs/class/corlib/System.Collections/ChangeLog
+++ b/mcs/class/corlib/System.Collections/ChangeLog
@@ -1,13 +1,3 @@
-2004-07-21 Geoff Norton <gnorton@customerdna.com>
-
- * Hashtable.cs: lock the SyncRoot when Cloning a Synchronized hashtable to avoid
- a snapshot out of sync error.
-
-2004-07-21 Duncan Mak <duncan@ximian.com>
-
- * DictionaryBase.cs: Rename the dictionary field to hashtable,
- which causes a serialization interop bug. Fixes bug #61721.
-
2004-06-18 Ben Maurer <bmaurer@ximian.com>
* IKeyComparer.cs: v2 class
diff --git a/mcs/class/corlib/System.Collections/DictionaryBase.cs b/mcs/class/corlib/System.Collections/DictionaryBase.cs
index 9e814d1fab9..af6b19f2617 100755
--- a/mcs/class/corlib/System.Collections/DictionaryBase.cs
+++ b/mcs/class/corlib/System.Collections/DictionaryBase.cs
@@ -51,11 +51,11 @@ namespace System.Collections {
[Serializable]
public abstract class DictionaryBase : IDictionary, ICollection, IEnumerable {
- Hashtable hashtable;
+ Hashtable dictionary;
protected DictionaryBase ()
{
- hashtable = new Hashtable ();
+ dictionary = new Hashtable ();
}
/// <summary>
@@ -64,7 +64,7 @@ namespace System.Collections {
public void Clear ()
{
OnClear ();
- hashtable.Clear ();
+ dictionary.Clear ();
OnClearComplete ();
}
@@ -73,7 +73,7 @@ namespace System.Collections {
/// </summary>
public int Count {
get {
- return hashtable.Count;
+ return dictionary.Count;
}
}
@@ -91,7 +91,7 @@ namespace System.Collections {
/// </summary>
protected Hashtable InnerHashtable {
get {
- return hashtable;
+ return dictionary;
}
}
@@ -129,7 +129,7 @@ namespace System.Collections {
/// </summary>
private void DoCopy (Array array, int index)
{
- foreach (DictionaryEntry de in hashtable)
+ foreach (DictionaryEntry de in dictionary)
array.SetValue (de, index++);
}
@@ -138,7 +138,7 @@ namespace System.Collections {
/// </summary>
public IDictionaryEnumerator GetEnumerator ()
{
- return hashtable.GetEnumerator ();
+ return dictionary.GetEnumerator ();
}
/// <summary>
@@ -311,20 +311,20 @@ namespace System.Collections {
object IDictionary.this [object key] {
get {
- OnGet (key, hashtable [key]);
- object value = hashtable [key];
+ OnGet (key, dictionary[key]);
+ object value = dictionary [key];
return value;
}
set {
OnValidate (key, value);
- object current_value = hashtable [key];
+ object current_value = dictionary [key];
OnSet (key, current_value, value);
- hashtable [key] = value;
+ dictionary [key] = value;
try {
OnSetComplete (key, current_value, value);
} catch {
- hashtable [key] = current_value;
+ dictionary [key] = current_value;
throw;
}
}
@@ -332,13 +332,13 @@ namespace System.Collections {
ICollection IDictionary.Keys {
get {
- return hashtable.Keys;
+ return dictionary.Keys;
}
}
ICollection IDictionary.Values {
get {
- return hashtable.Values;
+ return dictionary.Values;
}
}
@@ -349,11 +349,11 @@ namespace System.Collections {
{
OnValidate (key, value);
OnInsert (key, value);
- hashtable.Add (key, value);
+ dictionary.Add (key, value);
try {
OnInsertComplete (key, value);
} catch {
- hashtable.Remove (key);
+ dictionary.Remove(key);
throw;
}
}
@@ -363,10 +363,10 @@ namespace System.Collections {
/// </summary>
void IDictionary.Remove (object key)
{
- object value = hashtable [key];
+ object value = dictionary [key];
OnValidate (key, value);
OnRemove (key, value);
- hashtable.Remove (key);
+ dictionary.Remove (key);
OnRemoveComplete (key, value);
}
@@ -375,24 +375,24 @@ namespace System.Collections {
/// </summary>
bool IDictionary.Contains (object key)
{
- return hashtable.Contains (key);
+ return dictionary.Contains (key);
}
bool ICollection.IsSynchronized {
get {
- return hashtable.IsSynchronized;
+ return dictionary.IsSynchronized;
}
}
object ICollection.SyncRoot {
get {
- return hashtable.SyncRoot;
+ return dictionary.SyncRoot;
}
}
IEnumerator IEnumerable.GetEnumerator ()
{
- return hashtable.GetEnumerator ();
+ return dictionary.GetEnumerator ();
}
}
}
diff --git a/mcs/class/corlib/System.Collections/Hashtable.cs b/mcs/class/corlib/System.Collections/Hashtable.cs
index 270bbef13ca..36575c8e024 100644
--- a/mcs/class/corlib/System.Collections/Hashtable.cs
+++ b/mcs/class/corlib/System.Collections/Hashtable.cs
@@ -1114,9 +1114,8 @@ namespace System.Collections {
public override object Clone ()
{
- lock(host.SyncRoot) {
- return new SyncHashtable( (Hashtable) host.Clone () );
- }
+ Hashtable ht = (Hashtable) host.Clone ();
+ return new SyncHashtable (ht);
}
} // SyncHashtable
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.IsolatedStorage/ChangeLog b/mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog
index c27c01f582e..2b295ce72fa 100644
--- a/mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog
+++ b/mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog
@@ -1,7 +1,3 @@
-2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * IsolatedStorageInfo.cs: useGetFolderPath instead of getting "HOME".
-
2004-06-13 Gert Driesen <drieseng@users.sourceforge.net>
* IsolatedStorage.cs: really mark the storage_scope field private
diff --git a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageInfo.cs b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageInfo.cs
index d1107269a1b..a3a1ae0e8a3 100644
--- a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageInfo.cs
+++ b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageInfo.cs
@@ -37,7 +37,7 @@ namespace System.IO.IsolatedStorage {
[MonoTODO("Unix Specific; generalize for Win32")]
internal static string GetIsolatedStorageDirectory ()
{
- string home = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
+ string home = Environment.GetEnvironmentVariable ("HOME");
if (home == null)
home = "~";
diff --git a/mcs/class/corlib/System.IO/ChangeLog b/mcs/class/corlib/System.IO/ChangeLog
index 75d3b48b95b..6818c37ad82 100644
--- a/mcs/class/corlib/System.IO/ChangeLog
+++ b/mcs/class/corlib/System.IO/ChangeLog
@@ -1,35 +1,3 @@
-2004-08-18 Dick Porter <dick@ximian.com>
-
- * StreamWriter.cs: Flush the buffer if AutoFlush is set to true.
- Fixes bug 63063, patch by Laurent Debacker (debackerl@yahoo.com).
-
-2004-08-13 Dick Porter <dick@ximian.com>
-
- * StreamWriter.cs: Allow FileShare.Read access to the underlying
- FileStream, to be compatible with MS. Fixes bug 62152.
-
-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.IO/StreamWriter.cs b/mcs/class/corlib/System.IO/StreamWriter.cs
index 96ac1380984..4c51d0269be 100644
--- a/mcs/class/corlib/System.IO/StreamWriter.cs
+++ b/mcs/class/corlib/System.IO/StreamWriter.cs
@@ -123,7 +123,7 @@ namespace System.IO {
else
mode = FileMode.Create;
- internalStream = new FileStream (path, mode, FileAccess.Write, FileShare.Read);
+ internalStream = new FileStream (path, mode, FileAccess.Write);
if (append)
internalStream.Position = internalStream.Length;
@@ -137,16 +137,12 @@ namespace System.IO {
get {
return iflush;
}
- set {
- if (DisposedAlready)
- throw new ObjectDisposedException("StreamWriter");
- iflush = value;
-
- if (iflush) {
- Flush ();
- }
- }
- }
+ set {
+ if (DisposedAlready)
+ throw new ObjectDisposedException("StreamWriter");
+ iflush = value;
+ }
+ }
public virtual Stream BaseStream {
get {
diff --git a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
index 344395be1a3..ebe86410469 100755
--- a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
@@ -131,16 +131,8 @@ namespace System.Reflection.Emit {
}
if (n.KeyPair != null) {
- // full keypair is available (for signing)
sn = n.KeyPair.StrongName ();
}
- else {
- // public key is available (for delay-signing)
- byte[] pk = n.GetPublicKey ();
- if ((pk != null) && (pk.Length > 0)) {
- sn = new Mono.Security.StrongName (pk);
- }
- }
basic_init (this);
}
diff --git a/mcs/class/corlib/System.Reflection.Emit/ChangeLog b/mcs/class/corlib/System.Reflection.Emit/ChangeLog
index 0f117fa51cf..5aeec6cdae4 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ChangeLog
+++ b/mcs/class/corlib/System.Reflection.Emit/ChangeLog
@@ -1,12 +1,3 @@
-2004-08-13 Sebastien Pouliot <sebastien@ximian.com>
-
- * AssemblyBuilder.cs: (Partly) Fix delay-signing issue (#56621) when
- MCS is used on the MS runtime (other part of the fix is for MCS).
-
-2004-07-24 Martin Baulig <martin@ximian.com>
-
- * TypeBuilder.cs (TypeBuilder.UnspecifiedTypeSize): Set this to 0
- and initialize it to 0 everywhere.
Thu Jun 24 15:33:04 CEST 2004 Paolo Molaro <lupus@ximian.com>
diff --git a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
index c0059b54286..1f6884bdc12 100644
--- a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
@@ -95,7 +95,7 @@ namespace System.Reflection.Emit {
internal TypeBuilder (ModuleBuilder mb, TypeAttributes attr) {
this.parent = null;
this.attrs = attr;
- this.class_size = 0;
+ this.class_size = -1;
fullname = this.tname = "<Module>";
this.nspace = "";
pmodule = mb;
diff --git a/mcs/class/corlib/System.Reflection/ChangeLog b/mcs/class/corlib/System.Reflection/ChangeLog
index 2ceab253beb..8a7945e688e 100644
--- a/mcs/class/corlib/System.Reflection/ChangeLog
+++ b/mcs/class/corlib/System.Reflection/ChangeLog
@@ -1,12 +1,3 @@
-
-Sat Jul 10 15:48:34 CEST 2004 Paolo Molaro <lupus@ximian.com>
-
- * Modulec.s: return just name in ToString (bug #61287).
-
-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 876967a50c0..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 () {
@@ -211,7 +206,7 @@ namespace System.Reflection {
public override string ToString ()
{
- return name;
+ return "Reflection.Module: " + name;
}
// Mono Extension: returns the GUID of this 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.Channels/ChangeLog b/mcs/class/corlib/System.Runtime.Remoting.Channels/ChangeLog
index 35352b211ea..aafa83f9899 100644
--- a/mcs/class/corlib/System.Runtime.Remoting.Channels/ChangeLog
+++ b/mcs/class/corlib/System.Runtime.Remoting.Channels/ChangeLog
@@ -1,8 +1,3 @@
-2004-07-02 Lluis Sanchez Gual <lluis@novell.com>
-
- * ChannelServices.cs: In RegisterChannel, ignore name colisions if the
- channel name is "". This fixes bug #61592.
-
2004-06-15 Gert Driesen <drieseng@users.sourceforge.net>
* TransportHeaders.cs: added TODO for serialization
diff --git a/mcs/class/corlib/System.Runtime.Remoting.Channels/ChannelServices.cs b/mcs/class/corlib/System.Runtime.Remoting.Channels/ChannelServices.cs
index f2f21baf53e..98629c496f4 100644
--- a/mcs/class/corlib/System.Runtime.Remoting.Channels/ChannelServices.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting.Channels/ChannelServices.cs
@@ -254,7 +254,7 @@ namespace System.Runtime.Remoting.Channels
{
IChannel regc = (IChannel) registeredChannels[n];
- if (regc.ChannelName == chnl.ChannelName && chnl.ChannelName != "")
+ if (regc.ChannelName == chnl.ChannelName)
throw new RemotingException ("Channel " + regc.ChannelName + " already registered");
if (regc.ChannelPriority < chnl.ChannelPriority && pos==-1)
diff --git a/mcs/class/corlib/System.Runtime.Remoting.Messaging/ChangeLog b/mcs/class/corlib/System.Runtime.Remoting.Messaging/ChangeLog
index 31b0acd440c..87e4e0902e6 100644
--- a/mcs/class/corlib/System.Runtime.Remoting.Messaging/ChangeLog
+++ b/mcs/class/corlib/System.Runtime.Remoting.Messaging/ChangeLog
@@ -1,8 +1,3 @@
-2004-07-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * MethodCall.cs: Use RemotingServices.GetMethodBaseFromName to get the
- MethodBase from the method name. This fixes bug #61774.
-
2004-06-18 Sebastien Pouliot <sebastien@ximian.com>
* ReturnMessage.cs: Added IMessage interface to class definition.
diff --git a/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs b/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs
index 47dbb9d0beb..9313d3aa0cb 100644
--- a/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs
@@ -288,8 +288,11 @@ namespace System.Runtime.Remoting.Messaging {
Type type = RemotingServices.GetServerTypeForUri (_uri);
if (type == null) throw new RemotingException ("Requested service not found. No receiver for uri " + _uri);
- if (CanCastTo (_typeName, type)) {
- _methodBase = RemotingServices.GetMethodBaseFromName (type, _methodName, _methodSignature);
+ if (CanCastTo (_typeName, type))
+ {
+ BindingFlags bflags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
+ if (_methodSignature == null) _methodBase = type.GetMethod (_methodName, bflags);
+ else _methodBase = type.GetMethod (_methodName, bflags, null, _methodSignature, null);
return;
}
else
diff --git a/mcs/class/corlib/System.Runtime.Remoting/ChangeLog b/mcs/class/corlib/System.Runtime.Remoting/ChangeLog
index 14aa52173f9..1fc62be042d 100755
--- a/mcs/class/corlib/System.Runtime.Remoting/ChangeLog
+++ b/mcs/class/corlib/System.Runtime.Remoting/ChangeLog
@@ -1,21 +1,3 @@
-2004-07-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * ObjRef.cs: Fixed type check in in ObjRef constructor. The requested class
- must be the object class or a base class. This fixes bug #61249.
-
-2004-07-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * RemotingServices.cs: Changed GetMethodBaseFromMethodMessage so its code
- can be reused internally. Also fixed bug when gettting a method from an
- interface.
-
-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/ObjRef.cs b/mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs
index 30234367827..90db146c267 100644
--- a/mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs
@@ -92,7 +92,7 @@ namespace System.Runtime.Remoting {
uri = RemotingServices.GetObjectUri(mbr);
typeInfo = new TypeInfo(type);
- if (!type.IsAssignableFrom (mbr.GetType()))
+ if (!typeInfo.CanCastTo(mbr.GetType(), mbr))
throw new RemotingException ("The server object type cannot be cast to the requested type " + type.FullName + ".");
UpdateChannelInfo();
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 6d4b810ed13..aa694cbb3b6 100644
--- a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs
@@ -57,7 +57,6 @@ namespace System.Runtime.Remoting
internal static string app_id;
static int next_id = 1;
- static readonly BindingFlags methodBindings = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
static RemotingServices ()
{
@@ -160,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;
@@ -291,49 +288,22 @@ namespace System.Runtime.Remoting
Type type = Type.GetType (msg.TypeName);
if (type == null)
throw new RemotingException ("Type '" + msg.TypeName + "' not found.");
-
- return GetMethodBaseFromName (type, msg.MethodName, (Type[]) msg.MethodSignature);
- }
-
- internal static MethodBase GetMethodBaseFromName (Type type, string methodName, Type[] signature)
- {
- if (type.IsInterface) {
- return FindInterfaceMethod (type, methodName, signature);
- }
- else {
- MethodBase method = null;
- if (signature == null)
- method = type.GetMethod (methodName, methodBindings);
- else
- method = type.GetMethod (methodName, methodBindings, null, (Type[]) signature, null);
-
- if (method != null)
- return method;
-
- if (signature == null)
- return type.GetConstructor (methodBindings, null, Type.EmptyTypes, null);
- else
- return type.GetConstructor (methodBindings, null, signature, null);
- }
- }
-
- static MethodBase FindInterfaceMethod (Type type, string methodName, Type[] signature)
- {
- MethodBase method = null;
+
+ BindingFlags bflags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
- if (signature == null)
- method = type.GetMethod (methodName, methodBindings);
+ MethodBase method;
+ if (msg.MethodSignature == null)
+ method = type.GetMethod (msg.MethodName, bflags);
else
- method = type.GetMethod (methodName, methodBindings, null, signature, null);
-
- if (method != null) return method;
+ method = type.GetMethod (msg.MethodName, bflags, null, (Type[]) msg.MethodSignature, null);
- foreach (Type t in type.GetInterfaces ()) {
- method = FindInterfaceMethod (t, methodName, signature);
- if (method != null) return method;
- }
+ if (method != null)
+ return method;
- return null;
+ if (msg.MethodSignature == null)
+ return type.GetConstructor (bflags, null, Type.EmptyTypes, null);
+ else
+ return type.GetConstructor (bflags, null, (Type[]) msg.MethodSignature, null);
}
public static void GetObjectData(object obj, SerializationInfo info, StreamingContext context)
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.Security.Cryptography/ChangeLog b/mcs/class/corlib/System.Security.Cryptography/ChangeLog
index f087b452504..59642bc66bc 100644
--- a/mcs/class/corlib/System.Security.Cryptography/ChangeLog
+++ b/mcs/class/corlib/System.Security.Cryptography/ChangeLog
@@ -1,9 +1,3 @@
-2004-07-15 Sebastien Pouliot <sebastien@ximian.com>
-
- * DES.cs: Fixed FeedbackSizeValue to 8.
- * RC2.cs: Fixed FeedbackSizeValue to 8.
- * TripleDES.cs: Fixed FeedbackSizeValue to 8.
-
2004-06-23 Sebastien Pouliot <sebastien@ximian.com>
* CryptoStream.cs: Removed the block reduction. This seems to be done
diff --git a/mcs/class/corlib/System.Security.Cryptography/DES.cs b/mcs/class/corlib/System.Security.Cryptography/DES.cs
index cb678113d6c..a775477b436 100644
--- a/mcs/class/corlib/System.Security.Cryptography/DES.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/DES.cs
@@ -6,6 +6,10 @@
// Sebastien Pouliot <sebastien@ximian.com>
//
// Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com)
+// (C) 2004 Novell (http://www.novell.com)
+//
+
+//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -46,7 +50,7 @@ public abstract class DES : SymmetricAlgorithm {
{
KeySizeValue = 64;
BlockSizeValue = 64;
- FeedbackSizeValue = 8;
+ FeedbackSizeValue = 64;
LegalKeySizesValue = new KeySizes[1];
LegalKeySizesValue[0] = new KeySizes(64, 64, 0);
diff --git a/mcs/class/corlib/System.Security.Cryptography/RC2.cs b/mcs/class/corlib/System.Security.Cryptography/RC2.cs
index 70119078722..58566078d5f 100644
--- a/mcs/class/corlib/System.Security.Cryptography/RC2.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/RC2.cs
@@ -5,6 +5,10 @@
// Andrew Birkett (andy@nobugs.org)
// Sebastien Pouliot (sebastien@ximian.com)
//
+// (C) 2004 Novell (http://www.novell.com)
+//
+
+//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -73,7 +77,7 @@ namespace System.Security.Cryptography {
{
KeySizeValue = 128;
BlockSizeValue = 64;
- FeedbackSizeValue = 8;
+ FeedbackSizeValue = 64;
// The RFC allows keys of 1 to 128 bytes, but MS impl only supports
// 40 to 128 bits, sigh.
diff --git a/mcs/class/corlib/System.Security.Cryptography/TripleDES.cs b/mcs/class/corlib/System.Security.Cryptography/TripleDES.cs
index add883b6ce8..54969879d16 100644
--- a/mcs/class/corlib/System.Security.Cryptography/TripleDES.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/TripleDES.cs
@@ -5,6 +5,10 @@
// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
+// (C) 2004 Novell (http://www.novell.com)
+//
+
+//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -47,7 +51,7 @@ public abstract class TripleDES : SymmetricAlgorithm {
// from SymmetricAlgorithm
KeySizeValue = 192;
BlockSizeValue = 64;
- FeedbackSizeValue = 8;
+ FeedbackSizeValue = 64;
LegalKeySizesValue = new KeySizes [1];
LegalKeySizesValue [0] = new KeySizes (128, 192, 64);
diff --git a/mcs/class/corlib/System.Threading/ChangeLog b/mcs/class/corlib/System.Threading/ChangeLog
index d6236617956..ba1a9664f98 100644
--- a/mcs/class/corlib/System.Threading/ChangeLog
+++ b/mcs/class/corlib/System.Threading/ChangeLog
@@ -1,15 +1,3 @@
-2004-08-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * Timer.cs: don't invoke the callback if the period changes before the
- due time. Fixes bug #62421.
-
-2004-07-15 Dick Porter <dick@ximian.com>
-
- * Thread.cs: Hold a lock in GetNamedDataSlot. Fixes bug 61582,
- based on patch by Sébastien Robitaille
- (sebastien.robitaille@croesus.com). Also fix instances of
- lock(typeof(Thread)) to lock a private object instead.
-
2004-06-24 Dick Porter <dick@ximian.com>
* Mutex.cs: Implement the createdNew parameter
diff --git a/mcs/class/corlib/System.Threading/Thread.cs b/mcs/class/corlib/System.Threading/Thread.cs
index 911fb1dbe12..66826e12d40 100755
--- a/mcs/class/corlib/System.Threading/Thread.cs
+++ b/mcs/class/corlib/System.Threading/Thread.cs
@@ -157,10 +157,9 @@ namespace System.Threading
// Stores a hash keyed by strings of LocalDataStoreSlot objects
static Hashtable datastorehash;
- private static object datastore_lock = new object ();
-
+
private static void InitDataStoreHash () {
- lock (datastore_lock) {
+ lock (typeof (Thread)) {
if (datastorehash == null) {
datastorehash = Hashtable.Synchronized(new Hashtable());
}
@@ -168,7 +167,7 @@ namespace System.Threading
}
public static LocalDataStoreSlot AllocateNamedDataSlot(string name) {
- lock (datastore_lock) {
+ lock (typeof (Thread)) {
if (datastorehash == null)
InitDataStoreHash ();
LocalDataStoreSlot slot = (LocalDataStoreSlot)datastorehash[name];
@@ -187,7 +186,7 @@ namespace System.Threading
}
public static void FreeNamedDataSlot(string name) {
- lock (datastore_lock) {
+ lock (typeof (Thread)) {
if (datastorehash == null)
InitDataStoreHash ();
LocalDataStoreSlot slot=(LocalDataStoreSlot)datastorehash[name];
@@ -211,17 +210,15 @@ namespace System.Threading
public extern static int GetDomainID();
public static LocalDataStoreSlot GetNamedDataSlot(string name) {
- lock (datastore_lock) {
- if (datastorehash == null)
- InitDataStoreHash ();
- LocalDataStoreSlot slot=(LocalDataStoreSlot)datastorehash[name];
+ if (datastorehash == null)
+ InitDataStoreHash ();
+ LocalDataStoreSlot slot=(LocalDataStoreSlot)datastorehash[name];
- if(slot==null) {
- slot=AllocateNamedDataSlot(name);
- }
-
- return(slot);
+ if(slot==null) {
+ slot=AllocateNamedDataSlot(name);
}
+
+ return(slot);
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
diff --git a/mcs/class/corlib/System.Threading/Timer.cs b/mcs/class/corlib/System.Threading/Timer.cs
index 1675a5a4be7..164c60ef2ca 100755
--- a/mcs/class/corlib/System.Threading/Timer.cs
+++ b/mcs/class/corlib/System.Threading/Timer.cs
@@ -195,11 +195,10 @@ namespace System.Threading
if (runner == null)
return false;
-
- start_event.Reset ();
- runner.Abort ();
+
runner.DueTime = dueTime;
runner.Period = period;
+ runner.Abort ();
start_event.Set ();
return true;
}
diff --git a/mcs/class/corlib/System/ChangeLog b/mcs/class/corlib/System/ChangeLog
index df338e3db5a..b345b93f069 100644
--- a/mcs/class/corlib/System/ChangeLog
+++ b/mcs/class/corlib/System/ChangeLog
@@ -1,24 +1,3 @@
-2004-08-19 Atsushi Enomoto <atsushi@ximian.com>
-
- * DateTime.cs : When hour format is "hh", MS.NET (maybe incorrectly)
- allows 12, that should not be accepted (13 is rejected) and
- interpreted as 0. This fixes bug 63376.
-
-2004-08-17 Sebastien Pouliot <sebastien@ximian.com>
-
- * Version.cs: Fixed Clone so we can use it on versions with only
- major/minor or major/minor/build.
-
-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/DateTime.cs b/mcs/class/corlib/System/DateTime.cs
index ca1e1e564f7..cb90d719a98 100644
--- a/mcs/class/corlib/System/DateTime.cs
+++ b/mcs/class/corlib/System/DateTime.cs
@@ -1007,10 +1007,8 @@ namespace System
num = 1;
}
- if (hour > 12)
+ if (hour >= 12)
return false;
- if (hour == 12)
- hour = 0;
break;
case 'H':
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/System/Version.cs b/mcs/class/corlib/System/Version.cs
index adc86fa5568..ea64cde7080 100644
--- a/mcs/class/corlib/System/Version.cs
+++ b/mcs/class/corlib/System/Version.cs
@@ -152,12 +152,7 @@ namespace System
public object Clone ()
{
- if (_Build == -1)
- return new Version (_Major, _Minor);
- else if (_Revision == -1)
- return new Version (_Major, _Minor, _Build);
- else
- return new Version (_Major, _Minor, _Build, _Revision);
+ return new Version (_Major, _Minor, _Build, _Revision);
}
public int CompareTo (object version)
diff --git a/mcs/class/corlib/Test/System.Collections/ChangeLog b/mcs/class/corlib/Test/System.Collections/ChangeLog
index 885360ab080..5e7760f0fad 100644
--- a/mcs/class/corlib/Test/System.Collections/ChangeLog
+++ b/mcs/class/corlib/Test/System.Collections/ChangeLog
@@ -1,7 +1,3 @@
-2004-07-28 Dick Porter <dick@ximian.com>
-
- * ComparerTest.cs: Test for invariant compares (bug 61458.)
-
2004-06-14 Sebastien Pouliot <sebastien@ximian.com>
* HashtableTest.cs: Added new case to CopyTo(Array,int) an empty
diff --git a/mcs/class/corlib/Test/System.Collections/ComparerTest.cs b/mcs/class/corlib/Test/System.Collections/ComparerTest.cs
index c1591fc3402..c6353f4ec6a 100644
--- a/mcs/class/corlib/Test/System.Collections/ComparerTest.cs
+++ b/mcs/class/corlib/Test/System.Collections/ComparerTest.cs
@@ -42,16 +42,7 @@ namespace MonoTests.System.Collections {
Assert(c.Compare (3, 2) > 0);
}
-
- [Test]
- public void Invariant ()
- {
- Comparer c = Comparer.DefaultInvariant;
-
- Assert (c.Compare ("a", "A") > 0);
- }
-
-
+
}
}
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/class/corlib/Test/System/ChangeLog b/mcs/class/corlib/Test/System/ChangeLog
index 1e1e1931fbe..b271ba154f9 100644
--- a/mcs/class/corlib/Test/System/ChangeLog
+++ b/mcs/class/corlib/Test/System/ChangeLog
@@ -1,8 +1,3 @@
-2004-08-17 Sebastien Pouliot <sebastien@ximian.com>
-
- * VersionTest.cs: Added tests when cloning a version with no build and
- no revision numbers (-1).
-
2004-06-23 Sebastien Pouliot <sebastien@ximian.com>
* DoubleFormatterTest.cs: Added a new test for a negative roundtrip
diff --git a/mcs/class/corlib/Test/System/VersionTest.cs b/mcs/class/corlib/Test/System/VersionTest.cs
index 2467d963a48..635a485cadc 100644
--- a/mcs/class/corlib/Test/System/VersionTest.cs
+++ b/mcs/class/corlib/Test/System/VersionTest.cs
@@ -135,12 +135,6 @@ public class VersionTest : TestCase
Assert ("A1", v1.Equals (v2));
Assert ("A2", !ReferenceEquals (v1, v2));
-
- Version v3 = new Version (); // 0.0
- v2 = (Version) v3.Clone ();
-
- Assert ("A3", v3.Equals (v2));
- Assert ("A4", !ReferenceEquals (v3, v2));
}
public void TestCompareTo ()
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/ilasm/AssemblyInfo.cs b/mcs/ilasm/AssemblyInfo.cs
index 5f70fdc7d78..f3025174070 100644
--- a/mcs/ilasm/AssemblyInfo.cs
+++ b/mcs/ilasm/AssemblyInfo.cs
@@ -1,7 +1,7 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyVersion("1.0.1")]
+[assembly: AssemblyVersion("0.28.0")]
[assembly: AssemblyTitle ("Mono ILasm Compiler")]
[assembly: AssemblyDescription ("Mono ILasm Compiler")]
[assembly: AssemblyCopyright ("Sergey Chaban and Jackson Harper")]
diff --git a/mcs/mcs/AssemblyInfo.cs b/mcs/mcs/AssemblyInfo.cs
index 44f053c64a1..770d86ce57d 100644
--- a/mcs/mcs/AssemblyInfo.cs
+++ b/mcs/mcs/AssemblyInfo.cs
@@ -1,7 +1,7 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyVersion("1.0.1")]
+[assembly: AssemblyVersion("1.0")]
[assembly: AssemblyTitle ("Mono C# Compiler")]
[assembly: AssemblyDescription ("Mono C# Compiler")]
[assembly: AssemblyCopyright ("2001, 2002, 2003 Ximian, Inc.")]
diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog
index 9993e6340bb..0e090e70feb 100755
--- a/mcs/mcs/ChangeLog
+++ b/mcs/mcs/ChangeLog
@@ -1,99 +1,3 @@
-2004-08-04 Miguel de Icaza <miguel@ximian.com>
-
- * cfold.cs: Synchronize the folding with the code in expression.cs
- Binary.DoNumericPromotions for uint operands.
-
-
-2004-08-03 Ben Maurer <bmaurer@ximian.com>
-
- * ecore.cs (MethodGroupExpr): new IsBase property.
-
- * expression.cs (BaseAccess): Set IsBase on MethodGroupExpr.
-
- * delegate.cs (DelegateCreation): store a MethodGroupExpr
- rather than an instance expr.
-
- (DelegateCreation.Emit): Use the method group rather than
- the instance expression. Also, if you have base.Foo as the
- method for a delegate, make sure to emit ldftn, not ldftnvirt.
-
- (ResolveMethodGroupExpr): Use the MethodGroupExpr.
-
- (NewDelegate.DoResolve): Only check for the existance of Invoke
- if the method is going to be needed. Use MethodGroupExpr.
-
- (NewDelegate.Emit): Remove, DelegateCreation implements this.
-
- * expression.cs: For pointer arith., make sure to use
- the size of the type, not the size of the pointer to
- the type.
-
-2004-08-03 Martin Baulig <martin@ximian.com>
-
- * expression.cs (Binary.ResolveOperator): Don't abort if we can't
- use a user-defined operator; we still need to do numeric
- promotions in case one argument is a builtin type and the other
- one has an implicit conversion to that type. Fixes #62322.
-
-2004-07-19 Miguel de Icaza <miguel@ximian.com>
-
- * expression.cs: Resolve the constant expression before returning
- it. Fixes: 61702
-
-2004-07-17 Miguel de Icaza <miguel@ximian.com>
-
- * cs-tokenizer.cs (handle_preprocessing_directive): Do not return
- `true' for preprocessing directives that we parse. The return
- value indicates whether we should return to regular tokenizing or
- not, not whether it was parsed successfully.
-
- In the past if we were in: #if false ... #line #endif, we would
- resume parsing after `#line'. See bug 61604.
- * typemanager.cs: Removed an old hack from Gonzalo to get corlib
- building: IsEnumType should return true only for enums, not for
- enums or System.Enum itself. This fixes #61593.
-
- Likely what happened is that corlib was wrong: mcs depended on
- this bug in some places. The bug got fixed, we had to add the
- hack, which caused bug 61593.
-
- * expression.cs (ArrayAccess.GetStoreOpCode): Remove an old hack
- that was a workaround for the older conditions.
-
-2004-07-14 Martin Baulig <martin@ximian.com>
-
- * iterators.cs: Use real error numbers.
-
-2004-07-14 Martin Baulig <martin@ximian.com>
-
- * iterator.cs (IteratorHandle.IsIEnumerable): The spec explicitly
- requires this to be a System.Collection.IEnumerable and not a
- class implementing that interface.
- (IteratorHandle.IsIEnumerator): Likewise, for IEnumerator.
-
-2004-07-13 Marek Safar <marek.safar@seznam.cz>
-
- * class.cs: Fixed previous fix, it broke some error tests.
-
-2004-07-12 Martin Baulig <martin@ximian.com>
-
- * enum.cs (Enum.Define): Call Emit() to emit the attributes.
- Fixes #61293.
-
-2004-07-09 Miguel de Icaza <miguel@ximian.com>
-
- * assign.cs (LocalTemporary): Add new argument: is_address,If
- `is_address' is true, then the value that we store is the address
- to the real value, and not the value itself.
-
- * ecore.cs (PropertyExpr): use the new local temporary
- stuff to allow us to handle X.Y += z (where X is a struct)
-
-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
@@ -194,6 +98,12 @@
* cs-parser.jay: Added error CS1669 test for indexers.
+2004-06-13 Martin Baulig <martin@ximian.com>
+
+ Merged latest changes into gmcs. Please keep this comment in
+ here, it makes it easier for me to see what changed in MCS since
+ the last time I merged.
+
2004-06-11 Martin Baulig <martin@ximian.com>
* expression.cs (Invocation.IsParamsMethodApplicable): We need to
diff --git a/mcs/mcs/assign.cs b/mcs/mcs/assign.cs
index 94467b2cabb..ecabbcad461 100755
--- a/mcs/mcs/assign.cs
+++ b/mcs/mcs/assign.cs
@@ -55,34 +55,24 @@ namespace Mono.CSharp {
/// The local temporary is used to alter the normal flow of code generation
/// basically it creates a local variable, and its emit instruction generates
/// code to access this value, return its address or save its value.
- ///
- /// If `is_address' is true, then the value that we store is the address to the
- /// real value, and not the value itself.
- ///
- /// This is needed for a value type, because otherwise you just end up making a
- /// copy of the value on the stack and modifying it. You really need a pointer
- /// to the origional value so that you can modify it in that location. This
- /// Does not happen with a class because a class is a pointer -- so you always
- /// get the indirection.
- ///
- /// The `is_address' stuff is really just a hack. We need to come up with a better
- /// way to handle it.
/// </remarks>
public class LocalTemporary : Expression, IMemoryLocation {
LocalBuilder builder;
- bool is_address;
- public LocalTemporary (EmitContext ec, Type t) : this (ec, t, false) {}
-
- public LocalTemporary (EmitContext ec, Type t, bool is_address)
+ public LocalTemporary (EmitContext ec, Type t)
{
type = t;
eclass = ExprClass.Value;
loc = Location.Null;
- builder = ec.GetTemporaryLocal (is_address ? TypeManager.GetReferenceType (t): t);
- this.is_address = is_address;
+ builder = ec.GetTemporaryLocal (t);
}
+ public void Release (EmitContext ec)
+ {
+ ec.FreeTemporaryLocal (builder, type);
+ builder = null;
+ }
+
public LocalTemporary (LocalBuilder b, Type t)
{
type = t;
@@ -90,12 +80,6 @@ namespace Mono.CSharp {
loc = Location.Null;
builder = b;
}
-
- public void Release (EmitContext ec)
- {
- ec.FreeTemporaryLocal (builder, type);
- builder = null;
- }
public override Expression DoResolve (EmitContext ec)
{
@@ -104,39 +88,17 @@ namespace Mono.CSharp {
public override void Emit (EmitContext ec)
{
- ILGenerator ig = ec.ig;
-
- ig.Emit (OpCodes.Ldloc, builder);
- // we need to copy from the pointer
- if (is_address)
- LoadFromPtr (ig, type);
+ ec.ig.Emit (OpCodes.Ldloc, builder);
}
- // NB: if you have `is_address' on the stack there must
- // be a managed pointer. Otherwise, it is the type from
- // the ctor.
public void Store (EmitContext ec)
{
- ILGenerator ig = ec.ig;
- ig.Emit (OpCodes.Stloc, builder);
+ ec.ig.Emit (OpCodes.Stloc, builder);
}
public void AddressOf (EmitContext ec, AddressOp mode)
{
- // if is_address, than this is just the address anyways,
- // so we just return this.
- ILGenerator ig = ec.ig;
-
- if (is_address)
- ig.Emit (OpCodes.Ldloc, builder);
- else
- ig.Emit (OpCodes.Ldloca, builder);
- }
-
- public bool PointsToAddress {
- get {
- return is_address;
- }
+ ec.ig.Emit (OpCodes.Ldloca, builder);
}
}
@@ -424,7 +386,7 @@ namespace Mono.CSharp {
// just use `dup' to propagate the result
//
IAssignMethod am = (IAssignMethod) target;
-
+
if (this is CompoundAssign)
am.CacheTemporaries (ec);
diff --git a/mcs/mcs/cfold.cs b/mcs/mcs/cfold.cs
index 12999eccdd8..8ffdfb75030 100755
--- a/mcs/mcs/cfold.cs
+++ b/mcs/mcs/cfold.cs
@@ -128,9 +128,6 @@ namespace Mono.CSharp {
if (other is SByteConstant || other is ShortConstant || ic != null){
left = left.ToLong (loc);
right = right.ToLong (loc);
- } else {
- left = left.ToUInt (loc);
- right = left.ToUInt (loc);
}
return;
diff --git a/mcs/mcs/class.cs b/mcs/mcs/class.cs
index 213b3d671c1..ef925659b3d 100755
--- a/mcs/mcs/class.cs
+++ b/mcs/mcs/class.cs
@@ -1835,12 +1835,6 @@ namespace Mono.CSharp {
}
}
- if (enums != null) {
- foreach (Enum e in enums) {
- e.Emit (this);
- }
- }
-
if (Pending != null)
if (Pending.VerifyPendingMethods ())
return;
diff --git a/mcs/mcs/cs-tokenizer.cs b/mcs/mcs/cs-tokenizer.cs
index c3a116bc835..5191948f407 100755
--- a/mcs/mcs/cs-tokenizer.cs
+++ b/mcs/mcs/cs-tokenizer.cs
@@ -1461,7 +1461,7 @@ namespace Mono.CSharp
switch (cmd){
case "pragma":
if (RootContext.V2)
- return caller_is_taking;
+ return true;
break;
case "line":
@@ -1469,7 +1469,7 @@ namespace Mono.CSharp
Report.Error (
1576, Location,
"Argument to #line directive is missing or invalid");
- return caller_is_taking;
+ return true;
case "region":
region_directive = true;
diff --git a/mcs/mcs/delegate.cs b/mcs/mcs/delegate.cs
index 8ecc5fb2740..0965c498f79 100644
--- a/mcs/mcs/delegate.cs
+++ b/mcs/mcs/delegate.cs
@@ -644,7 +644,7 @@ namespace Mono.CSharp {
public abstract class DelegateCreation : Expression {
protected MethodBase constructor_method;
protected MethodBase delegate_method;
- protected MethodGroupExpr method_group;
+ protected Expression delegate_instance_expr;
public DelegateCreation () {}
@@ -670,13 +670,13 @@ namespace Mono.CSharp {
public override void Emit (EmitContext ec)
{
- if (method_group.InstanceExpression == null ||
+ if (delegate_instance_expr == null ||
delegate_method.IsStatic)
ec.ig.Emit (OpCodes.Ldnull);
else
- method_group.InstanceExpression.Emit (ec);
+ delegate_instance_expr.Emit (ec);
- if (delegate_method.IsVirtual && !method_group.IsBase) {
+ if (delegate_method.IsVirtual) {
ec.ig.Emit (OpCodes.Dup);
ec.ig.Emit (OpCodes.Ldvirtftn, (MethodInfo) delegate_method);
} else
@@ -742,22 +742,24 @@ namespace Mono.CSharp {
}
if (mg.InstanceExpression != null)
- mg.InstanceExpression = mg.InstanceExpression.Resolve (ec);
- else if (ec.IsStatic) {
- if (!delegate_method.IsStatic) {
- Report.Error (120, loc,
- "An object reference is required for the non-static method " +
- delegate_method.Name);
- return null;
- }
- mg.InstanceExpression = null;
- } else
- mg.InstanceExpression = ec.GetThis (loc);
+ delegate_instance_expr = mg.InstanceExpression.Resolve (ec);
+ else {
+ if (ec.IsStatic){
+ if (!delegate_method.IsStatic){
+ Report.Error (120, loc,
+ "An object reference is required for the non-static method " +
+ delegate_method.Name);
+ return null;
+ }
+ delegate_instance_expr = null;
+ } else
+ delegate_instance_expr = ec.GetThis (loc);
+ }
- if (mg.InstanceExpression != null && mg.InstanceExpression.Type.IsValueType)
- mg.InstanceExpression = new BoxedCast (mg.InstanceExpression);
+ if (delegate_instance_expr != null)
+ if (delegate_instance_expr.Type.IsValueType)
+ delegate_instance_expr = new BoxedCast (delegate_instance_expr);
- method_group = mg;
eclass = ExprClass.Value;
return this;
}
@@ -817,6 +819,15 @@ namespace Mono.CSharp {
return null;
Argument a = (Argument) Arguments [0];
+
+ Expression invoke_method = Expression.MemberLookup (
+ ec, type, "Invoke", MemberTypes.Method,
+ Expression.AllBindingFlags, loc);
+
+ if (invoke_method == null) {
+ Report.Error (-200, loc, "Internal error ! Could not find Invoke method!");
+ return null;
+ }
if (!a.ResolveMethodGroup (ec, loc))
return null;
@@ -834,29 +845,36 @@ namespace Mono.CSharp {
return null;
}
- method_group = Expression.MemberLookup (
- ec, type, "Invoke", MemberTypes.Method,
- Expression.AllBindingFlags, loc) as MethodGroupExpr;
-
- if (method_group == null) {
- Report.Error (-200, loc, "Internal error ! Could not find Invoke method!");
- return null;
- }
-
// This is what MS' compiler reports. We could always choose
- // to be more verbose and actually give delegate-level specifics
+ // to be more verbose and actually give delegate-level specifics
+
if (!Delegate.VerifyDelegate (ec, type, e_type, loc)) {
Report.Error (29, loc, "Cannot implicitly convert type '" + e_type + "' " +
"to type '" + type + "'");
return null;
}
- method_group.InstanceExpression = e;
- delegate_method = method_group.Methods [0];
+ delegate_instance_expr = e;
+ delegate_method = ((MethodGroupExpr) invoke_method).Methods [0];
eclass = ExprClass.Value;
return this;
}
+
+ public override void Emit (EmitContext ec)
+ {
+ if (delegate_instance_expr == null || delegate_method.IsStatic)
+ ec.ig.Emit (OpCodes.Ldnull);
+ else
+ delegate_instance_expr.Emit (ec);
+
+ if (delegate_method.IsVirtual) {
+ ec.ig.Emit (OpCodes.Dup);
+ ec.ig.Emit (OpCodes.Ldvirtftn, (MethodInfo) delegate_method);
+ } else
+ ec.ig.Emit (OpCodes.Ldftn, (MethodInfo) delegate_method);
+ ec.ig.Emit (OpCodes.Newobj, (ConstructorInfo) constructor_method);
+ }
}
public class DelegateInvocation : ExpressionStatement {
diff --git a/mcs/mcs/ecore.cs b/mcs/mcs/ecore.cs
index c78d201fab3..f9ef75c6fc1 100755
--- a/mcs/mcs/ecore.cs
+++ b/mcs/mcs/ecore.cs
@@ -2390,7 +2390,6 @@ namespace Mono.CSharp {
Expression instance_expression = null;
bool is_explicit_impl = false;
bool identical_type_name = false;
- bool is_base;
public MethodGroupExpr (MemberInfo [] mi, Location l)
{
@@ -2464,15 +2463,6 @@ namespace Mono.CSharp {
identical_type_name = value;
}
}
-
- public bool IsBase {
- get {
- return is_base;
- }
- set {
- is_base = value;
- }
- }
public string Name {
get {
@@ -3236,40 +3226,21 @@ namespace Mono.CSharp {
PropertyInfo.DeclaringType + "." +PropertyInfo.Name);
return null;
}
-
- //
- // Check that we are not making changes to a temporary memory location
- //
- if (instance_expr != null && instance_expr.Type.IsValueType && !(instance_expr is IMemoryLocation)) {
- // FIXME: Provide better error reporting.
- Error (1612, "Cannot modify expression because it is not a variable.");
- return null;
- }
-
return this;
}
public override void CacheTemporaries (EmitContext ec)
{
- if (!is_static){
- // we need to do indirection on the pointer
- bool need_address = instance_expr.Type.IsValueType;
- temporary = new LocalTemporary (ec, instance_expr.Type, need_address);
- }
+ if (!is_static)
+ temporary = new LocalTemporary (ec, instance_expr.Type);
}
Expression EmitInstance (EmitContext ec)
{
if (temporary != null){
if (!have_temporary){
- if (temporary.PointsToAddress){
- // must store the managed pointer
- IMemoryLocation loc = instance_expr as IMemoryLocation;
- loc.AddressOf (ec, AddressOp.LoadStore);
- } else
- instance_expr.Emit (ec);
+ instance_expr.Emit (ec);
temporary.Store (ec);
-
have_temporary = true;
}
return temporary;
diff --git a/mcs/mcs/enum.cs b/mcs/mcs/enum.cs
index bc84775ad94..ac9ef2b4305 100755
--- a/mcs/mcs/enum.cs
+++ b/mcs/mcs/enum.cs
@@ -685,7 +685,6 @@ namespace Mono.CSharp {
default_value = GetNextDefaultValue (default_value);
}
-
return true;
}
diff --git a/mcs/mcs/expression.cs b/mcs/mcs/expression.cs
index 2249effda78..8d2ff2b3aeb 100755
--- a/mcs/mcs/expression.cs
+++ b/mcs/mcs/expression.cs
@@ -2309,6 +2309,8 @@ namespace Mono.CSharp {
Type l = left.Type;
Type r = right.Type;
+ bool overload_failed = false;
+
//
// Special cases: string comapred to null
//
@@ -2359,6 +2361,8 @@ namespace Mono.CSharp {
MethodInfo mi = (MethodInfo) method;
return new BinaryMethod (mi.ReturnType, method, args);
+ } else {
+ overload_failed = true;
}
}
}
@@ -2684,6 +2688,14 @@ namespace Mono.CSharp {
}
//
+ // We are dealing with numbers
+ //
+ if (overload_failed){
+ Error_OperatorCannotBeApplied ();
+ return null;
+ }
+
+ //
// This will leave left or right set to null if there is an error
//
bool check_user_conv = is_user_defined (l) && is_user_defined (r);
@@ -3429,8 +3441,7 @@ namespace Mono.CSharp {
{
Type op_type = left.Type;
ILGenerator ig = ec.ig;
- Type element = TypeManager.GetElementType (op_type);
- int size = GetTypeSize (element);
+ int size = GetTypeSize (TypeManager.GetElementType (op_type));
Type rtype = right.Type;
if (rtype.IsPointer){
@@ -3443,7 +3454,7 @@ namespace Mono.CSharp {
if (size != 1){
if (size == 0)
- ig.Emit (OpCodes.Sizeof, element);
+ ig.Emit (OpCodes.Sizeof, op_type);
else
IntLiteral.EmitInt (ig, size);
ig.Emit (OpCodes.Div);
@@ -3458,7 +3469,7 @@ namespace Mono.CSharp {
right.Emit (ec);
if (size != 1){
if (size == 0)
- ig.Emit (OpCodes.Sizeof, element);
+ ig.Emit (OpCodes.Sizeof, op_type);
else
IntLiteral.EmitInt (ig, size);
if (rtype == TypeManager.int64_type)
@@ -3661,7 +3672,7 @@ namespace Mono.CSharp {
if (e != null) {
local_info.Used = true;
eclass = ExprClass.Value;
- return e.Resolve (ec);
+ return e;
}
VariableInfo variable_info = local_info.VariableInfo;
@@ -7545,7 +7556,7 @@ namespace Mono.CSharp {
//Console.WriteLine (new System.Diagnostics.StackTrace ());
is_stobj = false;
t = TypeManager.TypeToCoreType (t);
- if (TypeManager.IsEnumType (t))
+ if (TypeManager.IsEnumType (t) && t != TypeManager.enum_type)
t = TypeManager.EnumToUnderlying (t);
if (t == TypeManager.byte_type || t == TypeManager.sbyte_type ||
t == TypeManager.bool_type)
@@ -8125,9 +8136,6 @@ namespace Mono.CSharp {
pe.IsBase = true;
}
-
- if (e is MethodGroupExpr)
- ((MethodGroupExpr) e).IsBase = true;
return e;
}
diff --git a/mcs/mcs/iterators.cs b/mcs/mcs/iterators.cs
index 0b44fd57350..6f2d32ab29e 100644
--- a/mcs/mcs/iterators.cs
+++ b/mcs/mcs/iterators.cs
@@ -42,18 +42,15 @@ namespace Mono.CSharp {
public static bool CheckContext (EmitContext ec, Location loc)
{
if (ec.CurrentBranching.InFinally (true)){
- Report.Error (1625, loc, "Cannot yield in the body of a " +
- "finally clause");
+ Report.Error (-208, loc, "yield statement can not appear in finally clause");
return false;
}
if (ec.CurrentBranching.InCatch ()){
- Report.Error (1631, loc, "Cannot yield in the body of a " +
- "catch clause");
+ Report.Error (-209, loc, "yield statement can not appear in the catch clause");
return false;
}
if (ec.InAnonymousMethod){
- Report.Error (1621, loc, "yield statement can not appear " +
- "inside an anonymoud method");
+ Report.Error (-209, loc, "yield statement can not appear inside an anonymoud method");
return false;
}
@@ -654,12 +651,12 @@ namespace Mono.CSharp {
static bool IsIEnumerable (Type t)
{
- return t == TypeManager.ienumerable_type;
+ return t == TypeManager.ienumerable_type || TypeManager.ImplementsInterface (t, TypeManager.ienumerable_type);
}
static bool IsIEnumerator (Type t)
{
- return t == TypeManager.ienumerator_type;
+ return t == TypeManager.ienumerator_type || TypeManager.ImplementsInterface (t, TypeManager.ienumerator_type);
}
//
@@ -669,17 +666,18 @@ namespace Mono.CSharp {
{
if (!(IsIEnumerator (return_type) || IsIEnumerable (return_type))){
Report.Error (
- 1624, loc, "The body of `{0}' cannot be an iterator " +
- "block because '{1}' is not an iterator interface type",
- name, TypeManager.CSharpName (return_type));
+ -205, loc, String.Format (
+ "The method `{0}' contains a yield statement, but has an invalid return type for an iterator `{1}'",
+ name, TypeManager.CSharpName (return_type)));
return null;
}
for (int i = 0; i < parameters.Count; i++){
Parameter.Modifier mod = parameters.ParameterModifier (i);
if ((mod & (Parameter.Modifier.REF | Parameter.Modifier.OUT)) != 0){
- Report.Error (1623, loc, "Iterators cannot have ref " +
- "or out parameters");
+ Report.Error (-207, loc, String.Format (
+ "Parameter {0} of `{1}' is {2} and not allowed for an iterator method",
+ i+1, name, parameters.ParameterDesc (i)));
return null;
}
}
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/mcs/mcs/typemanager.cs b/mcs/mcs/typemanager.cs
index d488979601f..2c2cb05b669 100755
--- a/mcs/mcs/typemanager.cs
+++ b/mcs/mcs/typemanager.cs
@@ -1495,7 +1495,7 @@ public class TypeManager {
public static bool IsEnumType (Type t)
{
- if (t.IsSubclassOf (TypeManager.enum_type))
+ if (t == TypeManager.enum_type || t.IsSubclassOf (TypeManager.enum_type))
return true;
else
return false;
diff --git a/mcs/tests/ChangeLog b/mcs/tests/ChangeLog
index 580786710ba..0d97986bf11 100755
--- a/mcs/tests/ChangeLog
+++ b/mcs/tests/ChangeLog
@@ -1,9 +1,3 @@
-2004-08-03 Ben Maurer <bmaurer@ximian.com>
-
- * test-283.cs: for 62275.
-
- * unsafe-9.cs: new test for #62263.
-
2004-06-24 Raja R Harinath <rharinath@novell.com>
* test-252.cs: Avoid reference to System.dll.
diff --git a/mcs/tests/Makefile b/mcs/tests/Makefile
index a15a0c4b41b..2ccfb9d1614 100644
--- a/mcs/tests/Makefile
+++ b/mcs/tests/Makefile
@@ -43,8 +43,7 @@ TEST_SOURCES = \
test-241 test-242 test-243 test-244 test-245 test-246 test-247 test-248 test-249 test-250 \
test-251 test-252 test-253 test-254 test-255 test-256 test-257 test-258 test-259 test-260 \
test-261 test-262 test-263 test-264 test-265 test-266 test-267 test-268 test-269 test-270 \
- test-271 test-272 test-273 test-274 test-275 test-276 test-277 test-280 \
- test-283 test-284 \
+ test-271 test-272 test-273 test-274 test-275 test-276 test-277 \
cls-test-0 cls-test-1 cls-test-2 cls-test-3 cls-test-5 cls-test-6 cls-test-7 cls-test-10 \
cls-test-11 cls-test-14 cls-test-15 cls-test-16
@@ -55,7 +54,7 @@ TEST2_SOURCES = \
2test-1 2test-2 2test-3 2test-4 2test-5 2test-6
UNSAFE_SOURCES = \
- unsafe-1 unsafe-2 unsafe-3 test-58 test-171 unsafe-5 unsafe-6 unsafe-7 unsafe-8 unsafe-9
+ unsafe-1 unsafe-2 unsafe-3 test-58 test-171 unsafe-5 unsafe-6 unsafe-7 unsafe-8
WINDOWS_SOURCES = \
test-50 test-67
diff --git a/mcs/tests/test-280.cs b/mcs/tests/test-280.cs
deleted file mode 100644
index 8713c078ae2..00000000000
--- a/mcs/tests/test-280.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// Thisis just a compilation test for bug 61593
-using System;
-namespace AppFramework.Util
-{
- public class Logic
- {
- static public bool EnumInSet(Enum anEnum, Enum[] checkSet)
- {
- foreach(Enum aVal in checkSet)
- {
- if (aVal == anEnum)
- {
- return true;
- }
- }
- return false;
- }
- }
-
- static void Main () {}
-}
-
diff --git a/mcs/tests/test-283.cs b/mcs/tests/test-283.cs
deleted file mode 100644
index f4b0bc8d06f..00000000000
--- a/mcs/tests/test-283.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-class X {
- public virtual int Foo () {
- return 1;
- }
-}
-
-class Y : X {
-
- delegate int D();
-
-
- D GetIt () {
- return new D (base.Foo);
- }
-
- D GetIt2 () {
- return base.Foo;
- }
-
- public override int Foo () {
- return 0;
- }
-
- static int Main ()
- {
- if (new Y ().GetIt () () == 1 && new Y ().GetIt2 () () == 1) {
- System.Console.WriteLine ("good");
- return 0;
- }
-
- return 1;
- }
-} \ No newline at end of file
diff --git a/mcs/tests/test-284.cs b/mcs/tests/test-284.cs
deleted file mode 100644
index a4830a5c8c2..00000000000
--- a/mcs/tests/test-284.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-public class App
-{
- public static void Main()
- {
- object a = uint.MaxValue - ushort.MaxValue;
- }
-}
diff --git a/mcs/tools/mono-rpm-helpers/ChangeLog b/mcs/tools/mono-rpm-helpers/ChangeLog
index 77791244dc0..bd401e7ec2a 100644
--- a/mcs/tools/mono-rpm-helpers/ChangeLog
+++ b/mcs/tools/mono-rpm-helpers/ChangeLog
@@ -1,14 +1,3 @@
-2004-08-10 Duncan Mak <duncan@ximian.com>
-
- * mono-find-requires/mono-find-requires.cs (PrintRequires): Since
- assembly versions are not changing with releases, use "=" instead
- of ">=" to ensure that 2.0 packages will not be picked over 1.0 packages.
-
-2004-08-04 Duncan Mak <duncan@ximian.com>
-
- * mono-find-provides/mono-find-provides.cs: Add a hack to work
- around the issue with a 2.0 corlib.
-
2004-06-01 Todd Berman <tberman@sevenl.net>
* all: move stuff around so that it builds properly.
diff --git a/mcs/tools/mono-rpm-helpers/mono-find-provides/mono-find-provides.cs b/mcs/tools/mono-rpm-helpers/mono-find-provides/mono-find-provides.cs
index 4e650425b75..399ec4eac11 100644
--- a/mcs/tools/mono-rpm-helpers/mono-find-provides/mono-find-provides.cs
+++ b/mcs/tools/mono-rpm-helpers/mono-find-provides/mono-find-provides.cs
@@ -29,17 +29,12 @@ class FindProvides {
}
static void PrintProvides (string s)
- {
+ {
try {
Assembly a = Assembly.LoadFrom (s);
AssemblyName an = a.GetName ();
- // hack to work around the issue with a 2.0 corlib
- if (s.EndsWith ("2.0/mscorlib.dll"))
- Console.WriteLine ("mono({0}) = {1}", "mscorlib", "2.0.3600.0");
- else
- Console.WriteLine ("mono({0}) = {1}", an.Name, an.Version);
-
+ Console.WriteLine ("mono({0}) = {1}", an.Name, an.Version);
} catch {}
}
}
diff --git a/mcs/tools/mono-rpm-helpers/mono-find-requires/mono-find-requires.cs b/mcs/tools/mono-rpm-helpers/mono-find-requires/mono-find-requires.cs
index 002d109e397..1e43b45cc68 100644
--- a/mcs/tools/mono-rpm-helpers/mono-find-requires/mono-find-requires.cs
+++ b/mcs/tools/mono-rpm-helpers/mono-find-requires/mono-find-requires.cs
@@ -33,8 +33,8 @@ class FindRequires {
try {
Assembly a = Assembly.LoadFrom (s);
- foreach (AssemblyName an in a.GetReferencedAssemblies ())
- Console.WriteLine ("mono({0}) = {1}", an.Name, an.Version);
+ foreach (AssemblyName an in a.GetReferencedAssemblies ())
+ Console.WriteLine ("mono({0}) >= {1}", an.Name, an.Version);
} catch {}
}
diff --git a/mcs/tools/mono-xsd/ChangeLog b/mcs/tools/mono-xsd/ChangeLog
index 9db45c35ea3..af9eaa1f82c 100644
--- a/mcs/tools/mono-xsd/ChangeLog
+++ b/mcs/tools/mono-xsd/ChangeLog
@@ -1,18 +1,3 @@
-2004-08-16 Atsushi Enomoto <atsushi@ximian.com>
-
- * NewMonoXSD.cs : /language should support custom assembly qualified
- name specification. This fixes bug #63081.
- Also fixed usage message. "VB" is considered as valid.
-
-2004-08-07 Atsushi Enomoto <atsushi@ximian.com>
-
- * NewMonoXSD.cs : /generator (/g) option didn't work, since it usually
- ends with .dll (or .exe) and regarded as mere assembly filename.
-
-2004-07-12 Lluis Sanchez Gual <lluis@novell.com>
-
- * NewMonoXSD.cs: Accept files with absolute paths.
-
2004-05-07 Atsushi Enomoto <atsushi@ximian.com>
* NewMonoXSD.cs : Previous change broke default C# code generation.
diff --git a/mcs/tools/mono-xsd/NewMonoXSD.cs b/mcs/tools/mono-xsd/NewMonoXSD.cs
index 9c5628c9d00..0ba6ac69584 100755
--- a/mcs/tools/mono-xsd/NewMonoXSD.cs
+++ b/mcs/tools/mono-xsd/NewMonoXSD.cs
@@ -40,10 +40,8 @@ namespace Mono.Util {
" /e /element:NAME Element from schema to generate code for.\n" +
" Multiple elements can be specified.\n" +
" /u /uri:NAME Namespace uri of the elements to generate code for.\n" +
- " /l /language:NAME The language, or type name of custom CodeDomProvider\n" +
- " to use for the generated code.\n" +
- " Shorthand specifiers are: \"CS\" (C#) and \"VB\" (VB.NET).\n" +
- " For type name, assembly qualified name is required.\n" +
+ " /l /language:NAME The language to use for the generated code.\n" +
+ " Currently, the only supported language is CS (C#).\n" +
" /g /generator:TYPE Code Generator type name, followed by ','\n" +
" and assembly file name.\n" +
" /o /outputdir:PATH The directory where to generate the code or schemas.\n" +
@@ -112,11 +110,8 @@ namespace Mono.Util {
foreach (string arg in args)
{
- if (!arg.StartsWith ("--") && !arg.StartsWith ("/") ||
- (arg.StartsWith ("/") && arg.IndexOfAny (Path.InvalidPathChars) == -1)
- )
- {
- if ((arg.EndsWith (".dll") || arg.EndsWith (".exe")) && !arg.Substring (1).StartsWith ("generator:") && !arg.Substring (1).StartsWith ("g:"))
+ if (!arg.StartsWith ("--") && !arg.StartsWith ("/")) {
+ if (arg.EndsWith (".dll") || arg.EndsWith (".exe"))
{
if (!readingFiles) throw new Exception (incorrectOrder);
assemblies.Add (arg);
@@ -137,7 +132,7 @@ namespace Mono.Util {
inference = true;
continue;
}
- else if (!arg.StartsWith ("/"))
+ else //if (!arg.StartsWith ("/") && !arg.StartsWith ("-"))
{
if (!readingFiles) Error (incorrectOrder);
unknownFiles.Add (arg);
@@ -222,9 +217,6 @@ namespace Mono.Util {
if (outputDir == null) outputDir = ".";
- string typename = null;
- Type generatorType = null;
-
if (language != null) {
switch (language) {
case "CS":
@@ -234,20 +226,18 @@ namespace Mono.Util {
provider = new VBCodeProvider ();
break;
default:
- typename = StripQuot (language);
-
- generatorType = Type.GetType (typename);
- if (generatorType == null)
- Error (generatorTypeNotFound, typename);
+ Error (languageNotSupported, language);
break;
}
}
if (providerOption != null) {
string param = providerOption;
+ string typename;
+ Type generatorType;
int comma = param.IndexOf (',');
if (comma < 0) {
- typename = StripQuot (param);
+ typename = param;
generatorType = Type.GetType (param);
} else {
typename = param.Substring (0, comma);
@@ -263,16 +253,14 @@ namespace Mono.Util {
}
if (generatorType == null)
Error (generatorTypeNotFound, typename);
- }
- if (generatorType != null) {
if (!generatorType.IsSubclassOf (typeof (CodeDomProvider)))
Error (generatorTypeIsNotCodeGenerator, typename);
try {
provider = (CodeDomProvider) Activator.CreateInstance (generatorType, null);
} catch (Exception ex) {
- Error (generatorThrewException, generatorType.AssemblyQualifiedName.ToString () + " --> " + ex.Message);
+ Error (generatorThrewException, param);
}
- Console.WriteLine ("Loaded custom generator type " + generatorType + " .");
+ Console.WriteLine ("Loaded custom generator type " + param + " .");
}
if (provider == null)
provider = new CSharpCodeProvider ();
@@ -481,16 +469,5 @@ namespace Mono.Util {
{
throw new Exception (string.Format(msg,param));
}
-
- private string StripQuot (string input)
- {
- if (input.Length < 2)
- return input;
- if (input [0] == '"' && input [input.Length -1] == '"' ||
- input [0] == '\'' && input [input.Length - 1] == '\'')
- return input.Substring (1, input.Length - 2);
- else
- return language;
- }
}
}
diff --git a/mcs/tools/security/AssemblyInfo.cs b/mcs/tools/security/AssemblyInfo.cs
index 21cbdfa06a0..c1827893cea 100644
--- a/mcs/tools/security/AssemblyInfo.cs
+++ b/mcs/tools/security/AssemblyInfo.cs
@@ -6,7 +6,7 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany("Motus Technologies, Novell")]
[assembly: AssemblyProduct("Mono Security Tools")]
[assembly: AssemblyCopyright("Copyright 2002, 2003 Motus Technologies. Copyright 2004 Novell. BSD licensed.")]
-[assembly: AssemblyVersion("1.0.1.0")]
+[assembly: AssemblyVersion("0.95.99.0")]
//[assembly: AssemblyConfiguration("")]
//[assembly: AssemblyTrademark("")]
//[assembly: AssemblyCulture("")]
diff --git a/mcs/tools/security/ChangeLog b/mcs/tools/security/ChangeLog
index 95500607f1b..f8bbaed6dfd 100644
--- a/mcs/tools/security/ChangeLog
+++ b/mcs/tools/security/ChangeLog
@@ -1,8 +1,3 @@
-2004-08-02 Sebastien Pouliot <sebastien@ximian.com>
-
- * AssemblyInfo.cs: Update version number for Mono 1.0.1.
- * sn.cs: Warn for missing machine.config (if quiet isn't specified).
-
2004-06-21 Raja R Harinath <rharinath@novell.com>
* sn.cs (ReSign): Return a bool indicating success or failure.
diff --git a/mcs/tools/security/sn.cs b/mcs/tools/security/sn.cs
index 5127b713790..7ea5cabd9b1 100644
--- a/mcs/tools/security/sn.cs
+++ b/mcs/tools/security/sn.cs
@@ -41,7 +41,7 @@ namespace Mono.Tools {
static string defaultCSP;
- static bool LoadConfig (bool quiet)
+ static bool LoadConfig ()
{
MethodInfo config = typeof (System.Environment).GetMethod ("GetMachineConfigPath",
BindingFlags.Static|BindingFlags.NonPublic);
@@ -49,15 +49,9 @@ namespace Mono.Tools {
if (config != null) {
string path = (string) config.Invoke (null, null);
- bool exist = File.Exists (path);
- if (!quiet && !exist)
- Console.WriteLine ("Couldn't find machine.config");
-
StrongNameManager.LoadConfig (path);
- return exist;
+ return true;
}
- else if (!quiet)
- Console.WriteLine ("Couldn't resolve machine.config location (corlib issue)");
// default CSP
return false;
@@ -300,7 +294,7 @@ namespace Mono.Tools {
else
Header();
- bool config = LoadConfig (quiet);
+ bool config = LoadConfig ();
StrongName sn = null;
AssemblyName an = null;
diff --git a/mono/io-layer/ChangeLog b/mono/io-layer/ChangeLog
index fec9ca9fbe0..5178d3ac7bc 100644
--- a/mono/io-layer/ChangeLog
+++ b/mono/io-layer/ChangeLog
@@ -1,3 +1,82 @@
+2004-09-28 Dick Porter <dick@ximian.com>
+
+ * io.c (pipe_close_private): Fix one small typo in the last change
+ that totally hosed process creation with redirected pipes.
+
+2004-09-24 Dick Porter <dick@ximian.com>
+
+ * wapi-private.h:
+ * sockets.c:
+ * socket-private.h:
+ * io.c:
+ * io-private.h:
+ * handles-private.h: Cope when a file descriptor is reused while
+ the handle that thought it owned it is still referenced, instead
+ of asserting. Probably fixes bug 66479, though we've been unable
+ to reproduce it.
+
+2004-09-09 Dick Porter <dick@ximian.com>
+
+ * error.c:
+ * io.c: Set error codes everywhere.
+
+2004-09-06 Dick Porter <dick@ximian.com>
+
+ * handles.c (_wapi_handle_unref): Reset the private record's type
+ (_wapi_handle_process_fork): Fix long-standing bug in checking
+ handle return values. Also do the required bookkeeping with the
+ new process's handles.
+
+ * daemon.c: When creating a new process's handles, check whether
+ the shared space needs to be increased
+
+2004-08-19 Dick Porter <dick@ximian.com>
+
+ * handles.c (_wapi_handle_count_signalled_handles): Fix thinko
+ introduced with the fd offset stuff: unlock handles properly when
+ backing off. Fixes the monologue hang at exit.
+
+2004-08-18 Dick Porter <dick@ximian.com>
+
+ * sockets.c:
+ * io.c: Check that new fds fit in the table, return error if not
+
+ * daemon.c (_wapi_daemon_main):
+ * handles.c (shared_init): Have all processes agree on a size for
+ the fd table.
+
+2004-08-17 Dick Porter <dick@ximian.com>
+
+ * daemon.c (process_new):
+ * handles.c (_wapi_handle_new_internal): Cope when the space
+ reserved for file descriptors is larger than the shared segment
+ size. Fixes the crash reported when running mono under gdb on
+ macosx.
+
+2004-08-16 Dick Porter <dick@ximian.com>
+
+ * sockets.c:
+ * io.c:
+ * handles-private.h (_wapi_handle_fd_offset_to_handle): Improve
+ error checking with passed-in file descriptors.
+
+2004-08-11 Dick Porter <dick@ximian.com>
+
+ * sockets.c:
+ * io.c: Returned handle values are the file descriptor the handle
+ encapsulates
+
+ * handles.c:
+ * handles-private.h:
+ * daemon.c: Reserve the range of handles that can have the same
+ values as file descriptors. These won't be used, but the values
+ will be used as file, console, pipe or socket handles. The fd to
+ handle mapping is done internally and is invisible to users.
+ Fixes bug 61828.
+
+ * wapi-private.h (_WAPI_HANDLE_VERSION): Increment, because we now
+ reserve a chunk of handle space.
+
2004-07-22 Dick Porter <dick@ximian.com>
* timed-thread.c:
diff --git a/mono/io-layer/daemon.c b/mono/io-layer/daemon.c
index 62aa75ce1f3..e2eca91b3eb 100644
--- a/mono/io-layer/daemon.c
+++ b/mono/io-layer/daemon.c
@@ -830,23 +830,11 @@ static void send_reply (GIOChannel *channel, WapiHandleResponse *resp)
_wapi_daemon_response (g_io_channel_unix_get_fd (channel), resp);
}
-/*
- * process_new:
- * @channel: The client making the request
- * @channel_data: Our data for this channel
- * @type: type to init handle to
- *
- * Find a free handle and initialize it to 'type', increase refcnt and
- * send back a reply to the client.
- */
-static void process_new (GIOChannel *channel, ChannelData *channel_data,
- WapiHandleType type)
+static guint32 new_handle_with_shared_check (WapiHandleType type)
{
- guint32 handle;
- WapiHandleResponse resp={0};
-
- handle=_wapi_handle_new_internal (type);
- if(handle==0) {
+ guint32 handle = 0;
+
+ while ((handle = _wapi_handle_new_internal (type)) == 0) {
/* Try and allocate a new shared segment, and have
* another go
*/
@@ -871,15 +859,34 @@ static void process_new (GIOChannel *channel, ChannelData *channel_data,
channels[i].open_handles=_wapi_g_renew0 (channels[i].open_handles, old_len, new_len);
}
}
-
- handle=_wapi_handle_new_internal (type);
} else {
/* Map failed. Just return 0 meaning "out of
* handles"
*/
+ break;
}
}
+ return(handle);
+}
+
+/*
+ * process_new:
+ * @channel: The client making the request
+ * @channel_data: Our data for this channel
+ * @type: type to init handle to
+ *
+ * Find a free handle and initialize it to 'type', increase refcnt and
+ * send back a reply to the client.
+ */
+static void process_new (GIOChannel *channel, ChannelData *channel_data,
+ WapiHandleType type)
+{
+ guint32 handle;
+ WapiHandleResponse resp={0};
+
+ handle = new_handle_with_shared_check (type);
+
/* handle might still be set to 0. This is handled at the
* client end
*/
@@ -1064,11 +1071,11 @@ static void process_process_fork (GIOChannel *channel, ChannelData *channel_data
* client must check if either handle is 0 and take
* appropriate error handling action.
*/
- process_handle=_wapi_handle_new_internal (WAPI_HANDLE_PROCESS);
+ process_handle = new_handle_with_shared_check (WAPI_HANDLE_PROCESS);
ref_handle (daemon_channel_data, process_handle);
ref_handle (channel_data, process_handle);
- thread_handle=_wapi_handle_new_internal (WAPI_HANDLE_THREAD);
+ thread_handle = new_handle_with_shared_check (WAPI_HANDLE_THREAD);
ref_handle (daemon_channel_data, thread_handle);
ref_handle (channel_data, thread_handle);
@@ -1246,7 +1253,7 @@ static void process_process_fork (GIOChannel *channel, ChannelData *channel_data
resp.u.process_fork.pid=pid;
}
-
+
resp.u.process_fork.process_handle=process_handle;
resp.u.process_fork.thread_handle=thread_handle;
@@ -1491,6 +1498,9 @@ void _wapi_daemon_main(gpointer data, gpointer scratch)
/* Note that we've got the starting segment already */
_wapi_shared_data[0]->num_segments=1;
_wapi_shm_mapped_segments=1;
+
+ _wapi_fd_offset_table_size=getdtablesize ();
+ _wapi_shared_data[0]->fd_offset_table_size = _wapi_fd_offset_table_size;
startup ();
diff --git a/mono/io-layer/error.c b/mono/io-layer/error.c
index ee6dd56c96e..b167c1e9999 100644
--- a/mono/io-layer/error.c
+++ b/mono/io-layer/error.c
@@ -194,6 +194,14 @@ _wapi_get_win32_file_error (gint err)
ret = ERROR_NOT_SUPPORTED;
break;
+ case EBADF:
+ ret = ERROR_INVALID_HANDLE;
+ break;
+
+ case EIO:
+ ret = ERROR_INVALID_HANDLE;
+ break;
+
default:
g_message ("Unknown errno: %s\n", strerror (err));
ret = ERROR_GEN_FAILURE;
diff --git a/mono/io-layer/handles-private.h b/mono/io-layer/handles-private.h
index 674e01384b9..ad03546705c 100644
--- a/mono/io-layer/handles-private.h
+++ b/mono/io-layer/handles-private.h
@@ -28,6 +28,9 @@ extern struct _WapiHandlePrivate_list **_wapi_private_data;
extern pthread_mutex_t _wapi_shared_mutex;
extern guint32 _wapi_shm_mapped_segments;
+extern guint32 _wapi_fd_offset_table_size;
+extern gpointer *_wapi_fd_offset_table;
+
extern guint32 _wapi_handle_new_internal (WapiHandleType type);
extern gpointer _wapi_handle_new (WapiHandleType type);
extern gboolean _wapi_lookup_handle (gpointer handle, WapiHandleType type,
@@ -220,11 +223,38 @@ static inline guint32 _wapi_handle_index (guint32 segment, guint32 idx)
return((segment*_WAPI_HANDLES_PER_SEGMENT)+idx);
}
+static inline gpointer _wapi_handle_fd_offset_to_handle (gpointer fd_handle)
+{
+ int fd = GPOINTER_TO_INT (fd_handle);
+ gpointer handle;
+
+ if (fd >= _wapi_fd_offset_table_size) {
+ return(NULL);
+ }
+
+ handle = _wapi_fd_offset_table[fd];
+
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ return(NULL);
+ }
+
+#ifdef DEBUG
+ g_message (G_GNUC_PRETTY_FUNCTION ": Returning fd offset %d of %p", fd,
+ handle);
+#endif
+
+ return(handle);
+}
+
static inline WapiHandleType _wapi_handle_type (gpointer handle)
{
guint32 idx;
guint32 segment;
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
+
_wapi_handle_segment (handle, &segment, &idx);
if(segment>=_wapi_shm_mapped_segments)
@@ -233,6 +263,48 @@ static inline WapiHandleType _wapi_handle_type (gpointer handle)
return(_wapi_handle_get_shared_segment (segment)->handles[idx].type);
}
+static inline void _wapi_handle_fd_offset_store (int fd, gpointer handle)
+{
+ g_assert (fd < _wapi_fd_offset_table_size);
+
+ if (_wapi_fd_offset_table[fd] != NULL && handle != NULL) {
+ gpointer oldhandle = _wapi_fd_offset_table[fd];
+ struct _WapiHandlePrivate *private_handle;
+ guint32 idx;
+ guint32 segment;
+
+#ifdef DEBUG
+ g_message (G_GNUC_PRETTY_FUNCTION
+ ": Reassigning fd offset %d from %p", fd,
+ oldhandle);
+#endif
+
+ /* The WapiFDMapped struct at the head of the private
+ * handle data means we don't need to do a full
+ * lookup, and we don't need to know the handle type.
+ */
+ g_assert (_wapi_handle_type (oldhandle) == WAPI_HANDLE_FILE ||
+ _wapi_handle_type (oldhandle) == WAPI_HANDLE_CONSOLE ||
+ _wapi_handle_type (oldhandle) == WAPI_HANDLE_PIPE ||
+ _wapi_handle_type (oldhandle) == WAPI_HANDLE_SOCKET);
+
+ _wapi_handle_segment (oldhandle, &segment, &idx);
+ _wapi_handle_ensure_mapped (segment);
+
+ private_handle=&_wapi_handle_get_private_segment(segment)->handles[idx];
+ ((WapiFDMapped *)(&private_handle->u))->assigned = FALSE;
+ }
+
+ g_assert (GPOINTER_TO_UINT (handle) >= _wapi_fd_offset_table_size || handle==NULL);
+
+#ifdef DEBUG
+ g_message (G_GNUC_PRETTY_FUNCTION ": Assigning fd offset %d to %p", fd,
+ handle);
+#endif
+
+ _wapi_fd_offset_table[fd]=handle;
+}
+
static inline void _wapi_handle_set_signal_state (gpointer handle,
gboolean state,
gboolean broadcast)
@@ -242,6 +314,8 @@ static inline void _wapi_handle_set_signal_state (gpointer handle,
struct _WapiHandleShared *shared_handle;
int thr_ret;
+ g_assert (GPOINTER_TO_UINT (handle) >= _wapi_fd_offset_table_size);
+
_wapi_handle_segment (handle, &segment, &idx);
shared_handle=&_wapi_handle_get_shared_segment (segment)->handles[idx];
@@ -317,6 +391,8 @@ static inline gboolean _wapi_handle_issignalled (gpointer handle)
guint32 idx;
guint32 segment;
+ g_assert (GPOINTER_TO_UINT (handle) >= _wapi_fd_offset_table_size);
+
_wapi_handle_segment (handle, &segment, &idx);
return(_wapi_handle_get_shared_segment (segment)->handles[idx].signalled);
@@ -352,6 +428,8 @@ static inline int _wapi_handle_lock_handle (gpointer handle)
guint32 idx;
guint32 segment;
+ g_assert (GPOINTER_TO_UINT (handle) >= _wapi_fd_offset_table_size);
+
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION ": locking handle %p", handle);
#endif
@@ -369,6 +447,8 @@ static inline int _wapi_handle_unlock_handle (gpointer handle)
guint32 segment;
int ret;
+ g_assert (GPOINTER_TO_UINT (handle) >= _wapi_fd_offset_table_size);
+
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION ": unlocking handle %p", handle);
#endif
diff --git a/mono/io-layer/handles.c b/mono/io-layer/handles.c
index 769235fe76d..a1c3dde13ef 100644
--- a/mono/io-layer/handles.c
+++ b/mono/io-layer/handles.c
@@ -77,6 +77,9 @@ pthread_mutex_t _wapi_shared_mutex=PTHREAD_MUTEX_INITIALIZER;
*/
guint32 _wapi_shm_mapped_segments;
+guint32 _wapi_fd_offset_table_size;
+gpointer *_wapi_fd_offset_table=NULL;
+
static void shared_init (void)
{
struct sockaddr_un shared_socket_address;
@@ -86,7 +89,7 @@ static void shared_init (void)
_wapi_shared_data=g_new0 (struct _WapiHandleShared_list *, 1);
_wapi_private_data=g_new0 (struct _WapiHandlePrivate_list *, 1);
-
+
attach_again:
#ifndef DISABLE_SHARED_HANDLES
@@ -146,6 +149,9 @@ attach_again:
goto attach_again;
}
+ } else {
+ _wapi_fd_offset_table_size = _wapi_shared_data[0]->fd_offset_table_size;
+ _wapi_fd_offset_table=g_new0 (gpointer, _wapi_fd_offset_table_size);
}
}
@@ -158,6 +164,10 @@ attach_again:
_wapi_shared_data[0]->num_segments=1;
_wapi_shared_scratch=g_new0 (struct _WapiHandleScratch, 1);
+
+ _wapi_fd_offset_table_size=getdtablesize ();
+ _wapi_fd_offset_table=g_new0 (gpointer,
+ _wapi_fd_offset_table_size);
}
_wapi_private_data[0]=g_new0 (struct _WapiHandlePrivate_list, 1);
_wapi_shm_mapped_segments=1;
@@ -240,6 +250,7 @@ guint32 _wapi_handle_new_internal (WapiHandleType type)
guint32 i, j;
static guint32 last=1;
int thr_ret;
+ guint32 num_segments = _wapi_handle_get_shared_segment (0)->num_segments;
/* A linear scan should be fast enough. Start from the last
* allocation, assuming that handles are allocated more often
@@ -250,8 +261,7 @@ guint32 _wapi_handle_new_internal (WapiHandleType type)
#endif
again:
_wapi_handle_segment (GUINT_TO_POINTER (last), &segment, &idx);
- for(i=segment; i<_wapi_handle_get_shared_segment (0)->num_segments;
- i++) {
+ for(i=segment; i < num_segments; i++) {
if(i!=segment) {
idx=0;
}
@@ -259,8 +269,20 @@ again:
for(j=idx; j<_WAPI_HANDLES_PER_SEGMENT; j++) {
struct _WapiHandleShared *shared;
- /* Make sure we dont try and assign handle 0 */
- if (i==0 && j==0) {
+ /* Make sure we dont try and assign the
+ * handles that would clash with fds
+ */
+ if ((i * _WAPI_HANDLES_PER_SEGMENT + j) < _wapi_fd_offset_table_size) {
+ i = _wapi_fd_offset_table_size / _WAPI_HANDLES_PER_SEGMENT;
+ j = _wapi_fd_offset_table_size - (i * _WAPI_HANDLES_PER_SEGMENT);
+
+ if (i >= num_segments) {
+ /* Need to get the caller to
+ * add more shared segments
+ */
+ return(0);
+ }
+
continue;
}
@@ -314,7 +336,7 @@ gpointer _wapi_handle_new (WapiHandleType type)
int thr_ret;
mono_once (&shared_init_once, shared_init);
-
+
again:
if(shared==TRUE) {
new.type=WapiHandleRequestType_New;
@@ -336,8 +358,7 @@ again:
thr_ret = pthread_mutex_lock (&scan_mutex);
g_assert (thr_ret == 0);
- handle_idx=_wapi_handle_new_internal (type);
- if(handle_idx==0) {
+ while ((handle_idx = _wapi_handle_new_internal (type)) == 0) {
/* Try and get a new segment, and have another go */
segment=_wapi_handle_get_shared_segment (0)->num_segments;
_wapi_handle_ensure_mapped (segment);
@@ -345,7 +366,6 @@ again:
if(_wapi_handle_get_shared_segment (segment)!=NULL) {
/* Got a new segment */
_wapi_handle_get_shared_segment (0)->num_segments++;
- handle_idx=_wapi_handle_new_internal (type);
} else {
/* Map failed. Just return 0 meaning
* "out of handles"
@@ -361,6 +381,9 @@ again:
pthread_cleanup_pop (0);
}
+ /* Make sure we left the space for fd mappings */
+ g_assert (handle_idx >= _wapi_fd_offset_table_size);
+
if(handle_idx==0) {
g_warning (G_GNUC_PRETTY_FUNCTION ": Ran out of handles!");
@@ -414,6 +437,8 @@ gboolean _wapi_lookup_handle (gpointer handle, WapiHandleType type,
guint32 idx;
guint32 segment;
+ g_assert (GPOINTER_TO_UINT (handle) >= _wapi_fd_offset_table_size);
+
_wapi_handle_segment (handle, &segment, &idx);
_wapi_handle_ensure_mapped (segment);
@@ -592,6 +617,8 @@ gpointer _wapi_search_handle_namespace (WapiHandleType type,
void _wapi_handle_ref (gpointer handle)
{
+ g_assert (GPOINTER_TO_UINT (handle) >= _wapi_fd_offset_table_size);
+
if(shared==TRUE) {
WapiHandleRequest req={0};
WapiHandleResponse resp={0};
@@ -628,6 +655,8 @@ void _wapi_handle_unref (gpointer handle)
gboolean destroy = FALSE;
int thr_ret;
+ g_assert (GPOINTER_TO_UINT (handle) >= _wapi_fd_offset_table_size);
+
_wapi_handle_segment (handle, &segment, &idx);
if(shared==TRUE) {
@@ -676,6 +705,7 @@ void _wapi_handle_unref (gpointer handle)
_wapi_handle_ops_close_private (handle);
_wapi_handle_get_shared_segment (segment)->handles[idx].type=WAPI_HANDLE_UNUSED;
+ _wapi_handle_get_private_segment (segment)->handles[idx].type=WAPI_HANDLE_UNUSED;
/* Destroy the mutex and cond var. We hope nobody
* tried to grab them between the handle unlock and
@@ -1180,6 +1210,10 @@ gboolean _wapi_handle_test_capabilities (gpointer handle,
guint32 idx, segment;
WapiHandleType type;
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
+
_wapi_handle_segment (handle, &segment, &idx);
type=_wapi_handle_get_shared_segment (segment)->handles[idx].type;
@@ -1197,6 +1231,10 @@ void _wapi_handle_ops_close_shared (gpointer handle)
guint32 idx, segment;
WapiHandleType type;
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
+
_wapi_handle_segment (handle, &segment, &idx);
type=_wapi_handle_get_shared_segment (segment)->handles[idx].type;
@@ -1211,6 +1249,10 @@ void _wapi_handle_ops_close_private (gpointer handle)
guint32 idx, segment;
WapiHandleType type;
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
+
_wapi_handle_segment (handle, &segment, &idx);
type=_wapi_handle_get_shared_segment (segment)->handles[idx].type;
@@ -1232,6 +1274,10 @@ void _wapi_handle_ops_signal (gpointer handle)
guint32 idx, segment;
WapiHandleType type;
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
+
_wapi_handle_segment (handle, &segment, &idx);
type=_wapi_handle_get_shared_segment (segment)->handles[idx].type;
@@ -1246,6 +1292,10 @@ void _wapi_handle_ops_own (gpointer handle)
guint32 idx, segment;
WapiHandleType type;
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
+
_wapi_handle_segment (handle, &segment, &idx);
type=_wapi_handle_get_shared_segment (segment)->handles[idx].type;
@@ -1260,6 +1310,10 @@ gboolean _wapi_handle_ops_isowned (gpointer handle)
guint32 idx, segment;
WapiHandleType type;
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
+
_wapi_handle_segment (handle, &segment, &idx);
type=_wapi_handle_get_shared_segment (segment)->handles[idx].type;
@@ -1284,6 +1338,14 @@ gboolean _wapi_handle_ops_isowned (gpointer handle)
*/
gboolean CloseHandle(gpointer handle)
{
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
+
+ if (handle == NULL) {
+ return(FALSE);
+ }
+
_wapi_handle_unref (handle);
return(TRUE);
@@ -1303,12 +1365,17 @@ gboolean _wapi_handle_count_signalled_handles (guint32 numhandles,
again:
for(i=0; i<numhandles; i++) {
guint32 idx, segment;
+ gpointer handle = handles[i];
+
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
- _wapi_handle_segment (handles[i], &segment, &idx);
+ _wapi_handle_segment (handle, &segment, &idx);
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION ": attempting to lock %p",
- handles[i]);
+ handle);
#endif
ret=mono_mutex_trylock (&_wapi_handle_get_shared_segment (segment)->handles[idx].signal_mutex);
@@ -1317,11 +1384,17 @@ again:
struct timespec sleepytime;
#ifdef DEBUG
- g_message (G_GNUC_PRETTY_FUNCTION ": attempt failed for %p", handles[i]);
+ g_message (G_GNUC_PRETTY_FUNCTION ": attempt failed for %p: %s", handle, strerror (ret));
#endif
while(i--) {
- _wapi_handle_segment (handles[i], &segment, &idx);
+ handle = handles[i];
+
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
+
+ _wapi_handle_segment (handle, &segment, &idx);
thr_ret = mono_mutex_unlock (&_wapi_handle_get_shared_segment (segment)->handles[idx].signal_mutex);
g_assert (thr_ret == 0);
}
@@ -1359,24 +1432,29 @@ again:
for(i=0; i<numhandles; i++) {
guint32 idx, segment;
-
- _wapi_handle_ref (handles[i]);
+ gpointer handle = handles[i];
+
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
+
+ _wapi_handle_ref (handle);
- _wapi_handle_segment (handles[i], &segment, &idx);
+ _wapi_handle_segment (handle, &segment, &idx);
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION ": Checking handle %p",
- handles[i]);
+ handle);
#endif
- if(((_wapi_handle_test_capabilities (handles[i], WAPI_HANDLE_CAP_OWN)==TRUE) &&
- (_wapi_handle_ops_isowned (handles[i])==TRUE)) ||
+ if(((_wapi_handle_test_capabilities (handle, WAPI_HANDLE_CAP_OWN)==TRUE) &&
+ (_wapi_handle_ops_isowned (handle)==TRUE)) ||
(_wapi_handle_get_shared_segment (segment)->handles[idx].signalled==TRUE)) {
count++;
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION
- ": Handle %p signalled", handles[i]);
+ ": Handle %p signalled", handle);
#endif
if(*lowest>i) {
*lowest=i;
@@ -1412,18 +1490,23 @@ void _wapi_handle_unlock_handles (guint32 numhandles, gpointer *handles)
for(i=0; i<numhandles; i++) {
guint32 idx, segment;
-
- _wapi_handle_segment (handles[i], &segment, &idx);
+ gpointer handle = handles[i];
+
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
+
+ _wapi_handle_segment (handle, &segment, &idx);
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION ": unlocking handle %p",
- handles[i]);
+ handle);
#endif
thr_ret = mono_mutex_unlock (&_wapi_handle_get_shared_segment (segment)->handles[idx].signal_mutex);
g_assert (thr_ret == 0);
- _wapi_handle_unref (handles[i]);
+ _wapi_handle_unref (handle);
}
}
@@ -1495,6 +1578,10 @@ int _wapi_handle_wait_signal_handle (gpointer handle)
#if defined(_POSIX_THREAD_PROCESS_SHARED) && _POSIX_THREAD_PROCESS_SHARED != -1
guint32 idx, segment;
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
+
_wapi_handle_segment (handle, &segment, &idx);
return(mono_cond_wait (&_wapi_handle_get_shared_segment (segment)->handles[idx].signal_cond,
@@ -1504,6 +1591,10 @@ int _wapi_handle_wait_signal_handle (gpointer handle)
struct timespec fake_timeout;
int ret;
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
+
_wapi_handle_segment (handle, &segment, &idx);
_wapi_calc_timeout (&fake_timeout, 100);
@@ -1524,6 +1615,10 @@ int _wapi_handle_timedwait_signal_handle (gpointer handle,
#if defined(_POSIX_THREAD_PROCESS_SHARED) && _POSIX_THREAD_PROCESS_SHARED != -1
guint32 idx, segment;
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
+
_wapi_handle_segment (handle, &segment, &idx);
return(mono_cond_timedwait (&_wapi_handle_get_shared_segment (segment)->handles[idx].signal_cond,
@@ -1534,6 +1629,10 @@ int _wapi_handle_timedwait_signal_handle (gpointer handle,
struct timespec fake_timeout;
int ret;
+ if (GPOINTER_TO_UINT (handle) < _wapi_fd_offset_table_size) {
+ handle = _wapi_handle_fd_offset_to_handle (handle);
+ }
+
_wapi_handle_segment (handle, &segment, &idx);
_wapi_calc_timeout (&fake_timeout, 100);
@@ -1609,9 +1708,26 @@ gboolean _wapi_handle_process_fork (guint32 cmd, guint32 env, guint32 dir,
* exec_errno will be set, and the handle will be
* signalled immediately.
*/
- if(process_handle==0 || thread_handle==0) {
+ if(*process_handle==0 || *thread_handle==0) {
return(FALSE);
} else {
+ /* This call returns new handles, so we need to do
+ * a little bookkeeping
+ */
+ if (_wapi_private_data != NULL) {
+ guint32 segment, idx;
+
+ _wapi_handle_segment (*process_handle,
+ &segment, &idx);
+ _wapi_handle_ensure_mapped (segment);
+ _wapi_handle_get_private_segment (segment)->handles[idx].type = WAPI_HANDLE_PROCESS;
+
+ _wapi_handle_segment (*thread_handle,
+ &segment, &idx);
+ _wapi_handle_ensure_mapped (segment);
+ _wapi_handle_get_private_segment (segment)->handles[idx].type = WAPI_HANDLE_THREAD;
+ }
+
return(TRUE);
}
} else {
diff --git a/mono/io-layer/io-private.h b/mono/io-layer/io-private.h
index 374be059956..0fd2b4a7d4b 100644
--- a/mono/io-layer/io-private.h
+++ b/mono/io-layer/io-private.h
@@ -34,13 +34,9 @@ struct _WapiHandle_file
ino_t inode;
};
-/* The boolean is for distinguishing between a zeroed struct being not
- * as yet assigned, and one containing a valid fd 0
- */
struct _WapiHandlePrivate_file
{
- int fd;
- gboolean assigned;
+ WapiFDMapped fd_mapped;
gboolean async;
WapiOverlappedCB callback;
};
diff --git a/mono/io-layer/io.c b/mono/io-layer/io.c
index cdc616743fa..21708612564 100644
--- a/mono/io-layer/io.c
+++ b/mono/io-layer/io.c
@@ -236,6 +236,7 @@ static void file_close_shared (gpointer handle)
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up file handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
return;
}
@@ -263,15 +264,21 @@ static void file_close_private (gpointer handle)
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up file handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
return;
}
+ if (file_private_handle->fd_mapped.assigned) {
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION ": closing file handle %p with fd %d",
- handle, file_private_handle->fd);
+ g_message(G_GNUC_PRETTY_FUNCTION ": closing file handle %p with fd %d",
+ handle, file_private_handle->fd_mapped.fd);
#endif
- close(file_private_handle->fd);
+ /* Blank out the mapping, to make catching errors easier */
+ _wapi_handle_fd_offset_store (file_private_handle->fd_mapped.fd, NULL);
+
+ close(file_private_handle->fd_mapped.fd);
+ }
}
static WapiFileType file_getfiletype(void)
@@ -326,6 +333,12 @@ static gboolean file_read(gpointer handle, gpointer buffer,
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up file handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
+ if (file_private_handle->fd_mapped.assigned == FALSE) {
+ SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
@@ -336,15 +349,17 @@ static gboolean file_read(gpointer handle, gpointer buffer,
if(!(file_handle->fileaccess&GENERIC_READ) &&
!(file_handle->fileaccess&GENERIC_ALL)) {
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION": handle %p fd %d doesn't have GENERIC_READ access: %u", handle, file_private_handle->fd, file_handle->fileaccess);
+ g_message(G_GNUC_PRETTY_FUNCTION": handle %p fd %d doesn't have GENERIC_READ access: %u", handle, file_private_handle->fd_mapped.fd, file_handle->fileaccess);
#endif
+ SetLastError (ERROR_ACCESS_DENIED);
return(FALSE);
}
if (file_private_handle->async == FALSE) {
do {
- ret=read(file_private_handle->fd, buffer, numbytes);
+ ret=read(file_private_handle->fd_mapped.fd, buffer,
+ numbytes);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
@@ -354,7 +369,8 @@ static gboolean file_read(gpointer handle, gpointer buffer,
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": read of handle %p fd %d error: %s", handle,
- file_private_handle->fd, strerror(err));
+ file_private_handle->fd_mapped.fd,
+ strerror(err));
#endif
SetLastError (_wapi_get_win32_file_error (err));
return(FALSE);
@@ -377,7 +393,7 @@ static gboolean file_read(gpointer handle, gpointer buffer,
}
{
- int fd = file_private_handle->fd;
+ int fd = file_private_handle->fd_mapped.fd;
struct aiocb *aio;
int result;
notifier_data_t *ndata;
@@ -441,6 +457,12 @@ static gboolean file_write(gpointer handle, gconstpointer buffer,
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up file handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
+ if (file_private_handle->fd_mapped.assigned == FALSE) {
+ SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
@@ -451,9 +473,10 @@ static gboolean file_write(gpointer handle, gconstpointer buffer,
if(!(file_handle->fileaccess&GENERIC_WRITE) &&
!(file_handle->fileaccess&GENERIC_ALL)) {
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_WRITE access: %u", handle, file_private_handle->fd, file_handle->fileaccess);
+ g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_WRITE access: %u", handle, file_private_handle->fd_mapped.fd, file_handle->fileaccess);
#endif
+ SetLastError (ERROR_ACCESS_DENIED);
return(FALSE);
}
@@ -464,37 +487,40 @@ static gboolean file_write(gpointer handle, gconstpointer buffer,
* because we only do advisory locking on POSIX
* systems
*/
- current_pos = lseek (file_private_handle->fd, (off_t)0,
- SEEK_CUR);
+ current_pos = lseek (file_private_handle->fd_mapped.fd,
+ (off_t)0, SEEK_CUR);
if (current_pos == -1) {
#ifdef DEBUG
- g_message (G_GNUC_PRETTY_FUNCTION ": handle %p fd %d lseek failed: %s", handle, file_private_handle->fd, strerror (errno));
+ g_message (G_GNUC_PRETTY_FUNCTION ": handle %p fd %d lseek failed: %s", handle, file_private_handle->fd_mapped.fd, strerror (errno));
#endif
_wapi_set_last_error_from_errno ();
return(FALSE);
}
- if (_wapi_lock_file_region (file_private_handle->fd,
+ if (_wapi_lock_file_region (file_private_handle->fd_mapped.fd,
current_pos, numbytes) == FALSE) {
/* The error has already been set */
return(FALSE);
}
do {
- ret=write(file_private_handle->fd, buffer, numbytes);
+ ret=write(file_private_handle->fd_mapped.fd, buffer,
+ numbytes);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
- _wapi_unlock_file_region (file_private_handle->fd, current_pos,
- numbytes);
+ _wapi_unlock_file_region (file_private_handle->fd_mapped.fd,
+ current_pos, numbytes);
if(ret==-1) {
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": write of handle %p fd %d error: %s", handle,
- file_private_handle->fd, strerror(errno));
+ file_private_handle->fd_mapped.fd,
+ strerror(errno));
#endif
+ _wapi_set_last_error_from_errno ();
return(FALSE);
}
if(byteswritten!=NULL) {
@@ -513,7 +539,7 @@ static gboolean file_write(gpointer handle, gconstpointer buffer,
}
{
- int fd = file_private_handle->fd;
+ int fd = file_private_handle->fd_mapped.fd;
struct aiocb *aio;
int result;
notifier_data_t *ndata;
@@ -575,26 +601,34 @@ static gboolean file_flush(gpointer handle)
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up file handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
+ if (file_private_handle->fd_mapped.assigned == FALSE) {
+ SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
if(!(file_handle->fileaccess&GENERIC_WRITE) &&
!(file_handle->fileaccess&GENERIC_ALL)) {
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_WRITE access: %u", handle, file_private_handle->fd, file_handle->fileaccess);
+ g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_WRITE access: %u", handle, file_private_handle->fd_mapped.fd, file_handle->fileaccess);
#endif
+ SetLastError (ERROR_ACCESS_DENIED);
return(FALSE);
}
- ret=fsync(file_private_handle->fd);
+ ret=fsync(file_private_handle->fd_mapped.fd);
if (ret==-1) {
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
- ": write of handle %p fd %d error: %s", handle,
- file_private_handle->fd, strerror(errno));
+ ": fsync of handle %p fd %d error: %s", handle,
+ file_private_handle->fd_mapped.fd, strerror(errno));
#endif
+ _wapi_set_last_error_from_errno ();
return(FALSE);
}
@@ -620,12 +654,17 @@ static guint32 file_seek(gpointer handle, gint32 movedistance,
SetLastError (ERROR_INVALID_HANDLE);
return(INVALID_SET_FILE_POINTER);
}
+
+ if (file_private_handle->fd_mapped.assigned == FALSE) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
if(!(file_handle->fileaccess&GENERIC_READ) &&
!(file_handle->fileaccess&GENERIC_WRITE) &&
!(file_handle->fileaccess&GENERIC_ALL)) {
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_READ or GENERIC_WRITE access: %u", handle, file_private_handle->fd, file_handle->fileaccess);
+ g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_READ or GENERIC_WRITE access: %u", handle, file_private_handle->fd_mapped.fd, file_handle->fileaccess);
#endif
SetLastError (ERROR_ACCESS_DENIED);
@@ -675,20 +714,21 @@ static guint32 file_seek(gpointer handle, gint32 movedistance,
#ifdef HAVE_LARGE_FILE_SUPPORT
g_message(G_GNUC_PRETTY_FUNCTION
": moving handle %p fd %d by %lld bytes from %d", handle,
- file_private_handle->fd, offset, whence);
+ file_private_handle->fd_mapped.fd, offset, whence);
#else
g_message(G_GNUC_PRETTY_FUNCTION
": moving handle %p fd %d by %ld bytes from %d", handle,
- file_private_handle->fd, offset, whence);
+ file_private_handle->fd_mapped.fd, offset, whence);
#endif
#endif
- newpos=lseek(file_private_handle->fd, offset, whence);
+ newpos=lseek(file_private_handle->fd_mapped.fd, offset, whence);
if(newpos==-1) {
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": lseek on handle %p fd %d returned error %s",
- handle, file_private_handle->fd, strerror(errno));
+ handle, file_private_handle->fd_mapped.fd,
+ strerror(errno));
#endif
_wapi_set_last_error_from_errno ();
@@ -719,7 +759,7 @@ static guint32 file_seek(gpointer handle, gint32 movedistance,
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": move of handle %p fd %d returning %d/%d", handle,
- file_private_handle->fd, ret,
+ file_private_handle->fd_mapped.fd, ret,
highmovedistance==NULL?0:*highmovedistance);
#endif
@@ -741,15 +781,22 @@ static gboolean file_setendoffile(gpointer handle)
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up file handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
+ if (file_private_handle->fd_mapped.assigned == FALSE) {
+ SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
if(!(file_handle->fileaccess&GENERIC_WRITE) &&
!(file_handle->fileaccess&GENERIC_ALL)) {
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_WRITE access: %u", handle, file_private_handle->fd, file_handle->fileaccess);
+ g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_WRITE access: %u", handle, file_private_handle->fd_mapped.fd, file_handle->fileaccess);
#endif
+ SetLastError (ERROR_ACCESS_DENIED);
return(FALSE);
}
@@ -759,33 +806,35 @@ static gboolean file_setendoffile(gpointer handle)
* than the length, truncate the file.
*/
- ret=fstat(file_private_handle->fd, &statbuf);
+ ret=fstat(file_private_handle->fd_mapped.fd, &statbuf);
if(ret==-1) {
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": handle %p fd %d fstat failed: %s", handle,
- file_private_handle->fd, strerror(errno));
+ file_private_handle->fd_mapped.fd, strerror(errno));
#endif
+ _wapi_set_last_error_from_errno ();
return(FALSE);
}
size=statbuf.st_size;
- pos=lseek(file_private_handle->fd, (off_t)0, SEEK_CUR);
+ pos=lseek(file_private_handle->fd_mapped.fd, (off_t)0, SEEK_CUR);
if(pos==-1) {
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": handle %p fd %d lseek failed: %s", handle,
- file_private_handle->fd, strerror(errno));
+ file_private_handle->fd_mapped.fd, strerror(errno));
#endif
+ _wapi_set_last_error_from_errno ();
return(FALSE);
}
if(pos>size) {
/* extend */
do {
- ret=write(file_private_handle->fd, "", 1);
+ ret=write(file_private_handle->fd_mapped.fd, "", 1);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
@@ -793,10 +842,11 @@ static gboolean file_setendoffile(gpointer handle)
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": handle %p fd %d extend write failed: %s",
- handle, file_private_handle->fd,
+ handle, file_private_handle->fd_mapped.fd,
strerror(errno));
#endif
+ _wapi_set_last_error_from_errno ();
return(FALSE);
}
}
@@ -805,7 +855,7 @@ static gboolean file_setendoffile(gpointer handle)
* byte to the end of the file
*/
do {
- ret=ftruncate(file_private_handle->fd, pos);
+ ret=ftruncate(file_private_handle->fd_mapped.fd, pos);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
@@ -813,9 +863,10 @@ static gboolean file_setendoffile(gpointer handle)
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": handle %p fd %d ftruncate failed: %s", handle,
- file_private_handle->fd, strerror(errno));
+ file_private_handle->fd_mapped.fd, strerror(errno));
#endif
+ _wapi_set_last_error_from_errno ();
return(FALSE);
}
@@ -837,27 +888,35 @@ static guint32 file_getfilesize(gpointer handle, guint32 *highsize)
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up file handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
return(INVALID_FILE_SIZE);
}
+
+ if (file_private_handle->fd_mapped.assigned == FALSE) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
if(!(file_handle->fileaccess&GENERIC_READ) &&
!(file_handle->fileaccess&GENERIC_WRITE) &&
!(file_handle->fileaccess&GENERIC_ALL)) {
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_READ or GENERIC_WRITE access: %u", handle, file_private_handle->fd, file_handle->fileaccess);
+ g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_READ or GENERIC_WRITE access: %u", handle, file_private_handle->fd_mapped.fd, file_handle->fileaccess);
#endif
+ SetLastError (ERROR_ACCESS_DENIED);
return(INVALID_FILE_SIZE);
}
- ret=fstat(file_private_handle->fd, &statbuf);
+ ret=fstat(file_private_handle->fd_mapped.fd, &statbuf);
if(ret==-1) {
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": handle %p fd %d fstat failed: %s", handle,
- file_private_handle->fd, strerror(errno));
+ file_private_handle->fd_mapped.fd, strerror(errno));
#endif
+ _wapi_set_last_error_from_errno ();
return(INVALID_FILE_SIZE);
}
@@ -899,26 +958,34 @@ static gboolean file_getfiletime(gpointer handle, WapiFileTime *create_time,
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up file handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
+ if (file_private_handle->fd_mapped.assigned == FALSE) {
+ SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
if(!(file_handle->fileaccess&GENERIC_READ) &&
!(file_handle->fileaccess&GENERIC_ALL)) {
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_READ access: %u", handle, file_private_handle->fd, file_handle->fileaccess);
+ g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_READ access: %u", handle, file_private_handle->fd_mapped.fd, file_handle->fileaccess);
#endif
+ SetLastError (ERROR_ACCESS_DENIED);
return(FALSE);
}
- ret=fstat(file_private_handle->fd, &statbuf);
+ ret=fstat(file_private_handle->fd_mapped.fd, &statbuf);
if(ret==-1) {
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": handle %p fd %d fstat failed: %s", handle,
- file_private_handle->fd, strerror(errno));
+ file_private_handle->fd_mapped.fd, strerror(errno));
#endif
+ _wapi_set_last_error_from_errno ();
return(FALSE);
}
@@ -993,11 +1060,16 @@ static gboolean file_setfiletime(gpointer handle,
SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
+
+ if (file_private_handle->fd_mapped.assigned == FALSE) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
if(!(file_handle->fileaccess&GENERIC_WRITE) &&
!(file_handle->fileaccess&GENERIC_ALL)) {
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_WRITE access: %u", handle, file_private_handle->fd, file_handle->fileaccess);
+ g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_WRITE access: %u", handle, file_private_handle->fd_mapped.fd, file_handle->fileaccess);
#endif
SetLastError (ERROR_ACCESS_DENIED);
@@ -1008,7 +1080,7 @@ static gboolean file_setfiletime(gpointer handle,
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": handle %p fd %d unknown filename", handle,
- file_private_handle->fd);
+ file_private_handle->fd_mapped.fd);
#endif
SetLastError (ERROR_INVALID_HANDLE);
@@ -1018,12 +1090,12 @@ static gboolean file_setfiletime(gpointer handle,
/* Get the current times, so we can put the same times back in
* the event that one of the FileTime structs is NULL
*/
- ret=fstat(file_private_handle->fd, &statbuf);
+ ret=fstat(file_private_handle->fd_mapped.fd, &statbuf);
if(ret==-1) {
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": handle %p fd %d fstat failed: %s", handle,
- file_private_handle->fd, strerror(errno));
+ file_private_handle->fd_mapped.fd, strerror(errno));
#endif
SetLastError (ERROR_INVALID_PARAMETER);
@@ -1083,7 +1155,8 @@ static gboolean file_setfiletime(gpointer handle,
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": handle %p [%s] fd %d utime failed: %s", handle,
- name, file_private_handle->fd, strerror(errno));
+ name, file_private_handle->fd_mapped.fd,
+ strerror(errno));
#endif
g_free (name);
@@ -1106,6 +1179,7 @@ static void console_close_shared (gpointer handle)
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up console handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
return;
}
@@ -1133,16 +1207,22 @@ static void console_close_private (gpointer handle)
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up console handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
return;
}
+ if (console_private_handle->fd_mapped.assigned == TRUE) {
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION
- ": closing console handle %p with fd %d", handle,
- console_private_handle->fd);
+ g_message(G_GNUC_PRETTY_FUNCTION
+ ": closing console handle %p with fd %d", handle,
+ console_private_handle->fd_mapped.fd);
#endif
- close(console_private_handle->fd);
+ /* Blank out the mapping, to make catching errors easier */
+ _wapi_handle_fd_offset_store (console_private_handle->fd_mapped.fd, NULL);
+
+ close(console_private_handle->fd_mapped.fd);
+ }
}
static WapiFileType console_getfiletype(void)
@@ -1165,6 +1245,12 @@ static gboolean console_read(gpointer handle, gpointer buffer,
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up console handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
+ if (console_private_handle->fd_mapped.assigned == FALSE) {
+ SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
@@ -1175,14 +1261,16 @@ static gboolean console_read(gpointer handle, gpointer buffer,
if(!(console_handle->fileaccess&GENERIC_READ) &&
!(console_handle->fileaccess&GENERIC_ALL)) {
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION": handle %p fd %d doesn't have GENERIC_READ access: %u", handle, console_private_handle->fd, console_handle->fileaccess);
+ g_message(G_GNUC_PRETTY_FUNCTION": handle %p fd %d doesn't have GENERIC_READ access: %u", handle, console_private_handle->fd_mapped.fd, console_handle->fileaccess);
#endif
+ SetLastError (ERROR_ACCESS_DENIED);
return(FALSE);
}
do {
- ret=read(console_private_handle->fd, buffer, numbytes);
+ ret=read(console_private_handle->fd_mapped.fd, buffer,
+ numbytes);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
@@ -1190,9 +1278,11 @@ static gboolean console_read(gpointer handle, gpointer buffer,
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": read of handle %p fd %d error: %s", handle,
- console_private_handle->fd, strerror(errno));
+ console_private_handle->fd_mapped.fd,
+ strerror(errno));
#endif
+ _wapi_set_last_error_from_errno ();
return(FALSE);
}
@@ -1218,6 +1308,12 @@ static gboolean console_write(gpointer handle, gconstpointer buffer,
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up console handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
+ if (console_private_handle->fd_mapped.assigned == FALSE) {
+ SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
@@ -1228,14 +1324,16 @@ static gboolean console_write(gpointer handle, gconstpointer buffer,
if(!(console_handle->fileaccess&GENERIC_WRITE) &&
!(console_handle->fileaccess&GENERIC_ALL)) {
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_WRITE access: %u", handle, console_private_handle->fd, console_handle->fileaccess);
+ g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_WRITE access: %u", handle, console_private_handle->fd_mapped.fd, console_handle->fileaccess);
#endif
+ SetLastError (ERROR_ACCESS_DENIED);
return(FALSE);
}
do {
- ret=write(console_private_handle->fd, buffer, numbytes);
+ ret=write(console_private_handle->fd_mapped.fd, buffer,
+ numbytes);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
@@ -1243,9 +1341,11 @@ static gboolean console_write(gpointer handle, gconstpointer buffer,
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": write of handle %p fd %d error: %s", handle,
- console_private_handle->fd, strerror(errno));
+ console_private_handle->fd_mapped.fd,
+ strerror(errno));
#endif
+ _wapi_set_last_error_from_errno ();
return(FALSE);
}
if(byteswritten!=NULL) {
@@ -1265,6 +1365,7 @@ static void pipe_close_shared (gpointer handle)
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up pipe handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
return;
}
@@ -1292,16 +1393,22 @@ static void pipe_close_private (gpointer handle)
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up pipe handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
return;
}
+ if (pipe_private_handle->fd_mapped.assigned == TRUE) {
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION
- ": closing pipe handle %p with fd %d", handle,
- pipe_private_handle->fd);
+ g_message(G_GNUC_PRETTY_FUNCTION
+ ": closing pipe handle %p with fd %d", handle,
+ pipe_private_handle->fd_mapped.fd);
#endif
- close(pipe_private_handle->fd);
+ /* Blank out the mapping, to make catching errors easier */
+ _wapi_handle_fd_offset_store (pipe_private_handle->fd_mapped.fd, NULL);
+
+ close(pipe_private_handle->fd_mapped.fd);
+ }
}
static WapiFileType pipe_getfiletype(void)
@@ -1324,9 +1431,15 @@ static gboolean pipe_read (gpointer handle, gpointer buffer,
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up pipe handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
-
+
+ if (pipe_private_handle->fd_mapped.assigned == FALSE) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
if(bytesread!=NULL) {
*bytesread=0;
}
@@ -1334,20 +1447,21 @@ static gboolean pipe_read (gpointer handle, gpointer buffer,
if(!(pipe_handle->fileaccess&GENERIC_READ) &&
!(pipe_handle->fileaccess&GENERIC_ALL)) {
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION": handle %p fd %d doesn't have GENERIC_READ access: %u", handle, pipe_private_handle->fd, pipe_handle->fileaccess);
+ g_message(G_GNUC_PRETTY_FUNCTION": handle %p fd %d doesn't have GENERIC_READ access: %u", handle, pipe_private_handle->fd_mapped.fd, pipe_handle->fileaccess);
#endif
+ SetLastError (ERROR_ACCESS_DENIED);
return(FALSE);
}
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION
": reading up to %d bytes from pipe %p (fd %d)", numbytes,
- handle, pipe_private_handle->fd);
+ handle, pipe_private_handle->fd_mapped.fd);
#endif
do {
- ret=read(pipe_private_handle->fd, buffer, numbytes);
+ ret=read(pipe_private_handle->fd_mapped.fd, buffer, numbytes);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
@@ -1355,9 +1469,10 @@ static gboolean pipe_read (gpointer handle, gpointer buffer,
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": read of handle %p fd %d error: %s", handle,
- pipe_private_handle->fd, strerror(errno));
+ pipe_private_handle->fd_mapped.fd, strerror(errno));
#endif
+ _wapi_set_last_error_from_errno ();
return(FALSE);
}
@@ -1387,6 +1502,12 @@ static gboolean pipe_write(gpointer handle, gconstpointer buffer,
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up pipe handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
+ if (pipe_private_handle->fd_mapped.assigned == FALSE) {
+ SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
@@ -1397,20 +1518,21 @@ static gboolean pipe_write(gpointer handle, gconstpointer buffer,
if(!(pipe_handle->fileaccess&GENERIC_WRITE) &&
!(pipe_handle->fileaccess&GENERIC_ALL)) {
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_WRITE access: %u", handle, pipe_private_handle->fd, pipe_handle->fileaccess);
+ g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_WRITE access: %u", handle, pipe_private_handle->fd_mapped.fd, pipe_handle->fileaccess);
#endif
+ SetLastError (ERROR_ACCESS_DENIED);
return(FALSE);
}
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION
": writing up to %d bytes to pipe %p (fd %d)", numbytes,
- handle, pipe_private_handle->fd);
+ handle, pipe_private_handle->fd_mapped.fd);
#endif
do {
- ret=write(pipe_private_handle->fd, buffer, numbytes);
+ ret=write(pipe_private_handle->fd_mapped.fd, buffer, numbytes);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
@@ -1418,9 +1540,10 @@ static gboolean pipe_write(gpointer handle, gconstpointer buffer,
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": write of handle %p fd %d error: %s", handle,
- pipe_private_handle->fd, strerror(errno));
+ pipe_private_handle->fd_mapped.fd, strerror(errno));
#endif
+ _wapi_set_last_error_from_errno ();
return(FALSE);
}
if(byteswritten!=NULL) {
@@ -1575,6 +1698,7 @@ gpointer CreateFile(const gunichar2 *name, guint32 fileaccess,
g_message(G_GNUC_PRETTY_FUNCTION ": name is NULL");
#endif
+ SetLastError (ERROR_INVALID_NAME);
return(INVALID_HANDLE_VALUE);
}
@@ -1585,6 +1709,7 @@ gpointer CreateFile(const gunichar2 *name, guint32 fileaccess,
": unicode conversion returned NULL");
#endif
+ SetLastError (ERROR_INVALID_NAME);
return(INVALID_HANDLE_VALUE);
}
@@ -1619,6 +1744,19 @@ gpointer CreateFile(const gunichar2 *name, guint32 fileaccess,
return(INVALID_HANDLE_VALUE);
}
+ if (fd >= _wapi_fd_offset_table_size) {
+#ifdef DEBUG
+ g_message (G_GNUC_PRETTY_FUNCTION ": File descriptor is too big");
+#endif
+
+ SetLastError (ERROR_TOO_MANY_OPEN_FILES);
+
+ close (fd);
+ g_free (filename);
+
+ return(INVALID_HANDLE_VALUE);
+ }
+
ret = fstat (fd, &statbuf);
if (ret == -1) {
#ifdef DEBUG
@@ -1688,6 +1826,7 @@ gpointer CreateFile(const gunichar2 *name, guint32 fileaccess,
g_free (filename);
close (fd);
+ SetLastError (ERROR_GEN_FAILURE);
return(INVALID_HANDLE_VALUE);
}
@@ -1702,13 +1841,16 @@ gpointer CreateFile(const gunichar2 *name, guint32 fileaccess,
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up file handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
close (fd);
goto cleanup;
}
- cf_ret = handle;
- file_private_handle->fd=fd;
- file_private_handle->assigned=TRUE;
+ _wapi_handle_fd_offset_store (fd, handle);
+ cf_ret = GINT_TO_POINTER (fd);
+
+ file_private_handle->fd_mapped.fd=fd;
+ file_private_handle->fd_mapped.assigned=TRUE;
file_private_handle->async = ((attrs & FILE_FLAG_OVERLAPPED) != 0);
file_handle->filename=_wapi_handle_scratch_store (filename,
strlen (filename));
@@ -1726,7 +1868,7 @@ gpointer CreateFile(const gunichar2 *name, guint32 fileaccess,
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": returning handle %p with fd %d", handle,
- file_private_handle->fd);
+ file_private_handle->fd_mapped.fd);
#endif
cleanup:
@@ -1758,6 +1900,7 @@ gboolean DeleteFile(const gunichar2 *name)
g_message(G_GNUC_PRETTY_FUNCTION ": name is NULL");
#endif
+ SetLastError (ERROR_INVALID_NAME);
return(FALSE);
}
@@ -1768,6 +1911,7 @@ gboolean DeleteFile(const gunichar2 *name)
": unicode conversion returned NULL");
#endif
+ SetLastError (ERROR_INVALID_NAME);
return(FALSE);
}
@@ -1798,6 +1942,15 @@ gboolean MoveFile (const gunichar2 *name, const gunichar2 *dest_name)
{
gchar *utf8_name, *utf8_dest_name;
int result;
+
+ if(name==NULL) {
+#ifdef DEBUG
+ g_message(G_GNUC_PRETTY_FUNCTION ": name is NULL");
+#endif
+
+ SetLastError (ERROR_INVALID_NAME);
+ return(FALSE);
+ }
utf8_name = mono_unicode_to_external (name);
if (utf8_name == NULL) {
@@ -1805,8 +1958,19 @@ gboolean MoveFile (const gunichar2 *name, const gunichar2 *dest_name)
g_message (G_GNUC_PRETTY_FUNCTION ": unicode conversion returned NULL");
#endif
+ SetLastError (ERROR_INVALID_NAME);
return FALSE;
}
+
+ if(dest_name==NULL) {
+#ifdef DEBUG
+ g_message(G_GNUC_PRETTY_FUNCTION ": name is NULL");
+#endif
+
+ g_free (utf8_name);
+ SetLastError (ERROR_INVALID_NAME);
+ return(FALSE);
+ }
utf8_dest_name = mono_unicode_to_external (dest_name);
if (utf8_dest_name == NULL) {
@@ -1815,6 +1979,7 @@ gboolean MoveFile (const gunichar2 *name, const gunichar2 *dest_name)
#endif
g_free (utf8_name);
+ SetLastError (ERROR_INVALID_NAME);
return FALSE;
}
@@ -1825,6 +1990,7 @@ gboolean MoveFile (const gunichar2 *name, const gunichar2 *dest_name)
if (result != 0 && errno == EXDEV) {
/* Try a copy to the new location, and delete the source */
if (CopyFile (name, dest_name, TRUE)==FALSE) {
+ /* CopyFile will set the error */
return(FALSE);
}
@@ -1870,6 +2036,15 @@ gboolean CopyFile (const gunichar2 *name, const gunichar2 *dest_name,
int remain, n;
struct stat st;
+ if(name==NULL) {
+#ifdef DEBUG
+ g_message(G_GNUC_PRETTY_FUNCTION ": name is NULL");
+#endif
+
+ SetLastError (ERROR_INVALID_NAME);
+ return(FALSE);
+ }
+
utf8_src = mono_unicode_to_external (name);
if (utf8_src == NULL) {
#ifdef DEBUG
@@ -1880,6 +2055,16 @@ gboolean CopyFile (const gunichar2 *name, const gunichar2 *dest_name,
return(FALSE);
}
+ if(dest_name==NULL) {
+#ifdef DEBUG
+ g_message(G_GNUC_PRETTY_FUNCTION ": name is NULL");
+#endif
+
+ g_free (utf8_src);
+ SetLastError (ERROR_INVALID_NAME);
+ return(FALSE);
+ }
+
utf8_dest = mono_unicode_to_external (dest_name);
if (utf8_dest == NULL) {
#ifdef DEBUG
@@ -1991,16 +2176,16 @@ gboolean CopyFile (const gunichar2 *name, const gunichar2 *dest_name,
}
static mono_once_t stdhandle_once=MONO_ONCE_INIT;
-static gpointer stdin_handle=NULL;
-static gpointer stdout_handle=NULL;
-static gpointer stderr_handle=NULL;
+static gpointer stdin_handle=INVALID_HANDLE_VALUE;
+static gpointer stdout_handle=INVALID_HANDLE_VALUE;
+static gpointer stderr_handle=INVALID_HANDLE_VALUE;
static gpointer stdhandle_create (int fd, const guchar *name)
{
struct _WapiHandle_file *file_handle;
struct _WapiHandlePrivate_file *file_private_handle;
gboolean ok;
- gpointer handle, ret = NULL;
+ gpointer handle, ret = INVALID_HANDLE_VALUE;
int flags;
int thr_ret;
@@ -2024,6 +2209,7 @@ static gpointer stdhandle_create (int fd, const guchar *name)
fd, strerror(errno));
#endif
+ _wapi_set_last_error_from_errno ();
return(INVALID_HANDLE_VALUE);
}
@@ -2031,7 +2217,8 @@ static gpointer stdhandle_create (int fd, const guchar *name)
if(handle==_WAPI_HANDLE_INVALID) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error creating file handle");
- return(NULL);
+ SetLastError (ERROR_GEN_FAILURE);
+ return(INVALID_HANDLE_VALUE);
}
pthread_cleanup_push ((void(*)(void *))_wapi_handle_unlock_handle,
@@ -2045,12 +2232,16 @@ static gpointer stdhandle_create (int fd, const guchar *name)
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up console handle %p", handle);
+ SetLastError (ERROR_INVALID_HANDLE);
goto cleanup;
}
- ret = handle;
+
+ /* We know this is fd 0, 1 or 2 */
+ _wapi_handle_fd_offset_store (fd, handle);
+ ret = GINT_TO_POINTER (fd);
- file_private_handle->fd=fd;
- file_private_handle->assigned=TRUE;
+ file_private_handle->fd_mapped.fd=fd;
+ file_private_handle->fd_mapped.assigned=TRUE;
file_handle->filename=_wapi_handle_scratch_store (name, strlen (name));
/* some default security attributes might be needed */
file_handle->security_attributes=0;
@@ -2060,7 +2251,7 @@ static gpointer stdhandle_create (int fd, const guchar *name)
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION ": returning handle %p with fd %d",
- handle, file_private_handle->fd);
+ handle, file_private_handle->fd_mapped.fd);
#endif
cleanup:
@@ -2114,11 +2305,17 @@ gpointer GetStdHandle(WapiStdHandle stdhandle)
": unknown standard handle type");
#endif
+ SetLastError (ERROR_INVALID_PARAMETER);
return(INVALID_HANDLE_VALUE);
}
+ if (handle == INVALID_HANDLE_VALUE) {
+ SetLastError (ERROR_NO_MORE_FILES);
+ return(INVALID_HANDLE_VALUE);
+ }
+
/* Add a reference to this handle */
- _wapi_handle_ref (handle);
+ _wapi_handle_ref (_wapi_handle_fd_offset_to_handle (handle));
return(handle);
}
@@ -2150,12 +2347,21 @@ gpointer GetStdHandle(WapiStdHandle stdhandle)
* read due to an attempt to read past the end of the file), %FALSE on
* error.
*/
-gboolean ReadFile(gpointer handle, gpointer buffer, guint32 numbytes,
+gboolean ReadFile(gpointer fd_handle, gpointer buffer, guint32 numbytes,
guint32 *bytesread, WapiOverlapped *overlapped)
{
- WapiHandleType type=_wapi_handle_type (handle);
+ gpointer handle = _wapi_handle_fd_offset_to_handle (fd_handle);
+ WapiHandleType type;
+
+ if (handle == NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
+ type = _wapi_handle_type (handle);
if(io_ops[type].readfile==NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
@@ -2188,12 +2394,21 @@ gboolean ReadFile(gpointer handle, gpointer buffer, guint32 numbytes,
*
* Return value: %TRUE if the write succeeds, %FALSE on error.
*/
-gboolean WriteFile(gpointer handle, gconstpointer buffer, guint32 numbytes,
+gboolean WriteFile(gpointer fd_handle, gconstpointer buffer, guint32 numbytes,
guint32 *byteswritten, WapiOverlapped *overlapped)
{
- WapiHandleType type=_wapi_handle_type (handle);
+ gpointer handle = _wapi_handle_fd_offset_to_handle (fd_handle);
+ WapiHandleType type;
+
+ if (handle == NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
+ type = _wapi_handle_type (handle);
if(io_ops[type].writefile==NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
@@ -2211,11 +2426,20 @@ gboolean WriteFile(gpointer handle, gconstpointer buffer, guint32 numbytes,
*
* Return value: %TRUE on success, %FALSE otherwise.
*/
-gboolean FlushFileBuffers(gpointer handle)
+gboolean FlushFileBuffers(gpointer fd_handle)
{
- WapiHandleType type=_wapi_handle_type (handle);
+ gpointer handle = _wapi_handle_fd_offset_to_handle (fd_handle);
+ WapiHandleType type;
+
+ if (handle == NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
+ type = _wapi_handle_type (handle);
if(io_ops[type].flushfile==NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
@@ -2232,11 +2456,20 @@ gboolean FlushFileBuffers(gpointer handle)
*
* Return value: %TRUE on success, %FALSE otherwise.
*/
-gboolean SetEndOfFile(gpointer handle)
+gboolean SetEndOfFile(gpointer fd_handle)
{
- WapiHandleType type=_wapi_handle_type (handle);
+ gpointer handle = _wapi_handle_fd_offset_to_handle (fd_handle);
+ WapiHandleType type;
+
+ if (handle == NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
+ type = _wapi_handle_type (handle);
if(io_ops[type].setendoffile==NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
@@ -2272,13 +2505,22 @@ gboolean SetEndOfFile(gpointer handle)
* If @highmovedistance is not %NULL, the high 32 bits of the new file
* pointer are stored there. On failure, %INVALID_SET_FILE_POINTER.
*/
-guint32 SetFilePointer(gpointer handle, gint32 movedistance,
+guint32 SetFilePointer(gpointer fd_handle, gint32 movedistance,
gint32 *highmovedistance, WapiSeekMethod method)
{
- WapiHandleType type=_wapi_handle_type (handle);
+ gpointer handle = _wapi_handle_fd_offset_to_handle (fd_handle);
+ WapiHandleType type;
+
+ if (handle == NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(INVALID_SET_FILE_POINTER);
+ }
+
+ type = _wapi_handle_type (handle);
if(io_ops[type].seek==NULL) {
- return(FALSE);
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(INVALID_SET_FILE_POINTER);
}
return(io_ops[type].seek (handle, movedistance, highmovedistance,
@@ -2296,11 +2538,20 @@ guint32 SetFilePointer(gpointer handle, gint32 movedistance,
* %FILE_TYPE_CHAR - @handle is a character device, such as a console.
* %FILE_TYPE_PIPE - @handle is a named or anonymous pipe.
*/
-WapiFileType GetFileType(gpointer handle)
+WapiFileType GetFileType(gpointer fd_handle)
{
- WapiHandleType type=_wapi_handle_type (handle);
+ gpointer handle = _wapi_handle_fd_offset_to_handle (fd_handle);
+ WapiHandleType type;
+
+ if (handle == NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FILE_TYPE_UNKNOWN);
+ }
+
+ type = _wapi_handle_type (handle);
if(io_ops[type].getfiletype==NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
return(FILE_TYPE_UNKNOWN);
}
@@ -2323,12 +2574,21 @@ WapiFileType GetFileType(gpointer handle)
* @highsize is non-%NULL then the high 32 bits of the file size are
* stored here. On failure %INVALID_FILE_SIZE is returned.
*/
-guint32 GetFileSize(gpointer handle, guint32 *highsize)
+guint32 GetFileSize(gpointer fd_handle, guint32 *highsize)
{
- WapiHandleType type=_wapi_handle_type (handle);
+ gpointer handle = _wapi_handle_fd_offset_to_handle (fd_handle);
+ WapiHandleType type;
+
+ if (handle == NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(INVALID_FILE_SIZE);
+ }
+
+ type = _wapi_handle_type (handle);
if(io_ops[type].getfilesize==NULL) {
- return(FALSE);
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(INVALID_FILE_SIZE);
}
return(io_ops[type].getfilesize (handle, highsize));
@@ -2359,12 +2619,21 @@ guint32 GetFileSize(gpointer handle, guint32 *highsize)
*
* Return value: %TRUE on success, %FALSE otherwise.
*/
-gboolean GetFileTime(gpointer handle, WapiFileTime *create_time,
+gboolean GetFileTime(gpointer fd_handle, WapiFileTime *create_time,
WapiFileTime *last_access, WapiFileTime *last_write)
{
- WapiHandleType type=_wapi_handle_type (handle);
+ gpointer handle = _wapi_handle_fd_offset_to_handle (fd_handle);
+ WapiHandleType type;
+
+ if (handle == NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
+ type = _wapi_handle_type (handle);
if(io_ops[type].getfiletime==NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
@@ -2395,13 +2664,22 @@ gboolean GetFileTime(gpointer handle, WapiFileTime *create_time,
*
* Return value: %TRUE on success, %FALSE otherwise.
*/
-gboolean SetFileTime(gpointer handle, const WapiFileTime *create_time,
+gboolean SetFileTime(gpointer fd_handle, const WapiFileTime *create_time,
const WapiFileTime *last_access,
const WapiFileTime *last_write)
{
- WapiHandleType type=_wapi_handle_type (handle);
+ gpointer handle = _wapi_handle_fd_offset_to_handle (fd_handle);
+ WapiHandleType type;
+
+ if (handle == NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
+ type = _wapi_handle_type (handle);
if(io_ops[type].setfiletime==NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
@@ -2448,6 +2726,7 @@ gboolean FileTimeToSystemTime(const WapiFileTime *file_time,
g_message(G_GNUC_PRETTY_FUNCTION ": system_time NULL");
#endif
+ SetLastError (ERROR_INVALID_PARAMETER);
return(FALSE);
}
@@ -2463,6 +2742,7 @@ gboolean FileTimeToSystemTime(const WapiFileTime *file_time,
g_message(G_GNUC_PRETTY_FUNCTION ": file_time too big");
#endif
+ SetLastError (ERROR_INVALID_PARAMETER);
return(FALSE);
}
@@ -2799,6 +3079,7 @@ gpointer FindFirstFile (const gunichar2 *pattern, WapiFindData *find_data)
g_free (dir_part);
g_free (entry_part);
g_free (utf8_pattern);
+ SetLastError (ERROR_GEN_FAILURE);
return(INVALID_HANDLE_VALUE);
}
@@ -2819,6 +3100,7 @@ gpointer FindFirstFile (const gunichar2 *pattern, WapiFindData *find_data)
entry_part = NULL;
g_free (utf8_pattern);
utf8_pattern = NULL;
+ SetLastError (ERROR_INVALID_HANDLE);
goto cleanup;
}
@@ -3087,12 +3369,22 @@ gboolean CreateDirectory (const gunichar2 *name, WapiSecurityAttributes *securit
struct stat buf;
guint32 attrs;
+ if (name == NULL) {
+#ifdef DEBUG
+ g_message(G_GNUC_PRETTY_FUNCTION ": name is NULL");
+#endif
+
+ SetLastError (ERROR_INVALID_NAME);
+ return(FALSE);
+ }
+
utf8_name = mono_unicode_to_external (name);
if (utf8_name == NULL) {
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION ": unicode conversion returned NULL");
#endif
+ SetLastError (ERROR_INVALID_NAME);
return FALSE;
}
@@ -3139,6 +3431,15 @@ gboolean RemoveDirectory (const gunichar2 *name)
{
gchar *utf8_name;
int result;
+
+ if (name == NULL) {
+#ifdef DEBUG
+ g_message(G_GNUC_PRETTY_FUNCTION ": name is NULL");
+#endif
+
+ SetLastError (ERROR_INVALID_NAME);
+ return(FALSE);
+ }
utf8_name = mono_unicode_to_external (name);
if (utf8_name == NULL) {
@@ -3146,6 +3447,7 @@ gboolean RemoveDirectory (const gunichar2 *name)
g_message (G_GNUC_PRETTY_FUNCTION ": unicode conversion returned NULL");
#endif
+ SetLastError (ERROR_INVALID_NAME);
return FALSE;
}
@@ -3173,6 +3475,15 @@ guint32 GetFileAttributes (const gunichar2 *name)
struct stat buf;
int result;
+ if (name == NULL) {
+#ifdef DEBUG
+ g_message(G_GNUC_PRETTY_FUNCTION ": name is NULL");
+#endif
+
+ SetLastError (ERROR_INVALID_NAME);
+ return(FALSE);
+ }
+
utf8_name = mono_unicode_to_external (name);
if (utf8_name == NULL) {
#ifdef DEBUG
@@ -3219,8 +3530,18 @@ gboolean GetFileAttributesEx (const gunichar2 *name, WapiGetFileExInfoLevels lev
g_message (G_GNUC_PRETTY_FUNCTION ": info level %d not supported.", level);
#endif
+ SetLastError (ERROR_INVALID_PARAMETER);
return FALSE;
}
+
+ if (name == NULL) {
+#ifdef DEBUG
+ g_message(G_GNUC_PRETTY_FUNCTION ": name is NULL");
+#endif
+
+ SetLastError (ERROR_INVALID_NAME);
+ return(FALSE);
+ }
utf8_name = mono_unicode_to_external (name);
if (utf8_name == NULL) {
@@ -3287,8 +3608,26 @@ extern gboolean SetFileAttributes (const gunichar2 *name, guint32 attrs)
* Currently we only handle one *internal* case, with a value that is
* not standard: 0x80000000, which means `set executable bit'
*/
+
+ if (name == NULL) {
+#ifdef DEBUG
+ g_message(G_GNUC_PRETTY_FUNCTION ": name is NULL");
+#endif
+
+ SetLastError (ERROR_INVALID_NAME);
+ return(FALSE);
+ }
utf8_name = mono_unicode_to_external (name);
+ if (utf8_name == NULL) {
+#ifdef DEBUG
+ g_message (G_GNUC_PRETTY_FUNCTION ": unicode conversion returned NULL");
+#endif
+
+ SetLastError (ERROR_INVALID_NAME);
+ return FALSE;
+ }
+
result = stat (utf8_name, &buf);
if (result != 0) {
g_free (utf8_name);
@@ -3400,10 +3739,14 @@ extern gboolean SetCurrentDirectory (const gunichar2 *path)
return result;
}
-int _wapi_file_handle_to_fd (gpointer handle)
+/* When we're confident there are no more bugs in the fd->handle
+ * mapping, this can be replaced as a no-op: GPOINTER_TO_INT(fd_handle) == fd
+ */
+int _wapi_file_handle_to_fd (gpointer fd_handle)
{
struct _WapiHandlePrivate_file *file_private_handle;
gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (fd_handle);
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION ": looking up fd for %p", handle);
@@ -3422,17 +3765,25 @@ int _wapi_file_handle_to_fd (gpointer handle)
g_message (G_GNUC_PRETTY_FUNCTION
": returning -1");
#endif
+ SetLastError (ERROR_INVALID_HANDLE);
return(-1);
}
}
}
+ if (file_private_handle->fd_mapped.assigned == FALSE) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(-1);
+ }
+
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION ": returning %d",
- file_private_handle->fd);
+ file_private_handle->fd_mapped.fd);
#endif
- return(file_private_handle->fd);
+ g_assert (file_private_handle->fd_mapped.fd == GPOINTER_TO_INT (fd_handle));
+
+ return(file_private_handle->fd_mapped.fd);
}
gboolean CreatePipe (gpointer *readpipe, gpointer *writepipe,
@@ -3467,6 +3818,20 @@ gboolean CreatePipe (gpointer *readpipe, gpointer *writepipe,
_wapi_set_last_error_from_errno ();
return(FALSE);
}
+
+ if (filedes[0] >= _wapi_fd_offset_table_size ||
+ filedes[1] >= _wapi_fd_offset_table_size) {
+#ifdef DEBUG
+ g_message (G_GNUC_PRETTY_FUNCTION ": File descriptor is too big");
+#endif
+
+ SetLastError (ERROR_TOO_MANY_OPEN_FILES);
+
+ close (filedes[0]);
+ close (filedes[1]);
+
+ return(FALSE);
+ }
/* filedes[0] is open for reading, filedes[1] for writing */
@@ -3476,6 +3841,8 @@ gboolean CreatePipe (gpointer *readpipe, gpointer *writepipe,
": error creating pipe read handle");
close (filedes[0]);
close (filedes[1]);
+ SetLastError (ERROR_GEN_FAILURE);
+
return(FALSE);
}
@@ -3491,6 +3858,7 @@ gboolean CreatePipe (gpointer *readpipe, gpointer *writepipe,
g_warning (G_GNUC_PRETTY_FUNCTION ": error looking up pipe handle %p", read_handle);
close (filedes[0]);
close (filedes[1]);
+ SetLastError (ERROR_INVALID_HANDLE);
goto cleanup;
}
@@ -3502,6 +3870,8 @@ gboolean CreatePipe (gpointer *readpipe, gpointer *writepipe,
close (filedes[0]);
close (filedes[1]);
+ SetLastError (ERROR_GEN_FAILURE);
+
goto cleanup;
}
@@ -3520,26 +3890,27 @@ gboolean CreatePipe (gpointer *readpipe, gpointer *writepipe,
close (filedes[0]);
close (filedes[1]);
+ SetLastError (ERROR_INVALID_HANDLE);
goto write_cleanup;
}
cp_ret = TRUE;
- pipe_read_private_handle->fd=filedes[0];
- pipe_read_private_handle->assigned=TRUE;
+ pipe_read_private_handle->fd_mapped.fd=filedes[0];
+ pipe_read_private_handle->fd_mapped.assigned=TRUE;
pipe_read_handle->fileaccess=GENERIC_READ;
- *readpipe=read_handle;
+ _wapi_handle_fd_offset_store (filedes[0], read_handle);
+ *readpipe=GINT_TO_POINTER (filedes[0]);
- pipe_write_private_handle->fd=filedes[1];
- pipe_write_private_handle->assigned=TRUE;
+ pipe_write_private_handle->fd_mapped.fd=filedes[1];
+ pipe_write_private_handle->fd_mapped.assigned=TRUE;
pipe_write_handle->fileaccess=GENERIC_WRITE;
- *writepipe=write_handle;
+ _wapi_handle_fd_offset_store (filedes[1], write_handle);
+ *writepipe=GINT_TO_POINTER (filedes[1]);
#ifdef DEBUG
- g_message (G_GNUC_PRETTY_FUNCTION
- ": Returning pipe: read handle %p, write handle %p",
- read_handle, write_handle);
+ g_message (G_GNUC_PRETTY_FUNCTION ": Returning pipe: read handle %p (fd %d), write handle %p (fd %d)", read_handle, filedes[0], write_handle, filedes[1]);
#endif
write_cleanup:
@@ -3612,7 +3983,7 @@ guint32 GetTempPath (guint32 len, gunichar2 *buf)
}
gboolean
-_wapi_io_add_callback (gpointer handle,
+_wapi_io_add_callback (gpointer fd_handle,
WapiOverlappedCB callback,
guint64 flags G_GNUC_UNUSED)
{
@@ -3621,6 +3992,12 @@ _wapi_io_add_callback (gpointer handle,
gboolean ok;
int thr_ret;
gboolean ret = FALSE;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (fd_handle);
+
+ if (handle == NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
ok = _wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
(gpointer *) &file_handle,
@@ -3794,13 +4171,19 @@ static gboolean _wapi_unlock_file_region (int fd, off_t offset, off_t length)
return(TRUE);
}
-gboolean LockFile (gpointer handle, guint32 offset_low, guint32 offset_high,
+gboolean LockFile (gpointer fd_handle, guint32 offset_low, guint32 offset_high,
guint32 length_low, guint32 length_high)
{
struct _WapiHandle_file *file_handle;
struct _WapiHandlePrivate_file *file_private_handle;
gboolean ok;
off_t offset, length;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (fd_handle);
+
+ if (handle == NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
ok = _wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
(gpointer *)&file_handle,
@@ -3812,11 +4195,16 @@ gboolean LockFile (gpointer handle, guint32 offset_low, guint32 offset_high,
return(FALSE);
}
+ if (file_private_handle->fd_mapped.assigned == FALSE) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
if (!(file_handle->fileaccess & GENERIC_READ) &&
!(file_handle->fileaccess & GENERIC_WRITE) &&
!(file_handle->fileaccess & GENERIC_ALL)) {
#ifdef DEBUG
- g_message (G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_READ or GENERIC_WRITE access: %u", handle, file_private_handle->fd, file_handle->fileaccess);
+ g_message (G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_READ or GENERIC_WRITE access: %u", handle, file_private_handle->fd_mapped.fd, file_handle->fileaccess);
#endif
SetLastError (ERROR_ACCESS_DENIED);
return(FALSE);
@@ -3829,7 +4217,7 @@ gboolean LockFile (gpointer handle, guint32 offset_low, guint32 offset_high,
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION
": Locking handle %p fd %d, offset %lld, length %lld",
- handle, file_private_handle->fd, offset, length);
+ handle, file_private_handle->fd_mapped.fd, offset, length);
#endif
#else
offset = offset_low;
@@ -3838,21 +4226,28 @@ gboolean LockFile (gpointer handle, guint32 offset_low, guint32 offset_high,
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION
": Locking handle %p fd %d, offset %ld, length %ld",
- handle, file_private_handle->fd, offset, length);
+ handle, file_private_handle->fd_mapped.fd, offset, length);
#endif
#endif
- return(_wapi_lock_file_region (file_private_handle->fd, offset,
- length));
+ return(_wapi_lock_file_region (file_private_handle->fd_mapped.fd,
+ offset, length));
}
-gboolean UnlockFile (gpointer handle, guint32 offset_low, guint32 offset_high,
- guint32 length_low, guint32 length_high)
+gboolean UnlockFile (gpointer fd_handle, guint32 offset_low,
+ guint32 offset_high, guint32 length_low,
+ guint32 length_high)
{
struct _WapiHandle_file *file_handle;
struct _WapiHandlePrivate_file *file_private_handle;
gboolean ok;
off_t offset, length;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (fd_handle);
+
+ if (handle == NULL) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
ok = _wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
(gpointer *)&file_handle,
@@ -3864,11 +4259,16 @@ gboolean UnlockFile (gpointer handle, guint32 offset_low, guint32 offset_high,
return(FALSE);
}
+ if (file_private_handle->fd_mapped.assigned == FALSE) {
+ SetLastError (ERROR_INVALID_HANDLE);
+ return(FALSE);
+ }
+
if (!(file_handle->fileaccess & GENERIC_READ) &&
!(file_handle->fileaccess & GENERIC_WRITE) &&
!(file_handle->fileaccess & GENERIC_ALL)) {
#ifdef DEBUG
- g_message (G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_READ or GENERIC_WRITE access: %u", handle, file_private_handle->fd, file_handle->fileaccess);
+ g_message (G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_READ or GENERIC_WRITE access: %u", handle, file_private_handle->fd_mapped.fd, file_handle->fileaccess);
#endif
SetLastError (ERROR_ACCESS_DENIED);
return(FALSE);
@@ -3881,7 +4281,7 @@ gboolean UnlockFile (gpointer handle, guint32 offset_low, guint32 offset_high,
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION
": Unlocking handle %p fd %d, offset %lld, length %lld",
- handle, file_private_handle->fd, offset, length);
+ handle, file_private_handle->fd_mapped.fd, offset, length);
#endif
#else
offset = offset_low;
@@ -3890,10 +4290,10 @@ gboolean UnlockFile (gpointer handle, guint32 offset_low, guint32 offset_high,
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION
": Unlocking handle %p fd %d, offset %ld, length %ld",
- handle, file_private_handle->fd, offset, length);
+ handle, file_private_handle->fd_mapped.fd, offset, length);
#endif
#endif
- return(_wapi_unlock_file_region (file_private_handle->fd, offset,
- length));
+ return(_wapi_unlock_file_region (file_private_handle->fd_mapped.fd,
+ offset, length));
}
diff --git a/mono/io-layer/socket-private.h b/mono/io-layer/socket-private.h
index 47f14c1315f..4da7f58d8ad 100644
--- a/mono/io-layer/socket-private.h
+++ b/mono/io-layer/socket-private.h
@@ -22,7 +22,7 @@ struct _WapiHandle_socket
struct _WapiHandlePrivate_socket
{
- int fd;
+ WapiFDMapped fd_mapped;
};
#endif /* _WAPI_SOCKET_PRIVATE_H_ */
diff --git a/mono/io-layer/sockets.c b/mono/io-layer/sockets.c
index 3f48f02af8e..df7ac8a25dc 100644
--- a/mono/io-layer/sockets.c
+++ b/mono/io-layer/sockets.c
@@ -97,21 +97,28 @@ static void socket_close_private (gpointer handle)
g_ptr_array_remove_fast(sockets, GUINT_TO_POINTER (handle));
- do {
- ret=close(socket_private_handle->fd);
- }
- while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
+ if (socket_private_handle->fd_mapped.assigned == TRUE) {
+ /* Blank out the mapping, to make catching errors easier */
+ _wapi_handle_fd_offset_store (socket_private_handle->fd_mapped.fd, NULL);
+
+ do {
+ ret=close(socket_private_handle->fd_mapped.fd);
+ }
+ while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
- if(ret==-1) {
- gint errnum = errno;
+ if(ret==-1) {
+ gint errnum = errno;
#ifdef DEBUG
- g_message(G_GNUC_PRETTY_FUNCTION ": close error: %s",
- strerror(errno));
+ g_message(G_GNUC_PRETTY_FUNCTION ": close error: %s",
+ strerror(errno));
#endif
- errnum = errno_to_WSA (errnum, G_GNUC_PRETTY_FUNCTION);
- WSASetLastError (errnum);
+ errnum = errno_to_WSA (errnum, G_GNUC_PRETTY_FUNCTION);
+ WSASetLastError (errnum);
- return;
+ return;
+ }
+ } else {
+ WSASetLastError(WSAENOTSOCK);
}
}
@@ -205,20 +212,27 @@ int WSAGetLastError(void)
return(err);
}
-int closesocket(guint32 handle)
+int closesocket(guint32 fd_handle)
{
- _wapi_handle_unref (GUINT_TO_POINTER (handle));
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd_handle));
+
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
+ WSASetLastError (WSAENOTSOCK);
+ return(0);
+ }
+
+ _wapi_handle_unref (handle);
return(0);
}
-guint32 _wapi_accept(guint32 handle, struct sockaddr *addr,
- socklen_t *addrlen)
+guint32 _wapi_accept(guint32 fd, struct sockaddr *addr, socklen_t *addrlen)
{
- struct _WapiHandlePrivate_socket *socket_private_handle;
struct _WapiHandlePrivate_socket *new_socket_private_handle;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
gpointer new_handle;
gboolean ok;
- int fd;
+ int new_fd;
int thr_ret;
guint32 ret = INVALID_SOCKET;
@@ -227,21 +241,18 @@ guint32 _wapi_accept(guint32 handle, struct sockaddr *addr,
return(INVALID_SOCKET);
}
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return(INVALID_SOCKET);
}
do {
- fd=accept(socket_private_handle->fd, addr, addrlen);
+ new_fd=accept(fd, addr, addrlen);
}
- while (fd==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
+ while (new_fd==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
- if(fd==-1) {
+ if(new_fd==-1) {
gint errnum = errno;
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION ": accept error: %s",
@@ -254,10 +265,23 @@ guint32 _wapi_accept(guint32 handle, struct sockaddr *addr,
return(INVALID_SOCKET);
}
+ if (new_fd >= _wapi_fd_offset_table_size) {
+#ifdef DEBUG
+ g_message (G_GNUC_PRETTY_FUNCTION ": File descriptor is too big");
+#endif
+
+ WSASetLastError (WSASYSCALLFAILURE);
+
+ close (new_fd);
+
+ return(INVALID_SOCKET);
+ }
+
new_handle=_wapi_handle_new (WAPI_HANDLE_SOCKET);
if(new_handle==_WAPI_HANDLE_INVALID) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error creating socket handle");
+ WSASetLastError (ERROR_GEN_FAILURE);
return(INVALID_SOCKET);
}
@@ -270,17 +294,21 @@ guint32 _wapi_accept(guint32 handle, struct sockaddr *addr,
(gpointer *)&new_socket_private_handle);
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ ": error looking up new socket handle %p",
+ new_handle);
goto cleanup;
}
- ret = GPOINTER_TO_UINT (new_handle);
+
+ _wapi_handle_fd_offset_store (new_fd, new_handle);
+ ret = new_fd;
- new_socket_private_handle->fd=fd;
+ new_socket_private_handle->fd_mapped.fd = new_fd;
+ new_socket_private_handle->fd_mapped.assigned = TRUE;
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": returning newly accepted socket handle %p with fd %d",
- new_handle, new_socket_private_handle->fd);
+ new_handle, new_socket_private_handle->fd_mapped.fd);
#endif
cleanup:
@@ -291,27 +319,23 @@ cleanup:
return(ret);
}
-int _wapi_bind(guint32 handle, struct sockaddr *my_addr, socklen_t addrlen)
+int _wapi_bind(guint32 fd, struct sockaddr *my_addr, socklen_t addrlen)
{
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
int ret;
if(startup_count==0) {
WSASetLastError(WSANOTINITIALISED);
return(SOCKET_ERROR);
}
-
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return(SOCKET_ERROR);
}
- ret=bind(socket_private_handle->fd, my_addr, addrlen);
+ ret=bind(fd, my_addr, addrlen);
if(ret==-1) {
gint errnum = errno;
#ifdef DEBUG
@@ -326,11 +350,10 @@ int _wapi_bind(guint32 handle, struct sockaddr *my_addr, socklen_t addrlen)
return(ret);
}
-int _wapi_connect(guint32 handle, const struct sockaddr *serv_addr,
+int _wapi_connect(guint32 fd, const struct sockaddr *serv_addr,
socklen_t addrlen)
{
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
int ret;
gint errnum;
@@ -339,17 +362,14 @@ int _wapi_connect(guint32 handle, const struct sockaddr *serv_addr,
return(SOCKET_ERROR);
}
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return(SOCKET_ERROR);
}
do {
- ret=connect(socket_private_handle->fd, serv_addr, addrlen);
+ ret=connect(fd, serv_addr, addrlen);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
@@ -361,11 +381,11 @@ int _wapi_connect(guint32 handle, const struct sockaddr *serv_addr,
errnum = errno;
- ret=setsockopt (socket_private_handle->fd, SOL_SOCKET,
- SO_BROADCAST, &true, sizeof(true));
+ ret=setsockopt (fd, SOL_SOCKET, SO_BROADCAST, &true,
+ sizeof(true));
if(ret==0) {
do {
- ret=connect (socket_private_handle->fd, serv_addr, addrlen);
+ ret=connect (fd, serv_addr, addrlen);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
}
@@ -386,11 +406,9 @@ int _wapi_connect(guint32 handle, const struct sockaddr *serv_addr,
return(ret);
}
-int _wapi_getpeername(guint32 handle, struct sockaddr *name,
- socklen_t *namelen)
+int _wapi_getpeername(guint32 fd, struct sockaddr *name, socklen_t *namelen)
{
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
int ret;
if(startup_count==0) {
@@ -398,16 +416,13 @@ int _wapi_getpeername(guint32 handle, struct sockaddr *name,
return(SOCKET_ERROR);
}
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return(SOCKET_ERROR);
}
- ret=getpeername(socket_private_handle->fd, name, namelen);
+ ret=getpeername(fd, name, namelen);
if(ret==-1) {
gint errnum = errno;
#ifdef DEBUG
@@ -424,11 +439,9 @@ int _wapi_getpeername(guint32 handle, struct sockaddr *name,
return(ret);
}
-int _wapi_getsockname(guint32 handle, struct sockaddr *name,
- socklen_t *namelen)
+int _wapi_getsockname(guint32 fd, struct sockaddr *name, socklen_t *namelen)
{
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
int ret;
if(startup_count==0) {
@@ -436,16 +449,13 @@ int _wapi_getsockname(guint32 handle, struct sockaddr *name,
return(SOCKET_ERROR);
}
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return(SOCKET_ERROR);
}
- ret=getsockname(socket_private_handle->fd, name, namelen);
+ ret=getsockname(fd, name, namelen);
if(ret==-1) {
gint errnum = errno;
#ifdef DEBUG
@@ -462,11 +472,10 @@ int _wapi_getsockname(guint32 handle, struct sockaddr *name,
return(ret);
}
-int _wapi_getsockopt(guint32 handle, int level, int optname, void *optval,
+int _wapi_getsockopt(guint32 fd, int level, int optname, void *optval,
socklen_t *optlen)
{
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
int ret;
if(startup_count==0) {
@@ -474,17 +483,13 @@ int _wapi_getsockopt(guint32 handle, int level, int optname, void *optval,
return(SOCKET_ERROR);
}
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return(SOCKET_ERROR);
}
- ret=getsockopt(socket_private_handle->fd, level, optname, optval,
- optlen);
+ ret=getsockopt(fd, level, optname, optval, optlen);
if(ret==-1) {
gint errnum = errno;
#ifdef DEBUG
@@ -501,10 +506,9 @@ int _wapi_getsockopt(guint32 handle, int level, int optname, void *optval,
return(ret);
}
-int _wapi_listen(guint32 handle, int backlog)
+int _wapi_listen(guint32 fd, int backlog)
{
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
int ret;
if(startup_count==0) {
@@ -512,16 +516,13 @@ int _wapi_listen(guint32 handle, int backlog)
return(SOCKET_ERROR);
}
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return(SOCKET_ERROR);
}
- ret=listen(socket_private_handle->fd, backlog);
+ ret=listen(fd, backlog);
if(ret==-1) {
gint errnum = errno;
#ifdef DEBUG
@@ -538,19 +539,18 @@ int _wapi_listen(guint32 handle, int backlog)
return(0);
}
-int _wapi_recv(guint32 handle, void *buf, size_t len, int recv_flags)
+int _wapi_recv(guint32 fd, void *buf, size_t len, int recv_flags)
{
- return(_wapi_recvfrom(handle, buf, len, recv_flags, NULL, 0));
+ return(_wapi_recvfrom(fd, buf, len, recv_flags, NULL, 0));
}
-int _wapi_recvfrom(guint32 handle, void *buf, size_t len, int recv_flags,
+int _wapi_recvfrom(guint32 fd, void *buf, size_t len, int recv_flags,
struct sockaddr *from, socklen_t *fromlen)
{
#ifndef HAVE_MSG_NOSIGNAL
void (*old_sigpipe)(int); // old SIGPIPE handler
#endif
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
int ret;
if(startup_count==0) {
@@ -558,26 +558,22 @@ int _wapi_recvfrom(guint32 handle, void *buf, size_t len, int recv_flags,
return(SOCKET_ERROR);
}
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return(SOCKET_ERROR);
}
#ifdef HAVE_MSG_NOSIGNAL
do {
- ret=recvfrom(socket_private_handle->fd, buf, len, recv_flags | MSG_NOSIGNAL, from,
+ ret=recvfrom(fd, buf, len, recv_flags | MSG_NOSIGNAL, from,
fromlen);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
#else
old_sigpipe = signal(SIGPIPE, SIG_IGN);
do {
- ret=recvfrom(socket_private_handle->fd, buf, len, recv_flags, from,
- fromlen);
+ ret=recvfrom(fd, buf, len, recv_flags, from, fromlen);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
signal(SIGPIPE, old_sigpipe);
@@ -598,13 +594,12 @@ int _wapi_recvfrom(guint32 handle, void *buf, size_t len, int recv_flags,
return(ret);
}
-int _wapi_send(guint32 handle, const void *msg, size_t len, int send_flags)
+int _wapi_send(guint32 fd, const void *msg, size_t len, int send_flags)
{
#ifndef HAVE_MSG_NOSIGNAL
void (*old_sigpipe)(int); // old SIGPIPE handler
#endif
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
int ret;
if(startup_count==0) {
@@ -612,24 +607,21 @@ int _wapi_send(guint32 handle, const void *msg, size_t len, int send_flags)
return(SOCKET_ERROR);
}
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return(SOCKET_ERROR);
}
#ifdef HAVE_MSG_NOSIGNAL
do {
- ret=send(socket_private_handle->fd, msg, len, send_flags | MSG_NOSIGNAL);
+ ret=send(fd, msg, len, send_flags | MSG_NOSIGNAL);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
#else
old_sigpipe = signal(SIGPIPE, SIG_IGN);
do {
- ret=send(socket_private_handle->fd, msg, len, send_flags);
+ ret=send(fd, msg, len, send_flags);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
signal(SIGPIPE, old_sigpipe);
@@ -649,14 +641,13 @@ int _wapi_send(guint32 handle, const void *msg, size_t len, int send_flags)
return(ret);
}
-int _wapi_sendto(guint32 handle, const void *msg, size_t len, int send_flags,
+int _wapi_sendto(guint32 fd, const void *msg, size_t len, int send_flags,
const struct sockaddr *to, socklen_t tolen)
{
#ifndef HAVE_MSG_NOSIGNAL
void (*old_sigpipe)(int); // old SIGPIPE handler
#endif
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
int ret;
if(startup_count==0) {
@@ -664,24 +655,21 @@ int _wapi_sendto(guint32 handle, const void *msg, size_t len, int send_flags,
return(SOCKET_ERROR);
}
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return(SOCKET_ERROR);
}
#ifdef HAVE_MSG_NOSIGNAL
do {
- ret=sendto(socket_private_handle->fd, msg, len, send_flags | MSG_NOSIGNAL, to, tolen);
+ ret=sendto(fd, msg, len, send_flags | MSG_NOSIGNAL, to, tolen);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
#else
old_sigpipe = signal(SIGPIPE, SIG_IGN);
do {
- ret=sendto(socket_private_handle->fd, msg, len, send_flags, to, tolen);
+ ret=sendto(fd, msg, len, send_flags, to, tolen);
}
while (ret==-1 && errno==EINTR && !_wapi_thread_cur_apc_pending());
signal(SIGPIPE, old_sigpipe);
@@ -701,11 +689,10 @@ int _wapi_sendto(guint32 handle, const void *msg, size_t len, int send_flags,
return(ret);
}
-int _wapi_setsockopt(guint32 handle, int level, int optname,
+int _wapi_setsockopt(guint32 fd, int level, int optname,
const void *optval, socklen_t optlen)
{
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
int ret;
if(startup_count==0) {
@@ -713,17 +700,13 @@ int _wapi_setsockopt(guint32 handle, int level, int optname,
return(SOCKET_ERROR);
}
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return(SOCKET_ERROR);
}
- ret=setsockopt(socket_private_handle->fd, level, optname, optval,
- optlen);
+ ret=setsockopt(fd, level, optname, optval, optlen);
if(ret==-1) {
gint errnum = errno;
#ifdef DEBUG
@@ -740,10 +723,9 @@ int _wapi_setsockopt(guint32 handle, int level, int optname,
return(ret);
}
-int _wapi_shutdown(guint32 handle, int how)
+int _wapi_shutdown(guint32 fd, int how)
{
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
int ret;
if(startup_count==0) {
@@ -751,16 +733,13 @@ int _wapi_shutdown(guint32 handle, int how)
return(SOCKET_ERROR);
}
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return(SOCKET_ERROR);
}
- ret=shutdown(socket_private_handle->fd, how);
+ ret=shutdown(fd, how);
if(ret==-1) {
gint errnum = errno;
#ifdef DEBUG
@@ -802,6 +781,18 @@ guint32 _wapi_socket(int domain, int type, int protocol, void *unused, guint32 u
return(INVALID_SOCKET);
}
+
+ if (fd >= _wapi_fd_offset_table_size) {
+#ifdef DEBUG
+ g_message (G_GNUC_PRETTY_FUNCTION ": File descriptor is too big");
+#endif
+
+ WSASetLastError (WSASYSCALLFAILURE);
+ close (fd);
+
+ return(INVALID_SOCKET);
+ }
+
mono_once (&socket_ops_once, socket_ops_init);
@@ -824,14 +815,17 @@ guint32 _wapi_socket(int domain, int type, int protocol, void *unused, guint32 u
": error looking up socket handle %p", handle);
goto cleanup;
}
- ret = GPOINTER_TO_UINT (handle);
+
+ _wapi_handle_fd_offset_store (fd, handle);
+ ret = fd;
- socket_private_handle->fd=fd;
+ socket_private_handle->fd_mapped.fd = fd;
+ socket_private_handle->fd_mapped.assigned = TRUE;
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION
": returning socket handle %p with fd %d", handle,
- socket_private_handle->fd);
+ socket_private_handle->fd_mapped.fd);
#endif
cleanup:
@@ -884,13 +878,12 @@ struct hostent *_wapi_gethostbyname(const char *hostname)
}
int
-WSAIoctl (guint32 handle, gint32 command,
- gchar *input, gint i_len,
- gchar *output, gint o_len, glong *written,
- void *unused1, void *unused2)
+WSAIoctl (guint32 fd, gint32 command,
+ gchar *input, gint i_len,
+ gchar *output, gint o_len, glong *written,
+ void *unused1, void *unused2)
{
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
int ret;
gchar *buffer = NULL;
@@ -899,12 +892,8 @@ WSAIoctl (guint32 handle, gint32 command,
return(SOCKET_ERROR);
}
- ok = _wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
-
- if (ok == FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError (WSAENOTSOCK);
return SOCKET_ERROR;
}
@@ -912,7 +901,7 @@ WSAIoctl (guint32 handle, gint32 command,
if (i_len > 0)
buffer = g_memdup (input, i_len);
- ret = ioctl (socket_private_handle->fd, command, buffer);
+ ret = ioctl (fd, command, buffer);
if (ret == -1) {
gint errnum = errno;
#ifdef DEBUG
@@ -941,10 +930,9 @@ WSAIoctl (guint32 handle, gint32 command,
return 0;
}
-int ioctlsocket(guint32 handle, gint32 command, gpointer arg)
+int ioctlsocket(guint32 fd, gint32 command, gpointer arg)
{
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
int ret;
if(startup_count==0) {
@@ -952,11 +940,8 @@ int ioctlsocket(guint32 handle, gint32 command, gpointer arg)
return(SOCKET_ERROR);
}
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return(SOCKET_ERROR);
}
@@ -976,19 +961,19 @@ int ioctlsocket(guint32 handle, gint32 command, gpointer arg)
* connect to return EINPROGRESS, but the ioctl doesn't seem to)
*/
if(command==FIONBIO) {
- ret=fcntl(socket_private_handle->fd, F_GETFL, 0);
+ ret=fcntl(fd, F_GETFL, 0);
if(ret!=-1) {
if(*(gboolean *)arg) {
ret &= ~O_NONBLOCK;
} else {
ret |= O_NONBLOCK;
}
- ret=fcntl(socket_private_handle->fd, F_SETFL, ret);
+ ret=fcntl(fd, F_SETFL, ret);
}
} else
#endif /* O_NONBLOCK */
{
- ret=ioctl(socket_private_handle->fd, command, arg);
+ ret=ioctl(fd, command, arg);
}
if(ret==-1) {
gint errnum = errno;
@@ -1036,55 +1021,43 @@ int _wapi_select(int nfds G_GNUC_UNUSED, fd_set *readfds, fd_set *writefds,
return(ret);
}
-void _wapi_FD_CLR(guint32 handle, fd_set *set)
+void _wapi_FD_CLR(guint32 fd, fd_set *set)
{
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return;
}
- FD_CLR(socket_private_handle->fd, set);
+ FD_CLR(fd, set);
}
-int _wapi_FD_ISSET(guint32 handle, fd_set *set)
+int _wapi_FD_ISSET(guint32 fd, fd_set *set)
{
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return(0);
}
- return(FD_ISSET(socket_private_handle->fd, set));
+ return(FD_ISSET(fd, set));
}
-void _wapi_FD_SET(guint32 handle, fd_set *set)
+void _wapi_FD_SET(guint32 fd, fd_set *set)
{
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (GUINT_TO_POINTER (fd));
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if(ok==FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError(WSAENOTSOCK);
return;
}
- FD_SET(socket_private_handle->fd, set);
+ FD_SET(fd, set);
}
#ifdef USE_AIO
@@ -1119,29 +1092,23 @@ async_notifier (union sigval sig)
}
static gboolean
-do_aio_call (gboolean is_read, gpointer handle, gpointer buffer,
+do_aio_call (gboolean is_read, gpointer fd_handle, gpointer buffer,
guint32 numbytes, guint32 *out_bytes,
gpointer ares,
SocketAsyncCB callback)
{
- struct _WapiHandlePrivate_socket *socket_private_handle;
- gboolean ok;
- int fd;
+ gpointer handle = _wapi_handle_fd_offset_to_handle (fd_handle);
+ int fd = GPOINTER_TO_UINT (fd_handle);
struct aiocb *aio;
int result;
notifier_data_t *ndata;
- ok=_wapi_lookup_handle (GUINT_TO_POINTER (handle), WAPI_HANDLE_SOCKET,
- NULL, (gpointer *)&socket_private_handle);
- if (ok == FALSE) {
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": error looking up socket handle 0x%x", (guint) handle);
+ if (handle == NULL ||
+ _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
WSASetLastError (WSAENOTSOCK);
return FALSE;
}
- fd = socket_private_handle->fd;
-
ndata = g_new0 (notifier_data_t, 1);
aio = g_new0 (struct aiocb, 1);
ndata->ares = ares;
diff --git a/mono/io-layer/wapi-private.h b/mono/io-layer/wapi-private.h
index 59ec8defe30..2a7203c6937 100644
--- a/mono/io-layer/wapi-private.h
+++ b/mono/io-layer/wapi-private.h
@@ -35,7 +35,7 @@
/* Increment this whenever an incompatible change is made to the
* shared handle structure.
*/
-#define _WAPI_HANDLE_VERSION 1
+#define _WAPI_HANDLE_VERSION 3
typedef enum {
WAPI_HANDLE_UNUSED=0,
@@ -59,6 +59,19 @@ typedef struct
guint32 name;
} WapiSharedNamespace;
+/* The boolean is for distinguishing between a zeroed struct being not
+ * as yet assigned, and one containing a valid fd 0. It's also used
+ * to signal that a previously-good fd has been reused behind our
+ * back, so we need to invalidate the handle that thought it owned the
+ * fd.
+ */
+typedef struct
+{
+ int fd;
+ gboolean assigned;
+} WapiFDMapped;
+
+
typedef enum {
WAPI_HANDLE_CAP_WAIT=0x01,
WAPI_HANDLE_CAP_SIGNAL=0x02,
@@ -152,6 +165,7 @@ struct _WapiHandleShared_list
{
guchar daemon[MONO_SIZEOF_SUNPATH];
_wapi_daemon_status daemon_running;
+ guint32 fd_offset_table_size;
#if defined(_POSIX_THREAD_PROCESS_SHARED) && _POSIX_THREAD_PROCESS_SHARED != -1
mono_mutex_t signal_mutex;
diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog
index 67b36e468db..d23a628905c 100644
--- a/mono/metadata/ChangeLog
+++ b/mono/metadata/ChangeLog
@@ -1,3 +1,125 @@
+2004-10-07 Jackson Harper <jackson@ximian.com>
+
+ * culture-info-tables.h: regenerate file.
+
+2004-10-07 Zoltan Varga <vargaz@freemail.hu>
+
+ * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
+ 'lib' too. Fixes #63130.
+
+2004-10-02 Ben Maurer <bmaurer@ximian.com>
+
+ * threadpool.c: the ares hashtable needs a critical section around it.
+ this prevents some nasty segfaults
+
+2004-09-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * threads.c: don't call mono_thread_detach() in start_wrapper(),
+ avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
+
+2004-09-28 Zoltan Varga <vargaz@freemail.hu>
+
+ * reflection.c (method_encode_code): Align method headers properly.
+ Fixes #66025.
+
+2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * threadpool.c: reuse allocated slots in the queue.
+
+2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * appdomain.c:
+ (mono_domain_set): allow setting a domain that is being unloaded.
+ (mono_domain_unload): invoke the DomainUnload callbacks in the domain
+ being unloaded.
+
+2004-09-18 Martin Baulig <martin@ximian.com>
+
+ * mono-debug.c, debug-mono-symfile.c: Merged my locking changes
+ from HEAD.
+
+2004-09-17 Zoltan Varga <vargaz@freemail.hu>
+
+ * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name
+ mangling.
+
+2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
+
+ * locales.c: nullify the ICU_collator member of CompareInfo when it is
+ finalized. There where random SIGSEVs at program termination, when
+ an object being finalized was trying to do a string comparison and
+ the current culture was already finalized.
+
+2004-09-16 Zoltan Varga <vargaz@freemail.hu>
+
+ * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
+ assemblies from the parent. Fixes #65665.
+
+2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
+
+ * object.c: Added a "done" flag to TypeInitializationLock. This avoids
+ false deadlock checks in class initialization.
+
+2004-09-09 Zoltan Varga <vargaz@freemail.hu>
+
+ * reflection.h reflection.c loader.c: Allow dynamic construction of
+ pinvoke methods. Fixes #65571.
+
+2004-09-08 Lluis Sanchez Gual <lluis@novell.com>
+
+ * object.c: In mono_message_invoke, fill the output parameter array after
+ calling the managed method (it was done before the call). This fixes
+ bug #59299.
+
+2004-09-08 Zoltan Varga <vargaz@freemail.hu>
+
+ * image.c (mono_image_close): Applied patch from
+ vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
+ assembly is loaded multiple times from data.
+
+ * image.c (mono_image_open): Fix warning.
+
+2004-09-07 Zoltan Varga <vargaz@freemail.hu>
+
+ * reflection.c (mono_reflection_create_runtime_class): Initialize
+ klass->nested_classes. Fixes #61224.
+
+2004-09-06 Zoltan Varga <vargaz@freemail.hu>
+
+ * reflection.c (mono_param_get_objects): Initialize the default value
+ with DBNull.Value, not null. Fixes #62123.
+
+2004-09-01 Miguel de Icaza <miguel@ximian.com>
+
+ * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
+ throw an exception with a cute explanation.
+
+2004-09-06 Dick Porter <dick@ximian.com>
+
+ * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
+ Close the new process's thread handle, as we don't use it. The
+ handle stays around forever otherwise.
+
+2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * assembly.c: provide more information when loading an assembly fails.
+
+2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * filewatcher.c: don't expect the development fam package to be
+ installed. If HAVE_KQUEUE return mode 3 to use the new kqueue
+ watcher. Patch by Geoff Norton.
+
+2004-09-02 Zoltan Varga <vargaz@freemail.hu>
+
+ * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
+ as well.
+
+2004-08-28 Ben Maurer <bmaurer@users.sourceforge.net>
+
+ * gc.c: actually enable paolo's patch to make GC warnings
+ use the trace api.
+
2004-08-23 Zoltan Varga <vargaz@freemail.hu>
* metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
@@ -11005,4 +11127,3 @@ Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
Beta2.
* mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
-
diff --git a/mono/metadata/appdomain.c b/mono/metadata/appdomain.c
index af00a3510d2..c87e2b01bf2 100644
--- a/mono/metadata/appdomain.c
+++ b/mono/metadata/appdomain.c
@@ -44,6 +44,9 @@ mono_domain_assembly_preload (MonoAssemblyName *aname,
static void
mono_domain_fire_assembly_load (MonoAssembly *assembly, gpointer user_data);
+static void
+add_assemblies_to_domain (MonoDomain *domain, MonoAssembly *ass);
+
static MonoMethod *
look_for_method_by_name (MonoClass *klass, const gchar *name);
@@ -249,12 +252,12 @@ mono_domain_try_type_resolve (MonoDomain *domain, char *name, MonoObject *tb)
* if it is being unloaded.
* Returns:
* - TRUE on success
- * - FALSE if the domain is being unloaded
+ * - FALSE if the domain is unloaded
*/
gboolean
mono_domain_set (MonoDomain *domain, gboolean force)
{
- if (!force && (domain->state == MONO_APPDOMAIN_UNLOADING || domain->state == MONO_APPDOMAIN_UNLOADED))
+ if (!force && domain->state == MONO_APPDOMAIN_UNLOADED)
return FALSE;
mono_domain_set_internal (domain);
@@ -357,10 +360,16 @@ ves_icall_System_AppDomain_getCurDomain ()
return add->domain;
}
+static void
+add_assembly_to_domain (gpointer key, gpointer value, gpointer user_data)
+{
+ add_assemblies_to_domain ((MonoDomain*)user_data, (MonoAssembly*)value);
+}
+
MonoAppDomain *
ves_icall_System_AppDomain_createDomain (MonoString *friendly_name, MonoAppDomainSetup *setup)
{
- /*MonoDomain *domain = mono_domain_get (); */
+ MonoDomain *domain = mono_domain_get ();
MonoClass *adclass;
MonoAppDomain *ad;
MonoDomain *data;
@@ -381,7 +390,10 @@ ves_icall_System_AppDomain_createDomain (MonoString *friendly_name, MonoAppDomai
mono_context_init (data);
- /* FIXME: what to do next ? */
+ /* The new appdomain should have all assemblies loaded */
+ mono_domain_lock (domain);
+ g_hash_table_foreach (domain->assemblies, add_assembly_to_domain, data);
+ mono_domain_unlock (domain);
return ad;
}
@@ -1008,10 +1020,8 @@ ves_icall_System_AppDomain_ExecuteAssembly (MonoAppDomain *ad, MonoString *file,
assembly = mono_assembly_open (filename, NULL);
g_free (filename);
- if (!assembly) {
- mono_raise_exception ((MonoException *)mono_exception_from_name (
- mono_defaults.corlib, "System.IO", "FileNotFoundException"));
- }
+ if (!assembly)
+ mono_raise_exception (mono_get_exception_file_not_found (filename));
image = assembly->image;
@@ -1120,7 +1130,7 @@ ves_icall_System_AppDomain_InternalSetContext (MonoAppContext *mc)
MONO_ARCH_SAVE_REGS;
mono_context_set (mc);
-
+
return old_context;
}
@@ -1223,6 +1233,7 @@ mono_domain_unload (MonoDomain *domain)
MonoMethod *method;
MonoObject *exc;
unload_data thread_data;
+ MonoDomain *caller_domain = mono_domain_get ();
/* printf ("UNLOAD STARTING FOR %s.\n", domain->friendly_name); */
@@ -1240,6 +1251,7 @@ mono_domain_unload (MonoDomain *domain)
g_assert_not_reached ();
}
+ mono_domain_set (domain, FALSE);
/* Notify OnDomainUnload listeners */
method = look_for_method_by_name (domain->domain->mbr.obj.vtable->klass, "DoDomainUnload");
g_assert (method);
@@ -1249,6 +1261,7 @@ mono_domain_unload (MonoDomain *domain)
if (exc) {
/* Roll back the state change */
domain->state = MONO_APPDOMAIN_CREATED;
+ mono_domain_set (caller_domain, FALSE);
mono_raise_exception ((MonoException*)exc);
}
@@ -1275,6 +1288,7 @@ mono_domain_unload (MonoDomain *domain)
; /* wait for the thread */
+ mono_domain_set (caller_domain, FALSE);
if (thread_data.failure_reason) {
MonoException *ex;
diff --git a/mono/metadata/assembly.c b/mono/metadata/assembly.c
index 2ae0d0eef7b..a0ec7467f38 100644
--- a/mono/metadata/assembly.c
+++ b/mono/metadata/assembly.c
@@ -388,6 +388,15 @@ mono_assembly_load_references (MonoImage *image, MonoImageOpenStatus *status)
image->name, aname.name);
} else {
+ char *extra_msg = g_strdup ("");
+
+ if (*status == MONO_IMAGE_ERROR_ERRNO) {
+ extra_msg = g_strdup_printf ("System error: %s\n", strerror (errno));
+ } else if (*status == MONO_IMAGE_MISSING_ASSEMBLYREF) {
+ extra_msg = g_strdup ("Cannot find an assembly referenced from this one.\n");
+ } else if (*status == MONO_IMAGE_IMAGE_INVALID) {
+ extra_msg = g_strdup ("The file exists but is not a valid assembly.\n");
+ }
for (j = 0; j < i; j++)
mono_assembly_close (references [j]);
@@ -396,11 +405,12 @@ mono_assembly_load_references (MonoImage *image, MonoImageOpenStatus *status)
g_warning ("Could not find assembly %s, references from %s (assemblyref_index=%d)\n"
" Major/Minor: %d,%d\n"
" Build: %d,%d\n"
- " Token: %s\n",
+ " Token: %s\n%s",
aname.name, image->name, i,
aname.major, aname.minor, aname.build, aname.revision,
- aname.public_key_token);
+ aname.public_key_token, extra_msg);
*status = MONO_IMAGE_MISSING_ASSEMBLYREF;
+ g_free (extra_msg);
return;
}
}
diff --git a/mono/metadata/culture-info-tables.h b/mono/metadata/culture-info-tables.h
index 08698a4cb1e..bf0699633fe 100644
--- a/mono/metadata/culture-info-tables.h
+++ b/mono/metadata/culture-info-tables.h
@@ -1,12 +1,13 @@
-
-#ifndef MONO_METADATA_CULTURE_INFO_TABLES
-#define MONO_METADATA_CULTURE_INFO_TABLES 1
-
-#define NUM_CULTURE_ENTRIES 154
+#ifndef MONO_METADATA_CULTURE_INFO_TABLES
+#define MONO_METADATA_CULTURE_INFO_TABLES 1
-
-static const DateTimeFormatEntry datetime_format_entries [] = {
+
+#define NUM_CULTURE_ENTRIES 155
+
+
+static const DateTimeFormatEntry datetime_format_entries [] = {
+ {"d MMMM, yyyy h:mm:ss t", "d MMMM, yyyy", "d/M/yyyy", "h:mm:ss t", "h:mm t", "MMMM, yyyy", "d MMMM", "\xd8\xb5", "\xd9\x85", {"\xd8\xa7\xd9\x84\xd8\xa3\xd8\xad\xd8\xaf", "\xd8\xa7\xd9\x84\xd8\xa7\xd8\xab\xd9\x86\xd9\x8a\xd9\x86", "\xd8\xa7\xd9\x84\xd8\xab\xd9\x84\xd8\xa7\xd8\xab\xd8\xa7\xd8\xa1", "\xd8\xa7\xd9\x84\xd8\xa3\xd8\xb1\xd8\xa8\xd8\xb9\xd8\xa7\xd8\xa1", "\xd8\xa7\xd9\x84\xd8\xae\xd9\x85\xd9\x8a\xd8\xb3", "\xd8\xa7\xd9\x84\xd8\xac\xd9\x85\xd8\xb9\xd8\xa9", "\xd8\xa7\xd9\x84\xd8\xb3\xd8\xa8\xd8\xaa"}, {"\xd8\xa7\xd9\x84\xd8\xa3\xd8\xad\xd8\xaf", "\xd8\xa7\xd9\x84\xd8\xa7\xd8\xab\xd9\x86\xd9\x8a\xd9\x86", "\xd8\xa7\xd9\x84\xd8\xab\xd9\x84\xd8\xa7\xd8\xab\xd8\xa7\xd8\xa1", "\xd8\xa7\xd9\x84\xd8\xa3\xd8\xb1\xd8\xa8\xd8\xb9\xd8\xa7\xd8\xa1", "\xd8\xa7\xd9\x84\xd8\xae\xd9\x85\xd9\x8a\xd8\xb3", "\xd8\xa7\xd9\x84\xd8\xac\xd9\x85\xd8\xb9\xd8\xa9", "\xd8\xa7\xd9\x84\xd8\xb3\xd8\xa8\xd8\xaa"}, {"\xd9\x8a\xd9\x86\xd8\xa7\xd9\x8a\xd8\xb1", "\xd9\x81\xd8\xa8\xd8\xb1\xd8\xa7\xd9\x8a\xd8\xb1", "\xd9\x85\xd8\xa7\xd8\xb1\xd8\xb3", "\xd8\xa3\xd8\xa8\xd8\xb1\xd9\x8a\xd9\x84", "\xd9\x85\xd8\xa7\xd9\x8a\xd9\x88", "\xd9\x8a\xd9\x88\xd9\x86\xd9\x8a\xd9\x88", "\xd9\x8a\xd9\x88\xd9\x84\xd9\x8a\xd9\x88", "\xd8\xa3\xd8\xba\xd8\xb3\xd8\xb7\xd8\xb3", "\xd8\xb3\xd8\xa8\xd8\xaa\xd9\x85\xd8\xa8\xd8\xb1", "\xd8\xa3\xd9\x83\xd8\xaa\xd9\x88\xd8\xa8\xd8\xb1", "\xd9\x86\xd9\x88\xd9\x81\xd9\x85\xd8\xa8\xd8\xb1", "\xd8\xaf\xd9\x8a\xd8\xb3\xd9\x85\xd8\xa8\xd8\xb1"}, {"\xd9\x8a\xd9\x86\xd8\xa7\xd9\x8a\xd8\xb1", "\xd9\x81\xd8\xa8\xd8\xb1\xd8\xa7\xd9\x8a\xd8\xb1", "\xd9\x85\xd8\xa7\xd8\xb1\xd8\xb3", "\xd8\xa3\xd8\xa8\xd8\xb1\xd9\x8a\xd9\x84", "\xd9\x85\xd8\xa7\xd9\x8a\xd9\x88", "\xd9\x8a\xd9\x88\xd9\x86\xd9\x8a\xd9\x88", "\xd9\x8a\xd9\x88\xd9\x84\xd9\x8a\xd9\x88", "\xd8\xa3\xd8\xba\xd8\xb3\xd8\xb7\xd8\xb3", "\xd8\xb3\xd8\xa8\xd8\xaa\xd9\x85\xd8\xa8\xd8\xb1", "\xd8\xa3\xd9\x83\xd8\xaa\xd9\x88\xd8\xa8\xd8\xb1", "\xd9\x86\xd9\x88\xd9\x81\xd9\x85\xd8\xa8\xd8\xb1", "\xd8\xaf\xd9\x8a\xd8\xb3\xd9\x85\xd8\xa8\xd8\xb1", ""}, 0, 0, "/", ":", {0},{0},{0},{0}},
{"dd MMMM yyyy HH:mm:ss", "dd MMMM yyyy", "dd.M.yyyy '\xd0\xb3.'", "HH:mm:ss", "HH:mm", "MMMM yyyy", "dd MMMM", "AM", "PM", {"\xd0\xbd\xd0\xb5\xd0\xb4\xd0\xb5\xd0\xbb\xd1\x8f", "\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb5\xd0\xb4\xd0\xb5\xd0\xbb\xd0\xbd\xd0\xb8\xd0\xba", "\xd0\xb2\xd1\x82\xd0\xbe\xd1\x80\xd0\xbd\xd0\xb8\xd0\xba", "\xd1\x81\xd1\x80\xd1\x8f\xd0\xb4\xd0\xb0", "\xd1\x87\xd0\xb5\xd1\x82\xd0\xb2\xd1\x8a\xd1\x80\xd1\x82\xd1\x8a\xd0\xba", "\xd0\xbf\xd0\xb5\xd1\x82\xd1\x8a\xd0\xba", "\xd1\x81\xd1\x8a\xd0\xb1\xd0\xbe\xd1\x82\xd0\xb0"}, {"\xd0\xbd\xd0\xb5\xd0\xb4.", "\xd0\xbf\xd0\xbe\xd0\xbd.", "\xd0\xb2\xd1\x82.", "\xd1\x81\xd1\x80.", "\xd1\x87\xd0\xb5\xd1\x82\xd0\xb2.", "\xd0\xbf\xd0\xb5\xd1\x82.", "\xd1\x81\xd1\x8a\xd0\xb1."}, {"\xd1\x8f\xd0\xbd\xd1\x83\xd0\xb0\xd1\x80\xd0\xb8", "\xd1\x84\xd0\xb5\xd0\xb2\xd1\x80\xd1\x83\xd0\xb0\xd1\x80\xd0\xb8", "\xd0\xbc\xd0\xb0\xd1\x80\xd1\x82", "\xd0\xb0\xd0\xbf\xd1\x80\xd0\xb8\xd0\xbb", "\xd0\xbc\xd0\xb0\xd0\xb9", "\xd1\x8e\xd0\xbd\xd0\xb8", "\xd1\x8e\xd0\xbb\xd0\xb8", "\xd0\xb0\xd0\xb2\xd0\xb3\xd1\x83\xd1\x81\xd1\x82", "\xd1\x81\xd0\xb5\xd0\xbf\xd1\x82\xd0\xb5\xd0\xbc\xd0\xb2\xd1\x80\xd0\xb8", "\xd0\xbe\xd0\xba\xd1\x82\xd0\xbe\xd0\xbc\xd0\xb2\xd1\x80\xd0\xb8", "\xd0\xbd\xd0\xbe\xd0\xb5\xd0\xbc\xd0\xb2\xd1\x80\xd0\xb8", "\xd0\xb4\xd0\xb5\xd0\xba\xd0\xb5\xd0\xbc\xd0\xb2\xd1\x80\xd0\xb8"}, {"\xd1\x8f\xd0\xbd.", "\xd1\x84\xd0\xb5\xd0\xb2.", "\xd0\xbc\xd0\xb0\xd1\x80\xd1\x82", "\xd0\xb0\xd0\xbf\xd1\x80.", "\xd0\xbc\xd0\xb0\xd0\xb9", "\xd1\x8e\xd0\xbd\xd0\xb8", "\xd1\x8e\xd0\xbb\xd0\xb8", "\xd0\xb0\xd0\xb2\xd0\xb3.", "\xd1\x81\xd0\xb5\xd0\xbf.", "\xd0\xbe\xd0\xba\xd1\x82.", "\xd0\xbd\xd0\xbe\xd0\xb5\xd0\xbc.", "\xd0\xb4\xd0\xb5\xd0\xba.", ""}, 0, 0, "/", ":", {0},{0},{0},{0}},
{"d MMMM yyyy HH:mm:ss z", "d MMMM yyyy", "dd/MM/yyyy", "HH:mm:ss", "HH:mm", "MMMM yyyy", "dd MMMM", "AM", "PM", {"diumenge", "dilluns", "dimarts", "dimecres", "dijous", "divendres", "dissabte"}, {"dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."}, {"gener", "febrer", "mar\xc3\xa7", "abril", "maig", "juny", "juliol", "agost", "setembre", "octubre", "novembre", "desembre"}, {"gen.", "feb.", "mar\xc3\xa7", "abr.", "maig", "juny", "jul.", "ag.", "set.", "oct.", "nov.", "des.", ""}, 0, 0, "/", ":", {0},{0},{0},{0}},
{"d. MMMM yyyy H:mm:ss z", "d. MMMM yyyy", "d.M.yyyy", "H:mm:ss", "H:mm", "MMMM yyyy", "d. MMMM", "dop.", "odp.", {"ned\xc4\x9ble", "pond\xc4\x9bl\xc3\xad", "\xc3\xbater\xc3\xbd", "st\xc5\x99\x65\x64\x61", "\xc4\x8dtvrtek", "p\xc3\xa1tek", "sobota"}, {"ne", "po", "\xc3\xbat", "st", "\xc4\x8dt", "p\xc3\xa1", "so"}, {"leden", "\xc3\xbanor", "b\xc5\x99\x65zen", "duben", "kv\xc4\x9bten", "\xc4\x8d\x65rven", "\xc4\x8d\x65rvenec", "srpen", "z\xc3\xa1\xc5\x99\xc3\xad", "\xc5\x99\xc3\xadjen", "listopad", "prosinec"}, {"I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", ""}, 0, 0, "/", ":", {0},{0},{0},{0}},
@@ -20,10 +21,10 @@ static const DateTimeFormatEntry datetime_format_entries [] = {
{"yyyy. MMMM d. H:mm:ss z", "yyyy. MMMM d.", "yyyy. MM. dd.", "H:mm:ss", "H:mm", "yyyy. MMMM", "MMMM d", "DE", "DU", {"vas\xc3\xa1rnap", "h\xc3\xa9tf\xc5\x91", "kedd", "szerda", "cs\xc3\xbct\xc3\xb6rt\xc3\xb6k", "p\xc3\xa9ntek", "szombat"}, {"V", "H", "K", "Sze", "Cs", "P", "Szo"}, {"janu\xc3\xa1r", "febru\xc3\xa1r", "m\xc3\xa1rcius", "\xc3\xa1prilis", "m\xc3\xa1jus", "j\xc3\xbanius", "j\xc3\xbalius", "augusztus", "szeptember", "okt\xc3\xb3\x62\x65r", "november", "december"}, {"jan.", "febr.", "m\xc3\xa1rc.", "\xc3\xa1pr.", "m\xc3\xa1j.", "j\xc3\xban.", "j\xc3\xbal.", "aug.", "szept.", "okt.", "nov.", "dec.", ""}, 0, 0, "/", ":", {0},{0},{0},{0}},
{"d. MMMM yyyy HH:mm:ss z", "d. MMMM yyyy", "d.M.yyyy", "HH:mm:ss", "HH:mm", "MMMM yyyy", "d. MMMM", "AM", "PM", {"sunnudagur", "m\xc3\xa1nudagur", "\xc3\xberi\xc3\xb0judagur", "mi\xc3\xb0vikudagur", "fimmtudagur", "f\xc3\xb6studagur", "laugardagur"}, {"sun", "m\xc3\xa1n", "\xc3\xberi", "mi\xc3\xb0", "fim", "f\xc3\xb6s", "lau"}, {"jan\xc3\xba\x61r", "febr\xc3\xba\x61r", "mars", "apr\xc3\xadl", "ma\xc3\xad", "j\xc3\xban\xc3\xad", "j\xc3\xbal\xc3\xad", "\xc3\xa1g\xc3\xbast", "september", "okt\xc3\xb3\x62\x65r", "n\xc3\xb3vember", "desember"}, {"jan", "feb", "mar", "apr", "ma\xc3\xad", "j\xc3\xban", "j\xc3\xbal", "\xc3\xa1g\xc3\xba", "sep", "okt", "n\xc3\xb3v", "des", ""}, 0, 0, "/", ":", {0},{0},{0},{0}},
{"dd MMMM yyyy H:mm:ss z", "dd MMMM yyyy", "dd/MM/yyyy", "H.mm.ss", "HH:mm", "MMMM yyyy", "d MMMM", "m.", "p.", {"domenica", "luned\xc3\xac", "marted\xc3\xac", "mercoled\xc3\xac", "gioved\xc3\xac", "venerd\xc3\xac", "sabato"}, {"dom", "lun", "mar", "mer", "gio", "ven", "sab"}, {"gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"}, {"gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic", ""}, 0, 0, "/", ":", {0},{0},{0},{0}},
- {"yyyy'\xe5\xb9\xb4'M'\xe6\x9c\x88'd'\xe6\x97\xa5' H:mm:ss", "yyyy'\xe5\xb9\xb4'M'\xe6\x9c\x88'd'\xe6\x97\xa5'", "yyyy/MM/dd", "H:mm:ss", "H:mm", "yyyy'\xe5\xb9\xb4'M", "M'\xe6\x9c\x88'd", "\xe5\x8d\x88\xe5\x89\x8d", "\xe5\x8d\x88\xe5\xbe\x8c", {"\xe6\x97\xa5\xe6\x9b\x9c\xe6\x97\xa5", "\xe6\x9c\x88\xe6\x9b\x9c\xe6\x97\xa5", "\xe7\x81\xab\xe6\x9b\x9c\xe6\x97\xa5", "\xe6\xb0\xb4\xe6\x9b\x9c\xe6\x97\xa5", "\xe6\x9c\xa8\xe6\x9b\x9c\xe6\x97\xa5", "\xe9\x87\x91\xe6\x9b\x9c\xe6\x97\xa5", "\xe5\x9c\x9f\xe6\x9b\x9c\xe6\x97\xa5"}, {"\xe6\x97\xa5", "\xe6\x9c\x88", "\xe7\x81\xab", "\xe6\xb0\xb4", "\xe6\x9c\xa8", "\xe9\x87\x91", "\xe5\x9c\x9f"}, {"1\xe6\x9c\x88", "2\xe6\x9c\x88", "3\xe6\x9c\x88", "4\xe6\x9c\x88", "5\xe6\x9c\x88", "6\xe6\x9c\x88", "7\xe6\x9c\x88", "8\xe6\x9c\x88", "9\xe6\x9c\x88", "10\xe6\x9c\x88", "11\xe6\x9c\x88", "12\xe6\x9c\x88"}, {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", ""}, 0, 0, "/", ":", {"yyyy/MM/dd","yy/MM/dd","yy/M/d","yyyy/M/d","yy/MM/dd' ('ddd')'","yy/M/d' ('ddd')'","yyyy/M/d' ('ddd')'"},{"yyyy'\xe5\xb9\xb4'M'\xe6\x9c\x88'd'\xe6\x97\xa5'","yyyy'\xe5\xb9\xb4'MM'\xe6\x9c\x88'dd'\xe6\x97\xa5'","yyyy'\xe5\xb9\xb4'M'\xe6\x9c\x88'd'\xe6\x97\xa5' dddd","yyyy'\xe5\xb9\xb4'MM'\xe6\x9c\x88'dd'\xe6\x97\xa5' dddd"},{"H:mm","HH:mm","tt h:mm","tt hh:mm"},{"H:mm:ss","HH:mm:ss","tt h:mm:ss","tt hh:mm:ss"}},
+ {"yyyy'\xe5\xb9\xb4'M'\xe6\x9c\x88'd'\xe6\x97\xa5' H:mm:ss:z", "yyyy'\xe5\xb9\xb4'M'\xe6\x9c\x88'd'\xe6\x97\xa5'", "yyyy/MM/dd", "H:mm:ss:z", "H:mm", "yyyy'\xe5\xb9\xb4'M", "M'\xe6\x9c\x88'd", "\xe5\x8d\x88\xe5\x89\x8d", "\xe5\x8d\x88\xe5\xbe\x8c", {"\xe6\x97\xa5\xe6\x9b\x9c\xe6\x97\xa5", "\xe6\x9c\x88\xe6\x9b\x9c\xe6\x97\xa5", "\xe7\x81\xab\xe6\x9b\x9c\xe6\x97\xa5", "\xe6\xb0\xb4\xe6\x9b\x9c\xe6\x97\xa5", "\xe6\x9c\xa8\xe6\x9b\x9c\xe6\x97\xa5", "\xe9\x87\x91\xe6\x9b\x9c\xe6\x97\xa5", "\xe5\x9c\x9f\xe6\x9b\x9c\xe6\x97\xa5"}, {"\xe6\x97\xa5", "\xe6\x9c\x88", "\xe7\x81\xab", "\xe6\xb0\xb4", "\xe6\x9c\xa8", "\xe9\x87\x91", "\xe5\x9c\x9f"}, {"1\xe6\x9c\x88", "2\xe6\x9c\x88", "3\xe6\x9c\x88", "4\xe6\x9c\x88", "5\xe6\x9c\x88", "6\xe6\x9c\x88", "7\xe6\x9c\x88", "8\xe6\x9c\x88", "9\xe6\x9c\x88", "10\xe6\x9c\x88", "11\xe6\x9c\x88", "12\xe6\x9c\x88"}, {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", ""}, 0, 0, "/", ":", {"yyyy/MM/dd","yy/MM/dd","yy/M/d","yyyy/M/d","yy/MM/dd' ('ddd')'","yy/M/d' ('ddd')'","yyyy/M/d' ('ddd')'"},{"yyyy'\xe5\xb9\xb4'M'\xe6\x9c\x88'd'\xe6\x97\xa5'","yyyy'\xe5\xb9\xb4'MM'\xe6\x9c\x88'dd'\xe6\x97\xa5'","yyyy'\xe5\xb9\xb4'M'\xe6\x9c\x88'd'\xe6\x97\xa5' dddd","yyyy'\xe5\xb9\xb4'MM'\xe6\x9c\x88'dd'\xe6\x97\xa5' dddd"},{"H:mm","HH:mm","tt h:mm","tt hh:mm"},{"H:mm:ss","HH:mm:ss","tt h:mm:ss","tt hh:mm:ss"}},
{"yyyy'\xeb\x85\x84' M'\xec\x9b\x94' d'\xec\x9d\xbc' t hh'\xec\x8b\x9c' mm'\xeb\xb6\x84' ss'\xec\xb4\x88'", "yyyy'\xeb\x85\x84' M'\xec\x9b\x94' d'\xec\x9d\xbc'", "yyyy-MM-dd tt", "h:mm:ss", "t h:mm", "yyyy'\xeb\x85\x84' M", "M'\xec\x9b\x94' d", "\xec\x98\xa4\xec\xa0\x84", "\xec\x98\xa4\xed\x9b\x84", {"\xec\x9d\xbc\xec\x9a\x94\xec\x9d\xbc", "\xec\x9b\x94\xec\x9a\x94\xec\x9d\xbc", "\xed\x99\x94\xec\x9a\x94\xec\x9d\xbc", "\xec\x88\x98\xec\x9a\x94\xec\x9d\xbc", "\xeb\xaa\xa9\xec\x9a\x94\xec\x9d\xbc", "\xea\xb8\x88\xec\x9a\x94\xec\x9d\xbc", "\xed\x86\xa0\xec\x9a\x94\xec\x9d\xbc"}, {"\xec\x9d\xbc", "\xec\x9b\x94", "\xed\x99\x94", "\xec\x88\x98", "\xeb\xaa\xa9", "\xea\xb8\x88", "\xed\x86\xa0"}, {"1\xec\x9b\x94", "2\xec\x9b\x94", "3\xec\x9b\x94", "4\xec\x9b\x94", "5\xec\x9b\x94", "6\xec\x9b\x94", "7\xec\x9b\x94", "8\xec\x9b\x94", "9\xec\x9b\x94", "10\xec\x9b\x94", "11\xec\x9b\x94", "12\xec\x9b\x94"}, {"1\xec\x9b\x94", "2\xec\x9b\x94", "3\xec\x9b\x94", "4\xec\x9b\x94", "5\xec\x9b\x94", "6\xec\x9b\x94", "7\xec\x9b\x94", "8\xec\x9b\x94", "9\xec\x9b\x94", "10\xec\x9b\x94", "11\xec\x9b\x94", "12\xec\x9b\x94", ""}, 0, 0, "/", ":", {0},{0},{0},{0}},
{"d MMMM yyyy H:mm:ss z", "d MMMM yyyy", "d-M-yyyy", "H:mm:ss", "H:mm", "MMMM yyyy", "d MMMM", "AM", "PM", {"zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"}, {"zo", "ma", "di", "wo", "do", "vr", "za"}, {"januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"}, {"jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec", ""}, 0, 0, "/", ":", {0},{0},{0},{0}},
- {"d MMMM yyyy HH:mm:ss z", "d MMMM yyyy", "yyyy-MM-dd", "HH:mm:ss", "HH:mm", "MMMM yyyy", "d MMMM", "AM", "PM", {"niedziela", "poniedzia?ek", "wtorek", "?roda", "czwartek", "pi?tek", "sobota"}, {"N", "Pn", "Wt", "?r", "Cz", "Pt", "So"}, {"stycze?", "luty", "marzec", "kwiecie?", "maj", "czerwiec", "lipiec", "sierpie?", "wrzesie?", "pa?dziernik", "listopad", "grudzie?"}, {"sty", "lut", "mar", "kwi", "maj", "cze", "lip", "sie", "wrz", "pa?", "lis", "gru", ""}, 0, 0, "/", ":", {0},{0},{0},{0}},
+ {"d MMMM yyyy HH:mm:ss z", "d MMMM yyyy", "yyyy-MM-dd", "HH:mm:ss", "HH:mm", "MMMM yyyy", "d MMMM", "AM", "PM", {"niedziela", "poniedzia\xc5\x82\x65k", "wtorek", "\xc5\x9broda", "czwartek", "pi\xc4\x85tek", "sobota"}, {"N", "Pn", "Wt", "\xc5\x9ar", "Cz", "Pt", "So"}, {"stycze\xc5\x84", "luty", "marzec", "kwiecie\xc5\x84", "maj", "czerwiec", "lipiec", "sierpie\xc5\x84", "wrzesie\xc5\x84", "pa\xc5\xba\x64ziernik", "listopad", "grudzie\xc5\x84"}, {"sty", "lut", "mar", "kwi", "maj", "cze", "lip", "sie", "wrz", "pa\xc5\xba", "lis", "gru", ""}, 0, 0, "/", ":", {0},{0},{0},{0}},
{"d' de 'MMMM' de 'yyyy H'h'm'min's's' z", "d' de 'MMMM' de 'yyyy", "d/M/yyyy", "HH:mm:ss", "HH:mm", "MMMM' de 'yyyy", "d' de 'MMMM", "AM", "PM", {"domingo", "segunda-feira", "ter\xc3\xa7\x61-feira", "quarta-feira", "quinta-feira", "sexta-feira", "s\xc3\xa1\x62\x61\x64o"}, {"dom", "seg", "ter", "qua", "qui", "sex", "s\xc3\xa1\x62"}, {"janeiro", "fevereiro", "mar\xc3\xa7o", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"}, {"jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez", ""}, 0, 0, "/", ":", {0},{0},{0},{0}},
{"d MMMM yyyy HH:mm:ss z", "d MMMM yyyy", "dd.MM.yyyy", "HH:mm:ss", "HH:mm", "MMMM yyyy", "d MMMM", "AM", "PM", {"duminic\xc4\x83", "luni", "mar\xc5\xa3i", "miercuri", "joi", "vineri", "s\xc3\xaemb\xc4\x83t\xc4\x83"}, {"D", "L", "Ma", "Mi", "J", "V", "S"}, {"ianuarie", "februarie", "martie", "aprilie", "mai", "iunie", "iulie", "august", "septembrie", "octombrie", "noiembrie", "decembrie"}, {"Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Nov", "Dec", ""}, 0, 0, "/", ":", {0},{0},{0},{0}},
{"d MMMM yyyy '\xd0\xb3.' H:mm:ss z", "d MMMM yyyy '\xd0\xb3.'", "dd.MM.yyyy", "H:mm:ss", "H:mm", "MMMM yyyy", "d MMMM", "AM", "PM", {"\xd0\xb2\xd0\xbe\xd1\x81\xd0\xba\xd1\x80\xd0\xb5\xd1\x81\xd0\xb5\xd0\xbd\xd1\x8c\xd0\xb5", "\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb5\xd0\xb4\xd0\xb5\xd0\xbb\xd1\x8c\xd0\xbd\xd0\xb8\xd0\xba", "\xd0\xb2\xd1\x82\xd0\xbe\xd1\x80\xd0\xbd\xd0\xb8\xd0\xba", "\xd1\x81\xd1\x80\xd0\xb5\xd0\xb4\xd0\xb0", "\xd1\x87\xd0\xb5\xd1\x82\xd0\xb2\xd0\xb5\xd1\x80\xd0\xb3", "\xd0\xbf\xd1\x8f\xd1\x82\xd0\xbd\xd0\xb8\xd1\x86\xd0\xb0", "\xd1\x81\xd1\x83\xd0\xb1\xd0\xb1\xd0\xbe\xd1\x82\xd0\xb0"}, {"\xd0\x92\xd1\x81", "\xd0\x9f\xd0\xbd", "\xd0\x92\xd1\x82", "\xd0\xa1\xd1\x80", "\xd0\xa7\xd1\x82", "\xd0\x9f\xd1\x82", "\xd0\xa1\xd0\xb1"}, {"\xd0\xaf\xd0\xbd\xd0\xb2\xd0\xb0\xd1\x80\xd1\x8c", "\xd0\xa4\xd0\xb5\xd0\xb2\xd1\x80\xd0\xb0\xd0\xbb\xd1\x8c", "\xd0\x9c\xd0\xb0\xd1\x80\xd1\x82", "\xd0\x90\xd0\xbf\xd1\x80\xd0\xb5\xd0\xbb\xd1\x8c", "\xd0\x9c\xd0\xb0\xd0\xb9", "\xd0\x98\xd1\x8e\xd0\xbd\xd1\x8c", "\xd0\x98\xd1\x8e\xd0\xbb\xd1\x8c", "\xd0\x90\xd0\xb2\xd0\xb3\xd1\x83\xd1\x81\xd1\x82", "\xd0\xa1\xd0\xb5\xd0\xbd\xd1\x82\xd1\x8f\xd0\xb1\xd1\x80\xd1\x8c", "\xd0\x9e\xd0\xba\xd1\x82\xd1\x8f\xd0\xb1\xd1\x80\xd1\x8c", "\xd0\x9d\xd0\xbe\xd1\x8f\xd0\xb1\xd1\x80\xd1\x8c", "\xd0\x94\xd0\xb5\xd0\xba\xd0\xb0\xd0\xb1\xd1\x80\xd1\x8c"}, {"\xd1\x8f\xd0\xbd\xd0\xb2", "\xd1\x84\xd0\xb5\xd0\xb2", "\xd0\xbc\xd0\xb0\xd1\x80", "\xd0\xb0\xd0\xbf\xd1\x80", "\xd0\xbc\xd0\xb0\xd0\xb9", "\xd0\xb8\xd1\x8e\xd0\xbd", "\xd0\xb8\xd1\x8e\xd0\xbb", "\xd0\xb0\xd0\xb2\xd0\xb3", "\xd1\x81\xd0\xb5\xd0\xbd", "\xd0\xbe\xd0\xba\xd1\x82", "\xd0\xbd\xd0\xbe\xd1\x8f", "\xd0\xb4\xd0\xb5\xd0\xba", ""}, 0, 0, "/", ":", {0},{0},{0},{0}},
@@ -112,8 +113,9 @@ static const DateTimeFormatEntry datetime_format_entries [] = {
{"d' de 'MMMM' de 'yyyy hh:mm:ss t z", "d' de 'MMMM' de 'yyyy", "dd/MM/yyyy", "hh:mm:ss tt", "hh:mm t", "MMMM' de 'yyyy", "d' de 'MMMM", "a.m.", "p.m.", {"domingo", "lunes", "martes", "mi\xc3\xa9rcoles", "jueves", "viernes", "s\xc3\xa1\x62\x61\x64o"}, {"dom", "lun", "mar", "mi\xc3\xa9", "jue", "vie", "s\xc3\xa1\x62"}, {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, {"ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic", ""}, 0, 0, "/", ":", {0},{0},{0},{0}}
};
-
-static const NumberFormatEntry number_format_entries [] = {
+
+static const NumberFormatEntry number_format_entries [] = {
+ {"\xd9\xab", "\xd9\xac", "\xd9\xab", "\xd9\xac", "\xd9\xab", "\xd9\xac", "\xd8\xb1.\xd8\xb3.\xe2\x80\x8f", "\xd9\xaa", "\xef\xbf\xbd", "\xe2\x80\xb0", "-\xe2\x88\x9e", "\xe2\x88\x9e", "-", "+", 1, 0, 1, 1, 3, 2, 2, 2, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}},
{",", "\xc2\xa0", ",", "\xc2\xa0", ",", "\xc2\xa0", "\xd0\xbb\xd0\xb2.", "%", "\xef\xbf\xbd", "\xe2\x80\xb0", "-\xe2\x88\x9e", "\xe2\x88\x9e", "-", "+", 8, 3, 1, 1, 1, 2, 2, 2, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}},
{",", ".", ",", ".", ",", ".", "\xe2\x82\xac", "%", "\xef\xbf\xbd", "\xe2\x80\xb0", "-\xe2\x88\x9e", "\xe2\x88\x9e", "-", "+", 8, 3, 0, 0, 1, 2, 2, 2, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}},
{",", "\xc2\xa0", ",", "\xc2\xa0", ",", "\xc2\xa0", "K\xc4\x8d", "%", "\xef\xbf\xbd", "\xe2\x80\xb0", "-\xe2\x88\x9e", "\xe2\x88\x9e", "-", "+", 8, 3, 1, 1, 1, 2, 2, 2, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}},
@@ -130,8 +132,8 @@ static const NumberFormatEntry number_format_entries [] = {
{".", ",", ".", ",", ".", ",", "\\", "%", "NaN", "\xe2\x80\xb0", "-Infinity", "Infinity", "-", "+", 1, 0, 1, 1, 1, 0, 2, 2, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}},
{".", ",", ".", ",", ".", ",", "\xef\xbf\xa6", "%", "NaN", "\xe2\x80\xb0", "-Infinity", "Infinity", "-", "+", 0, 0, 0, 0, 1, 0, 2, 2, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}},
{",", ".", ",", ".", ",", ".", "\xe2\x82\xac", "%", "\xef\xbf\xbd", "\xe2\x80\xb0", "-\xe2\x88\x9e", "\xe2\x88\x9e", "-", "+", 11, 2, 0, 0, 1, 2, 2, 2, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}},
- {",", "?", ",", "?", ",", "?", "z?", "%", "?", "\xe2\x80\xb0", "-\xe2\x88\x9e", "\xe2\x88\x9e", "-", "+", 8, 3, 1, 1, 1, 2, 2, 2, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}},
- {",", ".", ",", ".", ",", ".", "R$", "%", "\xef\xbf\xbd", "\xe2\x80\xb0", "-\xe2\x88\x9e", "\xe2\x88\x9e", "-", "+", 0, 0, 1, 1, 1, 0, 2, 2, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}},
+ {",", "\xc2\xa0", ",", "\xc2\xa0", ",", "\xc2\xa0", "z\xc5\x82", "%", "\xef\xbf\xbd", "\xe2\x80\xb0", "-\xe2\x88\x9e", "\xe2\x88\x9e", "-", "+", 8, 3, 1, 1, 1, 2, 2, 2, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}},
+ {",", ".", ",", ".", ",", ".", "R$ ", "%", "\xef\xbf\xbd", "\xe2\x80\xb0", "-\xe2\x88\x9e", "\xe2\x88\x9e", "-", "+", 0, 0, 1, 1, 1, 2, 2, 2, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}},
{",", ".", ",", ".", ",", ".", "lei", "%", "\xef\xbf\xbd", "\xe2\x80\xb0", "-\xe2\x88\x9e", "\xe2\x88\x9e", "-", "+", 8, 3, 1, 1, 1, 2, 2, 2, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}},
{",", "\xc2\xa0", ",", "\xc2\xa0", ",", "\xc2\xa0", "\xd1\x80.", "%", "\xef\xbf\xbd", "\xe2\x80\xb0", "-\xe2\x88\x9e", "\xe2\x88\x9e", "-", "+", 5, 1, 1, 1, 1, 2, 2, 2, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}},
{",", ".", ",", ".", ",", ".", "Kn", "%", "\xef\xbf\xbd", "\xe2\x80\xb0", "-\xe2\x88\x9e", "\xe2\x88\x9e", "-", "+", 9, 2, 1, 1, 1, 2, 2, 2, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}},
@@ -219,8 +221,8 @@ static const NumberFormatEntry number_format_entries [] = {
{".", ",", ".", ",", ".", ",", "$", "%", "NaN", "\xe2\x80\xb0", "-Infinity", "Infinity", "-", "+", 0, 0, 1, 1, 1, 2, 2, 2, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}, {3, -1, -1, -1, -1}}
};
-
-static const CultureInfoEntry culture_entries [] = {
+
+static const CultureInfoEntry culture_entries [] = {
{0x0001, 0x007F, 0x0401, "ar", "Arabic", "Arabic", "Arabic", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9", "ARA", "ara", "ar", {0, 0, 0, 0, 0}, -1, -1},
{0x0002, 0x007F, 0x0402, "bg", "Bulgarian", "Bulgarian", "Bulgarian", "\xd0\x91\xd1\x8a\xd0\xbb\xd0\xb3\xd0\xb0\xd1\x80\xd1\x81\xd0\xba\xd0\xb8", "BGR", "bul", "bg", {0, 0, 0, 0, 0}, -1, -1},
{0x0003, 0x007F, 0x0403, "ca", "Catalan", "Catalan", "Catalan", "catal\xc3\xa0", "CAT", "cat", "ca", {0, 0, 0, 0, 0}, -1, -1},
@@ -272,269 +274,271 @@ static const CultureInfoEntry culture_entries [] = {
{0x004E, 0x007F, 0x044E, "mr", "Marathi", "Marathi", "Marathi", "\xe0\xa4\xae\xe0\xa4\xb0\xe0\xa4\xbe\xe0\xa4\xa0\xe0\xa5\x80", "MAR", "mar", "mr", {0, 0, 0, 0, 0}, -1, -1},
{0x0056, 0x007F, 0x0456, "gl", "Gallegan", "Gallegan", "Gallegan", "galego", "GLC", "glg", "gl", {0, 0, 0, 0, 0}, -1, -1},
{0x0057, 0x007F, 0x0457, "kok", "Konkani", "Konkani", "Konkani", "\xe0\xa4\x95\xe0\xa5\x8b\xe0\xa4\x82\xe0\xa4\x95\xe0\xa4\xa3\xe0\xa5\x80", "KNK", "kok", "hi", {0, 0, 0, 0, 0}, -1, -1},
- {0x0402, 0x0002, 0x0402, "bg-BG", "Bulgarian (Bulgaria)", "Bulgarian (Bulgaria)", "Bulgarian (Bulgaria)", "\xd0\x91\xd1\x8a\xd0\xbb\xd0\xb3\xd0\xb0\xd1\x80\xd1\x81\xd0\xba\xd0\xb8 (\xd0\x91\xd1\x8a\xd0\xbb\xd0\xb3\xd0\xb0\xd1\x80\xd0\xb8\xd1\x8f)", "BGR", "bul", "bg", {0, 0, 0, 0, 0}, 0, 0},
- {0x0403, 0x0003, 0x0403, "ca-ES", "Catalan (Spain)", "Catalan (Spain)", "Catalan (Spain)", "catal\xc3\xa0 (Espanya)", "CAT", "cat", "ca", {0, 0, 0, 0, 0}, 1, 1},
- {0x0405, 0x0005, 0x0405, "cs-CZ", "Czech (Czech Republic)", "Czech (Czech Republic)", "Czech (Czech Republic)", "\xc4\x8c\x65\xc5\xa1tina (\xc4\x8c\x65sk\xc3\xa1 republika)", "CSY", "ces", "cs", {0, 0, 0, 0, 0}, 2, 2},
- {0x0406, 0x0006, 0x0406, "da-DK", "Danish (Denmark)", "Danish (Denmark)", "Danish (Denmark)", "Dansk (Danmark)", "DAN", "dan", "da", {0, 0, 0, 0, 0}, 3, 3},
- {0x0407, 0x0007, 0x0407, "de-DE", "German (Germany)", "German (Germany)", "German (Germany)", "Deutsch (Deutschland)", "DEU", "deu", "de", {0, 0, 0, 0, 0}, 4, 4},
- {0x0408, 0x0008, 0x0408, "el-GR", "Greek (Greece)", "Greek (Greece)", "Greek (Greece)", "\xce\x95\xce\xbb\xce\xbb\xce\xb7\xce\xbd\xce\xb9\xce\xba\xce\xac (\xce\x95\xce\xbb\xce\xbb\xce\xac\xce\xb4\xce\xb1)", "ELL", "ell", "el", {0, 0, 0, 0, 0}, 5, 5},
- {0x0409, 0x0009, 0x0409, "en-US", "English (United States)", "English (United States)", "English (United States)", "English (United States)", "ENU", "eng", "en", {0, 0, 0, 0, 0}, 6, 6},
- {0x040B, 0x000B, 0x040B, "fi-FI", "Finnish (Finland)", "Finnish (Finland)", "Finnish (Finland)", "suomi (Suomi)", "FIN", "fin", "fi", {0, 0, 0, 0, 0}, 7, 7},
- {0x040C, 0x000C, 0x040C, "fr-FR", "French (France)", "French (France)", "French (France)", "fran\xc3\xa7\x61is (France)", "FRA", "fra", "fr", {0, 0, 0, 0, 0}, 8, 8},
- {0x040D, 0x000D, 0x040D, "he-IL", "Hebrew (Israel)", "Hebrew (Israel)", "Hebrew (Israel)", "\xd7\xa2\xd7\x91\xd7\xa8\xd7\x99\xd7\xaa (\xd7\x99\xd7\xa9\xd7\xa8\xd7\x90\xd7\x9c)", "HEB", "heb", "he", {0, 0, 0, 0, 0}, 9, 9},
- {0x040E, 0x000E, 0x040E, "hu-HU", "Hungarian (Hungary)", "Hungarian (Hungary)", "Hungarian (Hungary)", "magyar (Magyarorsz\xc3\xa1g)", "HUN", "hun", "hu", {0, 0, 0, 0, 0}, 10, 10},
- {0x040F, 0x000F, 0x040F, "is-IS", "Icelandic (Iceland)", "Icelandic (Iceland)", "Icelandic (Iceland)", "\xc3\xadslenska (\xc3\x8dsland)", "ISL", "isl", "is", {0, 0, 0, 0, 0}, 11, 11},
- {0x0410, 0x0010, 0x0410, "it-IT", "Italian (Italy)", "Italian (Italy)", "Italian (Italy)", "italiano (Italia)", "ITA", "ita", "it", {0, 0, 0, 0, 0}, 12, 12},
- {0x0411, 0x0011, 0x0411, "ja-JP", "Japanese (Japan)", "Japanese (Japan)", "Japanese (Japan)", "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e (\xe6\x97\xa5\xe6\x9c\xac)", "JPN", "jpn", "ja", {0, 0, 0, 0, 0}, 13, 13},
- {0x0412, 0x0012, 0x0412, "ko-KR", "Korean (South Korea)", "Korean (South Korea)", "Korean (South Korea)", "\xed\x95\x9c\xea\xb5\xad\xec\x96\xb4 (\xeb\x8c\x80\xed\x95\x9c\xeb\xaf\xbc\xea\xb5\xad)", "KOR", "kor", "ko", {0, 0, 0, 0, 0}, 14, 14},
- {0x0413, 0x0013, 0x0413, "nl-NL", "Dutch (Netherlands)", "Dutch (Netherlands)", "Dutch (Netherlands)", "Nederlands (Nederland)", "NLD", "nld", "nl", {0, 0, 0, 0, 0}, 15, 15},
- {0x0415, 0x0015, 0x0415, "pl-PL", "Polish (Poland)", "Polish (Poland)", "Polish (Poland)", "polski (Polska)", "PLK", "pol", "pl", {0, 0, 0, 0, 0}, 16, 16},
- {0x0416, 0x0016, 0x0416, "pt-BR", "Portuguese (Brazil)", "Portuguese (Brazil)", "Portuguese (Brazil)", "portugu\xc3\xaas (Brasil)", "PTB", "por", "pt", {0, 0, 0, 0, 0}, 17, 17},
- {0x0418, 0x0018, 0x0418, "ro-RO", "Romanian (Romania)", "Romanian (Romania)", "Romanian (Romania)", "Rom\xc3\xa2n\xc4\x83 (Rom\xc3\xa2nia)", "ROM", "ron", "ro", {0, 0, 0, 0, 0}, 18, 18},
- {0x0419, 0x0019, 0x0419, "ru-RU", "Russian (Russia)", "Russian (Russia)", "Russian (Russia)", "\xd0\xa0\xd1\x83\xd1\x81\xd1\x81\xd0\xba\xd0\xb8\xd0\xb9 (\xd0\xa0\xd0\xbe\xd1\x81\xd1\x81\xd0\xb8\xd1\x8f)", "RUS", "rus", "ru", {0, 0, 0, 0, 0}, 19, 19},
- {0x041A, 0x001A, 0x041A, "hr-HR", "Croatian (Croatia)", "Croatian (Croatia)", "Croatian (Croatia)", "hrvatski (Hrvatska)", "HRV", "hrv", "hr", {0, 0, 0, 0, 0}, 20, 20},
- {0x041B, 0x001B, 0x041B, "sk-SK", "Slovak (Slovakia)", "Slovak (Slovakia)", "Slovak (Slovakia)", "slovensk\xc3\xbd (Slovensk\xc3\xa1 republika)", "SKY", "slk", "sk", {0, 0, 0, 0, 0}, 21, 21},
- {0x041C, 0x001C, 0x041C, "sq-AL", "Albanian (Albania)", "Albanian (Albania)", "Albanian (Albania)", "shqipe (Shqip\xc3\xabria)", "SQI", "sqi", "sq", {0, 0, 0, 0, 0}, 22, 22},
- {0x041D, 0x001D, 0x041D, "sv-SE", "Swedish (Sweden)", "Swedish (Sweden)", "Swedish (Sweden)", "svenska (Sverige)", "SVE", "swe", "sv", {0, 0, 0, 0, 0}, 23, 23},
- {0x041E, 0x001E, 0x041E, "th-TH", "Thai (Thailand)", "Thai (Thailand)", "Thai (Thailand)", "\xe0\xb9\x84\xe0\xb8\x97\xe0\xb8\xa2 (\xe0\xb8\x9b\xe0\xb8\xa3\xe0\xb8\xb0\xe0\xb9\x80\xe0\xb8\x97\xe0\xb8\xa8\xe0\xb9\x84\xe0\xb8\x97\xe0\xb8\xa2)", "THA", "tha", "th", {0, 0, 0, 0, 0}, 24, 24},
- {0x041F, 0x001F, 0x041F, "tr-TR", "Turkish (Turkey)", "Turkish (Turkey)", "Turkish (Turkey)", "T\xc3\xbcrk\xc3\xa7\x65 (T\xc3\xbcrkiye)", "TRK", "tur", "tr", {0, 0, 0, 0, 0}, 25, 25},
- {0x0421, 0x0021, 0x0421, "id-ID", "Indonesian (Indonesia)", "Indonesian (Indonesia)", "Indonesian (Indonesia)", "Bahasa Indonesia (Indonesia)", "IND", "ind", "id", {0, 0, 0, 0, 0}, 26, 26},
- {0x0422, 0x0022, 0x0422, "uk-UA", "Ukrainian (Ukraine)", "Ukrainian (Ukraine)", "Ukrainian (Ukraine)", "\xd0\xa3\xd0\xba\xd1\x80\xd0\xb0\xd1\x97\xd0\xbd\xd1\x81\xd1\x8c\xd0\xba\xd0\xb0 (\xd0\xa3\xd0\xba\xd1\x80\xd0\xb0\xd1\x97\xd0\xbd\xd0\xb0)", "UKR", "ukr", "uk", {0, 0, 0, 0, 0}, 27, 27},
- {0x0423, 0x0023, 0x0423, "be-BY", "Belarusian (Belarus)", "Belarusian (Belarus)", "Belarusian (Belarus)", "\xd0\x91\xd0\xb5\xd0\xbb\xd0\xb0\xd1\x80\xd1\x83\xd1\x81\xd0\xba\xd1\x96 (\xd0\x91\xd0\xb5\xd0\xbb\xd0\xb0\xd1\x80\xd1\x83\xd1\x81\xd1\x8c)", "BEL", "bel", "be", {0, 0, 0, 0, 0}, 28, 28},
- {0x0424, 0x0024, 0x0424, "sl-SI", "Slovenian (Slovenia)", "Slovenian (Slovenia)", "Slovenian (Slovenia)", "Sloven\xc5\xa1\xc4\x8dina (Slovenija)", "SLV", "slv", "sl", {0, 0, 0, 0, 0}, 29, 29},
- {0x0425, 0x0025, 0x0425, "et-EE", "Estonian (Estonia)", "Estonian (Estonia)", "Estonian (Estonia)", "Eesti (Eesti)", "ETI", "est", "et", {0, 0, 0, 0, 0}, 30, 30},
- {0x0426, 0x0026, 0x0426, "lv-LV", "Latvian (Latvia)", "Latvian (Latvia)", "Latvian (Latvia)", "latvie\xc5\xa1u (Latvija)", "LVI", "lav", "lv", {0, 0, 0, 0, 0}, 31, 31},
- {0x0427, 0x0027, 0x0427, "lt-LT", "Lithuanian (Lithuania)", "Lithuanian (Lithuania)", "Lithuanian (Lithuania)", "Lietuvi\xc5\xb3 (Lietuva)", "LTH", "lit", "lt", {0, 0, 0, 0, 0}, 32, 32},
- {0x0429, 0x0029, 0x0429, "fa-IR", "Persian (Iran)", "Persian (Iran)", "Persian (Iran)", "\xd9\x81\xd8\xa7\xd8\xb1\xd8\xb3\xdb\x8c (\xd8\xa7\xdb\x8c\xd8\xb1\xd8\xa7\xd9\x86)", "FAR", "fas", "fa", {0, 0, 0, 0, 0}, 33, 33},
- {0x042A, 0x002A, 0x042A, "vi-VN", "Vietnamese (Vietnam)", "Vietnamese (Vietnam)", "Vietnamese (Vietnam)", "Ti\xe1\xba\xbfng Vi\xe1\xbb\x87t (Vi\xe1\xbb\x87t Nam)", "VIT", "vie", "vi", {0, 0, 0, 0, 0}, 34, 34},
- {0x042B, 0x002B, 0x042B, "hy-AM", "Armenian (Armenia)", "Armenian (Armenia)", "Armenian (Armenia)", "\xd5\x80\xd5\xa1\xd5\xb5\xd5\xa5\xd6\x80\xd5\xa7\xd5\xb6 (\xd5\x80\xd5\xa1\xd5\xb5\xd5\xa1\xd5\xbd\xd5\xbf\xd5\xa1\xd5\xb6\xd5\xab \xd5\x80\xd5\xa1\xd5\xb6\xd6\x80\xd5\xa1\xd5\xba\xd5\xa5\xd5\xbf\xd5\xb8\xd6\x82\xd5\xa9\xd5\xab\xd6\x82\xd5\xb6)", "HYE", "hye", "hy", {0, 0, 0, 0, 0}, 35, 35},
+ {0x0401, 0x0001, 0x0401, "ar-SA", "Arabic (Saudi Arabia)", "Arabic (Saudi Arabia)", "Arabic (Saudi Arabia)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xb3\xd8\xb9\xd9\x88\xd8\xaf\xd9\x8a\xd8\xa9)", "ARA", "ara", "ar", {16777216, 0, 0, 0, 0}, 0, 0},
+ {0x0402, 0x0002, 0x0402, "bg-BG", "Bulgarian (Bulgaria)", "Bulgarian (Bulgaria)", "Bulgarian (Bulgaria)", "\xd0\x91\xd1\x8a\xd0\xbb\xd0\xb3\xd0\xb0\xd1\x80\xd1\x81\xd0\xba\xd0\xb8 (\xd0\x91\xd1\x8a\xd0\xbb\xd0\xb3\xd0\xb0\xd1\x80\xd0\xb8\xd1\x8f)", "BGR", "bul", "bg", {0, 0, 0, 0, 0}, 1, 1},
+ {0x0403, 0x0003, 0x0403, "ca-ES", "Catalan (Spain)", "Catalan (Spain)", "Catalan (Spain)", "catal\xc3\xa0 (Espanya)", "CAT", "cat", "ca", {0, 0, 0, 0, 0}, 2, 2},
+ {0x0405, 0x0005, 0x0405, "cs-CZ", "Czech (Czech Republic)", "Czech (Czech Republic)", "Czech (Czech Republic)", "\xc4\x8c\x65\xc5\xa1tina (\xc4\x8c\x65sk\xc3\xa1 republika)", "CSY", "ces", "cs", {0, 0, 0, 0, 0}, 3, 3},
+ {0x0406, 0x0006, 0x0406, "da-DK", "Danish (Denmark)", "Danish (Denmark)", "Danish (Denmark)", "Dansk (Danmark)", "DAN", "dan", "da", {0, 0, 0, 0, 0}, 4, 4},
+ {0x0407, 0x0007, 0x0407, "de-DE", "German (Germany)", "German (Germany)", "German (Germany)", "Deutsch (Deutschland)", "DEU", "deu", "de", {0, 0, 0, 0, 0}, 5, 5},
+ {0x0408, 0x0008, 0x0408, "el-GR", "Greek (Greece)", "Greek (Greece)", "Greek (Greece)", "\xce\x95\xce\xbb\xce\xbb\xce\xb7\xce\xbd\xce\xb9\xce\xba\xce\xac (\xce\x95\xce\xbb\xce\xbb\xce\xac\xce\xb4\xce\xb1)", "ELL", "ell", "el", {0, 0, 0, 0, 0}, 6, 6},
+ {0x0409, 0x0009, 0x0409, "en-US", "English (United States)", "English (United States)", "English (United States)", "English (United States)", "ENU", "eng", "en", {0, 0, 0, 0, 0}, 7, 7},
+ {0x040B, 0x000B, 0x040B, "fi-FI", "Finnish (Finland)", "Finnish (Finland)", "Finnish (Finland)", "suomi (Suomi)", "FIN", "fin", "fi", {0, 0, 0, 0, 0}, 8, 8},
+ {0x040C, 0x000C, 0x040C, "fr-FR", "French (France)", "French (France)", "French (France)", "fran\xc3\xa7\x61is (France)", "FRA", "fra", "fr", {0, 0, 0, 0, 0}, 9, 9},
+ {0x040D, 0x000D, 0x040D, "he-IL", "Hebrew (Israel)", "Hebrew (Israel)", "Hebrew (Israel)", "\xd7\xa2\xd7\x91\xd7\xa8\xd7\x99\xd7\xaa (\xd7\x99\xd7\xa9\xd7\xa8\xd7\x90\xd7\x9c)", "HEB", "heb", "he", {0, 0, 0, 0, 0}, 10, 10},
+ {0x040E, 0x000E, 0x040E, "hu-HU", "Hungarian (Hungary)", "Hungarian (Hungary)", "Hungarian (Hungary)", "magyar (Magyarorsz\xc3\xa1g)", "HUN", "hun", "hu", {0, 0, 0, 0, 0}, 11, 11},
+ {0x040F, 0x000F, 0x040F, "is-IS", "Icelandic (Iceland)", "Icelandic (Iceland)", "Icelandic (Iceland)", "\xc3\xadslenska (\xc3\x8dsland)", "ISL", "isl", "is", {0, 0, 0, 0, 0}, 12, 12},
+ {0x0410, 0x0010, 0x0410, "it-IT", "Italian (Italy)", "Italian (Italy)", "Italian (Italy)", "italiano (Italia)", "ITA", "ita", "it", {0, 0, 0, 0, 0}, 13, 13},
+ {0x0411, 0x0011, 0x0411, "ja-JP", "Japanese (Japan)", "Japanese (Japan)", "Japanese (Japan)", "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e (\xe6\x97\xa5\xe6\x9c\xac)", "JPN", "jpn", "ja", {0, 0, 0, 0, 0}, 14, 14},
+ {0x0412, 0x0012, 0x0412, "ko-KR", "Korean (South Korea)", "Korean (South Korea)", "Korean (South Korea)", "\xed\x95\x9c\xea\xb5\xad\xec\x96\xb4 (\xeb\x8c\x80\xed\x95\x9c\xeb\xaf\xbc\xea\xb5\xad)", "KOR", "kor", "ko", {0, 0, 0, 0, 0}, 15, 15},
+ {0x0413, 0x0013, 0x0413, "nl-NL", "Dutch (Netherlands)", "Dutch (Netherlands)", "Dutch (Netherlands)", "Nederlands (Nederland)", "NLD", "nld", "nl", {0, 0, 0, 0, 0}, 16, 16},
+ {0x0415, 0x0015, 0x0415, "pl-PL", "Polish (Poland)", "Polish (Poland)", "Polish (Poland)", "polski (Polska)", "PLK", "pol", "pl", {0, 0, 0, 0, 0}, 17, 17},
+ {0x0416, 0x0016, 0x0416, "pt-BR", "Portuguese (Brazil)", "Portuguese (Brazil)", "Portuguese (Brazil)", "portugu\xc3\xaas (Brasil)", "PTB", "por", "pt", {0, 0, 0, 0, 0}, 18, 18},
+ {0x0418, 0x0018, 0x0418, "ro-RO", "Romanian (Romania)", "Romanian (Romania)", "Romanian (Romania)", "Rom\xc3\xa2n\xc4\x83 (Rom\xc3\xa2nia)", "ROM", "ron", "ro", {0, 0, 0, 0, 0}, 19, 19},
+ {0x0419, 0x0019, 0x0419, "ru-RU", "Russian (Russia)", "Russian (Russia)", "Russian (Russia)", "\xd0\xa0\xd1\x83\xd1\x81\xd1\x81\xd0\xba\xd0\xb8\xd0\xb9 (\xd0\xa0\xd0\xbe\xd1\x81\xd1\x81\xd0\xb8\xd1\x8f)", "RUS", "rus", "ru", {0, 0, 0, 0, 0}, 20, 20},
+ {0x041A, 0x001A, 0x041A, "hr-HR", "Croatian (Croatia)", "Croatian (Croatia)", "Croatian (Croatia)", "hrvatski (Hrvatska)", "HRV", "hrv", "hr", {0, 0, 0, 0, 0}, 21, 21},
+ {0x041B, 0x001B, 0x041B, "sk-SK", "Slovak (Slovakia)", "Slovak (Slovakia)", "Slovak (Slovakia)", "slovensk\xc3\xbd (Slovensk\xc3\xa1 republika)", "SKY", "slk", "sk", {0, 0, 0, 0, 0}, 22, 22},
+ {0x041C, 0x001C, 0x041C, "sq-AL", "Albanian (Albania)", "Albanian (Albania)", "Albanian (Albania)", "shqipe (Shqip\xc3\xabria)", "SQI", "sqi", "sq", {0, 0, 0, 0, 0}, 23, 23},
+ {0x041D, 0x001D, 0x041D, "sv-SE", "Swedish (Sweden)", "Swedish (Sweden)", "Swedish (Sweden)", "svenska (Sverige)", "SVE", "swe", "sv", {0, 0, 0, 0, 0}, 24, 24},
+ {0x041E, 0x001E, 0x041E, "th-TH", "Thai (Thailand)", "Thai (Thailand)", "Thai (Thailand)", "\xe0\xb9\x84\xe0\xb8\x97\xe0\xb8\xa2 (\xe0\xb8\x9b\xe0\xb8\xa3\xe0\xb8\xb0\xe0\xb9\x80\xe0\xb8\x97\xe0\xb8\xa8\xe0\xb9\x84\xe0\xb8\x97\xe0\xb8\xa2)", "THA", "tha", "th", {0, 0, 0, 0, 0}, 25, 25},
+ {0x041F, 0x001F, 0x041F, "tr-TR", "Turkish (Turkey)", "Turkish (Turkey)", "Turkish (Turkey)", "T\xc3\xbcrk\xc3\xa7\x65 (T\xc3\xbcrkiye)", "TRK", "tur", "tr", {0, 0, 0, 0, 0}, 26, 26},
+ {0x0421, 0x0021, 0x0421, "id-ID", "Indonesian (Indonesia)", "Indonesian (Indonesia)", "Indonesian (Indonesia)", "Bahasa Indonesia (Indonesia)", "IND", "ind", "id", {0, 0, 0, 0, 0}, 27, 27},
+ {0x0422, 0x0022, 0x0422, "uk-UA", "Ukrainian (Ukraine)", "Ukrainian (Ukraine)", "Ukrainian (Ukraine)", "\xd0\xa3\xd0\xba\xd1\x80\xd0\xb0\xd1\x97\xd0\xbd\xd1\x81\xd1\x8c\xd0\xba\xd0\xb0 (\xd0\xa3\xd0\xba\xd1\x80\xd0\xb0\xd1\x97\xd0\xbd\xd0\xb0)", "UKR", "ukr", "uk", {0, 0, 0, 0, 0}, 28, 28},
+ {0x0423, 0x0023, 0x0423, "be-BY", "Belarusian (Belarus)", "Belarusian (Belarus)", "Belarusian (Belarus)", "\xd0\x91\xd0\xb5\xd0\xbb\xd0\xb0\xd1\x80\xd1\x83\xd1\x81\xd0\xba\xd1\x96 (\xd0\x91\xd0\xb5\xd0\xbb\xd0\xb0\xd1\x80\xd1\x83\xd1\x81\xd1\x8c)", "BEL", "bel", "be", {0, 0, 0, 0, 0}, 29, 29},
+ {0x0424, 0x0024, 0x0424, "sl-SI", "Slovenian (Slovenia)", "Slovenian (Slovenia)", "Slovenian (Slovenia)", "Sloven\xc5\xa1\xc4\x8dina (Slovenija)", "SLV", "slv", "sl", {0, 0, 0, 0, 0}, 30, 30},
+ {0x0425, 0x0025, 0x0425, "et-EE", "Estonian (Estonia)", "Estonian (Estonia)", "Estonian (Estonia)", "Eesti (Eesti)", "ETI", "est", "et", {0, 0, 0, 0, 0}, 31, 31},
+ {0x0426, 0x0026, 0x0426, "lv-LV", "Latvian (Latvia)", "Latvian (Latvia)", "Latvian (Latvia)", "latvie\xc5\xa1u (Latvija)", "LVI", "lav", "lv", {0, 0, 0, 0, 0}, 32, 32},
+ {0x0427, 0x0027, 0x0427, "lt-LT", "Lithuanian (Lithuania)", "Lithuanian (Lithuania)", "Lithuanian (Lithuania)", "Lietuvi\xc5\xb3 (Lietuva)", "LTH", "lit", "lt", {0, 0, 0, 0, 0}, 33, 33},
+ {0x0429, 0x0029, 0x0429, "fa-IR", "Persian (Iran)", "Persian (Iran)", "Persian (Iran)", "\xd9\x81\xd8\xa7\xd8\xb1\xd8\xb3\xdb\x8c (\xd8\xa7\xdb\x8c\xd8\xb1\xd8\xa7\xd9\x86)", "FAR", "fas", "fa", {0, 0, 0, 0, 0}, 34, 34},
+ {0x042A, 0x002A, 0x042A, "vi-VN", "Vietnamese (Vietnam)", "Vietnamese (Vietnam)", "Vietnamese (Vietnam)", "Ti\xe1\xba\xbfng Vi\xe1\xbb\x87t (Vi\xe1\xbb\x87t Nam)", "VIT", "vie", "vi", {0, 0, 0, 0, 0}, 35, 35},
{0x042B, 0x002B, 0x042B, "hy-AM", "Armenian (Armenia)", "Armenian (Armenia)", "Armenian (Armenia)", "\xd5\x80\xd5\xa1\xd5\xb5\xd5\xa5\xd6\x80\xd5\xa7\xd5\xb6 (\xd5\x80\xd5\xa1\xd5\xb5\xd5\xa1\xd5\xbd\xd5\xbf\xd5\xa1\xd5\xb6\xd5\xab \xd5\x80\xd5\xa1\xd5\xb6\xd6\x80\xd5\xa1\xd5\xba\xd5\xa5\xd5\xbf\xd5\xb8\xd6\x82\xd5\xa9\xd5\xab\xd6\x82\xd5\xb6)", "HYE", "hye", "hy", {0, 0, 0, 0, 0}, 36, 36},
- {0x042D, 0x002D, 0x042D, "eu-ES", "Basque (Spain)", "Basque (Spain)", "Basque (Spain)", "euskara (Espainia)", "EUQ", "eus", "eu", {0, 0, 0, 0, 0}, 37, 37},
- {0x042F, 0x002F, 0x042F, "mk-MK", "Macedonian (Macedonia)", "Macedonian (Macedonia)", "Macedonian (Macedonia)", "\xd0\xbc\xd0\xb0\xd0\xba\xd0\xb5\xd0\xb4\xd0\xbe\xd0\xbd\xd1\x81\xd0\xba\xd0\xb8 (\xd0\x9c\xd0\xb0\xd0\xba\xd0\xb5\xd0\xb4\xd0\xbe\xd0\xbd\xd0\xb8\xd1\x98\xd0\xb0)", "MKI", "mkd", "mk", {0, 0, 0, 0, 0}, 38, 38},
- {0x0436, 0x0036, 0x0436, "af-ZA", "Afrikaans (South Africa)", "Afrikaans (South Africa)", "Afrikaans (South Africa)", "Afrikaanse (Suid-Afrika)", "AFK", "afr", "af", {0, 0, 0, 0, 0}, 39, 39},
- {0x0438, 0x0038, 0x0438, "fo-FO", "Faroese (Faroe Islands)", "Faroese (Faroe Islands)", "Faroese (Faroe Islands)", "f\xc3\xb8royskt (F\xc3\xb8royar)", "FOS", "fao", "fo", {0, 0, 0, 0, 0}, 40, 40},
- {0x0439, 0x0039, 0x0439, "hi-IN", "Hindi (India)", "Hindi (India)", "Hindi (India)", "\xe0\xa4\xb9\xe0\xa4\xbf\xe0\xa4\x82\xe0\xa4\xa6\xe0\xa5\x80 (\xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xa4)", "HIN", "hin", "hi", {0, 0, 0, 0, 0}, 41, 41},
- {0x0441, 0x0041, 0x0441, "sw-KE", "Swahili (Kenya)", "Swahili (Kenya)", "Swahili (Kenya)", "Kiswahili (Kenya)", "SWK", "swa", "sw", {0, 0, 0, 0, 0}, 42, 42},
- {0x0447, 0x0047, 0x0447, "gu-IN", "Gujarati (India)", "Gujarati (India)", "Gujarati (India)", "\xe0\xaa\x97\xe0\xab\x81\xe0\xaa\x9c\xe0\xaa\xb0\xe0\xaa\xbe\xe0\xaa\xa4\xe0\xab\x80 (\xe0\xaa\xad\xe0\xaa\xbe\xe0\xaa\xb0\xe0\xaa\xa4)", "GUJ", "guj", "gu", {0, 0, 0, 0, 0}, 43, 43},
- {0x0449, 0x0049, 0x0449, "ta-IN", "Tamil (India)", "Tamil (India)", "Tamil (India)", "\xe0\xae\xa4\xe0\xae\xae\xe0\xae\xbf\xe0\xae\xb4\xe0\xaf\x8d (\xe0\xae\x87\xe0\xae\xa8\xe0\xaf\x8d\xe0\xae\xa4\xe0\xae\xbf\xe0\xae\xaf\xe0\xae\xbe)", "TAM", "tam", "ta", {0, 0, 0, 0, 0}, 44, 44},
- {0x044A, 0x004A, 0x044A, "te-IN", "Telugu (India)", "Telugu (India)", "Telugu (India)", "\xe0\xb0\xa4\xe0\xb1\x86\xe0\xb0\xb2\xe0\xb1\x81\xe0\xb0\x97\xe0\xb1\x81 (\xe0\xb0\xad\xe0\xb0\xbe\xe0\xb0\xb0\xe0\xb0\xa4 \xe0\xb0\xa6\xe0\xb1\x87\xe0\xb0\xb3\xe0\xb1\xa6)", "TEL", "tel", "te", {0, 0, 0, 0, 0}, 45, 45},
- {0x044B, 0x004B, 0x044B, "kn-IN", "Kannada (India)", "Kannada (India)", "Kannada (India)", "\xe0\xb2\x95\xe0\xb2\xa8\xe0\xb3\x8d\xe0\xb2\xa8\xe0\xb2\xa1 (\xe0\xb2\xad\xe0\xb2\xbe\xe0\xb2\xb0\xe0\xb2\xa4)", "KAN", "kan", "kn", {0, 0, 0, 0, 0}, 46, 46},
- {0x044E, 0x004E, 0x044E, "mr-IN", "Marathi (India)", "Marathi (India)", "Marathi (India)", "\xe0\xa4\xae\xe0\xa4\xb0\xe0\xa4\xbe\xe0\xa4\xa0\xe0\xa5\x80 (\xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xa4)", "MAR", "mar", "mr", {0, 0, 0, 0, 0}, 47, 47},
- {0x0456, 0x0056, 0x0456, "gl-ES", "Gallegan (Spain)", "Gallegan (Spain)", "Gallegan (Spain)", "galego (Espa\xc3\xb1\x61)", "GLC", "glg", "gl", {0, 0, 0, 0, 0}, 48, 48},
- {0x0457, 0x0057, 0x0457, "kok-IN", "Konkani (India)", "Konkani (India)", "Konkani (India)", "\xe0\xa4\x95\xe0\xa5\x8b\xe0\xa4\x82\xe0\xa4\x95\xe0\xa4\xa3\xe0\xa5\x80 (\xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xa4)", "KNK", "kok", "kok", {0, 0, 0, 0, 0}, 49, 49},
- {0x0801, 0x0001, 0x0801, "ar-IQ", "Arabic (Iraq)", "Arabic (Iraq)", "Arabic (Iraq)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82)", "ARI", "ara", "ar", {2, 1, 0, 0, 0}, 50, 50},
- {0x0807, 0x0007, 0x0807, "de-CH", "German (Switzerland)", "German (Switzerland)", "German (Switzerland)", "Deutsch (Schweiz)", "DES", "deu", "de", {0, 0, 0, 0, 0}, 51, 51},
- {0x0809, 0x0009, 0x0809, "en-GB", "English (United Kingdom)", "English (United Kingdom)", "English (United Kingdom)", "English (United Kingdom)", "ENG", "eng", "en", {0, 0, 0, 0, 0}, 52, 52},
- {0x080A, 0x000A, 0x080A, "es-MX", "Spanish (Mexico)", "Spanish (Mexico)", "Spanish (Mexico)", "espa\xc3\xb1ol (M\xc3\xa9xico)", "ESM", "spa", "es", {0, 0, 0, 0, 0}, 53, 53},
- {0x080C, 0x000C, 0x080C, "fr-BE", "French (Belgium)", "French (Belgium)", "French (Belgium)", "fran\xc3\xa7\x61is (Belgique)", "FRB", "fra", "fr", {0, 0, 0, 0, 0}, 54, 54},
- {0x0810, 0x0010, 0x0810, "it-CH", "Italian (Switzerland)", "Italian (Switzerland)", "Italian (Switzerland)", "italiano (Svizzera)", "ITS", "ita", "it", {0, 0, 0, 0, 0}, 55, 55},
- {0x0813, 0x0013, 0x0813, "nl-BE", "Dutch (Belgium)", "Dutch (Belgium)", "Dutch (Belgium)", "Nederlands (Belgi\xc3\xab)", "NLB", "nld", "nl", {0, 0, 0, 0, 0}, 56, 56},
- {0x0816, 0x0016, 0x0816, "pt-PT", "Portuguese (Portugal)", "Portuguese (Portugal)", "Portuguese (Portugal)", "portugu\xc3\xaas (Portugal)", "PTG", "por", "pt", {0, 0, 0, 0, 0}, 57, 57},
- {0x081D, 0x001D, 0x081D, "sv-FI", "Swedish (Finland)", "Swedish (Finland)", "Swedish (Finland)", "svenska (Finland)", "SVF", "swe", "sv", {0, 0, 0, 0, 0}, 58, 58},
- {0x0C01, 0x0001, 0x0C01, "ar-EG", "Arabic (Egypt)", "Arabic (Egypt)", "Arabic (Egypt)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd9\x85\xd8\xb5\xd8\xb1)", "ARE", "ara", "ar", {16777216, 0, 0, 0, 0}, 59, 59},
- {0x0C07, 0x0007, 0x0C07, "de-AT", "German (Austria)", "German (Austria)", "German (Austria)", "Deutsch (\xc3\x96sterreich)", "DEA", "deu", "de", {0, 0, 0, 0, 0}, 60, 60},
- {0x0C09, 0x0009, 0x0C09, "en-AU", "English (Australia)", "English (Australia)", "English (Australia)", "English (Australia)", "ENA", "eng", "en", {0, 0, 0, 0, 0}, 61, 61},
- {0x0C0A, 0x000A, 0x0C0A, "es-ES", "Spanish (Spain)", "Spanish (Spain)", "Spanish (Spain)", "espa\xc3\xb1ol (Espa\xc3\xb1\x61)", "ESN", "spa", "es", {0, 0, 0, 0, 0}, 62, 62},
- {0x0C0C, 0x000C, 0x0C0C, "fr-CA", "French (Canada)", "French (Canada)", "French (Canada)", "fran\xc3\xa7\x61is (Canada)", "FRC", "fra", "fr", {0, 0, 0, 0, 0}, 63, 63},
- {0x1001, 0x0001, 0x1001, "ar-LY", "Arabic (Libya)", "Arabic (Libya)", "Arabic (Libya)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd9\x84\xd9\x8a\xd8\xa8\xd9\x8a\xd8\xa7)", "ARL", "ara", "ar", {16777216, 0, 0, 0, 0}, 64, 64},
- {0x1007, 0x0007, 0x1007, "de-LU", "German (Luxembourg)", "German (Luxembourg)", "German (Luxembourg)", "Deutsch (Luxemburg)", "DEL", "deu", "de", {0, 0, 0, 0, 0}, 65, 65},
- {0x1009, 0x0009, 0x1009, "en-CA", "English (Canada)", "English (Canada)", "English (Canada)", "English (Canada)", "ENC", "eng", "en", {0, 0, 0, 0, 0}, 66, 66},
- {0x100A, 0x000A, 0x100A, "es-GT", "Spanish (Guatemala)", "Spanish (Guatemala)", "Spanish (Guatemala)", "espa\xc3\xb1ol (Guatemala)", "ESG", "spa", "es", {0, 0, 0, 0, 0}, 67, 67},
- {0x100C, 0x000C, 0x100C, "fr-CH", "French (Switzerland)", "French (Switzerland)", "French (Switzerland)", "fran\xc3\xa7\x61is (Suisse)", "FRS", "fra", "fr", {0, 0, 0, 0, 0}, 68, 68},
- {0x1401, 0x0001, 0x1401, "ar-DZ", "Arabic (Algeria)", "Arabic (Algeria)", "Arabic (Algeria)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd8\xac\xd8\xb2\xd8\xa7\xd8\xa6\xd8\xb1)", "ARG", "ara", "ar", {16777216, 0, 0, 0, 0}, 69, 69},
- {0x1409, 0x0009, 0x1409, "en-NZ", "English (New Zealand)", "English (New Zealand)", "English (New Zealand)", "English (New Zealand)", "ENZ", "eng", "en", {0, 0, 0, 0, 0}, 70, 70},
- {0x140A, 0x000A, 0x140A, "es-CR", "Spanish (Costa Rica)", "Spanish (Costa Rica)", "Spanish (Costa Rica)", "espa\xc3\xb1ol (Costa Rica)", "ESC", "spa", "es", {0, 0, 0, 0, 0}, 71, 71},
- {0x140C, 0x000C, 0x140C, "fr-LU", "French (Luxembourg)", "French (Luxembourg)", "French (Luxembourg)", "fran\xc3\xa7\x61is (Luxembourg)", "FRL", "fra", "fr", {0, 0, 0, 0, 0}, 72, 72},
- {0x1801, 0x0001, 0x1801, "ar-MA", "Arabic (Morocco)", "Arabic (Morocco)", "Arabic (Morocco)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd9\x85\xd8\xba\xd8\xb1\xd8\xa8)", "ARM", "ara", "ar", {16777216, 0, 0, 0, 0}, 73, 73},
- {0x1809, 0x0009, 0x1809, "en-IE", "English (Ireland)", "English (Ireland)", "English (Ireland)", "English (Ireland)", "ENI", "eng", "en", {0, 0, 0, 0, 0}, 74, 74},
- {0x180A, 0x000A, 0x180A, "es-PA", "Spanish (Panama)", "Spanish (Panama)", "Spanish (Panama)", "espa\xc3\xb1ol (Panam\xc3\xa1)", "ESA", "spa", "es", {0, 0, 0, 0, 0}, 75, 75},
- {0x1C01, 0x0001, 0x1C01, "ar-TN", "Arabic (Tunisia)", "Arabic (Tunisia)", "Arabic (Tunisia)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xaa\xd9\x88\xd9\x86\xd8\xb3)", "ART", "ara", "ar", {16777216, 0, 0, 0, 0}, 76, 76},
- {0x1C09, 0x0009, 0x1C09, "en-ZA", "English (South Africa)", "English (South Africa)", "English (South Africa)", "English (South Africa)", "ENS", "eng", "en", {0, 0, 0, 0, 0}, 77, 77},
- {0x1C0A, 0x000A, 0x1C0A, "es-DO", "Spanish (Dominican Republic)", "Spanish (Dominican Republic)", "Spanish (Dominican Republic)", "espa\xc3\xb1ol (Rep\xc3\xba\x62lica Dominicana)", "ESD", "spa", "es", {0, 0, 0, 0, 0}, 78, 78},
- {0x2001, 0x0001, 0x2001, "ar-OM", "Arabic (Oman)", "Arabic (Oman)", "Arabic (Oman)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xb9\xd9\x85\xd8\xa7\xd9\x86)", "ARO", "ara", "ar", {16777216, 0, 0, 0, 0}, 79, 79},
- {0x200A, 0x000A, 0x200A, "es-VE", "Spanish (Venezuela)", "Spanish (Venezuela)", "Spanish (Venezuela)", "espa\xc3\xb1ol (Venezuela)", "ESV", "spa", "es", {0, 0, 0, 0, 0}, 80, 80},
- {0x2401, 0x0001, 0x2401, "ar-YE", "Arabic (Yemen)", "Arabic (Yemen)", "Arabic (Yemen)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd9\x8a\xd9\x85\xd9\x86)", "ARY", "ara", "ar", {16777216, 0, 0, 0, 0}, 81, 81},
- {0x240A, 0x000A, 0x240A, "es-CO", "Spanish (Colombia)", "Spanish (Colombia)", "Spanish (Colombia)", "espa\xc3\xb1ol (Colombia)", "ESO", "spa", "es", {0, 0, 0, 0, 0}, 82, 82},
- {0x2801, 0x0001, 0x2801, "ar-SY", "Arabic (Syria)", "Arabic (Syria)", "Arabic (Syria)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xb3\xd9\x88\xd8\xb1\xd9\x8a\xd8\xa9)", "ARS", "ara", "ar", {16777216, 0, 0, 0, 0}, 83, 83},
- {0x280A, 0x000A, 0x280A, "es-PE", "Spanish (Peru)", "Spanish (Peru)", "Spanish (Peru)", "espa\xc3\xb1ol (Per\xc3\xba)", "ESR", "spa", "es", {0, 0, 0, 0, 0}, 84, 84},
- {0x2C01, 0x0001, 0x2C01, "ar-JO", "Arabic (Jordan)", "Arabic (Jordan)", "Arabic (Jordan)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd8\xa7\xd8\xb1\xd8\xaf\xd9\x86)", "ARJ", "ara", "ar", {16777216, 0, 0, 0, 0}, 85, 85},
- {0x2C0A, 0x000A, 0x2C0A, "es-AR", "Spanish (Argentina)", "Spanish (Argentina)", "Spanish (Argentina)", "espa\xc3\xb1ol (Argentina)", "ESS", "spa", "es", {0, 0, 0, 0, 0}, 86, 86},
- {0x3001, 0x0001, 0x3001, "ar-LB", "Arabic (Lebanon)", "Arabic (Lebanon)", "Arabic (Lebanon)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd9\x84\xd8\xa8\xd9\x86\xd8\xa7\xd9\x86)", "ARB", "ara", "ar", {16777216, 0, 0, 0, 0}, 87, 87},
- {0x3009, 0x0009, 0x3009, "en-ZW", "English (Zimbabwe)", "English (Zimbabwe)", "English (Zimbabwe)", "English (Zimbabwe)", "ENW", "eng", "en", {0, 0, 0, 0, 0}, 88, 88},
- {0x300A, 0x000A, 0x300A, "es-EC", "Spanish (Ecuador)", "Spanish (Ecuador)", "Spanish (Ecuador)", "espa\xc3\xb1ol (Ecuador)", "ESF", "spa", "es", {0, 0, 0, 0, 0}, 89, 89},
- {0x3401, 0x0001, 0x3401, "ar-KW", "Arabic (Kuwait)", "Arabic (Kuwait)", "Arabic (Kuwait)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd9\x83\xd9\x88\xd9\x8a\xd8\xaa)", "ARK", "ara", "ar", {16777216, 0, 0, 0, 0}, 90, 90},
- {0x3409, 0x0009, 0x3409, "en-PH", "English (Philippines)", "English (Philippines)", "English (Philippines)", "English (Philippines)", "ENP", "eng", "en", {0, 0, 0, 0, 0}, 91, 91},
- {0x340A, 0x000A, 0x340A, "es-CL", "Spanish (Chile)", "Spanish (Chile)", "Spanish (Chile)", "espa\xc3\xb1ol (Chile)", "ESL", "spa", "es", {0, 0, 0, 0, 0}, 92, 92},
- {0x3801, 0x0001, 0x3801, "ar-AE", "Arabic (United Arab Emirates)", "Arabic (United Arab Emirates)", "Arabic (United Arab Emirates)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xa7\xd8\xb1\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd9\x85\xd8\xaa\xd8\xad\xd8\xaf\xd8\xa9)", "ARU", "ara", "ar", {16777216, 0, 0, 0, 0}, 93, 93},
- {0x380A, 0x000A, 0x380A, "es-UY", "Spanish (Uruguay)", "Spanish (Uruguay)", "Spanish (Uruguay)", "espa\xc3\xb1ol (Uruguay)", "ESY", "spa", "es", {0, 0, 0, 0, 0}, 94, 94},
- {0x3C01, 0x0001, 0x3C01, "ar-BH", "Arabic (Bahrain)", "Arabic (Bahrain)", "Arabic (Bahrain)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd8\xa8\xd8\xad\xd8\xb1\xd9\x8a\xd9\x86)", "ARH", "ara", "ar", {16777216, 0, 0, 0, 0}, 95, 95},
- {0x3C0A, 0x000A, 0x3C0A, "es-PY", "Spanish (Paraguay)", "Spanish (Paraguay)", "Spanish (Paraguay)", "espa\xc3\xb1ol (Paraguay)", "ESZ", "spa", "es", {0, 0, 0, 0, 0}, 96, 96},
- {0x4001, 0x0001, 0x4001, "ar-QA", "Arabic (Qatar)", "Arabic (Qatar)", "Arabic (Qatar)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd9\x82\xd8\xb7\xd8\xb1)", "ARQ", "ara", "ar", {16777216, 0, 0, 0, 0}, 97, 97},
- {0x400A, 0x000A, 0x400A, "es-BO", "Spanish (Bolivia)", "Spanish (Bolivia)", "Spanish (Bolivia)", "espa\xc3\xb1ol (Bolivia)", "ESB", "spa", "es", {0, 0, 0, 0, 0}, 98, 98},
- {0x440A, 0x000A, 0x440A, "es-SV", "Spanish (El Salvador)", "Spanish (El Salvador)", "Spanish (El Salvador)", "espa\xc3\xb1ol (El Salvador)", "ESE", "spa", "es", {0, 0, 0, 0, 0}, 99, 99},
- {0x480A, 0x000A, 0x480A, "es-HN", "Spanish (Honduras)", "Spanish (Honduras)", "Spanish (Honduras)", "espa\xc3\xb1ol (Honduras)", "ESH", "spa", "es", {0, 0, 0, 0, 0}, 100, 100},
- {0x4C0A, 0x000A, 0x4C0A, "es-NI", "Spanish (Nicaragua)", "Spanish (Nicaragua)", "Spanish (Nicaragua)", "espa\xc3\xb1ol (Nicaragua)", "ESI", "spa", "es", {0, 0, 0, 0, 0}, 101, 101},
- {0x500A, 0x000A, 0x500A, "es-PR", "Spanish (Puerto Rico)", "Spanish (Puerto Rico)", "Spanish (Puerto Rico)", "espa\xc3\xb1ol (Puerto Rico)", "ESU", "spa", "es", {0, 0, 0, 0, 0}, 102, 102}
+ {0x042B, 0x002B, 0x042B, "hy-AM", "Armenian (Armenia)", "Armenian (Armenia)", "Armenian (Armenia)", "\xd5\x80\xd5\xa1\xd5\xb5\xd5\xa5\xd6\x80\xd5\xa7\xd5\xb6 (\xd5\x80\xd5\xa1\xd5\xb5\xd5\xa1\xd5\xbd\xd5\xbf\xd5\xa1\xd5\xb6\xd5\xab \xd5\x80\xd5\xa1\xd5\xb6\xd6\x80\xd5\xa1\xd5\xba\xd5\xa5\xd5\xbf\xd5\xb8\xd6\x82\xd5\xa9\xd5\xab\xd6\x82\xd5\xb6)", "HYE", "hye", "hy", {0, 0, 0, 0, 0}, 37, 37},
+ {0x042D, 0x002D, 0x042D, "eu-ES", "Basque (Spain)", "Basque (Spain)", "Basque (Spain)", "euskara (Espainia)", "EUQ", "eus", "eu", {0, 0, 0, 0, 0}, 38, 38},
+ {0x042F, 0x002F, 0x042F, "mk-MK", "Macedonian (Macedonia)", "Macedonian (Macedonia)", "Macedonian (Macedonia)", "\xd0\xbc\xd0\xb0\xd0\xba\xd0\xb5\xd0\xb4\xd0\xbe\xd0\xbd\xd1\x81\xd0\xba\xd0\xb8 (\xd0\x9c\xd0\xb0\xd0\xba\xd0\xb5\xd0\xb4\xd0\xbe\xd0\xbd\xd0\xb8\xd1\x98\xd0\xb0)", "MKI", "mkd", "mk", {0, 0, 0, 0, 0}, 39, 39},
+ {0x0436, 0x0036, 0x0436, "af-ZA", "Afrikaans (South Africa)", "Afrikaans (South Africa)", "Afrikaans (South Africa)", "Afrikaanse (Suid-Afrika)", "AFK", "afr", "af", {0, 0, 0, 0, 0}, 40, 40},
+ {0x0438, 0x0038, 0x0438, "fo-FO", "Faroese (Faroe Islands)", "Faroese (Faroe Islands)", "Faroese (Faroe Islands)", "f\xc3\xb8royskt (F\xc3\xb8royar)", "FOS", "fao", "fo", {0, 0, 0, 0, 0}, 41, 41},
+ {0x0439, 0x0039, 0x0439, "hi-IN", "Hindi (India)", "Hindi (India)", "Hindi (India)", "\xe0\xa4\xb9\xe0\xa4\xbf\xe0\xa4\x82\xe0\xa4\xa6\xe0\xa5\x80 (\xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xa4)", "HIN", "hin", "hi", {0, 0, 0, 0, 0}, 42, 42},
+ {0x0441, 0x0041, 0x0441, "sw-KE", "Swahili (Kenya)", "Swahili (Kenya)", "Swahili (Kenya)", "Kiswahili (Kenya)", "SWK", "swa", "sw", {0, 0, 0, 0, 0}, 43, 43},
+ {0x0447, 0x0047, 0x0447, "gu-IN", "Gujarati (India)", "Gujarati (India)", "Gujarati (India)", "\xe0\xaa\x97\xe0\xab\x81\xe0\xaa\x9c\xe0\xaa\xb0\xe0\xaa\xbe\xe0\xaa\xa4\xe0\xab\x80 (\xe0\xaa\xad\xe0\xaa\xbe\xe0\xaa\xb0\xe0\xaa\xa4)", "GUJ", "guj", "gu", {0, 0, 0, 0, 0}, 44, 44},
+ {0x0449, 0x0049, 0x0449, "ta-IN", "Tamil (India)", "Tamil (India)", "Tamil (India)", "\xe0\xae\xa4\xe0\xae\xae\xe0\xae\xbf\xe0\xae\xb4\xe0\xaf\x8d (\xe0\xae\x87\xe0\xae\xa8\xe0\xaf\x8d\xe0\xae\xa4\xe0\xae\xbf\xe0\xae\xaf\xe0\xae\xbe)", "TAM", "tam", "ta", {0, 0, 0, 0, 0}, 45, 45},
+ {0x044A, 0x004A, 0x044A, "te-IN", "Telugu (India)", "Telugu (India)", "Telugu (India)", "\xe0\xb0\xa4\xe0\xb1\x86\xe0\xb0\xb2\xe0\xb1\x81\xe0\xb0\x97\xe0\xb1\x81 (\xe0\xb0\xad\xe0\xb0\xbe\xe0\xb0\xb0\xe0\xb0\xa4 \xe0\xb0\xa6\xe0\xb1\x87\xe0\xb0\xb3\xe0\xb1\xa6)", "TEL", "tel", "te", {0, 0, 0, 0, 0}, 46, 46},
+ {0x044B, 0x004B, 0x044B, "kn-IN", "Kannada (India)", "Kannada (India)", "Kannada (India)", "\xe0\xb2\x95\xe0\xb2\xa8\xe0\xb3\x8d\xe0\xb2\xa8\xe0\xb2\xa1 (\xe0\xb2\xad\xe0\xb2\xbe\xe0\xb2\xb0\xe0\xb2\xa4)", "KAN", "kan", "kn", {0, 0, 0, 0, 0}, 47, 47},
+ {0x044E, 0x004E, 0x044E, "mr-IN", "Marathi (India)", "Marathi (India)", "Marathi (India)", "\xe0\xa4\xae\xe0\xa4\xb0\xe0\xa4\xbe\xe0\xa4\xa0\xe0\xa5\x80 (\xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xa4)", "MAR", "mar", "mr", {0, 0, 0, 0, 0}, 48, 48},
+ {0x0456, 0x0056, 0x0456, "gl-ES", "Gallegan (Spain)", "Gallegan (Spain)", "Gallegan (Spain)", "galego (Espa\xc3\xb1\x61)", "GLC", "glg", "gl", {0, 0, 0, 0, 0}, 49, 49},
+ {0x0457, 0x0057, 0x0457, "kok-IN", "Konkani (India)", "Konkani (India)", "Konkani (India)", "\xe0\xa4\x95\xe0\xa5\x8b\xe0\xa4\x82\xe0\xa4\x95\xe0\xa4\xa3\xe0\xa5\x80 (\xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xa4)", "KNK", "kok", "kok", {0, 0, 0, 0, 0}, 50, 50},
+ {0x0801, 0x0001, 0x0801, "ar-IQ", "Arabic (Iraq)", "Arabic (Iraq)", "Arabic (Iraq)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82)", "ARI", "ara", "ar", {2, 1, 0, 0, 0}, 51, 51},
+ {0x0807, 0x0007, 0x0807, "de-CH", "German (Switzerland)", "German (Switzerland)", "German (Switzerland)", "Deutsch (Schweiz)", "DES", "deu", "de", {0, 0, 0, 0, 0}, 52, 52},
+ {0x0809, 0x0009, 0x0809, "en-GB", "English (United Kingdom)", "English (United Kingdom)", "English (United Kingdom)", "English (United Kingdom)", "ENG", "eng", "en", {0, 0, 0, 0, 0}, 53, 53},
+ {0x080A, 0x000A, 0x080A, "es-MX", "Spanish (Mexico)", "Spanish (Mexico)", "Spanish (Mexico)", "espa\xc3\xb1ol (M\xc3\xa9xico)", "ESM", "spa", "es", {0, 0, 0, 0, 0}, 54, 54},
+ {0x080C, 0x000C, 0x080C, "fr-BE", "French (Belgium)", "French (Belgium)", "French (Belgium)", "fran\xc3\xa7\x61is (Belgique)", "FRB", "fra", "fr", {0, 0, 0, 0, 0}, 55, 55},
+ {0x0810, 0x0010, 0x0810, "it-CH", "Italian (Switzerland)", "Italian (Switzerland)", "Italian (Switzerland)", "italiano (Svizzera)", "ITS", "ita", "it", {0, 0, 0, 0, 0}, 56, 56},
+ {0x0813, 0x0013, 0x0813, "nl-BE", "Dutch (Belgium)", "Dutch (Belgium)", "Dutch (Belgium)", "Nederlands (Belgi\xc3\xab)", "NLB", "nld", "nl", {0, 0, 0, 0, 0}, 57, 57},
+ {0x0816, 0x0016, 0x0816, "pt-PT", "Portuguese (Portugal)", "Portuguese (Portugal)", "Portuguese (Portugal)", "portugu\xc3\xaas (Portugal)", "PTG", "por", "pt", {0, 0, 0, 0, 0}, 58, 58},
+ {0x081D, 0x001D, 0x081D, "sv-FI", "Swedish (Finland)", "Swedish (Finland)", "Swedish (Finland)", "svenska (Finland)", "SVF", "swe", "sv", {0, 0, 0, 0, 0}, 59, 59},
+ {0x0C01, 0x0001, 0x0C01, "ar-EG", "Arabic (Egypt)", "Arabic (Egypt)", "Arabic (Egypt)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd9\x85\xd8\xb5\xd8\xb1)", "ARE", "ara", "ar", {16777216, 0, 0, 0, 0}, 60, 60},
+ {0x0C07, 0x0007, 0x0C07, "de-AT", "German (Austria)", "German (Austria)", "German (Austria)", "Deutsch (\xc3\x96sterreich)", "DEA", "deu", "de", {0, 0, 0, 0, 0}, 61, 61},
+ {0x0C09, 0x0009, 0x0C09, "en-AU", "English (Australia)", "English (Australia)", "English (Australia)", "English (Australia)", "ENA", "eng", "en", {0, 0, 0, 0, 0}, 62, 62},
+ {0x0C0A, 0x000A, 0x0C0A, "es-ES", "Spanish (Spain)", "Spanish (Spain)", "Spanish (Spain)", "espa\xc3\xb1ol (Espa\xc3\xb1\x61)", "ESN", "spa", "es", {0, 0, 0, 0, 0}, 63, 63},
+ {0x0C0C, 0x000C, 0x0C0C, "fr-CA", "French (Canada)", "French (Canada)", "French (Canada)", "fran\xc3\xa7\x61is (Canada)", "FRC", "fra", "fr", {0, 0, 0, 0, 0}, 64, 64},
+ {0x1001, 0x0001, 0x1001, "ar-LY", "Arabic (Libya)", "Arabic (Libya)", "Arabic (Libya)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd9\x84\xd9\x8a\xd8\xa8\xd9\x8a\xd8\xa7)", "ARL", "ara", "ar", {16777216, 0, 0, 0, 0}, 65, 65},
+ {0x1007, 0x0007, 0x1007, "de-LU", "German (Luxembourg)", "German (Luxembourg)", "German (Luxembourg)", "Deutsch (Luxemburg)", "DEL", "deu", "de", {0, 0, 0, 0, 0}, 66, 66},
+ {0x1009, 0x0009, 0x1009, "en-CA", "English (Canada)", "English (Canada)", "English (Canada)", "English (Canada)", "ENC", "eng", "en", {0, 0, 0, 0, 0}, 67, 67},
+ {0x100A, 0x000A, 0x100A, "es-GT", "Spanish (Guatemala)", "Spanish (Guatemala)", "Spanish (Guatemala)", "espa\xc3\xb1ol (Guatemala)", "ESG", "spa", "es", {0, 0, 0, 0, 0}, 68, 68},
+ {0x100C, 0x000C, 0x100C, "fr-CH", "French (Switzerland)", "French (Switzerland)", "French (Switzerland)", "fran\xc3\xa7\x61is (Suisse)", "FRS", "fra", "fr", {0, 0, 0, 0, 0}, 69, 69},
+ {0x1401, 0x0001, 0x1401, "ar-DZ", "Arabic (Algeria)", "Arabic (Algeria)", "Arabic (Algeria)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd8\xac\xd8\xb2\xd8\xa7\xd8\xa6\xd8\xb1)", "ARG", "ara", "ar", {16777216, 0, 0, 0, 0}, 70, 70},
+ {0x1409, 0x0009, 0x1409, "en-NZ", "English (New Zealand)", "English (New Zealand)", "English (New Zealand)", "English (New Zealand)", "ENZ", "eng", "en", {0, 0, 0, 0, 0}, 71, 71},
+ {0x140A, 0x000A, 0x140A, "es-CR", "Spanish (Costa Rica)", "Spanish (Costa Rica)", "Spanish (Costa Rica)", "espa\xc3\xb1ol (Costa Rica)", "ESC", "spa", "es", {0, 0, 0, 0, 0}, 72, 72},
+ {0x140C, 0x000C, 0x140C, "fr-LU", "French (Luxembourg)", "French (Luxembourg)", "French (Luxembourg)", "fran\xc3\xa7\x61is (Luxembourg)", "FRL", "fra", "fr", {0, 0, 0, 0, 0}, 73, 73},
+ {0x1801, 0x0001, 0x1801, "ar-MA", "Arabic (Morocco)", "Arabic (Morocco)", "Arabic (Morocco)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd9\x85\xd8\xba\xd8\xb1\xd8\xa8)", "ARM", "ara", "ar", {16777216, 0, 0, 0, 0}, 74, 74},
+ {0x1809, 0x0009, 0x1809, "en-IE", "English (Ireland)", "English (Ireland)", "English (Ireland)", "English (Ireland)", "ENI", "eng", "en", {0, 0, 0, 0, 0}, 75, 75},
+ {0x180A, 0x000A, 0x180A, "es-PA", "Spanish (Panama)", "Spanish (Panama)", "Spanish (Panama)", "espa\xc3\xb1ol (Panam\xc3\xa1)", "ESA", "spa", "es", {0, 0, 0, 0, 0}, 76, 76},
+ {0x1C01, 0x0001, 0x1C01, "ar-TN", "Arabic (Tunisia)", "Arabic (Tunisia)", "Arabic (Tunisia)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xaa\xd9\x88\xd9\x86\xd8\xb3)", "ART", "ara", "ar", {16777216, 0, 0, 0, 0}, 77, 77},
+ {0x1C09, 0x0009, 0x1C09, "en-ZA", "English (South Africa)", "English (South Africa)", "English (South Africa)", "English (South Africa)", "ENS", "eng", "en", {0, 0, 0, 0, 0}, 78, 78},
+ {0x1C0A, 0x000A, 0x1C0A, "es-DO", "Spanish (Dominican Republic)", "Spanish (Dominican Republic)", "Spanish (Dominican Republic)", "espa\xc3\xb1ol (Rep\xc3\xba\x62lica Dominicana)", "ESD", "spa", "es", {0, 0, 0, 0, 0}, 79, 79},
+ {0x2001, 0x0001, 0x2001, "ar-OM", "Arabic (Oman)", "Arabic (Oman)", "Arabic (Oman)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xb9\xd9\x85\xd8\xa7\xd9\x86)", "ARO", "ara", "ar", {16777216, 0, 0, 0, 0}, 80, 80},
+ {0x200A, 0x000A, 0x200A, "es-VE", "Spanish (Venezuela)", "Spanish (Venezuela)", "Spanish (Venezuela)", "espa\xc3\xb1ol (Venezuela)", "ESV", "spa", "es", {0, 0, 0, 0, 0}, 81, 81},
+ {0x2401, 0x0001, 0x2401, "ar-YE", "Arabic (Yemen)", "Arabic (Yemen)", "Arabic (Yemen)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd9\x8a\xd9\x85\xd9\x86)", "ARY", "ara", "ar", {16777216, 0, 0, 0, 0}, 82, 82},
+ {0x240A, 0x000A, 0x240A, "es-CO", "Spanish (Colombia)", "Spanish (Colombia)", "Spanish (Colombia)", "espa\xc3\xb1ol (Colombia)", "ESO", "spa", "es", {0, 0, 0, 0, 0}, 83, 83},
+ {0x2801, 0x0001, 0x2801, "ar-SY", "Arabic (Syria)", "Arabic (Syria)", "Arabic (Syria)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xb3\xd9\x88\xd8\xb1\xd9\x8a\xd8\xa9)", "ARS", "ara", "ar", {16777216, 0, 0, 0, 0}, 84, 84},
+ {0x280A, 0x000A, 0x280A, "es-PE", "Spanish (Peru)", "Spanish (Peru)", "Spanish (Peru)", "espa\xc3\xb1ol (Per\xc3\xba)", "ESR", "spa", "es", {0, 0, 0, 0, 0}, 85, 85},
+ {0x2C01, 0x0001, 0x2C01, "ar-JO", "Arabic (Jordan)", "Arabic (Jordan)", "Arabic (Jordan)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd8\xa7\xd8\xb1\xd8\xaf\xd9\x86)", "ARJ", "ara", "ar", {16777216, 0, 0, 0, 0}, 86, 86},
+ {0x2C0A, 0x000A, 0x2C0A, "es-AR", "Spanish (Argentina)", "Spanish (Argentina)", "Spanish (Argentina)", "espa\xc3\xb1ol (Argentina)", "ESS", "spa", "es", {0, 0, 0, 0, 0}, 87, 87},
+ {0x3001, 0x0001, 0x3001, "ar-LB", "Arabic (Lebanon)", "Arabic (Lebanon)", "Arabic (Lebanon)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd9\x84\xd8\xa8\xd9\x86\xd8\xa7\xd9\x86)", "ARB", "ara", "ar", {16777216, 0, 0, 0, 0}, 88, 88},
+ {0x3009, 0x0009, 0x3009, "en-ZW", "English (Zimbabwe)", "English (Zimbabwe)", "English (Zimbabwe)", "English (Zimbabwe)", "ENW", "eng", "en", {0, 0, 0, 0, 0}, 89, 89},
+ {0x300A, 0x000A, 0x300A, "es-EC", "Spanish (Ecuador)", "Spanish (Ecuador)", "Spanish (Ecuador)", "espa\xc3\xb1ol (Ecuador)", "ESF", "spa", "es", {0, 0, 0, 0, 0}, 90, 90},
+ {0x3401, 0x0001, 0x3401, "ar-KW", "Arabic (Kuwait)", "Arabic (Kuwait)", "Arabic (Kuwait)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd9\x83\xd9\x88\xd9\x8a\xd8\xaa)", "ARK", "ara", "ar", {16777216, 0, 0, 0, 0}, 91, 91},
+ {0x3409, 0x0009, 0x3409, "en-PH", "English (Philippines)", "English (Philippines)", "English (Philippines)", "English (Philippines)", "ENP", "eng", "en", {0, 0, 0, 0, 0}, 92, 92},
+ {0x340A, 0x000A, 0x340A, "es-CL", "Spanish (Chile)", "Spanish (Chile)", "Spanish (Chile)", "espa\xc3\xb1ol (Chile)", "ESL", "spa", "es", {0, 0, 0, 0, 0}, 93, 93},
+ {0x3801, 0x0001, 0x3801, "ar-AE", "Arabic (United Arab Emirates)", "Arabic (United Arab Emirates)", "Arabic (United Arab Emirates)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xa7\xd8\xb1\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd9\x85\xd8\xaa\xd8\xad\xd8\xaf\xd8\xa9)", "ARU", "ara", "ar", {16777216, 0, 0, 0, 0}, 94, 94},
+ {0x380A, 0x000A, 0x380A, "es-UY", "Spanish (Uruguay)", "Spanish (Uruguay)", "Spanish (Uruguay)", "espa\xc3\xb1ol (Uruguay)", "ESY", "spa", "es", {0, 0, 0, 0, 0}, 95, 95},
+ {0x3C01, 0x0001, 0x3C01, "ar-BH", "Arabic (Bahrain)", "Arabic (Bahrain)", "Arabic (Bahrain)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd8\xa7\xd9\x84\xd8\xa8\xd8\xad\xd8\xb1\xd9\x8a\xd9\x86)", "ARH", "ara", "ar", {16777216, 0, 0, 0, 0}, 96, 96},
+ {0x3C0A, 0x000A, 0x3C0A, "es-PY", "Spanish (Paraguay)", "Spanish (Paraguay)", "Spanish (Paraguay)", "espa\xc3\xb1ol (Paraguay)", "ESZ", "spa", "es", {0, 0, 0, 0, 0}, 97, 97},
+ {0x4001, 0x0001, 0x4001, "ar-QA", "Arabic (Qatar)", "Arabic (Qatar)", "Arabic (Qatar)", "\xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa8\xd9\x8a\xd8\xa9 (\xd9\x82\xd8\xb7\xd8\xb1)", "ARQ", "ara", "ar", {16777216, 0, 0, 0, 0}, 98, 98},
+ {0x400A, 0x000A, 0x400A, "es-BO", "Spanish (Bolivia)", "Spanish (Bolivia)", "Spanish (Bolivia)", "espa\xc3\xb1ol (Bolivia)", "ESB", "spa", "es", {0, 0, 0, 0, 0}, 99, 99},
+ {0x440A, 0x000A, 0x440A, "es-SV", "Spanish (El Salvador)", "Spanish (El Salvador)", "Spanish (El Salvador)", "espa\xc3\xb1ol (El Salvador)", "ESE", "spa", "es", {0, 0, 0, 0, 0}, 100, 100},
+ {0x480A, 0x000A, 0x480A, "es-HN", "Spanish (Honduras)", "Spanish (Honduras)", "Spanish (Honduras)", "espa\xc3\xb1ol (Honduras)", "ESH", "spa", "es", {0, 0, 0, 0, 0}, 101, 101},
+ {0x4C0A, 0x000A, 0x4C0A, "es-NI", "Spanish (Nicaragua)", "Spanish (Nicaragua)", "Spanish (Nicaragua)", "espa\xc3\xb1ol (Nicaragua)", "ESI", "spa", "es", {0, 0, 0, 0, 0}, 102, 102},
+ {0x500A, 0x000A, 0x500A, "es-PR", "Spanish (Puerto Rico)", "Spanish (Puerto Rico)", "Spanish (Puerto Rico)", "espa\xc3\xb1ol (Puerto Rico)", "ESU", "spa", "es", {0, 0, 0, 0, 0}, 103, 103}
};
-
-static const CultureInfoNameEntry culture_name_entries [] = {
+
+static const CultureInfoNameEntry culture_name_entries [] = {
{"af", 40},
- {"af-za", 90},
+ {"af-za", 91},
{"ar", 0},
- {"ar-ae", 144},
- {"ar-bh", 146},
- {"ar-dz", 120},
- {"ar-eg", 110},
- {"ar-iq", 101},
- {"ar-jo", 136},
- {"ar-kw", 141},
- {"ar-lb", 138},
- {"ar-ly", 115},
- {"ar-ma", 124},
- {"ar-om", 130},
- {"ar-qa", 148},
- {"ar-sy", 134},
- {"ar-tn", 127},
- {"ar-ye", 132},
+ {"ar-ae", 145},
+ {"ar-bh", 147},
+ {"ar-dz", 121},
+ {"ar-eg", 111},
+ {"ar-iq", 102},
+ {"ar-jo", 137},
+ {"ar-kw", 142},
+ {"ar-lb", 139},
+ {"ar-ly", 116},
+ {"ar-ma", 125},
+ {"ar-om", 131},
+ {"ar-qa", 149},
+ {"ar-sa", 51},
+ {"ar-sy", 135},
+ {"ar-tn", 128},
+ {"ar-ye", 133},
{"be", 30},
- {"be-by", 79},
+ {"be-by", 80},
{"bg", 1},
- {"bg-bg", 51},
+ {"bg-bg", 52},
{"ca", 2},
- {"ca-es", 52},
+ {"ca-es", 53},
{"cs", 3},
- {"cs-cz", 53},
+ {"cs-cz", 54},
{"da", 4},
- {"da-dk", 54},
+ {"da-dk", 55},
{"de", 5},
- {"de-at", 111},
- {"de-ch", 102},
- {"de-de", 55},
- {"de-lu", 116},
+ {"de-at", 112},
+ {"de-ch", 103},
+ {"de-de", 56},
+ {"de-lu", 117},
{"el", 6},
- {"el-gr", 56},
+ {"el-gr", 57},
{"en", 7},
- {"en-au", 112},
- {"en-ca", 117},
- {"en-gb", 103},
- {"en-ie", 125},
- {"en-nz", 121},
- {"en-ph", 142},
- {"en-us", 57},
- {"en-za", 128},
- {"en-zw", 139},
+ {"en-au", 113},
+ {"en-ca", 118},
+ {"en-gb", 104},
+ {"en-ie", 126},
+ {"en-nz", 122},
+ {"en-ph", 143},
+ {"en-us", 58},
+ {"en-za", 129},
+ {"en-zw", 140},
{"es", 8},
- {"es-ar", 137},
- {"es-bo", 149},
- {"es-cl", 143},
- {"es-co", 133},
- {"es-cr", 122},
- {"es-do", 129},
- {"es-ec", 140},
- {"es-es", 113},
- {"es-gt", 118},
- {"es-hn", 151},
- {"es-mx", 104},
- {"es-ni", 152},
- {"es-pa", 126},
- {"es-pe", 135},
- {"es-pr", 153},
- {"es-py", 147},
- {"es-sv", 150},
- {"es-uy", 145},
- {"es-ve", 131},
+ {"es-ar", 138},
+ {"es-bo", 150},
+ {"es-cl", 144},
+ {"es-co", 134},
+ {"es-cr", 123},
+ {"es-do", 130},
+ {"es-ec", 141},
+ {"es-es", 114},
+ {"es-gt", 119},
+ {"es-hn", 152},
+ {"es-mx", 105},
+ {"es-ni", 153},
+ {"es-pa", 127},
+ {"es-pe", 136},
+ {"es-pr", 154},
+ {"es-py", 148},
+ {"es-sv", 151},
+ {"es-uy", 146},
+ {"es-ve", 132},
{"et", 32},
- {"et-ee", 81},
+ {"et-ee", 82},
{"eu", 38},
- {"eu-es", 88},
+ {"eu-es", 89},
{"fa", 35},
- {"fa-ir", 84},
+ {"fa-ir", 85},
{"fi", 9},
- {"fi-fi", 58},
+ {"fi-fi", 59},
{"fo", 41},
- {"fo-fo", 91},
+ {"fo-fo", 92},
{"fr", 10},
- {"fr-be", 105},
- {"fr-ca", 114},
- {"fr-ch", 119},
- {"fr-fr", 59},
- {"fr-lu", 123},
+ {"fr-be", 106},
+ {"fr-ca", 115},
+ {"fr-ch", 120},
+ {"fr-fr", 60},
+ {"fr-lu", 124},
{"gl", 49},
- {"gl-es", 99},
+ {"gl-es", 100},
{"gu", 44},
- {"gu-in", 94},
+ {"gu-in", 95},
{"he", 11},
- {"he-il", 60},
+ {"he-il", 61},
{"hi", 42},
- {"hi-in", 92},
+ {"hi-in", 93},
{"hr", 22},
- {"hr-hr", 71},
+ {"hr-hr", 72},
{"hu", 12},
- {"hu-hu", 61},
+ {"hu-hu", 62},
{"hy", 37},
- {"hy-am", 86},
{"hy-am", 87},
+ {"hy-am", 88},
{"id", 28},
- {"id-id", 77},
+ {"id-id", 78},
{"is", 13},
- {"is-is", 62},
+ {"is-is", 63},
{"it", 14},
- {"it-ch", 106},
- {"it-it", 63},
+ {"it-ch", 107},
+ {"it-it", 64},
{"ja", 15},
- {"ja-jp", 64},
+ {"ja-jp", 65},
{"kn", 47},
- {"kn-in", 97},
+ {"kn-in", 98},
{"ko", 16},
+ {"ko-kr", 66},
{"kok", 50},
- {"kok-in", 100},
- {"ko-kr", 65},
+ {"kok-in", 101},
{"lt", 34},
- {"lt-lt", 83},
+ {"lt-lt", 84},
{"lv", 33},
- {"lv-lv", 82},
+ {"lv-lv", 83},
{"mk", 39},
- {"mk-mk", 89},
+ {"mk-mk", 90},
{"mr", 48},
- {"mr-in", 98},
+ {"mr-in", 99},
{"nl", 17},
- {"nl-be", 107},
- {"nl-nl", 66},
+ {"nl-be", 108},
+ {"nl-nl", 67},
{"pl", 18},
- {"pl-pl", 67},
+ {"pl-pl", 68},
{"pt", 19},
- {"pt-br", 68},
- {"pt-pt", 108},
+ {"pt-br", 69},
+ {"pt-pt", 109},
{"ro", 20},
- {"ro-ro", 69},
+ {"ro-ro", 70},
{"ru", 21},
- {"ru-ru", 70},
+ {"ru-ru", 71},
{"sk", 23},
- {"sk-sk", 72},
+ {"sk-sk", 73},
{"sl", 31},
- {"sl-si", 80},
+ {"sl-si", 81},
{"sq", 24},
- {"sq-al", 73},
+ {"sq-al", 74},
{"sv", 25},
- {"sv-fi", 109},
- {"sv-se", 74},
+ {"sv-fi", 110},
+ {"sv-se", 75},
{"sw", 43},
- {"sw-ke", 93},
+ {"sw-ke", 94},
{"ta", 45},
- {"ta-in", 95},
+ {"ta-in", 96},
{"te", 46},
- {"te-in", 96},
+ {"te-in", 97},
{"th", 26},
- {"th-th", 75},
+ {"th-th", 76},
{"tr", 27},
- {"tr-tr", 76},
+ {"tr-tr", 77},
{"uk", 29},
- {"uk-ua", 78},
+ {"uk-ua", 79},
{"vi", 36},
- {"vi-vn", 85}
+ {"vi-vn", 86}
};
-
+
#endif
-
+
diff --git a/mono/metadata/debug-mono-symfile.c b/mono/metadata/debug-mono-symfile.c
index 612eb39babf..a44c2748e18 100644
--- a/mono/metadata/debug-mono-symfile.c
+++ b/mono/metadata/debug-mono-symfile.c
@@ -107,17 +107,21 @@ mono_debug_open_mono_symbol_file (MonoDebugHandle *handle, gboolean create_symfi
{
MonoSymbolFile *symfile;
+ mono_loader_lock ();
symfile = g_new0 (MonoSymbolFile, 1);
symfile->raw_contents = open_symfile (handle->image, &symfile->raw_contents_size);
- if (load_symfile (handle, symfile))
+ if (load_symfile (handle, symfile)) {
+ mono_loader_unlock ();
return symfile;
- else if (!create_symfile) {
+ } else if (!create_symfile) {
mono_debug_close_mono_symbol_file (symfile);
+ mono_loader_unlock ();
return NULL;
}
+ mono_loader_unlock ();
return symfile;
}
@@ -127,10 +131,12 @@ mono_debug_close_mono_symbol_file (MonoSymbolFile *symfile)
if (!symfile)
return;
+ mono_loader_lock ();
if (symfile->method_hash)
g_hash_table_destroy (symfile->method_hash);
g_free (symfile);
+ mono_loader_unlock ();
}
static gchar *
@@ -151,12 +157,17 @@ mono_debug_find_source_location (MonoSymbolFile *symfile, MonoMethod *method, gu
const char *ptr;
int i;
- if (!symfile->method_hash)
+ mono_loader_lock ();
+ if (!symfile->method_hash) {
+ mono_loader_unlock ();
return NULL;
+ }
minfo = g_hash_table_lookup (symfile->method_hash, method);
- if (!minfo)
+ if (!minfo) {
+ mono_loader_unlock ();
return NULL;
+ }
if (read32(&(minfo->entry->_source_index))) {
int offset = read32(&(symfile->offset_table->_source_table_offset)) +
@@ -176,6 +187,7 @@ mono_debug_find_source_location (MonoSymbolFile *symfile, MonoMethod *method, gu
if (line_number) {
*line_number = read32(&(lne->_row));
+ mono_loader_unlock ();
if (source_file)
return source_file;
else
@@ -183,11 +195,16 @@ mono_debug_find_source_location (MonoSymbolFile *symfile, MonoMethod *method, gu
} else if (source_file) {
gchar *retval = g_strdup_printf ("%s:%d", source_file, read32(&(lne->_row)));
g_free (source_file);
+ mono_loader_unlock ();
return retval;
- } else
- return g_strdup_printf ("%d", read32(&(lne->_row)));
+ } else {
+ gchar* retval = g_strdup_printf ("%d", read32(&(lne->_row)));
+ mono_loader_unlock ();
+ return retval;
+ }
}
+ mono_loader_unlock ();
return NULL;
}
@@ -233,6 +250,7 @@ mono_debug_find_method (MonoDebugHandle *handle, MonoMethod *method)
if (handle->image != mono_class_get_image (mono_method_get_class (method)))
return NULL;
+ mono_loader_lock ();
first_ie = (MonoSymbolFileMethodIndexEntry *)
(symfile->raw_contents + read32(&(symfile->offset_table->_method_table_offset)));
@@ -240,8 +258,10 @@ mono_debug_find_method (MonoDebugHandle *handle, MonoMethod *method)
read32(&(symfile->offset_table->_method_count)),
sizeof (MonoSymbolFileMethodIndexEntry), compare_method);
- if (!ie)
+ if (!ie) {
+ mono_loader_unlock ();
return NULL;
+ }
me = (MonoSymbolFileMethodEntry *) (symfile->raw_contents + read32(&(ie->_file_offset)));
@@ -256,5 +276,6 @@ mono_debug_find_method (MonoDebugHandle *handle, MonoMethod *method)
g_hash_table_insert (symfile->method_hash, method, minfo);
+ mono_loader_unlock ();
return minfo;
}
diff --git a/mono/metadata/filewatcher.c b/mono/metadata/filewatcher.c
index 6210dc6b1f8..731eb3a1ad2 100644
--- a/mono/metadata/filewatcher.c
+++ b/mono/metadata/filewatcher.c
@@ -89,21 +89,26 @@ static int (*FAMNextEvent) (gpointer, gpointer);
gint
ves_icall_System_IO_FSW_SupportsFSW (void)
{
+#if HAVE_KQUEUE
+ return 3;
+#else
GModule *fam_module;
+ gchar *filename;
MONO_ARCH_SAVE_REGS;
- fam_module = g_module_open ("libfam", G_MODULE_BIND_LAZY);
- if (fam_module == NULL) {
+ filename = g_module_build_path (NULL, "libfam.so.0");
+ fam_module = g_module_open (filename, G_MODULE_BIND_LAZY);
+ g_free (filename);
+ if (fam_module == NULL)
return 0;
- }
-
g_module_symbol (fam_module, "FAMNextEvent", (gpointer *) &FAMNextEvent);
if (FAMNextEvent == NULL)
return 0;
return 2;
+#endif
}
gpointer
diff --git a/mono/metadata/gc.c b/mono/metadata/gc.c
index 73167d0e9dc..3a9db3a1c62 100644
--- a/mono/metadata/gc.c
+++ b/mono/metadata/gc.c
@@ -663,6 +663,8 @@ void mono_gc_init (void)
gc_thread_vtable = &mono_gc_thread_vtable;
#endif
+ GC_set_warn_proc (mono_gc_warning);
+
#ifdef ENABLE_FINALIZER_THREAD
if (g_getenv ("GC_DONT_GC")) {
diff --git a/mono/metadata/image.c b/mono/metadata/image.c
index 8b0473429ed..01c9644be34 100644
--- a/mono/metadata/image.c
+++ b/mono/metadata/image.c
@@ -849,12 +849,12 @@ MonoImage *
mono_image_open (const char *fname, MonoImageOpenStatus *status)
{
MonoImage *image, *image2;
- const char *absfname;
+ char *absfname;
g_return_val_if_fail (fname != NULL, NULL);
if (g_path_is_absolute (fname))
- absfname = fname;
+ absfname = (char*)fname;
else {
gchar *path = g_get_current_dir ();
absfname = g_build_filename (path, fname, NULL);
@@ -960,9 +960,22 @@ mono_image_close (MonoImage *image)
if (image->f)
fclose (image->f);
- if (image->raw_data_allocated)
- g_free (image->raw_data);
+ if (image->raw_data_allocated) {
+ /* image->raw_metadata and cli_sections might lie inside image->raw_data */
+ MonoCLIImageInfo *ii = image->image_info;
+ int i;
+
+ if ((image->raw_metadata > image->raw_data) &&
+ (image->raw_metadata <= (image->raw_data + image->raw_data_len)))
+ image->raw_metadata = NULL;
+ for (i = 0; i < ii->cli_section_count; i++)
+ if (((char*)(ii->cli_sections [i]) > image->raw_data) &&
+ ((char*)(ii->cli_sections [i]) <= ((char*)image->raw_data + image->raw_data_len)))
+ ii->cli_sections [i] = NULL;
+
+ g_free (image->raw_data);
+ }
g_free (image->name);
g_free (image->files);
diff --git a/mono/metadata/loader.c b/mono/metadata/loader.c
index 81f2af3fa7c..f9fac307bd3 100644
--- a/mono/metadata/loader.c
+++ b/mono/metadata/loader.c
@@ -580,28 +580,41 @@ mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char
g_assert (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL);
- if (exc_class) {
- *exc_class = NULL;
- *exc_arg = NULL;
- }
-
if (method->addr)
return method->addr;
- if (!piinfo->implmap_idx)
- return NULL;
-
- mono_metadata_decode_row (im, piinfo->implmap_idx - 1, im_cols, MONO_IMPLMAP_SIZE);
- piinfo->piflags = im_cols [MONO_IMPLMAP_FLAGS];
- import = mono_metadata_string_heap (image, im_cols [MONO_IMPLMAP_NAME]);
- scope_token = mono_metadata_decode_row_col (mr, im_cols [MONO_IMPLMAP_SCOPE] - 1, MONO_MODULEREF_NAME);
- orig_scope = mono_metadata_string_heap (image, scope_token);
+ if (method->klass->image->dynamic) {
+ MonoReflectionMethodAux *method_aux =
+ mono_g_hash_table_lookup (
+ ((MonoDynamicImage*)method->klass->image)->method_aux_hash, method);
+ if (!method_aux)
+ return NULL;
+
+ import = method_aux->dllentry;
+ orig_scope = method_aux->dll;
+ }
+ else {
+ if (!piinfo->implmap_idx)
+ return NULL;
+
+ mono_metadata_decode_row (im, piinfo->implmap_idx - 1, im_cols, MONO_IMPLMAP_SIZE);
+
+ piinfo->piflags = im_cols [MONO_IMPLMAP_FLAGS];
+ import = mono_metadata_string_heap (image, im_cols [MONO_IMPLMAP_NAME]);
+ scope_token = mono_metadata_decode_row_col (mr, im_cols [MONO_IMPLMAP_SCOPE] - 1, MONO_MODULEREF_NAME);
+ orig_scope = mono_metadata_string_heap (image, scope_token);
+ }
mono_dllmap_lookup (image, orig_scope, import, &new_scope, &import);
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_DLLIMPORT,
"DllImport attempting to load: '%s'.", new_scope);
+ if (exc_class) {
+ *exc_class = NULL;
+ *exc_arg = NULL;
+ }
+
#ifndef PLATFORM_WIN32
/*
* If we are P/Invoking a library from System.Windows.Forms, load Wine
@@ -616,17 +629,27 @@ mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char
* Try loading the module using a variety of names
*/
for (i = 0; i < 2; ++i) {
- if (i == 0)
+ switch (i) {
+ case 0:
/* Try the original name */
file_name = g_strdup (new_scope);
- else {
+ break;
+ case 1:
/* Try trimming the .dll extension */
if (strstr (new_scope, ".dll") == (new_scope + strlen (new_scope) - 4)) {
file_name = g_strdup (new_scope);
file_name [strlen (new_scope) - 4] = '\0';
}
else
- break;
+ continue;
+ break;
+ default:
+ if (strstr (new_scope, "lib") != new_scope) {
+ file_name = g_strdup_printf ("lib%s", new_scope);
+ }
+ else
+ continue;
+ break;
}
if (!gmodule) {
@@ -712,6 +735,21 @@ mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char
break;
}
+
+#ifdef PLATFORM_WIN32
+ /* Try the stdcall mangled name */
+ if (!method->addr) {
+ /* FIX: Compute this correctly */
+ mangled_name = g_strdup_printf ("%s@%d", import, method->signature->param_count * sizeof (gpointer));
+ g_module_symbol (gmodule, mangled_name, &method->addr);
+ g_free (mangled_name);
+ }
+ if (!method->addr) {
+ mangled_name = g_strdup_printf ("_%s@%d", import, method->signature->param_count * sizeof (gpointer));
+ g_module_symbol (gmodule, mangled_name, &method->addr);
+ g_free (mangled_name);
+ }
+#endif
}
if (!method->addr) {
diff --git a/mono/metadata/locales.c b/mono/metadata/locales.c
index 1210965a70a..256598e14c0 100644
--- a/mono/metadata/locales.c
+++ b/mono/metadata/locales.c
@@ -1041,6 +1041,7 @@ void ves_icall_System_Globalization_CompareInfo_free_internal_collator (MonoComp
coll=this->ICU_collator;
if(coll!=NULL) {
+ this->ICU_collator = NULL;
ucol_close (coll);
}
}
diff --git a/mono/metadata/marshal.c b/mono/metadata/marshal.c
index 2892d81e88b..97a71e3a56a 100644
--- a/mono/metadata/marshal.c
+++ b/mono/metadata/marshal.c
@@ -2198,6 +2198,19 @@ handle_enum:
return res;
}
+static void
+raise_auto_layout_exception (MonoClass *klass)
+{
+ char *msg = g_strdup_printf ("The type `%s.%s' layout needs to be Sequential or Explicit",
+ klass->name_space, klass->name, NULL);
+
+ MonoException *e = mono_exception_from_name_msg (
+ mono_get_corlib (), "System.Runtime.InteropServices",
+ "MarshalDirectiveException", msg);
+ g_free (msg);
+ mono_raise_exception (e);
+}
+
/*
* generates IL code to call managed methods from unmanaged code
*/
@@ -2359,8 +2372,9 @@ mono_marshal_get_managed_wrapper (MonoMethod *method, MonoObject *this, MonoMars
break;
}
- /* FIXME: Raise a MarshalDirectiveException here */
- g_assert ((klass->flags & TYPE_ATTRIBUTE_LAYOUT_MASK) != TYPE_ATTRIBUTE_AUTO_LAYOUT);
+ /* The class can not have an automatic layout */
+ if ((klass->flags & TYPE_ATTRIBUTE_LAYOUT_MASK) == TYPE_ATTRIBUTE_AUTO_LAYOUT)
+ raise_auto_layout_exception (klass);
if (t->attrs & PARAM_ATTRIBUTE_OUT) {
mono_mb_emit_byte (mb, CEE_LDNULL);
@@ -2630,8 +2644,9 @@ mono_marshal_get_managed_wrapper (MonoMethod *method, MonoObject *this, MonoMars
break;
}
- /* FIXME: Raise a MarshalDirectiveException here */
- g_assert ((klass->flags & TYPE_ATTRIBUTE_LAYOUT_MASK) != TYPE_ATTRIBUTE_AUTO_LAYOUT);
+ /* The class can not have an automatic layout */
+ if ((klass->flags & TYPE_ATTRIBUTE_LAYOUT_MASK) == TYPE_ATTRIBUTE_AUTO_LAYOUT)
+ raise_auto_layout_exception (klass);
mono_mb_emit_byte (mb, CEE_STLOC_0);
/* Check for null */
@@ -4845,6 +4860,8 @@ mono_marshal_alloc (gpointer size)
{
MONO_ARCH_SAVE_REGS;
+ if (size == NULL)
+ size = (gpointer)4;
return g_try_malloc ((gulong)size);
}
diff --git a/mono/metadata/mono-debug.c b/mono/metadata/mono-debug.c
index b8503ecbc4b..b977ec0546d 100644
--- a/mono/metadata/mono-debug.c
+++ b/mono/metadata/mono-debug.c
@@ -45,8 +45,6 @@ extern void (*mono_debugger_class_init_func) (MonoClass *klass);
void
mono_debug_init (MonoDomain *domain, MonoDebugFormat format)
{
- MonoAssembly **ass;
-
g_assert (!mono_debug_initialized);
mono_debug_initialized = TRUE;
@@ -346,25 +344,35 @@ gchar *
mono_debug_source_location_from_address (MonoMethod *method, guint32 address, guint32 *line_number,
MonoDomain *domain)
{
- MonoDebugMethodInfo *minfo = _mono_debug_lookup_method (method);
+ char *res;
+ MonoDebugMethodInfo *minfo;
MonoDebugDomainData *domain_data;
- if (!minfo)
+ mono_loader_lock ();
+ minfo = _mono_debug_lookup_method (method);
+ if (!minfo || !minfo->handle || !minfo->handle->symfile ||
+ !minfo->handle->symfile->offset_table) {
+ mono_loader_unlock ();
return NULL;
+ }
domain_data = mono_debug_get_domain_data (minfo->handle, domain);
- if (!domain_data->jit [minfo->index])
+ if (!domain_data->jit [minfo->index]) {
+ mono_loader_unlock ();
return NULL;
+ }
- if (minfo->handle) {
+ if (minfo->handle && minfo->handle->symfile) {
gint32 offset = il_offset_from_address (domain_data->jit [minfo->index], address);
+ char *res = NULL;
- if (offset < 0)
- return NULL;
-
- return mono_debug_find_source_location (minfo->handle->symfile, method, offset, line_number);
+ if (offset >= 0)
+ res = mono_debug_find_source_location (minfo->handle->symfile, method, offset, line_number);
+ mono_loader_unlock ();
+ return res;
}
+ mono_loader_unlock ();
return NULL;
}
@@ -381,12 +389,19 @@ mono_debug_source_location_from_address (MonoMethod *method, guint32 address, gu
gchar *
mono_debug_source_location_from_il_offset (MonoMethod *method, guint32 offset, guint32 *line_number)
{
- MonoDebugMethodInfo *minfo = _mono_debug_lookup_method (method);
+ char *res;
+ MonoDebugMethodInfo *minfo;
- if (!minfo || !minfo->handle)
+ mono_loader_lock ();
+ minfo = _mono_debug_lookup_method (method);
+ if (!minfo || !minfo->handle || !minfo->handle->symfile) {
+ mono_loader_unlock ();
return NULL;
+ }
- return mono_debug_find_source_location (minfo->handle->symfile, method, offset, line_number);
+ res = mono_debug_find_source_location (minfo->handle->symfile, method, offset, line_number);
+ mono_loader_unlock ();
+ return res;
}
/*
@@ -398,17 +413,24 @@ mono_debug_il_offset_from_address (MonoMethod *method, gint32 address, MonoDomai
{
MonoDebugMethodInfo *minfo;
MonoDebugDomainData *domain_data;
+ gint32 res;
if (address < 0)
return -1;
+ mono_loader_lock ();
minfo = _mono_debug_lookup_method (method);
- if (!minfo || !minfo->il_offsets)
+ if (!minfo || !minfo->il_offsets || !minfo->handle || !minfo->handle->symfile ||
+ !minfo->handle->symfile->offset_table) {
+ mono_loader_unlock ();
return -1;
+ }
domain_data = mono_debug_get_domain_data (minfo->handle, domain);
- return il_offset_from_address (domain_data->jit [minfo->index], address);
+ res = il_offset_from_address (domain_data->jit [minfo->index], address);
+ mono_loader_unlock ();
+ return res;
}
/*
@@ -420,17 +442,24 @@ mono_debug_address_from_il_offset (MonoMethod *method, gint32 il_offset, MonoDom
{
MonoDebugMethodInfo *minfo;
MonoDebugDomainData *domain_data;
+ gint32 res;
if (il_offset < 0)
return -1;
+ mono_loader_lock ();
minfo = _mono_debug_lookup_method (method);
- if (!minfo || !minfo->il_offsets)
+ if (!minfo || !minfo->il_offsets || !minfo->handle || !minfo->handle->symfile ||
+ !minfo->handle->symfile->offset_table) {
+ mono_loader_unlock ();
return -1;
+ }
domain_data = mono_debug_get_domain_data (minfo->handle, domain);
- return _mono_debug_address_from_il_offset (domain_data->jit [minfo->index], il_offset);
+ res = _mono_debug_address_from_il_offset (domain_data->jit [minfo->index], il_offset);
+ mono_loader_unlock ();
+ return res;
}
MonoDebugDomainData *
@@ -439,6 +468,9 @@ mono_debug_get_domain_data (MonoDebugHandle *handle, MonoDomain *domain)
MonoDebugDomainData *data;
int domain_id = mono_domain_get_id (domain);
+ /* We checked this earlier. */
+ g_assert (handle->symfile);
+
for (data = handle->_priv->domain_table; data; data = data->_priv->next)
if (data->domain_id == domain_id)
return data;
diff --git a/mono/metadata/object.c b/mono/metadata/object.c
index 65176ce2435..904bd25c868 100644
--- a/mono/metadata/object.c
+++ b/mono/metadata/object.c
@@ -90,6 +90,7 @@ typedef struct
{
guint32 initializing_tid;
guint32 waiting_count;
+ gboolean done;
CRITICAL_SECTION initialization_section;
} TypeInitializationLock;
@@ -177,28 +178,38 @@ mono_runtime_class_init (MonoVTable *vtable)
InitializeCriticalSection (&lock->initialization_section);
lock->initializing_tid = tid;
lock->waiting_count = 1;
+ lock->done = FALSE;
/* grab the vtable lock while this thread still owns type_initialization_section */
EnterCriticalSection (&lock->initialization_section);
g_hash_table_insert (type_initialization_hash, vtable, lock);
do_initialization = 1;
} else {
gpointer blocked;
+ TypeInitializationLock *pending_lock;
- if (lock->initializing_tid == tid) {
+ if (lock->initializing_tid == tid || lock->done) {
LeaveCriticalSection (&type_initialization_section);
return;
}
/* see if the thread doing the initialization is already blocked on this thread */
blocked = GUINT_TO_POINTER (lock->initializing_tid);
- while ((blocked = g_hash_table_lookup (blocked_thread_hash, blocked))) {
- if (blocked == GUINT_TO_POINTER (tid)) {
- LeaveCriticalSection (&type_initialization_section);
- return;
+ while ((pending_lock = (TypeInitializationLock*) g_hash_table_lookup (blocked_thread_hash, blocked))) {
+ if (pending_lock->initializing_tid == tid) {
+ if (!pending_lock->done) {
+ LeaveCriticalSection (&type_initialization_section);
+ return;
+ } else {
+ /* the thread doing the initialization is blocked on this thread,
+ but on a lock that has already been freed. It just hasn't got
+ time to awake */
+ break;
+ }
}
+ blocked = GUINT_TO_POINTER (pending_lock->initializing_tid);
}
++lock->waiting_count;
/* record the fact that we are waiting on the initializing thread */
- g_hash_table_insert (blocked_thread_hash, GUINT_TO_POINTER (tid), GUINT_TO_POINTER (lock->initializing_tid));
+ g_hash_table_insert (blocked_thread_hash, GUINT_TO_POINTER (tid), lock);
}
LeaveCriticalSection (&type_initialization_section);
@@ -206,6 +217,7 @@ mono_runtime_class_init (MonoVTable *vtable)
mono_runtime_invoke (method, NULL, NULL, (MonoObject **) &exc);
if (last_domain)
mono_domain_set (last_domain, TRUE);
+ lock->done = TRUE;
LeaveCriticalSection (&lock->initialization_section);
} else {
/* this just blocks until the initializing thread is done */
@@ -2711,6 +2723,7 @@ mono_message_invoke (MonoObject *target, MonoMethodMessage *msg,
MonoDomain *domain;
MonoMethod *method;
MonoMethodSignature *sig;
+ MonoObject *ret;
int i, j, outarg_count = 0;
if (target && target->vtable->klass == mono_defaults.transparent_proxy_class) {
@@ -2735,6 +2748,8 @@ mono_message_invoke (MonoObject *target, MonoMethodMessage *msg,
*out_args = mono_array_new (domain, mono_defaults.object_class, outarg_count);
*exc = NULL;
+ ret = mono_runtime_invoke_array (method, method->klass->valuetype? mono_object_unbox (target): target, msg->args, exc);
+
for (i = 0, j = 0; i < sig->param_count; i++) {
if (sig->params [i]->byref) {
gpointer arg;
@@ -2744,7 +2759,7 @@ mono_message_invoke (MonoObject *target, MonoMethodMessage *msg,
}
}
- return mono_runtime_invoke_array (method, method->klass->valuetype? mono_object_unbox (target): target, msg->args, exc);
+ return ret;
}
void
diff --git a/mono/metadata/process.c b/mono/metadata/process.c
index 90edc4023e5..5fa57bcf0ed 100644
--- a/mono/metadata/process.c
+++ b/mono/metadata/process.c
@@ -875,7 +875,9 @@ MonoBoolean ves_icall_System_Diagnostics_Process_Start_internal (MonoString *app
if(ret) {
process_info->process_handle=procinfo.hProcess;
- process_info->thread_handle=procinfo.hThread;
+ /*process_info->thread_handle=procinfo.hThread;*/
+ process_info->thread_handle=NULL;
+ CloseHandle(procinfo.hThread);
process_info->pid=procinfo.dwProcessId;
process_info->tid=procinfo.dwThreadId;
} else {
diff --git a/mono/metadata/reflection.c b/mono/metadata/reflection.c
index c25ea98cd0d..9a1555d27a7 100644
--- a/mono/metadata/reflection.c
+++ b/mono/metadata/reflection.c
@@ -61,6 +61,9 @@ typedef struct {
MonoMethod *mhandle;
guint32 nrefs;
gpointer *refs;
+ /* for PInvoke */
+ int charset, lasterr, native_cc;
+ MonoString *dll, *dllentry;
} ReflectionMethodBuilder;
const unsigned char table_sizes [64] = {
@@ -887,6 +890,8 @@ method_encode_code (MonoDynamicImage *assembly, ReflectionMethodBuilder *mb)
max_stack = 8; /* we probably need to run a verifier on the code... */
}
+ stream_data_align (&assembly->code);
+
/* check for exceptions, maxstack, locals */
maybe_small = (max_stack <= 8) && (!num_locals) && (!num_exception);
if (maybe_small) {
@@ -1260,6 +1265,14 @@ reflection_methodbuilder_from_method_builder (ReflectionMethodBuilder *rmb,
rmb->mhandle = mb->mhandle;
rmb->nrefs = 0;
rmb->refs = NULL;
+
+ if (mb->dll) {
+ rmb->charset = rmb->charset & 0xf;
+ rmb->lasterr = rmb->charset & 0x40;
+ rmb->native_cc = rmb->native_cc;
+ rmb->dllentry = mb->dllentry;
+ rmb->dll = mb->dll;
+ }
}
static void
@@ -5257,12 +5270,21 @@ MonoArray*
mono_param_get_objects (MonoDomain *domain, MonoMethod *method)
{
static MonoClass *System_Reflection_ParameterInfo;
+ static MonoClassField *dbnull_value_field;
+ MonoClass *klass;
MonoArray *res = NULL;
MonoReflectionMethod *member = NULL;
MonoReflectionParameter *param = NULL;
char **names;
int i;
+ if (!dbnull_value_field) {
+ klass = mono_class_from_name (mono_defaults.corlib, "System", "DBNull");
+ mono_class_init (klass);
+ dbnull_value_field = mono_class_get_field_from_name (klass, "Value");
+ g_assert (dbnull_value_field);
+ }
+
if (!System_Reflection_ParameterInfo)
System_Reflection_ParameterInfo = mono_class_from_name (
mono_defaults.corlib, "System.Reflection", "ParameterInfo");
@@ -5284,7 +5306,7 @@ mono_param_get_objects (MonoDomain *domain, MonoMethod *method)
param = (MonoReflectionParameter *)mono_object_new (domain,
System_Reflection_ParameterInfo);
param->ClassImpl = mono_type_get_object (domain, method->signature->params [i]);
- param->DefaultValueImpl = NULL; /* FIXME */
+ param->DefaultValueImpl = mono_field_get_value_object (domain, dbnull_value_field, NULL); /* FIXME */
param->MemberImpl = (MonoObject*)member;
param->NameImpl = mono_string_new (domain, names [i]);
param->PositionImpl = i;
@@ -7007,6 +7029,17 @@ reflection_methodbuilder_to_mono_method (MonoClass *klass,
} else if (m->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) {
/* TODO */
m->signature->pinvoke = 1;
+
+ method_aux = g_new0 (MonoReflectionMethodAux, 1);
+
+ method_aux->dllentry = g_strdup (mono_string_to_utf8 (rmb->dllentry));
+ method_aux->dll = g_strdup (mono_string_to_utf8 (rmb->dll));
+
+ ((MonoMethodPInvoke*)m)->piflags = (rmb->native_cc << 8) | (rmb->charset ? (rmb->charset - 1) * 2 : 1) | rmb->lasterr;
+
+ if (klass->image->dynamic)
+ mono_g_hash_table_insert (((MonoDynamicImage*)klass->image)->method_aux_hash, m, method_aux);
+
return m;
} else if (!m->klass->dummy &&
!(m->flags & METHOD_ATTRIBUTE_ABSTRACT) &&
@@ -7820,6 +7853,7 @@ mono_reflection_create_runtime_class (MonoReflectionTypeBuilder *tb)
{
MonoClass *klass;
MonoReflectionType* res;
+ int i;
MONO_ARCH_SAVE_REGS;
@@ -7830,7 +7864,6 @@ mono_reflection_create_runtime_class (MonoReflectionTypeBuilder *tb)
/*
* Fields to set in klass:
* the various flags: delegate/unicode/contextbound etc.
- * nested_classes
*/
klass->flags = tb->attrs;
@@ -7842,6 +7875,13 @@ mono_reflection_create_runtime_class (MonoReflectionTypeBuilder *tb)
if (!klass->enumtype)
ensure_runtime_vtable (klass);
+ if (tb->subtypes) {
+ for (i = 0; i < mono_array_length (tb->subtypes); ++i) {
+ MonoReflectionTypeBuilder *subtb = mono_array_get (tb->subtypes, MonoReflectionTypeBuilder*, i);
+ klass->nested_classes = g_list_prepend (klass->nested_classes, my_mono_class_from_mono_type (subtb->type.type));
+ }
+ }
+
/* fields and object layout */
if (klass->parent) {
if (!klass->parent->size_inited)
diff --git a/mono/metadata/reflection.h b/mono/metadata/reflection.h
index e44243f3d66..f365047c3b6 100644
--- a/mono/metadata/reflection.h
+++ b/mono/metadata/reflection.h
@@ -34,6 +34,7 @@ typedef struct {
char **param_names;
MonoMarshalSpec **param_marshall;
MonoCustomAttrInfo **param_cattr;
+ char *dllentry, *dll;
} MonoReflectionMethodAux;
int mono_reflection_parse_type (char *name, MonoTypeNameParse *info);
diff --git a/mono/metadata/threadpool.c b/mono/metadata/threadpool.c
index e14470c0e5d..9d5768df224 100644
--- a/mono/metadata/threadpool.c
+++ b/mono/metadata/threadpool.c
@@ -31,7 +31,7 @@
#include "threadpool.h"
/* maximum number of worker threads */
-int mono_max_worker_threads = 25; /* fixme: should be 25 per available CPU */
+int mono_max_worker_threads = 25; /* per available CPU? */
static int mono_min_worker_threads = 0;
/* current number of worker threads */
@@ -43,6 +43,8 @@ static int busy_worker_threads = 0;
/* we use this to store a reference to the AsyncResult to avoid GC */
static MonoGHashTable *ares_htable = NULL;
+static CRITICAL_SECTION ares_lock;
+
/* we append a job */
static HANDLE job_added;
@@ -91,9 +93,12 @@ mono_async_invoke (MonoAsyncResult *ares)
}
mono_monitor_exit ((MonoObject *) ares);
+ EnterCriticalSection (&ares_lock);
mono_g_hash_table_remove (ares_htable, ares);
+ LeaveCriticalSection (&ares_lock);
}
+
MonoAsyncResult *
mono_thread_pool_add (MonoObject *target, MonoMethodMessage *msg, MonoDelegate *async_callback,
MonoObject *state)
@@ -122,11 +127,14 @@ mono_thread_pool_add (MonoObject *target, MonoMethodMessage *msg, MonoDelegate *
ares->async_delegate = target;
if (!ares_htable) {
+ InitializeCriticalSection (&ares_lock);
ares_htable = mono_g_hash_table_new (NULL, NULL);
job_added = CreateSemaphore (NULL, 0, 0x7fffffff, NULL);
}
+ EnterCriticalSection (&ares_lock);
mono_g_hash_table_insert (ares_htable, ares, ares);
+ LeaveCriticalSection (&ares_lock);
busy = (int) InterlockedCompareExchange (&busy_worker_threads, 0, -1);
worker = (int) InterlockedCompareExchange (&mono_worker_threads, 0, -1);
@@ -203,8 +211,19 @@ mono_thread_pool_cleanup (void)
static void
append_job (MonoAsyncResult *ar)
{
+ GList *tmp;
+
EnterCriticalSection (&mono_delegate_section);
- async_call_queue = g_list_append (async_call_queue, ar);
+ if (async_call_queue == NULL) {
+ async_call_queue = g_list_append (async_call_queue, ar);
+ } else {
+ for (tmp = async_call_queue; tmp && tmp->data != NULL; tmp = tmp->next);
+ if (tmp == NULL) {
+ async_call_queue = g_list_append (async_call_queue, ar);
+ } else {
+ tmp->data = ar;
+ }
+ }
LeaveCriticalSection (&mono_delegate_section);
}
@@ -212,17 +231,23 @@ static MonoAsyncResult *
dequeue_job (void)
{
MonoAsyncResult *ar = NULL;
- GList *tmp = NULL;
+ GList *tmp, *tmp2;
EnterCriticalSection (&mono_delegate_section);
- if (async_call_queue) {
- ar = (MonoAsyncResult *)async_call_queue->data;
- tmp = async_call_queue;
- async_call_queue = g_list_remove_link (tmp, tmp);
+ tmp = async_call_queue;
+ if (tmp) {
+ ar = (MonoAsyncResult *) tmp->data;
+ tmp->data = NULL;
+ tmp2 = tmp;
+ for (tmp2 = tmp; tmp2->next != NULL; tmp2 = tmp2->next);
+ if (tmp2 != tmp) {
+ async_call_queue = tmp->next;
+ tmp->next = NULL;
+ tmp2->next = tmp;
+ tmp->prev = tmp2;
+ }
}
LeaveCriticalSection (&mono_delegate_section);
- if (tmp)
- g_list_free_1 (tmp);
return ar;
}
@@ -268,7 +293,7 @@ async_invoke_thread (gpointer data)
}
while (!data && timeout > 0);
}
-
+
if (!data) {
workers = (int) InterlockedCompareExchange (&mono_worker_threads, 0, -1);
min = (int) InterlockedCompareExchange (&mono_min_worker_threads, 0, -1);
diff --git a/mono/metadata/threads.c b/mono/metadata/threads.c
index 7a43ab5ff8a..26568288af1 100644
--- a/mono/metadata/threads.c
+++ b/mono/metadata/threads.c
@@ -243,12 +243,9 @@ static guint32 start_wrapper(void *data)
mono_thread_push_appdomain_ref (mono_domain_get ());
thread_adjust_static_data (thread);
-#ifndef PLATFORM_WIN32
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION "start_wrapper for %d\n", thread->tid);
#endif
- pthread_cleanup_push ((void (*) (void *)) mono_thread_detach, thread);
-#endif
start_func (this);
#ifdef PLATFORM_WIN32
@@ -273,8 +270,6 @@ static guint32 start_wrapper(void *data)
TlsSetValue (current_object_key, NULL);
thread_cleanup (thread);
-#else
- pthread_cleanup_pop (1);
#endif
return(0);
diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog
index a730a60ba59..8e09b509dbc 100644
--- a/mono/mini/ChangeLog
+++ b/mono/mini/ChangeLog
@@ -1,3 +1,22 @@
+2004-09-17 Zoltan Varga <vargaz@freemail.hu>
+
+ * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
+
+2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
+
+ * inssel.brg: make ldelema check aot friendly.
+
+Thu Sep 9 20:57:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
+
+ * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
+ OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
+ set the carry/borrow flag). The sparc and s390 implementations
+ can now use optimized versions (and simplify the code). ppc bugfixes.
+
+2004-09-02 Zoltan Varga <vargaz@freemail.hu>
+
+ * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
+
2004-08-23 Zoltan Varga <vargaz@freemail.hu>
* inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
diff --git a/mono/mini/basic-long.cs b/mono/mini/basic-long.cs
index f16f9f5dcb1..4b321017ce7 100644
--- a/mono/mini/basic-long.cs
+++ b/mono/mini/basic-long.cs
@@ -263,6 +263,12 @@ class Tests {
return 1;
}
+ static int test_4_addcc_imm () {
+ long a = 3;
+ long b = 0;
+ return (int)(a - b + 1);
+ }
+
static int test_5_sub () {
long a = 8;
long b = 3;
diff --git a/mono/mini/cpu-g4.md b/mono/mini/cpu-g4.md
index 7d76db87792..638fb2828bc 100644
--- a/mono/mini/cpu-g4.md
+++ b/mono/mini/cpu-g4.md
@@ -545,6 +545,8 @@ adc: dest:i src1:i src2:i len:4
addcc: dest:i src1:i src2:i len:4
subcc: dest:i src1:i src2:i len:4
adc_imm: dest:i src1:i len:12
+addcc_imm: dest:i src1:i len:12
+subcc_imm: dest:i src1:i len:12
sbb: dest:i src1:i src2:i len:4
sbb_imm: dest:i src1:i len:12
br_reg: src1:i len:8
diff --git a/mono/mini/cpu-pentium.md b/mono/mini/cpu-pentium.md
index 2568eac81f6..e48ba96540e 100644
--- a/mono/mini/cpu-pentium.md
+++ b/mono/mini/cpu-pentium.md
@@ -354,7 +354,9 @@ loadr8_membase: dest:f src1:b len:6
loadr8_spill_membase: src1:b len:8
loadu4_mem: dest:i len:9
move: dest:i src1:i len:2
+addcc_imm: dest:i src1:i len:6 clob:1
add_imm: dest:i src1:i len:6 clob:1
+subcc_imm: dest:i src1:i len:6 clob:1
sub_imm: dest:i src1:i len:6 clob:1
mul_imm: dest:i src1:i len:6
# there is no actual support for division or reminder by immediate
diff --git a/mono/mini/cpu-s390.md b/mono/mini/cpu-s390.md
index 256bf4aa609..3cc63d770d1 100644
--- a/mono/mini/cpu-s390.md
+++ b/mono/mini/cpu-s390.md
@@ -349,7 +349,9 @@ loadu4_mem: dest:i len:8
move: dest:i src1:i len:4
fmove: dest:f src1:f len:4
add_imm: dest:i src1:i len:18
+addcc_imm: dest:i src1:i len:18
sub_imm: dest:i src1:i len:18
+subcc_imm: dest:i src1:i len:18
mul_imm: dest:i src1:i len:18
# there is no actual support for division or reminder by immediate
# we simulate them, though (but we need to change the burg rules
diff --git a/mono/mini/cpu-sparc.md b/mono/mini/cpu-sparc.md
index 8f9280a222b..6fef70d713d 100644
--- a/mono/mini/cpu-sparc.md
+++ b/mono/mini/cpu-sparc.md
@@ -356,7 +356,9 @@ loadr8_membase: dest:f src1:b len:20
loadu4_mem: dest:i len:8
move: dest:i src1:i len:4
add_imm: dest:i src1:i len:12
+addcc_imm: dest:i src1:i len:64
sub_imm: dest:i src1:i len:12
+subcc_imm: dest:i src1:i len:64
mul_imm: dest:i src1:i len:12
div_imm: dest:a src1:i src2:i len:28
div_un_imm: dest:a src1:i src2:i len:12
diff --git a/mono/mini/inssel-long32.brg b/mono/mini/inssel-long32.brg
index 0d1cf077f2d..2ebeb3c27b7 100644
--- a/mono/mini/inssel-long32.brg
+++ b/mono/mini/inssel-long32.brg
@@ -108,7 +108,7 @@ lreg: OP_LADD_OVF_UN (lreg, lreg) {
}
lreg: OP_LADD (lreg, i8con) {
- MONO_EMIT_NEW_BIALU_IMM (s, OP_ADD_IMM, state->reg1, state->left->reg1, state->right->tree->inst_ls_word);
+ MONO_EMIT_NEW_BIALU_IMM (s, OP_ADDCC_IMM, state->reg1, state->left->reg1, state->right->tree->inst_ls_word);
MONO_EMIT_BIALU_IMM (s, tree, OP_ADC_IMM, state->reg2, state->left->reg2, state->right->tree->inst_ms_word);
}
@@ -118,7 +118,7 @@ lreg: OP_LSUB (lreg, lreg) {
}
lreg: OP_LSUB (lreg, i8con) {
- MONO_EMIT_NEW_BIALU_IMM (s, OP_SUB_IMM, state->reg1, state->left->reg1, state->right->tree->inst_ls_word);
+ MONO_EMIT_NEW_BIALU_IMM (s, OP_SUBCC_IMM, state->reg1, state->left->reg1, state->right->tree->inst_ls_word);
MONO_EMIT_BIALU_IMM (s, tree, OP_SBB_IMM, state->reg2, state->left->reg2, state->right->tree->inst_ms_word);
}
@@ -575,15 +575,30 @@ reg: OP_LCONV_TO_OVF_I1_UN (lreg) {
}
reg: OP_LCONV_TO_OVF_I1 (lreg) {
+ MonoInst *is_negative, *end_label;
+
+ MONO_NEW_LABEL (s, is_negative);
+ MONO_NEW_LABEL (s, end_label);
+
MONO_EMIT_NEW_BIALU_IMM (s, OP_COMPARE_IMM, -1, state->left->reg2, 0);
MONO_EMIT_NEW_COND_EXC (s, GT, "OverflowException");
MONO_EMIT_NEW_BIALU_IMM (s, OP_COMPARE_IMM, -1, state->left->reg2, -1);
MONO_EMIT_NEW_COND_EXC (s, LT, "OverflowException");
+ MONO_EMIT_NEW_BIALU_IMM (s, OP_COMPARE_IMM, -1, state->left->reg2, 0);
+ MONO_EMIT_NEW_BRANCH_LABEL (s, CEE_BLT, is_negative);
+
+ /* Positive */
MONO_EMIT_NEW_COMPARE_IMM (s, state->left->reg1, 127);
- MONO_EMIT_NEW_COND_EXC (s, GT, "OverflowException");
+ MONO_EMIT_NEW_COND_EXC (s, GT_UN, "OverflowException");
+ MONO_EMIT_NEW_BRANCH_LABEL (s, CEE_BR, end_label);
+
+ /* Negative */
+ mono_bblock_add_inst (s->cbb, is_negative);
MONO_EMIT_NEW_COMPARE_IMM (s, state->left->reg1, -128);
- MONO_EMIT_NEW_COND_EXC (s, LT, "OverflowException");
+ MONO_EMIT_NEW_COND_EXC (s, LT_UN, "OverflowException");
+ mono_bblock_add_inst (s->cbb, end_label);
+
MONO_EMIT_UNALU (s, tree, CEE_CONV_I1, state->reg1, state->left->reg1);
}
diff --git a/mono/mini/inssel.brg b/mono/mini/inssel.brg
index e0bc1f0254b..0cb8129cca0 100644
--- a/mono/mini/inssel.brg
+++ b/mono/mini/inssel.brg
@@ -1736,7 +1736,14 @@ reg: OP_CHECK_ARRAY_TYPE (reg) {
vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
MONO_EMIT_NEW_LOAD_MEMBASE_OP (s, OP_LOAD_MEMBASE, elclass_reg,
class_reg, G_STRUCT_OFFSET (MonoClass, element_class));
- MONO_EMIT_NEW_BIALU_IMM (s, OP_COMPARE_IMM, -1, elclass_reg, tree->klass);
+ if (mono_compile_aot) {
+ int klass_reg = mono_regstate_next_int (s->rs);
+ MONO_EMIT_NEW_CLASSCONST (s, klass_reg, tree->klass);
+ MONO_EMIT_NEW_BIALU (s, OP_COMPARE, -1, elclass_reg, klass_reg);
+ } else {
+ MONO_EMIT_NEW_BIALU_IMM (s, OP_COMPARE_IMM, -1, elclass_reg, tree->klass);
+ }
+
MONO_EMIT_NEW_COND_EXC (s, NE_UN, "ArrayTypeMismatchException");
MONO_EMIT_UNALU (s, tree, OP_MOVE, state->reg1, state->left->reg1);
}
diff --git a/mono/mini/mini-ops.h b/mono/mini/mini-ops.h
index 32b6eb5f35e..98da133d3fa 100644
--- a/mono/mini/mini-ops.h
+++ b/mono/mini/mini-ops.h
@@ -297,7 +297,9 @@ MINI_OP(OP_ADC_IMM, "adc_imm")
MINI_OP(OP_SBB, "sbb")
MINI_OP(OP_SBB_IMM, "sbb_imm")
MINI_OP(OP_ADDCC, "addcc")
+MINI_OP(OP_ADDCC_IMM, "addcc_imm")
MINI_OP(OP_SUBCC, "subcc")
+MINI_OP(OP_SUBCC_IMM, "subcc_imm")
MINI_OP(OP_BR_REG, "br_reg")
MINI_OP(OP_SEXT_I1, "sext_i1")
MINI_OP(OP_SEXT_I2, "sext_i2")
diff --git a/mono/mini/mini-ppc.c b/mono/mini/mini-ppc.c
index 537cefb50a7..92bef163894 100644
--- a/mono/mini/mini-ppc.c
+++ b/mono/mini/mini-ppc.c
@@ -2443,6 +2443,14 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case OP_ADC:
ppc_adde (code, ins->dreg, ins->sreg1, ins->sreg2);
break;
+ case OP_ADDCC_IMM:
+ if (ppc_is_imm16 (ins->inst_imm)) {
+ ppc_addic (code, ins->dreg, ins->sreg1, ins->inst_imm);
+ } else {
+ ppc_load (code, ppc_r11, ins->inst_imm);
+ ppc_addc (code, ins->dreg, ins->sreg1, ppc_r11);
+ }
+ break;
case OP_ADD_IMM:
if (ppc_is_imm16 (ins->inst_imm)) {
ppc_addi (code, ins->dreg, ins->sreg1, ins->inst_imm);
@@ -2522,6 +2530,10 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case OP_SUBCC:
ppc_subfc (code, ins->dreg, ins->sreg2, ins->sreg1);
break;
+ case OP_SUBCC_IMM:
+ ppc_load (code, ppc_r11, ins->inst_imm);
+ ppc_subfc (code, ins->dreg, ppc_r11, ins->sreg1);
+ break;
case CEE_SUB:
ppc_subf (code, ins->dreg, ins->sreg2, ins->sreg1);
break;
@@ -2539,7 +2551,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
break;
case OP_SBB_IMM:
ppc_load (code, ppc_r11, ins->inst_imm);
- ppc_subfe (code, ins->dreg, ins->sreg2, ppc_r11);
+ ppc_subfe (code, ins->dreg, ppc_r11, ins->sreg1);
break;
case OP_PPC_SUBFIC:
g_assert (ppc_is_imm16 (ins->inst_imm));
diff --git a/mono/mini/mini-s390.c b/mono/mini/mini-s390.c
index 0a7db247fa2..6d7f7ce718b 100644
--- a/mono/mini/mini-s390.c
+++ b/mono/mini/mini-s390.c
@@ -3228,6 +3228,7 @@ guint8 cond;
s390_alcr (code, ins->dreg, ins->sreg2);
}
break;
+ case OP_ADDCC_IMM:
case OP_ADD_IMM: {
if ((ins->next) &&
(ins->next->opcode == OP_ADC_IMM)) {
@@ -3293,6 +3294,7 @@ guint8 cond;
s390_slbr (code, ins->dreg, ins->sreg2);
}
break;
+ case OP_SUBCC_IMM:
case OP_SUB_IMM: {
if (s390_is_imm16 (-ins->inst_imm)) {
if (ins->dreg != ins->sreg1) {
diff --git a/mono/mini/mini-sparc.c b/mono/mini/mini-sparc.c
index d0f58dc84cf..1552e50c16e 100644
--- a/mono/mini/mini-sparc.c
+++ b/mono/mini/mini-sparc.c
@@ -2652,6 +2652,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case CEE_ADD:
sparc_add (code, FALSE, ins->sreg1, ins->sreg2, ins->dreg);
break;
+ case OP_ADDCC_IMM:
case OP_ADD_IMM:
/* according to inssel-long32.brg, this should set cc */
EMIT_ALU_IMM (ins, add, TRUE);
@@ -2669,6 +2670,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case CEE_SUB:
sparc_sub (code, FALSE, ins->sreg1, ins->sreg2, ins->dreg);
break;
+ case OP_SUBCC_IMM:
case OP_SUB_IMM:
/* according to inssel-long32.brg, this should set cc */
EMIT_ALU_IMM (ins, sub, TRUE);
diff --git a/mono/mini/mini-x86.c b/mono/mini/mini-x86.c
index 4f5842f8750..dc098a1c26b 100644
--- a/mono/mini/mini-x86.c
+++ b/mono/mini/mini-x86.c
@@ -2326,6 +2326,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case OP_ADC:
x86_alu_reg_reg (code, X86_ADC, ins->sreg1, ins->sreg2);
break;
+ case OP_ADDCC_IMM:
case OP_ADD_IMM:
x86_alu_reg_imm (code, X86_ADD, ins->dreg, ins->inst_imm);
break;
@@ -2339,6 +2340,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case OP_SBB:
x86_alu_reg_reg (code, X86_SBB, ins->sreg1, ins->sreg2);
break;
+ case OP_SUBCC_IMM:
case OP_SUB_IMM:
x86_alu_reg_imm (code, X86_SUB, ins->dreg, ins->inst_imm);
break;
diff --git a/mono/mini/mini.c b/mono/mini/mini.c
index 14a32f6dd6c..28f70d463c3 100644
--- a/mono/mini/mini.c
+++ b/mono/mini/mini.c
@@ -3893,7 +3893,13 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
CHECK_OPSIZE (5);
n = read32 (ip + 1);
- if (method->wrapper_type != MONO_WRAPPER_NONE) {
+ if (method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD) {
+ NEW_PCONST (cfg, ins, mono_method_get_wrapper_data (method, n));
+ ins->cil_code = ip;
+ ins->type = STACK_OBJ;
+ *sp = ins;
+ }
+ else if (method->wrapper_type != MONO_WRAPPER_NONE) {
int temp;
MonoInst *iargs [1];
diff --git a/mono/tests/ChangeLog b/mono/tests/ChangeLog
index e73b632c1c1..041938869bd 100644
--- a/mono/tests/ChangeLog
+++ b/mono/tests/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-07 Duncan Mak <duncan@ximian.com>
+
+ * typeof-ptr.cs: Add unsafe sections to the code that's using
+ pointers directly. This was breaking the test stage on the build
+ boxes.
+
2004-05-29 Zoltan Varga <vargaz@freemail.hu>
* invoke.cs: Add an Invoke test.
diff --git a/mono/tests/typeof-ptr.cs b/mono/tests/typeof-ptr.cs
index eea3d1072db..69e75ca1745 100644
--- a/mono/tests/typeof-ptr.cs
+++ b/mono/tests/typeof-ptr.cs
@@ -8,13 +8,19 @@ class T {
ParameterInfo[] args = typeof (T).GetMethod ("meth").GetParameters ();
if (args[0].ParameterType == args[1].ParameterType)
return 1;
-
- if (typeof(int) == typeof (int*))
- return 2;
+
+ unsafe {
+ if (typeof(int) == typeof (int*))
+ return 2;
+ }
if (args[0].ParameterType != typeof(int))
return 3;
- if (args[1].ParameterType != typeof(int*))
- return 4;
+
+ unsafe {
+ if (args[1].ParameterType != typeof(int*))
+ return 4;
+ }
+
return 0;
}
}
diff --git a/tools/locale-builder/supp/ChangeLog b/tools/locale-builder/supp/ChangeLog
index b5eb13b4ddc..aac15bd01ce 100755
--- a/tools/locale-builder/supp/ChangeLog
+++ b/tools/locale-builder/supp/ChangeLog
@@ -1,3 +1,9 @@
+2004-10-06 Jackson Harper <jackson@ximian.com>
+
+ * pt.xml: We need a space after R$. Is there a better way to do
+ this? I should know...
+ * pt_BR.xml: Fix currency format.
+
2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
* ja.xml : added extra datetime patterns.
diff --git a/tools/locale-builder/supp/pt.xml b/tools/locale-builder/supp/pt.xml
new file mode 100755
index 00000000000..c424d37d4fa
--- /dev/null
+++ b/tools/locale-builder/supp/pt.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ldml>
+ <numbers>
+ <currencies>
+ <currency type="BRL">
+ <displayName>Real Brasileiro</displayName>
+ <symbol>R$ </symbol>
+ </currency>
+ </currencies>
+ </numbers>
+</ldml>
+
diff --git a/tools/locale-builder/supp/pt_BR.xml b/tools/locale-builder/supp/pt_BR.xml
index 5492f0a75b8..f06421234f3 100755
--- a/tools/locale-builder/supp/pt_BR.xml
+++ b/tools/locale-builder/supp/pt_BR.xml
@@ -4,7 +4,7 @@
<currencyFormats>
<currencyFormatLength >
<currencyFormat >
- <pattern>#,##0;(-#,##0)</pattern>
+ <pattern>#,##0.00;(#,##0.00)</pattern>
</currencyFormat>
</currencyFormatLength >
</currencyFormats>
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>