diff options
-rw-r--r-- | Makerules | 7 | ||||
-rw-r--r-- | apps/mudraw.c | 12 | ||||
-rw-r--r-- | apps/mutool.c | 4 | ||||
-rw-r--r-- | fitz/image_jpx.c | 2 | ||||
-rw-r--r-- | fitz/stm_open.c | 2 |
5 files changed, 16 insertions, 11 deletions
@@ -2,6 +2,7 @@ OS ?= $(shell uname) OS := $(OS:MINGW%=MINGW) +OS := $(OS:Windows_NT=MINGW) CFLAGS += -Wall @@ -23,8 +24,12 @@ else $(error unknown build setting: '$(build)') endif +# Windows (MINGW) build doesn't use system libraries. +ifeq "$(OS)" "MINGW" +NOX11=yes + # Mac OS X doesn't have pkg-config so we hard code paths. -ifeq "$(OS)" "Darwin" +else ifeq "$(OS)" "Darwin" SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL SYS_OPENSSL_LIBS = -lcrypto SYS_X11_CFLAGS = -I/usr/X11R6/include diff --git a/apps/mudraw.c b/apps/mudraw.c index 768298f1..8e550c84 100644 --- a/apps/mudraw.c +++ b/apps/mudraw.c @@ -351,7 +351,11 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum) fprintf(mujstest_file, "TEXT %d\n", mujstest_count); break; case PDF_WIDGET_CONTENT_SPECIAL: +#ifdef __MINGW32__ + fprintf(mujstest_file, "TEXT %I64d\n", 46702919800LL + mujstest_count); +#else fprintf(mujstest_file, "TEXT %lld\n", 46702919800LL + mujstest_count); +#endif break; case PDF_WIDGET_CONTENT_DATE: fprintf(mujstest_file, "TEXT Jun %d 1979\n", 1 + ((13 + mujstest_count) % 30)); @@ -808,15 +812,11 @@ parse_colorspace(const char *name) return -1; } -#ifdef MUPDF_COMBINED_EXE -int draw_main(int argc, char **argv) -#else -#ifdef _WIN32 +#ifdef _MSC_VER static int main_utf8(int argc, char **argv) #else int main(int argc, char **argv) #endif -#endif { char *password = ""; fz_document *doc = NULL; @@ -1082,7 +1082,7 @@ int main(int argc, char **argv) return (errored != 0); } -#ifdef _WIN32 +#ifdef _MSC_VER static char * wchar_to_utf8(wchar_t *s) { diff --git a/apps/mutool.c b/apps/mutool.c index 5215b78d..17c98424 100644 --- a/apps/mutool.c +++ b/apps/mutool.c @@ -29,7 +29,7 @@ namematch(const char *end, const char *start, const char *match) return ((end-len >= start) && (strncmp(end-len, match, len) == 0)); } -#ifdef _WIN32 +#ifdef _MSC_VER static int main_utf8(int argc, char **argv) #else int main(int argc, char **argv) @@ -82,7 +82,7 @@ int main(int argc, char **argv) return 1; } -#ifdef _WIN32 +#ifdef _MSC_VER static char * wchar_to_utf8(wchar_t *s) { diff --git a/fitz/image_jpx.c b/fitz/image_jpx.c index 1006cfdb..a77fb19b 100644 --- a/fitz/image_jpx.c +++ b/fitz/image_jpx.c @@ -4,7 +4,7 @@ * due to the use of __stdcall. We believe it is required on some * linux toolchains too. */ #define OPJ_STATIC -#ifndef _WIN32 +#ifndef _MSC_VER #define OPJ_HAVE_STDINT_H #endif diff --git a/fitz/stm_open.c b/fitz/stm_open.c index f3d78b9d..ffa6de82 100644 --- a/fitz/stm_open.c +++ b/fitz/stm_open.c @@ -141,7 +141,7 @@ fz_open_file_w(fz_context *ctx, const wchar_t *name) { int fd = _wopen(name, O_BINARY | O_RDONLY, 0); if (fd == -1) - fz_throw(ctx, "cannot open file %Ls", name); + fz_throw(ctx, "cannot open file %ls", name); return fz_open_fd(ctx, fd); } #endif |