summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/system.h
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2017-08-13 13:53:34 +0800
committerSebastian Rasmussen <sebras@gmail.com>2017-08-15 20:42:16 +0800
commiteb11f659bbeacfab0a3110dbe40dd6099b77e308 (patch)
tree1032bbe0ae89b2190ca0b080dfdd410cc6d1bb59 /include/mupdf/fitz/system.h
parentdf4f2031b12d029ea731adfe616034008a75d90f (diff)
downloadmupdf-eb11f659bbeacfab0a3110dbe40dd6099b77e308.tar.xz
Move S_ISDIR workaround to common header file.
Might be useful in locations other than directory.c.
Diffstat (limited to 'include/mupdf/fitz/system.h')
-rw-r--r--include/mupdf/fitz/system.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/mupdf/fitz/system.h b/include/mupdf/fitz/system.h
index 6870ec03..73003c3b 100644
--- a/include/mupdf/fitz/system.h
+++ b/include/mupdf/fitz/system.h
@@ -229,6 +229,11 @@ typedef int fz_off_t;
#define fz_atoo_imp atoi
#endif
+/* Cope with systems (such as Windows) with no S_ISDIR */
+#ifndef S_ISDIR
+#define S_ISDIR(mode) ((mode) & S_IFDIR)
+#endif
+
/* Portable way to format a size_t */
#if defined(_WIN64)
#define FZ_FMT_zu "%llu"