aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/loader
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/loader')
-rw-r--r--xorg-server/hw/xfree86/loader/loadmod.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/xorg-server/hw/xfree86/loader/loadmod.c b/xorg-server/hw/xfree86/loader/loadmod.c
index c6b559072..706b9b3e8 100644
--- a/xorg-server/hw/xfree86/loader/loadmod.c
+++ b/xorg-server/hw/xfree86/loader/loadmod.c
@@ -212,9 +212,15 @@ static const char *stdSubdirs[] = {
* to port this DDX to, say, Darwin, we'll need to fix this.
*/
static PatternRec stdPatterns[] = {
+#ifdef __CYGWIN__
+ {"^cyg(.*)\\.dll$",},
+ {"(.*)_drv\\.dll$",},
+ {"(.*)\\.dll$",},
+#else
{"^lib(.*)\\.so$",},
{"(.*)_drv\\.so$",},
{"(.*)\\.so$",},
+#endif
{NULL,}
};
@@ -408,21 +414,33 @@ FindModuleInSubdir(const char *dirpath, const char *module)
continue;
}
+#ifdef __CYGWIN__
+ snprintf(tmpBuf, PATH_MAX, "cyg%s.dll", module);
+#else
snprintf(tmpBuf, PATH_MAX, "lib%s.so", module);
+#endif
if (strcmp(direntry->d_name, tmpBuf) == 0) {
if (asprintf(&ret, "%s%s", dirpath, tmpBuf) == -1)
ret = NULL;
break;
}
+#ifdef __CYGWIN__
+ snprintf(tmpBuf, PATH_MAX, "%s_drv.dll", module);
+#else
snprintf(tmpBuf, PATH_MAX, "%s_drv.so", module);
+#endif
if (strcmp(direntry->d_name, tmpBuf) == 0) {
if (asprintf(&ret, "%s%s", dirpath, tmpBuf) == -1)
ret = NULL;
break;
}
+#ifdef __CYGWIN__
+ snprintf(tmpBuf, PATH_MAX, "%s.dll", module);
+#else
snprintf(tmpBuf, PATH_MAX, "%s.so", module);
+#endif
if (strcmp(direntry->d_name, tmpBuf) == 0) {
if (asprintf(&ret, "%s%s", dirpath, tmpBuf) == -1)
ret = NULL;