summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-08-17 15:01:09 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-11-01 13:08:56 +0100
commitf595e889b91a674eb94db7ca4d832da54f5194cd (patch)
tree273b4a7cc465477e428d0c628a19a61301baaae0 /scripts
parent2910531c99e80bede06d2f1460459e8f6ce79961 (diff)
downloadmupdf-f595e889b91a674eb94db7ca4d832da54f5194cd.tar.xz
Use int64_t for public file API offsets.
Don't mess with conditional compilation with LARGEFILE -- always expose 64-bit file offsets in our public API.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmapdump.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/scripts/cmapdump.c b/scripts/cmapdump.c
index c82ac114..a59532e8 100644
--- a/scripts/cmapdump.c
+++ b/scripts/cmapdump.c
@@ -3,11 +3,15 @@
/* We never want to build memento versions of the cmapdump util */
#undef MEMENTO
-/* We never want large file access here */
-#undef FZ_LARGEFILE
-
-#include <stdio.h>
-#include <string.h>
+#ifndef _LARGEFILE64_SOURCE
+#ifdef _MSC_VER
+#if _MSC_VER >= 1400 /* MSVC 8 (Visual Studio 2005) or newer */
+#define _LARGEFILE64_SOURCE
+#endif
+#else
+#define _LARGEFILE64_SOURCE
+#endif
+#endif
#include "mupdf/fitz.h"
#include "mupdf/pdf.h"
@@ -32,6 +36,9 @@
#include "../source/pdf/pdf-cmap.c"
#include "../source/pdf/pdf-cmap-parse.c"
+#include <stdio.h>
+#include <string.h>
+
static void
clean(char *p)
{