Alexandre Julliard : libwine: Hack to work around the Solaris dlopen()
brain damage.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Mar 30 06:20:38 CDT 2007
Module: wine
Branch: master
Commit: f3960b22b12db14530191880e5153d5bad6ac4fc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f3960b22b12db14530191880e5153d5bad6ac4fc
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Mar 30 12:17:01 2007 +0200
libwine: Hack to work around the Solaris dlopen() brain damage.
---
libs/wine/loader.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/libs/wine/loader.c b/libs/wine/loader.c
index 4a089ee..a86da98 100644
--- a/libs/wine/loader.c
+++ b/libs/wine/loader.c
@@ -24,6 +24,7 @@
#include <assert.h>
#include <ctype.h>
#include <fcntl.h>
+#include <limits.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
@@ -689,6 +690,16 @@ void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize
void *ret;
const char *s;
dlerror(); dlerror();
+#ifdef __sun
+ if (strchr( filename, ':' ))
+ {
+ char path[PATH_MAX];
+ /* Solaris' brain damaged dlopen() treats ':' as a path separator */
+ realpath( filename, path );
+ ret = dlopen( path, flag | RTLD_FIRST );
+ }
+ else
+#endif
ret = dlopen( filename, flag | RTLD_FIRST );
s = dlerror();
if (error && errorsize)
More information about the wine-cvs
mailing list