projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Created
[fw/sdcc]
/
src
/
spawn.c
diff --git
a/src/spawn.c
b/src/spawn.c
index 5ae213613eadec069cf2e0a07ca01cde26dceb2f..3c85169e31addd619356bd4252cbf8edd822756a 100644
(file)
--- a/
src/spawn.c
+++ b/
src/spawn.c
@@
-11,6
+11,7
@@
the GPL license. e-mail: salvador@inti.gov.ar, set@computer.org
***************************************************************************/
#ifndef __DJGPP__
***************************************************************************/
#ifndef __DJGPP__
+#ifndef __MINGW32__
#include <unistd.h>
#include <sys/wait.h>
#include <unistd.h>
#include <sys/wait.h>
@@
-25,20
+26,21
@@
sequence which doesn't work for djgpp.
***************************************************************************/
***************************************************************************/
-int spawnv(int mode, const char *path, char *const argv[])
+int
+spawnv (int mode, const char *path, char *const argv[])
{
{
- int pStatus;
+
int pStatus;
-
if (mode==
P_OVERLAY)
- return execv
(path,
argv);
-
if (!fork
())
- {
-
if (execv(path,
argv))
- return -1;
- }
-
if (mode==
P_WAIT)
- wait(&pStatus);
- return 0;
+
if (mode ==
P_OVERLAY)
+ return execv
(path,
argv);
+
if (!fork
())
+
{
+
if (execv (path,
argv))
+ return -1;
+
}
+
if (mode ==
P_WAIT)
+ wait
(&pStatus);
+
return 0;
}
/**[txh]********************************************************************
}
/**[txh]********************************************************************
@@
-48,19
+50,21
@@
int spawnv(int mode, const char *path, char *const argv[])
***************************************************************************/
***************************************************************************/
-int spawnvp(int mode, const char *path, char *const argv[])
+int
+spawnvp (int mode, const char *path, char *const argv[])
{
{
- int pStatus;
+
int pStatus;
-
if (mode==
P_OVERLAY)
- return execv
(path,
argv);
-
if (!fork
())
- {
-
if (execvp(path,
argv))
- return -1;
- }
-
if (mode==
P_WAIT)
- wait(&pStatus);
- return 0;
+
if (mode ==
P_OVERLAY)
+ return execv
(path,
argv);
+
if (!fork
())
+
{
+
if (execvp (path,
argv))
+ return -1;
+
}
+
if (mode ==
P_WAIT)
+ wait
(&pStatus);
+
return 0;
}
#endif
}
#endif
+#endif