+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
AttributeTargets.Struct)]
internal class MapAttribute : Attribute {
private string nativeType;
+ private bool suppressFlags;
public MapAttribute ()
{
public string NativeType {
get {return nativeType;}
}
+
+ public bool SuppressFlags {
+ get {return suppressFlags;}
+ set {suppressFlags = value;}
+ }
}
// 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
}