From 81c77a6b6464f5af66f851837f85ed6f9724f19e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 19 Mar 2018 10:34:30 +0100 Subject: Clean up windows ifdefs. _WIN32 is always defined on windows (it means the WinAPI is available). _WIN64 is also defined on 64-bit targets. This means the test for defined(_WIN32) || defined(_WIN64) is redundant, since if _WIN64 is defined, then _WIN32 is always also defined. MSC_VER is only defined for MSVC, so split the ifdef sections in include/fitz/system.h into separate MSVC and WIN32 parts so that we can build with MinGW and other non-MSVC compilers on windows. --- source/fitz/output.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/fitz/output.c') diff --git a/source/fitz/output.c b/source/fitz/output.c index 32813fd8..4ee0023c 100644 --- a/source/fitz/output.c +++ b/source/fitz/output.c @@ -137,7 +137,7 @@ static void file_seek(fz_context *ctx, void *opaque, int64_t off, int whence) { FILE *file = opaque; -#if defined(_WIN32) || defined(_WIN64) +#ifdef _WIN32 int n = _fseeki64(file, off, whence); #else int n = fseeko(file, off, whence); @@ -150,7 +150,7 @@ static int64_t file_tell(fz_context *ctx, void *opaque) { FILE *file = opaque; -#if defined(_WIN32) || defined(_WIN64) +#ifdef _WIN32 int64_t off = _ftelli64(file); #else int64_t off = ftello(file); @@ -221,7 +221,7 @@ fz_new_output_with_path(fz_context *ctx, const char *filename, int append) if (!strcmp(filename, "/dev/null") || !fz_strcasecmp(filename, "nul:")) return fz_new_output(ctx, 0, NULL, null_write, NULL, NULL); -#if defined(_WIN32) || defined(_WIN64) +#ifdef _WIN32 /* Ensure we create a brand new file. We don't want to clobber our old file. */ if (!append) { -- cgit v1.2.3