summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvisvgm/dvisvgm-1.9-PATCHES/patch-01-mingw32
blob: 877dac8b566a85e5956aa0c1929fedcb55034e80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff -ur dvisvgm-1.9.orig/src/Ghostscript.cpp dvisvgm-1.9/src/Ghostscript.cpp
--- dvisvgm-1.9.orig/src/Ghostscript.cpp	2014-10-09 16:20:18.000000000 +0200
+++ dvisvgm-1.9/src/Ghostscript.cpp	2015-01-07 13:42:12.049828785 +0100
@@ -38,7 +38,8 @@
 
 #ifndef HAVE_LIBGS
 
-#ifdef __WIN32__
+/** RegGetValueA and RRF_RT_REG_SZ may not be defined for some oldish MinGW. */
+#if defined(__WIN32__) && defined(RRF_RT_REG_SZ)
 /** Looks up the path of the Ghostscript DLL in the Windows registry and returns it.
  *  If there is no proper registry entry, the returned string is empty. */
 static string get_path_from_registry () {
@@ -96,7 +97,7 @@
 	if (const char *gsdll_path = FileFinder::lookup(gsdll))
 		return gsdll_path;
 #endif // MIKTEX
-#if defined(__WIN32__)
+#if defined(__WIN32__) && defined(RRF_RT_REG_SZ)
 	// try to look up the path of the Ghostscript DLL in the Windows registry
 	string gsdll_path = get_path_from_registry();
 	if (!gsdll_path.empty())