[Mono-list] Re: Solaris.cs

smoux smoux91@yahoo.fr
Thu, 22 Nov 2001 13:25:13 +0100 (CET)


--0-523436928-1006431913=:68614
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Content-Disposition: inline

> What are the differences between solaris.cs and the
existing Linux.cs?

you will found here the solaris.diff to see the
differences. There are some difference on the
O_CREATE, O_EXCLU, O_APPEND and few others. 

Due to this, mono cannot creates files on Solaris.

>If they are minimal we should rename Linux.cs to
POSIX.cs or something.
>(Especially as I'm working on some changes to
Linux.cs to use the new IO layer)

I think the differences are not too big, but enough to
make errors during execution of mono. 
Then, I propose you to see the differences and make
the decision how to manage it.

>Again, this should just be the same as the linux
build.
yes, but I cannot commit it.

>- Dick

smoux




___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Courrier : http://courrier.yahoo.fr
--0-523436928-1006431913=:68614
Content-Type: text/plain; name="solaris.diff"
Content-Description: solaris.diff
Content-Disposition: inline; filename="solaris.diff"

--- Linux.cs	Thu Nov 22 13:11:03 2001
+++ Solaris.cs	Thu Nov 22 13:11:13 2001
@@ -1,19 +1,8 @@
 /*---------------------------------------------------------------------
 
-		 XX		   X		    XXX
-				  XX		     XX
-		XXX	XX XXX	 XXXXX		     XX
-		 XX	XXX XX	  XX		     XX
-		 XX	XX  XX	  XX	  XXXXX	     XX
-		 XX	XX  XX	  XX XX	 XX    X     XX
-		XXXX	XX  XX	   XXX	 XXXXXXX    XXXX
-					 XX
-					  XXXXX
 
-Copyright (c) 2001 Intel Corporation.  All Rights Reserved.
-
-CREATED: August	22, 2001
-OWNER: Scott D Smith, Joel Marcey
+CREATED: November	20, 2001
+OWNER: smoux <smoux91@yahoo.fr>
 VERSION: 1.0
 ---------------------------------------------------------------------*/
 	    
