Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
1269f43c
Commit
1269f43c
authored
19 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
libwine: Add the runtime library path to the front of the dll paths list.
parent
133b3069
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libs/wine/config.c
+3
-2
3 additions, 2 deletions
libs/wine/config.c
libs/wine/loader.c
+12
-6
12 additions, 6 deletions
libs/wine/loader.c
with
15 additions
and
8 deletions
libs/wine/config.c
+
3
−
2
View file @
1269f43c
...
...
@@ -162,9 +162,10 @@ static void init_server_dir( dev_t dev, ino_t ino )
}
/* retrieve the default dll dir */
const
char
*
get_default_dlldir
(
void
)
const
char
*
get_
dlldir
(
const
char
**
default_dlldir
)
{
return
dlldir
?
dlldir
:
DLLDIR
;
*
default_dlldir
=
DLLDIR
;
return
dlldir
;
}
/* initialize all the paths values */
...
...
This diff is collapsed.
Click to expand it.
libs/wine/loader.c
+
12
−
6
View file @
1269f43c
...
...
@@ -81,13 +81,14 @@ static int dll_path_maxlen;
extern
void
mmap_init
(
void
);
extern
void
debug_init
(
void
);
extern
const
char
*
get_default_dlldir
(
void
);
extern
const
char
*
get_
dlldir
(
const
char
**
default_dlldir
);
/* build the dll load path from the WINEDLLPATH variable */
static
void
build_dll_path
(
void
)
{
int
len
,
count
=
0
;
char
*
p
,
*
path
=
getenv
(
"WINEDLLPATH"
);
const
char
*
dlldir
=
get_dlldir
(
&
default_dlldir
);
if
(
path
)
{
...
...
@@ -103,12 +104,18 @@ static void build_dll_path(void)
}
}
dll_paths
=
malloc
(
(
count
+
1
)
*
sizeof
(
*
dll_paths
)
);
dll_paths
=
malloc
(
(
count
+
2
)
*
sizeof
(
*
dll_paths
)
);
nb_dll_paths
=
0
;
if
(
dlldir
)
{
dll_path_maxlen
=
strlen
(
dlldir
);
dll_paths
[
nb_dll_paths
++
]
=
dlldir
;
}
if
(
count
)
{
p
=
path
;
nb_dll_paths
=
0
;
while
(
*
p
)
{
while
(
*
p
==
':'
)
*
p
++
=
0
;
...
...
@@ -122,7 +129,6 @@ static void build_dll_path(void)
}
/* append default dll dir (if not empty) to path */
default_dlldir
=
get_default_dlldir
();
if
((
len
=
strlen
(
default_dlldir
))
>
0
)
{
if
(
len
>
dll_path_maxlen
)
dll_path_maxlen
=
len
;
...
...
@@ -570,8 +576,8 @@ void wine_init( int argc, char *argv[], char *error, int error_size )
void
*
ntdll
=
NULL
;
void
(
*
init_func
)(
void
);
build_dll_path
();
wine_init_argv0_path
(
argv
[
0
]
);
build_dll_path
();
__wine_main_argc
=
argc
;
__wine_main_argv
=
argv
;
__wine_main_environ
=
environ
;
...
...
@@ -583,7 +589,7 @@ void wine_init( int argc, char *argv[], char *error, int error_size )
if
((
ntdll
=
wine_dlopen
(
path
,
RTLD_NOW
,
error
,
error_size
)))
{
/* if we didn't use the default dll dir, remove it from the search path */
if
(
sizeof
(
default_dlldir
)
>
1
&&
context
.
index
<
nb_dll_paths
)
nb_dll_paths
--
;
if
(
default_dlldir
[
0
]
&&
context
.
index
<
nb_dll_paths
)
nb_dll_paths
--
;
break
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment