@@ -5,11 +5,11 @@ Subject: [PATCH 1/1] Support for using the DLL directory as libdir
55
66Upstream-Status: Pending [https://github.com/libvips/build-win64-mxe/issues/34]
77
8- diff --git a/libvips/include/vips/util .h b/libvips/include/vips/util .h
8+ diff --git a/libvips/include/vips/internal .h b/libvips/include/vips/internal .h
99index 1111111..2222222 100644
10- --- a/libvips/include/vips/util .h
11- +++ b/libvips/include/vips/util .h
12- @@ -418 ,6 +418 ,7 @@ guint32 vips__random(guint32 seed);
10+ --- a/libvips/include/vips/internal .h
11+ +++ b/libvips/include/vips/internal .h
12+ @@ -426 ,6 +426 ,7 @@ guint32 vips__random(guint32 seed);
1313 guint32 vips__random_add(guint32 seed, int value);
1414
1515 const char *vips__icc_dir(void);
@@ -21,7 +21,7 @@ diff --git a/libvips/iofuncs/init.c b/libvips/iofuncs/init.c
2121index 1111111..2222222 100644
2222--- a/libvips/iofuncs/init.c
2323+++ b/libvips/iofuncs/init.c
24- @@ -1200 ,6 +1200 ,12 @@ vips_guess_prefix(const char *argv0, const char *env_name)
24+ @@ -1201 ,6 +1201 ,12 @@ vips_guess_prefix(const char *argv0, const char *env_name)
2525 const char *
2626 vips_guess_libdir(const char *argv0, const char *env_name)
2727 {
@@ -34,7 +34,7 @@ index 1111111..2222222 100644
3434 const char *prefix = vips_guess_prefix(argv0, env_name);
3535 static char *libdir = NULL;
3636
37- @@ -1224 ,6 +1230 ,7 @@ vips_guess_libdir(const char *argv0, const char *env_name)
37+ @@ -1225 ,6 +1231 ,7 @@ vips_guess_libdir(const char *argv0, const char *env_name)
3838 libdir = g_strdup_printf("%s/lib", prefix);
3939
4040 return libdir;
@@ -46,7 +46,7 @@ diff --git a/libvips/iofuncs/util.c b/libvips/iofuncs/util.c
4646index 1111111..2222222 100644
4747--- a/libvips/iofuncs/util.c
4848+++ b/libvips/iofuncs/util.c
49- @@ -1894 ,6 +1894,54 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
49+ @@ -1986 ,6 +1986,53 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
5050 return TRUE;
5151 }
5252 #endif
@@ -94,8 +94,7 @@ index 1111111..2222222 100644
9494+ {
9595+ static GOnce once = G_ONCE_INIT;
9696+
97- + return (const char *) g_once(&once,
98- + vips__dll_dir_once, NULL);
97+ + return (const char *) g_once(&once, vips__dll_dir_once, NULL);
9998+ }
10099+ #endif /*VIPS_DLLDIR_AS_LIBDIR*/
101100 #endif /*G_OS_WIN32*/
0 commit comments