More general approach to file descriptor types and flags.
diff --git a/server/protocol.def b/server/protocol.def
index 76a3cf8..6ab1f35 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -542,13 +542,17 @@
unsigned int access; /* wanted access rights */
@REPLY
int fd; /* file descriptor */
- int type; /* the type of file */
+ int type; /* the type of file (see below) */
+ int flags; /* file read/write flags (see below) */
@END
-#define FD_TYPE_INVALID 0
-#define FD_TYPE_DEFAULT 1
-#define FD_TYPE_CONSOLE 2
-#define FD_TYPE_OVERLAPPED 3
-#define FD_TYPE_TIMEOUT 4
+enum fd_type
+{
+ FD_TYPE_INVALID,
+ FD_TYPE_DEFAULT,
+ FD_TYPE_CONSOLE
+};
+#define FD_FLAG_OVERLAPPED 0x01
+#define FD_FLAG_TIMEOUT 0x02
/* Set a file current position */