summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-04-24 11:10:41 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-04-27 12:02:58 +0200
commit147b081bde160f879b941ad1f2a46c643f5da414 (patch)
treea3b6607dbe48646367a6d1be65f8fbb26a0bf1e6
parentf70460b2c402ac0769018a065a7b057332373be2 (diff)
downloadmupdf-147b081bde160f879b941ad1f2a46c643f5da414.tar.xz
memento: Don't include unnecessary headers.
-rw-r--r--include/mupdf/memento.h9
-rw-r--r--source/fitz/memento.c7
2 files changed, 9 insertions, 7 deletions
diff --git a/include/mupdf/memento.h b/include/mupdf/memento.h
index 8e501073..ee9bf4fb 100644
--- a/include/mupdf/memento.h
+++ b/include/mupdf/memento.h
@@ -161,15 +161,10 @@
#ifndef MEMENTO_H
-#include <stdlib.h>
-
-#ifdef __ANDROID__
-#define MEMENTO_ANDROID
-#include <stdio.h>
-#endif
-
#define MEMENTO_H
+#include <stddef.h> /* for size_t */
+
#ifndef MEMENTO_UNDERLYING_MALLOC
#define MEMENTO_UNDERLYING_MALLOC malloc
#endif
diff --git a/source/fitz/memento.c b/source/fitz/memento.c
index c96f1f1d..5676cafd 100644
--- a/source/fitz/memento.c
+++ b/source/fitz/memento.c
@@ -49,6 +49,13 @@ int atexit(void (*)(void));
#include <limits.h>
#endif
+#include <stdlib.h>
+
+#ifdef __ANDROID__
+#define MEMENTO_ANDROID
+#include <stdio.h>
+#endif
+
#ifdef MEMENTO
#ifndef MEMENTO_CPP_EXTRAS_ONLY