projects
/
chise
/
xemacs-chise.git-
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(U+9B32-var-001): Use "⿱𠮛x" instead of "⿳一&CDP-89CC;x".
[chise/xemacs-chise.git-]
/
src
/
sysfile.h
diff --git
a/src/sysfile.h
b/src/sysfile.h
index
b00e9c4
..
d9d3deb
100644
(file)
--- a/
src/sysfile.h
+++ b/
src/sysfile.h
@@
-178,7
+178,7
@@
Boston, MA 02111-1307, USA. */
#define lstat xemacs_stat
#endif
#define lstat xemacs_stat
#endif
-#if !S_IRUSR
+#ifndef S_IRUSR
# if S_IREAD
# define S_IRUSR S_IREAD
# else
# if S_IREAD
# define S_IRUSR S_IREAD
# else
@@
-186,7
+186,7
@@
Boston, MA 02111-1307, USA. */
# endif
#endif
# endif
#endif
-#if !S_IWUSR
+#ifndef S_IWUSR
# if S_IWRITE
# define S_IWUSR S_IWRITE
# else
# if S_IWRITE
# define S_IWUSR S_IWRITE
# else
@@
-194,7
+194,7
@@
Boston, MA 02111-1307, USA. */
# endif
#endif
# endif
#endif
-#if !S_IXUSR
+#ifndef S_IXUSR
# if S_IEXEC
# define S_IXUSR S_IEXEC
# else
# if S_IEXEC
# define S_IXUSR S_IEXEC
# else
@@
-261,14
+261,20
@@
Boston, MA 02111-1307, USA. */
#endif
/* The following definitions are needed under Windows, at least */
#endif
/* The following definitions are needed under Windows, at least */
-#ifndef X_OK
-# define X_OK 1
-#endif
-
#ifndef R_OK
# define R_OK 4
#endif
#ifndef R_OK
# define R_OK 4
#endif
+/* Under native Windows, there is no concept of execute permission,
+ so redefine execute permissions to be the same as read permission */
+#ifndef X_OK
+# ifdef WIN32_NATIVE
+# define X_OK R_OK
+# else
+# define X_OK 1
+# endif
+#endif
+
#ifndef W_OK
# define W_OK 2
#endif
#ifndef W_OK
# define W_OK 2
#endif