summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2018-02-06 12:54:08 +0100
committerSebastian Rasmussen <sebras@gmail.com>2018-02-06 13:27:45 +0100
commitf95c4e9ca03417427f76ab9529767734cefab2ff (patch)
treea9d6830a485eff353a05c12446e16f6124ee7236 /source
parentdca5cca4e129ab1e424ec86f5ceb325e7ee3d8cd (diff)
downloadmupdf-f95c4e9ca03417427f76ab9529767734cefab2ff.tar.xz
Include limits.h where INT_MAX/INT_MIN/PATH_MAX/UINT_MAX are used.
Diffstat (limited to 'source')
-rw-r--r--source/fitz/compress.c2
-rw-r--r--source/fitz/load-png.c1
-rw-r--r--source/fitz/output-cbz.c6
-rw-r--r--source/fitz/output-svg.c2
-rw-r--r--source/helpers/pkcs7/pkcs7-openssl.c1
-rw-r--r--source/pdf/pdf-appearance.c1
-rw-r--r--source/pdf/pdf-write.c1
7 files changed, 12 insertions, 2 deletions
diff --git a/source/fitz/compress.c b/source/fitz/compress.c
index 439c461e..4fc9b653 100644
--- a/source/fitz/compress.c
+++ b/source/fitz/compress.c
@@ -2,6 +2,8 @@
#include <zlib.h>
+#include <limits.h>
+
static void *fz_z_alloc(void *opaque, unsigned int count, unsigned int size)
{
fz_context *ctx = (fz_context *)opaque;
diff --git a/source/fitz/load-png.c b/source/fitz/load-png.c
index 55dd8fe7..c5bc925c 100644
--- a/source/fitz/load-png.c
+++ b/source/fitz/load-png.c
@@ -2,6 +2,7 @@
#include <zlib.h>
+#include <limits.h>
#include <string.h>
struct info
diff --git a/source/fitz/output-cbz.c b/source/fitz/output-cbz.c
index 0abeb1a4..1eb0e473 100644
--- a/source/fitz/output-cbz.c
+++ b/source/fitz/output-cbz.c
@@ -1,11 +1,13 @@
#include "mupdf/fitz.h"
+#include <zlib.h>
+
+#include <limits.h>
+
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
-#include <zlib.h>
-
typedef struct fz_cbz_writer_s fz_cbz_writer;
struct fz_cbz_writer_s
diff --git a/source/fitz/output-svg.c b/source/fitz/output-svg.c
index 8895960a..2bafda75 100644
--- a/source/fitz/output-svg.c
+++ b/source/fitz/output-svg.c
@@ -1,5 +1,7 @@
#include "mupdf/fitz.h"
+#include <limits.h>
+
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
diff --git a/source/helpers/pkcs7/pkcs7-openssl.c b/source/helpers/pkcs7/pkcs7-openssl.c
index a9916f5c..7bbda55e 100644
--- a/source/helpers/pkcs7/pkcs7-openssl.c
+++ b/source/helpers/pkcs7/pkcs7-openssl.c
@@ -3,6 +3,7 @@
#include "../../fitz/fitz-imp.h"
#include "mupdf/helpers/pkcs7-openssl.h"
+#include <limits.h>
#include <string.h>
/* Generated from resources/certs/AdobeCA.p7c */
diff --git a/source/pdf/pdf-appearance.c b/source/pdf/pdf-appearance.c
index bca9da86..4d243e3e 100644
--- a/source/pdf/pdf-appearance.c
+++ b/source/pdf/pdf-appearance.c
@@ -2,6 +2,7 @@
#include "mupdf/pdf.h"
#include <float.h>
+#include <limits.h>
#include <math.h>
#include <ft2build.h>
diff --git a/source/pdf/pdf-write.c b/source/pdf/pdf-write.c
index 7b163813..2d5b5372 100644
--- a/source/pdf/pdf-write.c
+++ b/source/pdf/pdf-write.c
@@ -5,6 +5,7 @@
#include <zlib.h>
#include <assert.h>
+#include <limits.h>
#include <string.h>
#include <stdio.h> /* for debug printing */