diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2017-08-13 13:53:34 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2017-08-15 20:42:16 +0800 |
commit | eb11f659bbeacfab0a3110dbe40dd6099b77e308 (patch) | |
tree | 1032bbe0ae89b2190ca0b080dfdd410cc6d1bb59 | |
parent | df4f2031b12d029ea731adfe616034008a75d90f (diff) | |
download | mupdf-eb11f659bbeacfab0a3110dbe40dd6099b77e308.tar.xz |
Move S_ISDIR workaround to common header file.
Might be useful in locations other than directory.c.
-rw-r--r-- | include/mupdf/fitz/system.h | 5 | ||||
-rw-r--r-- | source/fitz/directory.c | 5 |
2 files changed, 5 insertions, 5 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" diff --git a/source/fitz/directory.c b/source/fitz/directory.c index a269ef9a..df42f83c 100644 --- a/source/fitz/directory.c +++ b/source/fitz/directory.c @@ -53,11 +53,6 @@ static int has_dir_entry(fz_context *ctx, fz_archive *arch, const char *name) return fz_file_exists(ctx, path); } -/* Cope with systems (such as Windows) with no S_ISDIR */ -#ifndef S_ISDIR -#define S_ISDIR(mode) ((mode) & S_IFDIR) -#endif - int fz_is_directory(fz_context *ctx, const char *path) { |