mirror of
https://github.com/mirror/make.git
synced 2026-08-30 19:27:57 +08:00
job.c (pid2str) [WINDOWS32]: Don't use %Id with GCC < 4.x.
(exec_command) [WINDOWS32]: Use pid2str instead of non-portable %Id. main.c (handle_runtime_exceptions): Use %p to print addresses, to DTRT on both 32-bit and 64-bit hosts. Savannah bug #27809. job.c (w32_kill, start_job_command, create_batch_file): Use pid_t for process IDs and intptr_t for the 1st arg of _open_osfhandle. function.c (windows32_openpipe): Use pid_t for process IDs and intptr_t for the 1st arg of _open_osfhandle. (func_shell): Use pid_t for process IDs. main.c (main) [WINDOWS32]: Pacify the compiler. config.h.W32.template (pid_t): Add a definition for 64-bit Windows builds that don't use GCC. Savannah bug #27809. Patch by Ozkan Sezer <sezeroz@gmail.com>
This commit is contained in:
12
function.c
12
function.c
@@ -1434,7 +1434,7 @@ int shell_function_pid = 0, shell_function_completed;
|
||||
|
||||
|
||||
void
|
||||
windows32_openpipe (int *pipedes, int *pid_p, char **command_argv, char **envp)
|
||||
windows32_openpipe (int *pipedes, pid_t *pid_p, char **command_argv, char **envp)
|
||||
{
|
||||
SECURITY_ATTRIBUTES saAttr;
|
||||
HANDLE hIn;
|
||||
@@ -1489,13 +1489,13 @@ windows32_openpipe (int *pipedes, int *pid_p, char **command_argv, char **envp)
|
||||
process_register(hProcess);
|
||||
|
||||
/* set the pid for returning to caller */
|
||||
*pid_p = (int) hProcess;
|
||||
*pid_p = (pid_t) hProcess;
|
||||
|
||||
/* set up to read data from child */
|
||||
pipedes[0] = _open_osfhandle((long) hChildOutRd, O_RDONLY);
|
||||
pipedes[0] = _open_osfhandle((intptr_t) hChildOutRd, O_RDONLY);
|
||||
|
||||
/* this will be closed almost right away */
|
||||
pipedes[1] = _open_osfhandle((long) hChildOutWr, O_APPEND);
|
||||
pipedes[1] = _open_osfhandle((intptr_t) hChildOutWr, O_APPEND);
|
||||
} else {
|
||||
/* reap/cleanup the failed process */
|
||||
process_cleanup(hProcess);
|
||||
@@ -1510,7 +1510,7 @@ windows32_openpipe (int *pipedes, int *pid_p, char **command_argv, char **envp)
|
||||
|
||||
/* set status for return */
|
||||
pipedes[0] = pipedes[1] = -1;
|
||||
*pid_p = -1;
|
||||
*pid_p = (pid_t)-1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1594,7 +1594,7 @@ func_shell (char *o, char **argv, const char *funcname UNUSED)
|
||||
const char *error_prefix;
|
||||
char **envp;
|
||||
int pipedes[2];
|
||||
int pid;
|
||||
pid_t pid;
|
||||
|
||||
#ifndef __MSDOS__
|
||||
/* Construct the argument list. */
|
||||
|
||||
Reference in New Issue
Block a user