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
1aea4efd
Commit
1aea4efd
authored
Aug 27, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: Take into account the executable extension when looking for tools in the path.
parent
f5896a2b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
5 deletions
+17
-5
configure
configure
+5
-0
configure.ac
configure.ac
+1
-0
config.h.in
include/config.h.in
+3
-0
utils.c
tools/winebuild/utils.c
+3
-2
utils.c
tools/winegcc/utils.c
+5
-3
No files found.
configure
View file @
1aea4efd
...
...
@@ -3960,6 +3960,11 @@ else
fi
cat
>>
confdefs.h
<<
_ACEOF
#define EXEEXT "
$ac_exeext
"
_ACEOF
case
$host
in
*
-darwin
*
)
if
test
"x
$enable_win64
"
=
"xyes"
...
...
configure.ac
View file @
1aea4efd
...
...
@@ -105,6 +105,7 @@ AC_PROG_CC
AC_PROG_CXX
dnl We can't use AC_PROG_CPP for winegcc, it uses by default $(CC) -E
AC_CHECK_TOOL(CPPBIN,cpp,cpp)
AC_DEFINE_UNQUOTED(EXEEXT,["$ac_exeext"],[Define to the file extension for executables.])
case $host in
*-darwin*)
...
...
include/config.h.in
View file @
1aea4efd
...
...
@@ -2,6 +2,9 @@
#define __WINE_CONFIG_H
/* Define to the file extension for executables. */
#undef EXEEXT
/* Define to 1 if you have the <alias.h> header file. */
#undef HAVE_ALIAS_H
...
...
tools/winebuild/utils.c
View file @
1aea4efd
...
...
@@ -198,7 +198,7 @@ int output( const char *format, ... )
}
/* find a build tool in the path, trying the various names */
char
*
find_tool
(
const
char
*
const
*
names
)
static
char
*
find_tool
(
const
char
*
const
*
names
)
{
static
char
**
dirs
;
static
unsigned
int
count
,
maxlen
;
...
...
@@ -231,7 +231,7 @@ char *find_tool( const char * const *names )
while
(
*
names
)
{
len
=
strlen
(
*
names
)
+
1
;
len
=
strlen
(
*
names
)
+
sizeof
(
EXEEXT
)
+
1
;
file
=
xmalloc
(
maxlen
+
len
);
for
(
i
=
0
;
i
<
count
;
i
++
)
...
...
@@ -241,6 +241,7 @@ char *find_tool( const char * const *names )
if
(
p
==
file
)
*
p
++
=
'.'
;
if
(
p
[
-
1
]
!=
'/'
)
*
p
++
=
'/'
;
strcpy
(
p
,
*
names
);
strcat
(
p
,
EXEEXT
);
if
(
!
stat
(
file
,
&
st
)
&&
S_ISREG
(
st
.
st_mode
)
&&
(
st
.
st_mode
&
0111
))
return
file
;
}
...
...
tools/winegcc/utils.c
View file @
1aea4efd
...
...
@@ -308,14 +308,16 @@ void spawn(const strarray* prefix, const strarray* args, int ignore_errors)
if
(
prefix
)
{
const
char
*
p
=
strrchr
(
argv
[
0
],
'/'
);
if
(
!
p
)
p
=
argv
[
0
];
else
p
++
;
for
(
i
=
0
;
i
<
prefix
->
size
;
i
++
)
{
const
char
*
p
;
struct
stat
st
;
if
(
!
(
p
=
strrchr
(
argv
[
0
],
'/'
)))
p
=
argv
[
0
];
free
(
prog
);
prog
=
strmake
(
"%s/%s
"
,
prefix
->
base
[
i
],
p
);
prog
=
strmake
(
"%s/%s
%s"
,
prefix
->
base
[
i
],
p
,
EXEEXT
);
if
(
stat
(
prog
,
&
st
)
==
0
&&
S_ISREG
(
st
.
st_mode
)
&&
(
st
.
st_mode
&
0111
))
{
argv
[
0
]
=
prog
;
...
...
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