@@ -26,7 +15,7 @@
 namespace System.PAL
 {
 	/// <summary>
-	///	Class that implements IOperatingSystem,	providing the requested	functionality through calls into APIs available	in Linux 
+	///	Class that implements IOperatingSystem,	providing the requested	functionality through calls into APIs available	in Solaris
 	/// </summary>
 	internal class OpSys
 	{
@@ -35,12 +24,13 @@
 		//----------------------------------
 		//	       Class Constants
 		//----------------------------------
-		private	const int EOF =	-1; // TODO: Linux: Is this true?
+		private	const int EOF =	-1; // TODO: Solaris: Is this true?
 	
 
 		// For StdInputStream and StdOutputStream
-		private	const int STDOUT = 1; // TODO: Linux: Is this true?
-		private	const int STDIN	= 0; //	TODO: Linux: Is	this true?
+		private const int STDIN         = 0x00000000;	// TODO: Solaris: Is this true?
+		private const int STDOUT        = 0x00000001;	// TODO: Solaris: Is this true?
+		private const int STDERR        = 0x00000002;	// TODO: Solaris: Is this true?	
 
 
 		//----------------------------------
@@ -175,11 +165,7 @@
 		{
 			get
 			{
-				string path = Path.Combine(Path.Combine("/proc", _getPid().ToString()), "cmdline");
-				StreamReader stream = File.OpenText(path);
-				string res = stream.ReadToEnd();
-				stream.Close();
-				return res;
+				return null;
 			}
 		}
 
@@ -203,62 +189,62 @@
 
 		public string ChangeExtension(string path, string extension)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:ChangeExtension(System.String, System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:ChangeExtension(System.String, System.String): Stub Method");
 			return null;
 		}
 
 		public string GetExtension(string path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetExtension(System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetExtension(System.String): Stub Method");
 			return null;
 		}
 
 		public string GetFileName(string path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetFileName(System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetFileName(System.String): Stub Method");
 			return null;
 		}
 	
 		public string GetFileNameWithoutExtension(string path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetFileNameWithoutExtension(System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetFileNameWithoutExtension(System.String): Stub Method");
 			return null;
 		}
 
 		public string GetFullPath(string path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetFullPath(System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetFullPath(System.String): Stub Method");
 			return null;
 		}
 
 		public string GetPathRoot(string path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetPathRoot(System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetPathRoot(System.String): Stub Method");
 			return null;
 
 		}
 	
 		public string GetTempFileName()
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetTempFileName(): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetTempFileName(): Stub Method");
 			return null;
 		}
 	
 		public string GetTempPath()
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetTempPath(): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetTempPath(): Stub Method");
 			return null;
 		}
 
 		public bool HasExtension(string	path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:HasExtension(System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:HasExtension(System.String): Stub Method");
 			return false;
 		}
 
 		public bool IsPathRooted(string	path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:IsPathRooted(System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:IsPathRooted(System.String): Stub Method");
 			return false;
 		}
 
@@ -268,80 +254,80 @@
 
 		public void DeleteDirectory(string path, bool recursive)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:DeleteDirectory(System.String, System.Boolean): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:DeleteDirectory(System.String, System.Boolean): Stub Method");
 		}
 
 		public bool ExistsDirectory(string path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:ExistsDirectory(System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:ExistsDirectory(System.String): Stub Method");
 			return false;
 		}
 
 		public DateTime	GetCreationTimeDirectory(string	path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetCreationTimeDirectory(System.String): Stub	Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetCreationTimeDirectory(System.String): Stub	Method");
 			return new DateTime(0);
 		}
 
 		public string GetCurrentDirectory()
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetCurrentDirectory(): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetCurrentDirectory(): Stub Method");
 			return null;
 		}
 
 		public string[]	GetDirectories(string path, string searchPattern)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetDirectories(System.String,System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetDirectories(System.String,System.String): Stub Method");
 			return null;
 		}
 
 		public string[]	GetFiles(string	path, string searchPattern)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetFiles(System.String, System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetFiles(System.String, System.String): Stub Method");
 			return null;
 		}
 
 		public string[]	GetFileSystemEntries(string path, string searchPattern)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetFileSystemEntries(System.String, System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetFileSystemEntries(System.String, System.String): Stub Method");
 			return null;
 		}
 
 		public DateTime	GetLastAccessTimeDirectory(string path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetLastAccessTimeDirectory(System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetLastAccessTimeDirectory(System.String): Stub Method");
 			return new DateTime(0);
 		}
 
 		public DateTime	GetLastWriteTimeDirectory(string path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetLastWriteTimeDirectory(System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetLastWriteTimeDirectory(System.String): Stub Method");
 			return new DateTime(0);
 		}
 
 		public void MoveDirectory(string sourceDirName,	string destDirName)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:MoveDirectory(System.String, System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:MoveDirectory(System.String, System.String): Stub Method");
 		}
 
 		public void SetCreationTimeDirectory(string path, DateTime creationTime)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:SetCreationTimeDirectory(System.String, System.DateTime): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:SetCreationTimeDirectory(System.String, System.DateTime): Stub Method");
 		}
 
 		public void SetCurrentDirectory(string path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:SetCurrentDirectory(System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:SetCurrentDirectory(System.String): Stub Method");
 		}
 
 		public void SetLastAccessTimeDirectory(string path, DateTime lastAccessTime)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:SetLastAccessTimeDirectory(System.String, System.DateTime): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:SetLastAccessTimeDirectory(System.String, System.DateTime): Stub Method");
 		}
 
 		public void SetLastWriteTimeDirectory(string path, DateTime lastWriteTime)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:SetLastWriteTimeDirectory(System.String, System.DateTime): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:SetLastWriteTimeDirectory(System.String, System.DateTime): Stub Method");
 		}
 
 		//-----------------------------------
@@ -429,41 +415,41 @@
 	
 		public bool ExistsFile(string path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:ExistsFile(System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:ExistsFile(System.String): Stub Method");
 			return false;
 		}
 	
 		public DateTime	GetCreationTimeFile(string path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetCreationTimeFile(System.String): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetCreationTimeFile(System.String): Stub Method");
 			return new DateTime(0);
 		}
 	
 		public DateTime	GetLastAccessTimeFile(string path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetLastAccessTimeFile(System.String):	Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetLastAccessTimeFile(System.String):	Stub Method");
 			return new DateTime(0);
 		}
 	
 		public DateTime	GetLastWriteTimeFile(string path)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:GetLastWriteFile(System.String): Stub	Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:GetLastWriteFile(System.String): Stub	Method");
 			return new DateTime(0);
 		}
 	
 		public void SetCreationTimeFile(string path, DateTime creationTime)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:SetCreationTimeFile(System.String, System.DateTime): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:SetCreationTimeFile(System.String, System.DateTime): Stub Method");
 		}
 	
 		public void SetLastAccessTimeFile(string path, DateTime	lastAccessTime)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:SetLastAccessTimeFile(System.String, System.DateTime): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:SetLastAccessTimeFile(System.String, System.DateTime): Stub Method");
 		}
 	
 		public void SetLastWriteTimeFile(string	path, DateTime lastWriteTime)
 		{
-			System.Diagnostics.Debug.WriteLine("Linux:SetCLastWriteTimeFile(System.String, System.DateTime): Stub Method");
+			System.Diagnostics.Debug.WriteLine("Solaris:SetCLastWriteTimeFile(System.String, System.DateTime): Stub Method");
 		}
 
 
@@ -511,11 +497,11 @@
 		private const int O_RDONLY             = 0x00000000;
 		private const int O_WRONLY             = 0x00000001;
 		private const int O_RDWR               = 0x00000002;
-		private const int O_CREAT              = 0x00000040;
-		private const int O_EXCL               = 0x00000080;
+		private const int O_CREAT              = 0x00000100;
+		private const int O_EXCL               = 0x00000400;
 		private const int O_TRUNC              = 0x00000200;
-		private const int O_APPEND             = 0x00000400;
-
+		private const int O_APPEND             = 0x00000008;
+		
 		private const int SEEK_SET             = 0;
 		private const int SEEK_CUR             = 1;
 		private const int SEEK_END             = 2;

--0-523436928-1006431913=:68614--