compat: <unistd.h>: make X_OK a no-op on Windows
There's nothing to check via access() on Windows for directory
permissions, and I have no clue if the underlying _access() ignores
unknown mode flags, so let's play it safe. The worst case is that
access() will be too optimistic, which wouldn't really hart because of
TOCTOU races, anyway. In other words, if anything breaks by this patch,
then it's broken already.
diff --git a/compat/posix-shims/unistd.h b/compat/posix-shims/unistd.h
index e01a73d..ab717a7 100644
--- a/compat/posix-shims/unistd.h
+++ b/compat/posix-shims/unistd.h
@@ -18,7 +18,7 @@
These may be OR'd together. */
#define R_OK 4 /* Test for read permission. */
#define W_OK 2 /* Test for write permission. */
-//#define X_OK 1 /* execute permission - unsupported in windows*/
+#define X_OK 0 /* jkt: unsupported on Windows, so we don't really care */
#define F_OK 0 /* Test for existence. */
#define access _access