From eb11f659bbeacfab0a3110dbe40dd6099b77e308 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Sun, 13 Aug 2017 13:53:34 +0800 Subject: Move S_ISDIR workaround to common header file. Might be useful in locations other than directory.c. --- include/mupdf/fitz/system.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/mupdf/fitz/system.h') 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" -- cgit v1.2.3