* MapAttribute.cs: Update (adds SuppressFlags property).
authorJonathan Pryor <jpryor@novell.com>
Sat, 28 Oct 2006 01:45:06 +0000 (01:45 -0000)
committerJonathan Pryor <jpryor@novell.com>
Sat, 28 Oct 2006 01:45:06 +0000 (01:45 -0000)
* Syscall.cs: Mark non-flags FilePermissions enumeration members so that
  they aren't treated as bitfields.  Impacts e.g. S_IFDIR, S_IFCHR, etc..

svn path=/trunk/mcs/; revision=67055

mcs/class/Mono.Posix/Mono.Unix.Native/ChangeLog
mcs/class/Mono.Posix/Mono.Unix.Native/MapAttribute.cs
mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs

index e9851db764f49b57b4789a0ffa3bc959cb4c61c5..a1350418853d9a8035564ec2fd032b2ca063f335 100644 (file)
@@ -1,3 +1,9 @@
+2006-10-27  Jonathan Pryor  <jonpryor@vt.edu>
+
+       * MapAttribute.cs: Update (adds SuppressFlags property).
+       * Syscall.cs: Mark non-flags FilePermissions enumeration members so that
+         they aren't treated as bitfields.  Impacts e.g. S_IFDIR, S_IFCHR, etc..
+
 2006-10-24  Jonathan Pryor  <jonpryor@vt.edu>
 
        * HeaderAttribute.cs: Removed.  Use create-native-map command-line arguments
index a628a27f44a65c86adddb24ac1bfe0334782d559..714d771c58ce8ed9adeb71525f7575515f55edd6 100644 (file)
@@ -37,6 +37,7 @@ using System;
                AttributeTargets.Struct)]
 internal class MapAttribute : Attribute {
        private string nativeType;
+       private bool   suppressFlags;
 
        public MapAttribute ()
        {
@@ -50,5 +51,10 @@ internal class MapAttribute : Attribute {
        public string NativeType {
                get {return nativeType;}
        }
+
+       public bool SuppressFlags {
+               get {return suppressFlags;}
+               set {suppressFlags = value;}
+       }
 }
 
index c8cc4ce82a3ff30bc50eea08b65ed54623af6093..e63c526ac9dcdf182940f6b94f4d825593d385af 100644 (file)
@@ -177,13 +177,21 @@ namespace Mono.Unix.Native {
 
                // Device types
                // Why these are held in "mode_t" is beyond me...
+               [Map(SuppressFlags=true)]
                S_IFMT      = 0xF000, // Bits which determine file type
+               [Map(SuppressFlags=true)]
                S_IFDIR     = 0x4000, // Directory
+               [Map(SuppressFlags=true)]
                S_IFCHR     = 0x2000, // Character device
+               [Map(SuppressFlags=true)]
                S_IFBLK     = 0x6000, // Block device
+               [Map(SuppressFlags=true)]
                S_IFREG     = 0x8000, // Regular file
+               [Map(SuppressFlags=true)]
                S_IFIFO     = 0x1000, // FIFO
+               [Map(SuppressFlags=true)]
                S_IFLNK     = 0xA000, // Symbolic link
+               [Map(SuppressFlags=true)]
                S_IFSOCK    = 0xC000, // Socket
        }