summaryrefslogtreecommitdiff
path: root/gmodule
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2004-03-31 02:02:02 +0000
committerTor Lillqvist <tml@src.gnome.org>2004-03-31 02:02:02 +0000
commit81f9b7dba5fb9518a8e63d05a0a7aefb3978a4ab (patch)
treef34979d7de2276477ba391eff4ae5deeab54757b /gmodule
parent81f3d4e7135b84f14269fa0683529d639a760936 (diff)
downloadglib-81f9b7dba5fb9518a8e63d05a0a7aefb3978a4ab.tar.gz
On Cygwin, use the "cyg" prefix, and accept also the normal "lib".
2004-03-31 Tor Lillqvist <tml@iki.fi> * gmodule-win32.c (_g_module_build_path): On Cygwin, use the "cyg" prefix, and accept also the normal "lib". (#138403, Roger Leigh)
Diffstat (limited to 'gmodule')
-rw-r--r--gmodule/ChangeLog5
-rw-r--r--gmodule/gmodule-win32.c14
2 files changed, 19 insertions, 0 deletions
diff --git a/gmodule/ChangeLog b/gmodule/ChangeLog
index 0adfea5e9..a4dd1ac5c 100644
--- a/gmodule/ChangeLog
+++ b/gmodule/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-31 Tor Lillqvist <tml@iki.fi>
+
+ * gmodule-win32.c (_g_module_build_path): On Cygwin, use the "cyg"
+ prefix, and accept also the normal "lib". (#138403, Roger Leigh)
+
Tue Feb 24 14:09:21 2004 Owen Taylor <otaylor@redhat.com>
* === Released 2.3.3 ===
diff --git a/gmodule/gmodule-win32.c b/gmodule/gmodule-win32.c
index 882ee7b0a..97b33638d 100644
--- a/gmodule/gmodule-win32.c
+++ b/gmodule/gmodule-win32.c
@@ -230,14 +230,28 @@ _g_module_build_path (const gchar *directory,
if (directory && *directory)
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)
+ 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);
+#else
else if (strncmp (module_name, "lib", 3) == 0)
return g_strconcat (directory, G_DIR_SEPARATOR_S, module_name, ".dll", NULL);
else
return g_strconcat (directory, G_DIR_SEPARATOR_S, "lib", module_name, ".dll", NULL);
+#endif
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)
+ return g_strconcat (module_name, ".dll", NULL);
+ else
+ return g_strconcat ("cyg", module_name, ".dll", NULL);
+#else
else if (strncmp (module_name, "lib", 3) == 0)
return g_strconcat (module_name, ".dll", NULL);
else
return g_strconcat ("lib", module_name, ".dll", NULL);
+#endif
}