Add some compatibility macros

Dmitry Timoshkov dmitry at baikal.ru
Thu Apr 22 00:05:11 CDT 2004


Hello,

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    Add some compatibility macros.

--- cvs/hq/wine/include/wine/port.h	Tue Apr 06 07:49:24 2004
+++ wine/include/wine/port.h	Thu Apr 22 04:57:58 2004
@@ -121,9 +121,45 @@ struct statvfs
 #define vsnprintf _vsnprintf
 #endif
 
+#ifndef F_OK
+# define F_OK 0
+#endif
+
+#ifndef W_OK
+#define W_OK 2
+#endif
+
+#ifndef R_OK
+#define R_OK 4
+#endif
+
 #ifndef S_ISLNK
 # define S_ISLNK(mod) (0)
-#endif /* S_ISLNK */
+#endif
+
+#ifndef S_ISSOCK
+# define S_ISSOCK(mod) (0)
+#endif
+
+#ifndef S_ISDIR
+# define S_ISDIR(mod) (((mod) & _S_IFMT) == _S_IFDIR)
+#endif
+
+#ifndef S_ISCHR
+# define S_ISCHR(mod) (((mod) & _S_IFMT) == _S_IFCHR)
+#endif
+
+#ifndef S_ISFIFO
+# define S_ISFIFO(mod) (((mod) & _S_IFMT) == _S_IFIFO)
+#endif
+
+#ifndef S_ISREG
+# define S_ISREG(mod) (((mod) & _S_IFMT) == _S_IFREG)
+#endif
+
+#ifndef S_IWUSR
+# define S_IWUSR 0
+#endif
 
 /* So we open files in 64 bit access mode on Linux */
 #ifndef O_LARGEFILE
@@ -132,6 +168,10 @@ struct statvfs
 
 #ifndef O_NONBLOCK
 # define O_NONBLOCK 0
+#endif
+
+#ifndef O_BINARY
+# define O_BINARY 0
 #endif
 
 #if !defined(S_IXUSR) && defined(S_IEXEC)






More information about the wine-patches mailing list