MSYS2-packages/glib2/001-gmodule-lib-prefix.patch
Christoph Reiter 7b33d268cc glib: Update to 2.70.5
Drop the gconvert patch as it was rejected upstream and it's unclear
what exactly it fixed for us.

Drop the gmodule patch as it's unclear if it's still needed, and module
loading seems to work for me.

Add a small patch replacing the cygwin DLL prefix. There are more cases
in the tests where MODULE_FILENAME_PREFIX and G_MODULE_SUFFIX are wrong,
or not set for cygwin, but that's for another time.
2022-04-03 12:41:13 +02:00

29 lines
1.6 KiB
Diff

--- glib-2.70.5/gmodule/gmodule-win32.c.orig 2022-04-03 11:58:46.475994600 +0200
+++ glib-2.70.5/gmodule/gmodule-win32.c 2022-04-03 11:58:23.491209800 +0200
@@ -211,10 +211,10 @@
if (k > 4 && g_ascii_strcasecmp (module_name + k - 4, ".dll") == 0)
return g_strconcat (directory, G_DIR_SEPARATOR_S, module_name, NULL);
#ifdef G_WITH_CYGWIN
- else if (strncmp (module_name, "lib", 3) == 0 || strncmp (module_name, "cyg", 3) == 0)
+ else if (strncmp (module_name, "lib", 3) == 0 || strncmp (module_name, "msys-", 4) == 0)
return g_strconcat (directory, G_DIR_SEPARATOR_S, module_name, ".dll", NULL);
else
- return g_strconcat (directory, G_DIR_SEPARATOR_S, "cyg", module_name, ".dll", NULL);
+ return g_strconcat (directory, G_DIR_SEPARATOR_S, "msys-", module_name, ".dll", NULL);
#else
else if (strncmp (module_name, "lib", 3) == 0)
return g_strconcat (directory, G_DIR_SEPARATOR_S, module_name, ".dll", NULL);
@@ -224,10 +224,10 @@
else if (k > 4 && g_ascii_strcasecmp (module_name + k - 4, ".dll") == 0)
return g_strdup (module_name);
#ifdef G_WITH_CYGWIN
- else if (strncmp (module_name, "lib", 3) == 0 || strncmp (module_name, "cyg", 3) == 0)
+ else if (strncmp (module_name, "lib", 3) == 0 || strncmp (module_name, "msys-", 4) == 0)
return g_strconcat (module_name, ".dll", NULL);
else
- return g_strconcat ("cyg", module_name, ".dll", NULL);
+ return g_strconcat ("msys-", module_name, ".dll", NULL);
#else
else if (strncmp (module_name, "lib", 3) == 0)
return g_strconcat (module_name, ".dll", NULL);