Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
493129d6
Commit
493129d6
authored
Nov 28, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Look for the 64-bit wineserver using the 64-bit loader symlink.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
27254d84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
+25
-3
config.c
libs/wine/config.c
+25
-3
No files found.
libs/wine/config.c
View file @
493129d6
...
@@ -47,6 +47,7 @@ static char *server_dir;
...
@@ -47,6 +47,7 @@ static char *server_dir;
static
char
*
build_dir
;
static
char
*
build_dir
;
static
char
*
user_name
;
static
char
*
user_name
;
static
char
*
argv0_name
;
static
char
*
argv0_name
;
static
char
*
wineserver64
;
#ifdef __GNUC__
#ifdef __GNUC__
static
void
fatal_error
(
const
char
*
err
,
...
)
__attribute__
((
noreturn
,
format
(
printf
,
1
,
2
)));
static
void
fatal_error
(
const
char
*
err
,
...
)
__attribute__
((
noreturn
,
format
(
printf
,
1
,
2
)));
...
@@ -156,7 +157,7 @@ static char *get_runtime_libdir(void)
...
@@ -156,7 +157,7 @@ static char *get_runtime_libdir(void)
/* read a symlink and return its directory */
/* read a symlink and return its directory */
static
char
*
symlink_dirname
(
const
char
*
name
)
static
char
*
symlink_dirname
(
const
char
*
name
)
{
{
char
*
p
,
*
buffer
;
char
*
p
,
*
buffer
,
*
absdir
=
NULL
;
int
ret
,
size
;
int
ret
,
size
;
for
(
size
=
256
;
;
size
*=
2
)
for
(
size
=
256
;
;
size
*=
2
)
...
@@ -169,11 +170,19 @@ static char *symlink_dirname( const char *name )
...
@@ -169,11 +170,19 @@ static char *symlink_dirname( const char *name )
if
(
!
(
p
=
strrchr
(
buffer
,
'/'
)))
break
;
if
(
!
(
p
=
strrchr
(
buffer
,
'/'
)))
break
;
if
(
p
==
buffer
)
p
++
;
if
(
p
==
buffer
)
p
++
;
*
p
=
0
;
*
p
=
0
;
return
buffer
;
if
(
buffer
[
0
]
==
'/'
)
return
buffer
;
/* make it absolute */
absdir
=
xmalloc
(
strlen
(
name
)
+
strlen
(
buffer
)
+
1
);
strcpy
(
absdir
,
name
);
if
(
!
(
p
=
strrchr
(
absdir
,
'/'
)))
break
;
strcpy
(
p
+
1
,
buffer
);
free
(
buffer
);
return
absdir
;
}
}
free
(
buffer
);
free
(
buffer
);
}
}
free
(
buffer
);
free
(
buffer
);
free
(
absdir
);
return
NULL
;
return
NULL
;
}
}
...
@@ -446,6 +455,16 @@ done:
...
@@ -446,6 +455,16 @@ done:
if
(
build_dir
)
if
(
build_dir
)
{
{
argv0_name
=
build_path
(
"loader/"
,
basename
);
argv0_name
=
build_path
(
"loader/"
,
basename
);
if
(
sizeof
(
int
)
==
sizeof
(
void
*
))
{
char
*
loader
,
*
linkname
=
build_path
(
build_dir
,
"loader/wine64"
);
if
((
loader
=
symlink_dirname
(
linkname
)))
{
wineserver64
=
build_path
(
loader
,
"../server/wineserver"
);
free
(
loader
);
}
free
(
linkname
);
}
}
}
else
else
{
{
...
@@ -565,7 +584,10 @@ void wine_exec_wine_binary( const char *name, char **argv, const char *env_var )
...
@@ -565,7 +584,10 @@ void wine_exec_wine_binary( const char *name, char **argv, const char *env_var )
/* if we are in build dir and name contains a path, try that */
/* if we are in build dir and name contains a path, try that */
if
(
build_dir
)
if
(
build_dir
)
{
{
argv
[
0
]
=
build_path
(
build_dir
,
name
);
if
(
wineserver64
&&
!
strcmp
(
name
,
"server/wineserver"
))
argv
[
0
]
=
xstrdup
(
wineserver64
);
else
argv
[
0
]
=
build_path
(
build_dir
,
name
);
preloader_exec
(
argv
,
use_preloader
);
preloader_exec
(
argv
,
use_preloader
);
free
(
argv
[
0
]
);
free
(
argv
[
0
]
);
}
}
...
...
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