1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
Do not #include <dlfcn.h> when not used (might not exits).
Use defined(DISABLE_GS) instead of DISABLE_GS, to avoid gcc
preprocessor warning (-Wundef).
diff -ur dvisvgm-0.8.7.orig/src/DVIToSVG.cpp dvisvgm-0.8.7/src/DVIToSVG.cpp
--- dvisvgm-0.8.7.orig/src/DVIToSVG.cpp 2009-11-09 17:36:55.000000000 +0100
+++ dvisvgm-0.8.7/src/DVIToSVG.cpp 2009-11-18 00:30:05.000000000 +0100
@@ -18,6 +18,13 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#define VERSION_STR VERSION " (" TARGET_SYSTEM ")"
+#else
+#define VERSION_STR ""
+#endif
+
#include <cstdlib>
#include <ctime>
#include <fstream>
@@ -50,20 +57,13 @@
#include "DvisvgmSpecialHandler.h"
#include "EmSpecialHandler.h"
//#include "HtmlSpecialHandler.h"
-#if !DISABLE_GS
+#if !defined(DISABLE_GS)
#include "PsSpecialHandler.h"
#endif
#include "TpicSpecialHandler.h"
///////////////////////////////////
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#define VERSION_STR VERSION " (" TARGET_SYSTEM ")"
-#else
-#define VERSION_STR ""
-#endif
-
using namespace std;
// static class variables
diff -ur dvisvgm-0.8.7.orig/src/Ghostscript.cpp dvisvgm-0.8.7/src/Ghostscript.cpp
--- dvisvgm-0.8.7.orig/src/Ghostscript.cpp 2009-11-06 22:17:58.000000000 +0100
+++ dvisvgm-0.8.7/src/Ghostscript.cpp 2009-11-18 00:30:50.000000000 +0100
@@ -19,7 +19,7 @@
*************************************************************************/
#include "Ghostscript.h"
-#if !DISABLE_GS
+#if !defined(DISABLE_GS)
#include <cstring>
#include <sstream>
diff -ur dvisvgm-0.8.7.orig/src/Ghostscript.h dvisvgm-0.8.7/src/Ghostscript.h
--- dvisvgm-0.8.7.orig/src/Ghostscript.h 2009-11-06 22:17:58.000000000 +0100
+++ dvisvgm-0.8.7/src/Ghostscript.h 2009-11-18 00:33:30.000000000 +0100
@@ -26,7 +26,9 @@
#endif
#include <string>
-#if HAVE_LIBGS
+#if defined(DISABLE_GS)
+ #include "iapi.h"
+#elif HAVE_LIBGS
#include <ghostscript/iapi.h>
#else
#include "DLLoader.h"
@@ -37,7 +39,7 @@
#define _Windows
#endif
-#if DISABLE_GS
+#if defined(DISABLE_GS)
struct Ghostscript
{
typedef int (GSDLLCALLPTR Stdin) (void *caller, char *buf, int len);
|