summaryrefslogtreecommitdiffhomepage
path: root/src/os-win32.h
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2022-05-16 20:23:39 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2022-05-16 20:23:39 +0100
commite8843dba3eb1c7a67f6ff7b920046ae36a12acd0 (patch)
treeaa1ecd11a720ba66508000b2cdd08fa09ed4b4ac /src/os-win32.h
parent9009f75bf5fd33e13abae5762d31968b39f233c3 (diff)
Make the demo directory check more robust
This is how it should've been to begin with, but I was lazy.
Diffstat (limited to 'src/os-win32.h')
-rw-r--r--src/os-win32.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/os-win32.h b/src/os-win32.h
index 8aeb93a..12720a9 100644
--- a/src/os-win32.h
+++ b/src/os-win32.h
@@ -109,6 +109,9 @@ static inline void os_randombytes(void *buf, int sz) {
#define W_OK 2
#define X_OK R_OK // there's no actual X bit, just pretend
+// windows doesn't define this for some reason!? note: add others as needed...
+#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
+
// just dump this boilerplate here as well, I spose
#define OS_WINDOWS_ERROR(arrayname) \
FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, 0, GetLastError(), \