[Fwd: Re: [MonoDevelop] Problem getting monodevelop to load combines]

John BouAntoun jba-mono@optusnet.com.au
Sun, 05 Dec 2004 19:46:08 +1100


--=-HiU30jgPOG4b6LPB0uz5
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Todd,

Your suggested changes were giving me ambiguous usage errors.

The attached patch works with my mono/mcs (installed from head two weeks
ago) and shouldn't change the mono 1.0.4 behaviour at all.

JBA

On Tue, 2004-11-30 at 01:09 -0800, Todd Berman wrote:
> This patch wont work.
> 
> 1) You aren't using #if MONO_POSIX_OEE so you will break the build for
> everyone who is using any released version of mono.
> 2) Stylistically you should follow what was used above with a using
> FilePermissions = Mono.Unix.FilePermissions. However, I believe that
> using existed to distinguish between Sys.IO.FileMode and
> Mono.Posix.FileMode, so you most likely dont need it at all, and
> changing the first #if sequence to:
> 
> #if MONO_POSIX_OEE
> using Mono.Unix;
> #else
> using Mono.Posix;
> using FileMode = Mono.Posix.FileMode;
> #endif
> 
> would be the best bet.
> 
> --Todd
> 
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list

--=-HiU30jgPOG4b6LPB0uz5
Content-Disposition: attachment; filename=Combine-monohead-patch.diff
Content-Type: text/x-patch; name=Combine-monohead-patch.diff; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

Index: Combine.cs
===================================================================
--- Combine.cs	(revision 2051)
+++ Combine.cs	(working copy)
@@ -17,8 +17,10 @@
 
 using Mono.Posix;
 #if MONO_POSIX_OEE
-using FileMode = Mono.Posix.FilePermissions;
+using Posix = Mono.Unix;
+using FileMode = Mono.Unix.FilePermissions; 
 #else
+using Posix = Mono.Posix;
 using FileMode = Mono.Posix.FileMode;
 #endif
 
@@ -663,7 +665,7 @@
 			buildstream.Flush ();
 			buildstream.Close ();
 			
-			Syscall.chmod (Path.Combine (path, "make.sh"), FileMode.S_IRUSR | FileMode.S_IWUSR | FileMode.S_IXUSR | FileMode.S_IRGRP | FileMode.S_IWGRP | FileMode.S_IROTH);
+			Posix.Syscall.chmod (Path.Combine (path, "make.sh"), FileMode.S_IRUSR | FileMode.S_IWUSR | FileMode.S_IXUSR | FileMode.S_IRGRP | FileMode.S_IWGRP | FileMode.S_IROTH);
 
 			StreamWriter stream = new StreamWriter (Path.Combine (path, "Makefile.solution." + Name.Replace (" ", "")));
 			stream.WriteLine ("# This file is autogenerated by MonoDevelop");

--=-HiU30jgPOG4b6LPB0uz5--