* src/lib/dlfcn/dlfcn.c: (dladdr):

replace all the '\' by '/' in the filename found by dladdr


SVN revision: 34518
This commit is contained in:
doursse 2008-05-09 23:16:42 +00:00 committed by doursse
parent d7e2cb5163
commit 638afceae2
2 changed files with 15 additions and 1 deletions

View File

@ -1,8 +1,13 @@
2008-05-10 Vincent Torri <doursse at users dot sf dot net>
* src/lib/dlfcn/dlfcn.c: (dladdr):
replace all the '\' by '/' in the filename found by dladdr
2008-04-28 Vincent Torri <doursse at users dot sf dot net>
* src/lib/Evil.h:
* src/lib/evil.c: (evil_getcwd):
add getgwd-like function
add getcwd-like function
* src/lib/dlfcn/dlfcn.c: (dladdr):
* src/lib/dlfcn/dlfcn.h:

View File

@ -161,6 +161,7 @@ dladdr (void *addr __UNUSED__, Dl_info *info)
{
TCHAR tpath[PATH_MAX];
char *path;
char *tmp;
int length;
int ret = 0;
@ -184,6 +185,14 @@ dladdr (void *addr __UNUSED__, Dl_info *info)
path[PATH_MAX - 1] = '\0';
}
/* replace '\' by '/' */
tmp = path;
while (*tmp)
{
if (*tmp == '\\') *tmp = '/';
tmp++;
}
memcpy (info->dli_fname, path, length + 1);
info->dli_fbase = NULL;
info->dli_sname = NULL;