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
832e4388
Commit
832e4388
authored
Apr 02, 2003
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Apr 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make use of the new spawnvp function in wine{gcc,wrap}.
parent
3569c234
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
46 deletions
+10
-46
winegcc.c
tools/winegcc.c
+5
-23
winewrap.c
tools/winewrap.c
+5
-23
No files found.
tools/winegcc.c
View file @
832e4388
...
...
@@ -27,13 +27,7 @@
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#include <sys/stat.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
static
char
**
tmp_files
;
static
int
nb_tmp_files
;
...
...
@@ -75,29 +69,17 @@ char *strmake(const char *fmt, ...)
void
spawn
(
char
*
const
argv
[])
{
#ifdef HAVE__SPAWNVP
if
(
!
_spawnvp
(
_P_WAIT
,
argv
[
0
],
argv
))
return
;
#else
int
pid
,
status
,
wret
,
i
;
int
i
,
status
;
if
(
verbose
)
{
for
(
i
=
0
;
argv
[
i
];
i
++
)
printf
(
"%s "
,
argv
[
i
]);
printf
(
"
\n
"
);
}
if
(
!
(
status
=
spawnvp
(
_P_WAIT
,
argv
[
0
],
argv
)))
return
;
if
((
pid
=
fork
())
==
0
)
execvp
(
argv
[
0
],
argv
);
else
if
(
pid
>
0
)
{
while
(
pid
!=
(
wret
=
waitpid
(
pid
,
&
status
,
0
)))
if
(
wret
==
-
1
&&
errno
!=
EINTR
)
break
;
if
(
pid
==
wret
&&
WIFEXITED
(
status
)
&&
WEXITSTATUS
(
status
)
==
0
)
return
;
error
(
"%s failed."
,
argv
[
0
]);
}
#endif
/* HAVE__SPAWNVP */
perror
(
"Error:"
);
if
(
status
>
0
)
error
(
"%s failed."
,
argv
[
0
]);
else
perror
(
"Error:"
);
exit
(
3
);
}
...
...
tools/winewrap.c
View file @
832e4388
...
...
@@ -27,13 +27,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#include <sys/stat.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifndef WINEDLLS
#define WINEDLLS "/usr/local/lib/wine"
...
...
@@ -296,29 +290,17 @@ void create_file(const char *name, const char *fmt, ...)
void
spawn
(
char
*
const
argv
[])
{
#ifdef HAVE__SPAWNVP
if
(
!
_spawnvp
(
_P_WAIT
,
argv
[
0
],
argv
))
return
;
#else
int
pid
,
status
,
wret
,
i
;
int
i
,
status
;
if
(
verbose
)
{
for
(
i
=
0
;
argv
[
i
];
i
++
)
printf
(
"%s "
,
argv
[
i
]);
printf
(
"
\n
"
);
}
if
(
!
(
status
=
spawnvp
(
_P_WAIT
,
argv
[
0
],
argv
)))
return
;
if
((
pid
=
fork
())
==
0
)
execvp
(
argv
[
0
],
argv
);
else
if
(
pid
>
0
)
{
while
(
pid
!=
(
wret
=
waitpid
(
pid
,
&
status
,
0
)))
if
(
wret
==
-
1
&&
errno
!=
EINTR
)
break
;
if
(
pid
==
wret
&&
WIFEXITED
(
status
)
&&
WEXITSTATUS
(
status
)
==
0
)
return
;
error
(
"%s failed."
,
argv
[
0
]);
}
#endif
/* HAVE__SPAWNVP */
perror
(
"Error:"
);
if
(
status
>
0
)
error
(
"%s failed."
,
argv
[
0
]);
else
perror
(
"Error:"
);
exit
(
3
);
}
...
...
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