[Mesa-dev] [PATCH 2/4] Use correct names for dlopen()ed files on Cygwin
Jon Turney
jon.turney at dronecode.org.uk
Mon Jun 13 14:12:31 UTC 2016
From: Yaakov Selkowitz <yselkowi at redhat.com>
Signed-off-by: Yaakov Selkowitz <yselkowi at redhat.com>
Reviewed-by: Jon Turney <jon.turney at dronecode.org.uk>
---
src/egl/drivers/dri2/egl_dri2.c | 2 ++
src/gallium/auxiliary/util/u_format_s3tc.c | 2 ++
src/glx/dri_common.c | 3 +++
src/mesa/main/texcompress_s3tc.c | 2 ++
4 files changed, 9 insertions(+)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index bfde640..ac2be86 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -2733,6 +2733,8 @@ dri2_load(_EGLDriver *drv)
const char *libname = "libglapi.so";
#elif defined(__APPLE__)
const char *libname = "libglapi.0.dylib";
+#elif defined(__CYGWIN__)
+ const char *libname = "cygglapi-0.dll";
#else
const char *libname = "libglapi.so.0";
#endif
diff --git a/src/gallium/auxiliary/util/u_format_s3tc.c b/src/gallium/auxiliary/util/u_format_s3tc.c
index cd3e165..8c4f215 100644
--- a/src/gallium/auxiliary/util/u_format_s3tc.c
+++ b/src/gallium/auxiliary/util/u_format_s3tc.c
@@ -32,6 +32,8 @@
#if defined(_WIN32) || defined(WIN32)
#define DXTN_LIBNAME "dxtn.dll"
+#elif defined(__CYGWIN__)
+#define DXTN_LIBNAME "cygtxc_dxtn.dll"
#elif defined(__APPLE__)
#define DXTN_LIBNAME "libtxc_dxtn.dylib"
#else
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
index 6728d38..9cd320b 100644
--- a/src/glx/dri_common.c
+++ b/src/glx/dri_common.c
@@ -73,6 +73,9 @@ dri_message(int level, const char *f, ...)
}
}
+#ifdef __CYGWIN__
+#define GL_LIB_NAME "cygGL-1.dll"
+#endif
#ifndef GL_LIB_NAME
#define GL_LIB_NAME "libGL.so.1"
#endif
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index 7ddb0ed..992ad05 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -46,6 +46,8 @@
#define DXTN_LIBNAME "dxtn.dll"
#define RTLD_LAZY 0
#define RTLD_GLOBAL 0
+#elif defined(__CYGWIN__)
+#define DXTN_LIBNAME "cygtxc_dxtn.dll"
#else
#define DXTN_LIBNAME "libtxc_dxtn.so"
#endif
--
2.8.3
More information about the mesa-dev
mailing list