Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
bc23ae6d
Commit
bc23ae6d
authored
Apr 03, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make dlopen_dll return an error immediately if the library exists but
dlopen() fails.
parent
c2c8bf1b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
loader.c
library/loader.c
+12
-0
No files found.
library/loader.c
View file @
bc23ae6d
...
...
@@ -103,6 +103,13 @@ static void build_dll_path(void)
}
}
/* check if a given file can be opened */
inline
static
int
file_exists
(
const
char
*
name
)
{
int
fd
=
open
(
name
,
O_RDONLY
);
if
(
fd
!=
-
1
)
close
(
fd
);
return
(
fd
!=
-
1
);
}
/* open a library for a given dll, searching in the dll path
* 'name' must be the Windows dll name (e.g. "kernel32.dll") */
...
...
@@ -128,6 +135,11 @@ static void *dlopen_dll( const char *name, char *error, int errorsize )
p
=
buffer
+
dll_path_maxlen
-
len
;
memcpy
(
p
,
dll_paths
[
i
],
len
);
if
((
ret
=
wine_dlopen
(
p
,
RTLD_NOW
,
error
,
errorsize
)))
break
;
if
(
file_exists
(
p
))
/* exists but cannot be loaded, return the error */
{
free
(
buffer
);
return
NULL
;
}
}
/* now try the default dlopen search path */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment