summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/patch-06-libdvisvgm-HAVE_LIBGS
blob: 5f29442d43c707820a74d9dcc10bec432e0bc5db (plain)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
	Replace '#if HAVE_LIBGS' by '#if defined(HAVE_LIBGS)'.

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-18 00:30:50.000000000 +0100
+++ dvisvgm-0.8.7/src/Ghostscript.cpp	2009-11-18 14:28:08.000000000 +0100
@@ -36,7 +36,7 @@
 /** Loads the Ghostscript library but does not create an instance. This
  *  constructor should only be used to call available() and revision(). */
 Ghostscript::Ghostscript ()
-#if !HAVE_LIBGS
+#if !defined(HAVE_LIBGS)
 : DLLoader(GS_DL_NAME)
 #endif
 {
@@ -49,7 +49,7 @@
  * @param[in] argv parameters passed to Ghostscript
  * @param[in] caller this parameter is passed to all callback functions */
 Ghostscript::Ghostscript (int argc, const char **argv, void *caller)
-#if !HAVE_LIBGS
+#if !defined(HAVE_LIBGS)
 	: DLLoader(GS_DL_NAME)
 #endif
 {
@@ -73,7 +73,7 @@
 
 /** Returns true if Ghostscript library was found and can be loaded. */
 bool Ghostscript::available () {
-#if HAVE_LIBGS
+#if defined(HAVE_LIBGS)
 	return true;
 #else
 	return loaded();
@@ -85,7 +85,7 @@
  * @param[out] r takes the revision information (see GS API documentation for further details)
  * @return true on success  */
 bool Ghostscript::revision (gsapi_revision_t *r) {
-#if HAVE_LIBGS
+#if defined(HAVE_LIBGS)
 	return (gsapi_revision(r, sizeof(gsapi_revision_t)) == 0);
 #else
 	if (PFN_gsapi_revision fn = (PFN_gsapi_revision)loadFunction("gsapi_revision"))
@@ -111,7 +111,7 @@
  *  @param[out] psinst handle of newly created instance (or 0 on error)
  *  @param[in] caller pointer forwarded to callback functions */
 int Ghostscript::new_instance (void **psinst, void *caller) {
-#if HAVE_LIBGS
+#if defined(HAVE_LIBGS)
 	return gsapi_new_instance(psinst, caller);
 #else
 	if (PFN_gsapi_new_instance fn = (PFN_gsapi_new_instance)loadFunction("gsapi_new_instance"))
@@ -125,7 +125,7 @@
 /** Destroys the current instance of Ghostscript. This method is called by the destructor
  *  and should not be used elsewhere. */
 void Ghostscript::delete_instance () {
-#if HAVE_LIBGS
+#if defined(HAVE_LIBGS)
 	gsapi_delete_instance(_inst);
 #else
 	if (PFN_gsapi_delete_instance fn = (PFN_gsapi_delete_instance)loadFunction("gsapi_delete_instance"))
@@ -136,7 +136,7 @@
 
 /** Exits the interpreter. Must be called before destroying the GS instance. */
 int Ghostscript::exit () {
-#if HAVE_LIBGS
+#if defined(HAVE_LIBGS)
 	return gsapi_exit(_inst);
 #else
 	if (PFN_gsapi_exit fn = (PFN_gsapi_exit)loadFunction("gsapi_exit"))
@@ -151,7 +151,7 @@
  * @param[in] out pointer to stdout handler
  * @param[in] err pointer to stderr handler */
 int Ghostscript::set_stdio (Stdin in, Stdout out, Stderr err) {
-#if HAVE_LIBGS
+#if defined(HAVE_LIBGS)
 	return gsapi_set_stdio(_inst, in, out, err);
 #else
 	if (PFN_gsapi_set_stdio fn = (PFN_gsapi_set_stdio)loadFunction("gsapi_set_stdio"))
@@ -166,7 +166,7 @@
  *  @param[in] argc number of paramters
  *  @param[in] argv parameters passed to Ghostscript */
 int Ghostscript::init_with_args (int argc, char **argv) {
-#if HAVE_LIBGS
+#if defined(HAVE_LIBGS)
 	return gsapi_init_with_args(_inst, argc, argv);
 #else
 	if (PFN_gsapi_init_with_args fn = (PFN_gsapi_init_with_args)loadFunction("gsapi_init_with_args"))
@@ -178,7 +178,7 @@
 
 /** Tells Ghostscript that several calls of run_string_continue will follow. */
 int Ghostscript::run_string_begin (int user_errors, int *pexit_code) {
-#if HAVE_LIBGS
+#if defined(HAVE_LIBGS)
 	return gsapi_run_string_begin(_inst, user_errors, pexit_code);
 #else
 	if (PFN_gsapi_run_string_begin fn = (PFN_gsapi_run_string_begin)loadFunction("gsapi_run_string_begin"))
@@ -197,7 +197,7 @@
  *  @param[in] user_errors if non-negative, the default PS error values will be generated, otherwise this value is returned
  *  @param[out] pexit_code takes the PS error code */
 int Ghostscript::run_string_continue (const char *str, unsigned length, int user_errors, int *pexit_code) {
-#if HAVE_LIBGS
+#if defined(HAVE_LIBGS)
 	return gsapi_run_string_continue(_inst, str, length, user_errors, pexit_code);
 #else
 	if (PFN_gsapi_run_string_continue fn = (PFN_gsapi_run_string_continue)loadFunction("gsapi_run_string_continue"))
@@ -210,7 +210,7 @@
 
 /** Terminates the successive code feeding. Must be called after the last call of run_string_continue. */
 int Ghostscript::run_string_end (int user_errors, int *pexit_code) {
-#if HAVE_LIBGS
+#if defined(HAVE_LIBGS)
 	return gsapi_run_string_end(_inst, user_errors, pexit_code);
 #else
 	if (PFN_gsapi_run_string_end fn = (PFN_gsapi_run_string_end)loadFunction("gsapi_run_string_end"))
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-18 00:33:30.000000000 +0100
+++ dvisvgm-0.8.7/src/Ghostscript.h	2009-11-18 14:28:02.000000000 +0100
@@ -28,7 +28,7 @@
 #include <string>
 #if defined(DISABLE_GS)
    #include "iapi.h"
-#elif HAVE_LIBGS
+#elif defined(HAVE_LIBGS)
    #include <ghostscript/iapi.h>
 #else
    #include "DLLoader.h"
@@ -62,7 +62,7 @@
 
 /** Wrapper class of (a subset of) the Ghostscript API. */
 class Ghostscript
-#if !HAVE_LIBGS
+#if !defined(HAVE_LIBGS)
 : public DLLoader
 #endif
 {