Blob Blame History Raw
From 34a52f30400aab1c21c69c31122d496751d7d99e Mon Sep 17 00:00:00 2001
From: Carlos Garcia Campos <carlosgc@gnome.org>
Date: Sat, 2 Apr 2016 11:15:38 +0200
Subject: [PATCH] Fix the build with Ghostscript >= 9.18

---
 libspectre/spectre-gs.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/libspectre/spectre-gs.c b/libspectre/spectre-gs.c
index 93444a4ff24a2810ecbdc74d4bf0f27f23c6ec75..b0821ce7833b9201b5cd69e61c63fae93a10e51f 100644
--- a/libspectre/spectre-gs.c
+++ b/libspectre/spectre-gs.c
@@ -27,10 +27,21 @@
 
 /* ghostscript stuff */
 #include <ghostscript/iapi.h>
 #include <ghostscript/ierrors.h>
 
+/* e_ macros have been removed from Ghostscript in 9.18. */
+#ifndef e_Fatal
+#define e_Fatal gs_error_Fatal
+#endif
+#ifndef e_NeedInput
+#define e_NeedInput gs_error_NeedInput
+#endif
+#ifndef e_ExecStackUnderflow
+#define e_ExecStackUnderflow gs_error_ExecStackUnderflow
+#endif
+
 #define BUFFER_SIZE 32768
 
 struct SpectreGS {
 	void *ghostscript_instance;
 };
-- 
2.9.3