directly into the argv array of the child process. */
int w32_execvp (const char *, char **);
-extern int execvp (const char*, char **);
int
w32_execvp (const char *path, char **argv)
getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi (ppid));
if (!getppid_parent)
{
- printf ("Failed to open handle to parent process: %d\n",
+ printf ("Failed to open handle to parent process: %lu\n",
GetLastError ());
exit (1);
}
return 1;
case WAIT_FAILED:
default:
- printf ("Checking parent status failed: %d\n", GetLastError ());
+ printf ("Checking parent status failed: %lu\n", GetLastError ());
exit (1);
}
}
return 0;
}
-/* Place a wrapper around the MSVC version of ctime. It returns NULL
- on network directories, so we handle that case here.
- (Ulrich Leodolter, 1/11/95). */
-char *
-sys_ctime (const time_t *t)
-{
- char *str = (char *) ctime (t);
- return (str ? str : "Sun Jan 01 00:00:00 1970");
-}
-
FILE *
sys_fopen (const char * path, const char * mode)
{
/* Map to MSVC names. */
#define execlp _execlp
#define execvp _execvp
+#include <stdint.h> /* for intptr_t */
+extern intptr_t _execvp (const char *, char **);
+extern intptr_t execve (const char *, char * const *, char * const *);
#define fdatasync _commit
#define fdopen _fdopen
#define fsync _commit