From 0e3699334faf92f508b6c187a261548b656b0dd3 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 20 Apr 2012 17:07:15 +0200 Subject: fontconfig libX11 mesa pixman xserver git update 20 april 2012 --- xorg-server/hw/xfree86/loader/loadmod.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'xorg-server/hw/xfree86/loader/loadmod.c') 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; -- cgit v1.2.3