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
62f9966f
Commit
62f9966f
authored
Oct 28, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Fix the lib dir detection.
Spotted by André Hentschel.
parent
800cdcfe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
winegcc.c
tools/winegcc/winegcc.c
+15
-7
No files found.
tools/winegcc/winegcc.c
View file @
62f9966f
...
...
@@ -340,28 +340,36 @@ static int check_platform( struct options *opts, const char *file )
static
char
*
get_lib_dir
(
struct
options
*
opts
)
{
static
const
char
*
stdlibpath
[]
=
{
LIBDIR
,
"/usr/lib"
,
"/usr/local/lib"
,
"/lib"
};
static
const
char
libwine
[]
=
"/libwine.so"
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
stdlibpath
)
/
sizeof
(
stdlibpath
[
0
]);
i
++
)
{
char
*
p
,
*
buffer
=
xmalloc
(
strlen
(
stdlibpath
[
i
])
+
s
izeof
(
"32/libwine.so"
)
);
char
*
p
,
*
buffer
=
xmalloc
(
strlen
(
stdlibpath
[
i
])
+
s
trlen
(
libwine
)
+
3
);
strcpy
(
buffer
,
stdlibpath
[
i
]
);
p
=
buffer
+
strlen
(
buffer
);
while
(
p
>
buffer
&&
p
[
-
1
]
==
'/'
)
p
--
;
strcpy
(
p
,
"/libwine.so"
);
if
(
check_platform
(
opts
,
buffer
))
return
buffer
;
strcpy
(
p
,
libwine
);
if
(
check_platform
(
opts
,
buffer
))
goto
found
;
if
(
p
>
buffer
+
2
&&
(
!
memcmp
(
p
-
2
,
"32"
,
2
)
||
!
memcmp
(
p
-
2
,
"64"
,
2
)))
p
-=
2
;
if
(
opts
->
force_pointer_size
==
4
||
(
!
opts
->
force_pointer_size
&&
opts
->
target_cpu
!=
CPU_x86_64
))
{
strcpy
(
p
,
"32/libwine.so"
);
if
(
check_platform
(
opts
,
buffer
))
return
buffer
;
strcpy
(
p
,
"32"
);
strcat
(
p
,
libwine
);
if
(
check_platform
(
opts
,
buffer
))
goto
found
;
}
if
(
opts
->
force_pointer_size
==
8
||
(
!
opts
->
force_pointer_size
&&
opts
->
target_cpu
==
CPU_x86_64
))
{
strcpy
(
p
,
"64/libwine.so"
);
if
(
check_platform
(
opts
,
buffer
))
return
buffer
;
strcpy
(
p
,
"64"
);
strcat
(
p
,
libwine
);
if
(
check_platform
(
opts
,
buffer
))
goto
found
;
}
free
(
buffer
);
continue
;
found:
buffer
[
strlen
(
buffer
)
-
strlen
(
libwine
)]
=
0
;
return
buffer
;
}
return
xstrdup
(
LIBDIR
);
}
...
...
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