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
1269f43c
Commit
1269f43c
authored
Feb 17, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Add the runtime library path to the front of the dll paths list.
parent
133b3069
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
config.c
libs/wine/config.c
+3
-2
loader.c
libs/wine/loader.c
+12
-6
No files found.
libs/wine/config.c
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_d
efault_dlldir
(
void
)
const
char
*
get_d
lldir
(
const
char
**
default_dlldir
)
{
return
dlldir
?
dlldir
:
DLLDIR
;
*
default_dlldir
=
DLLDIR
;
return
dlldir
;
}
/* initialize all the paths values */
...
...
libs/wine/loader.c
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_d
efault_dlldir
(
void
);
extern
const
char
*
get_d
lldir
(
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
;
}
}
...
...
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