Fossil SCM
Fix fallback definitions of R_OK/W_OK, make them the same as Microsoft's defenitions.
Commit
e3fe51e1e899b418b0dfe3c8905fc5c6d9f93312b00d12243f82210f59b4c074
Parent
222e9ea810b61b6…
1 file changed
+5
-5
+5
-5
| --- win/include/unistd.h | ||
| +++ win/include/unistd.h | ||
| @@ -22,18 +22,18 @@ | ||
| 22 | 22 | |
| 23 | 23 | #ifndef X_OK |
| 24 | 24 | #define X_OK 1 |
| 25 | 25 | #endif /* not X_OK */ |
| 26 | 26 | |
| 27 | +#ifndef W_OK | |
| 28 | +#define W_OK 2 | |
| 29 | +#endif /* not W_OK */ | |
| 30 | + | |
| 27 | 31 | #ifndef R_OK |
| 28 | -#define R_OK 2 | |
| 32 | +#define R_OK 4 | |
| 29 | 33 | #endif /* not R_OK */ |
| 30 | 34 | |
| 31 | -#ifndef W_OK | |
| 32 | -#define W_OK 4 | |
| 33 | -#endif /* not W_OK */ | |
| 34 | - | |
| 35 | 35 | #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) |
| 36 | 36 | #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) |
| 37 | 37 | |
| 38 | 38 | |
| 39 | 39 | |
| 40 | 40 |
| --- win/include/unistd.h | |
| +++ win/include/unistd.h | |
| @@ -22,18 +22,18 @@ | |
| 22 | |
| 23 | #ifndef X_OK |
| 24 | #define X_OK 1 |
| 25 | #endif /* not X_OK */ |
| 26 | |
| 27 | #ifndef R_OK |
| 28 | #define R_OK 2 |
| 29 | #endif /* not R_OK */ |
| 30 | |
| 31 | #ifndef W_OK |
| 32 | #define W_OK 4 |
| 33 | #endif /* not W_OK */ |
| 34 | |
| 35 | #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) |
| 36 | #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) |
| 37 | |
| 38 | |
| 39 | |
| 40 |
| --- win/include/unistd.h | |
| +++ win/include/unistd.h | |
| @@ -22,18 +22,18 @@ | |
| 22 | |
| 23 | #ifndef X_OK |
| 24 | #define X_OK 1 |
| 25 | #endif /* not X_OK */ |
| 26 | |
| 27 | #ifndef W_OK |
| 28 | #define W_OK 2 |
| 29 | #endif /* not W_OK */ |
| 30 | |
| 31 | #ifndef R_OK |
| 32 | #define R_OK 4 |
| 33 | #endif /* not R_OK */ |
| 34 | |
| 35 | #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) |
| 36 | #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) |
| 37 | |
| 38 | |
| 39 | |
| 40 |