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
c296d1fb
Commit
c296d1fb
authored
Jun 03, 2012
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Jun 04, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Improve bin directory detection on FreeBSD.
parent
6cb7cd19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
config.c
libs/wine/config.c
+8
-2
No files found.
libs/wine/config.c
View file @
c296d1fb
...
...
@@ -53,6 +53,12 @@ static void fatal_error( const char *err, ... ) __attribute__((noreturn,format(
static
void
fatal_perror
(
const
char
*
err
,
...
)
__attribute__
((
noreturn
,
format
(
printf
,
1
,
2
)));
#endif
#ifdef __linux__
#define EXE_LINK "/proc/self/exe"
#elif defined (__FreeBSD__)
#define EXE_LINK "/proc/curproc/file"
#endif
/* die on a fatal error */
static
void
fatal_error
(
const
char
*
err
,
...
)
{
...
...
@@ -151,12 +157,12 @@ static char *get_runtime_bindir( const char *argv0 )
char
*
p
,
*
bindir
,
*
cwd
;
int
len
,
size
;
#ifdef
linux
#ifdef
EXE_LINK
for
(
size
=
256
;
;
size
*=
2
)
{
int
ret
;
if
(
!
(
bindir
=
malloc
(
size
)))
break
;
if
((
ret
=
readlink
(
"/proc/self/exe"
,
bindir
,
size
))
==
-
1
)
break
;
if
((
ret
=
readlink
(
EXE_LINK
,
bindir
,
size
))
==
-
1
)
break
;
if
(
ret
!=
size
)
{
if
(
!
(
p
=
memrchr
(
bindir
,
'/'
,
ret
)))
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