summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-03-19 10:34:30 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-03-22 14:58:01 +0100
commit81c77a6b6464f5af66f851837f85ed6f9724f19e (patch)
tree1274fafb16396e27f06d9da24dc77bfb9714b0c9 /include
parent5521ff9f0c4a05c969c891a547a45094377cf780 (diff)
downloadmupdf-81c77a6b6464f5af66f851837f85ed6f9724f19e.tar.xz
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.
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/fitz/getopt.h2
-rw-r--r--include/mupdf/fitz/system.h4
-rw-r--r--include/mupdf/helpers/mu-threads.h2
3 files changed, 6 insertions, 2 deletions
diff --git a/include/mupdf/fitz/getopt.h b/include/mupdf/fitz/getopt.h
index 3890c618..8f71120b 100644
--- a/include/mupdf/fitz/getopt.h
+++ b/include/mupdf/fitz/getopt.h
@@ -11,7 +11,7 @@ extern char *fz_optarg;
/*
Windows unicode versions.
*/
-#if defined(_WIN32) || defined(_WIN64)
+#ifdef _WIN32
extern int fz_getoptw(int nargc, wchar_t * const *nargv, const wchar_t *ostr);
extern int fz_optindw;
extern wchar_t *fz_optargw;
diff --git a/include/mupdf/fitz/system.h b/include/mupdf/fitz/system.h
index 277ec286..136246a7 100644
--- a/include/mupdf/fitz/system.h
+++ b/include/mupdf/fitz/system.h
@@ -123,6 +123,10 @@ static __inline int signbit(double x)
#define hypotf _hypotf
#define atoll _atoi64
+#endif
+
+#ifdef _WIN32
+
char *fz_utf8_from_wchar(const wchar_t *s);
wchar_t *fz_wchar_from_utf8(const char *s);
diff --git a/include/mupdf/helpers/mu-threads.h b/include/mupdf/helpers/mu-threads.h
index d1830a44..ea3dfc3c 100644
--- a/include/mupdf/helpers/mu-threads.h
+++ b/include/mupdf/helpers/mu-threads.h
@@ -23,7 +23,7 @@
*/
#if !defined(DISABLE_MUTHREADS)
-#if defined(_WIN32) || defined(_WIN64)
+#ifdef _WIN32
#define MU_THREAD_IMPL_TYPE 1
#elif defined(HAVE_PTHREAD)
#define MU_THREAD_IMPL_TYPE 2