]> git.ipfire.org Git - thirdparty/make.git/commitdiff
w32/subproc/sub_proc.c: Include stdint.h.
authorEli Zaretskii <eliz@gnu.org>
Fri, 9 Jul 2010 12:05:10 +0000 (12:05 +0000)
committerEli Zaretskii <eliz@gnu.org>
Fri, 9 Jul 2010 12:05:10 +0000 (12:05 +0000)
 (sub_process_t): Use intptr_t for file handles and pid_t for
 process ID.
 (process_pipes, process_init_fd, process_begin): Use intptr_t for
 file handles and pid_t for process ID.
 Savannah bug #27809.  Patch by Ozkan Sezer <sezeroz@gmail.com>

ChangeLog
w32/subproc/sub_proc.c

index 79ee21600cecaf90f760e19c3131768a4699d776..0bc52cfc08a9132f0e0cee177e1ca43cdeb0e0ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2010-07-09  Eli Zaretskii  <eliz@gnu.org>
 
+       * w32/subproc/sub_proc.c: Include stdint.h.
+       (sub_process_t): Use intptr_t for file handles and pid_t for
+       process ID.
+       (process_pipes, process_init_fd, process_begin): Use intptr_t for
+       file handles and pid_t for process ID.
+       Savannah bug #27809.  Patch by Ozkan Sezer <sezeroz@gmail.com>
+
        * function.c (abspath): Support absolute file names in UNC format.
        (Savannah bug #30312.)
 
index 882b67424b0d89bcc57e60c873ff41f46f28f3fc..2b1b364504f05140f206d051a6dddc3a486e6bf1 100644 (file)
@@ -17,6 +17,7 @@ this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdint.h>
 #include <process.h>  /* for msvc _beginthreadex, _endthreadex */
 #include <signal.h>
 #include <windows.h>
@@ -31,9 +32,9 @@ static char *make_command_line(char *shell_name, char *exec_path, char **argv);
 extern char *xmalloc (unsigned int);
 
 typedef struct sub_process_t {
-       int sv_stdin[2];
-       int sv_stdout[2];
-       int sv_stderr[2];
+       intptr_t sv_stdin[2];
+       intptr_t sv_stdout[2];
+       intptr_t sv_stderr[2];
        int using_pipes;
        char *inp;
        DWORD incnt;
@@ -41,7 +42,7 @@ typedef struct sub_process_t {
        volatile DWORD outcnt;
        char * volatile errp;
        volatile DWORD errcnt;
-       int pid;
+       pid_t pid;
        int exit_code;
        int signal;
        long last_err;
@@ -310,12 +311,12 @@ process_init()
                pproc->lerrno = E_SCALL;
                return((HANDLE)pproc);
        }
-       pproc->sv_stdin[0]  = (int) stdin_pipes[0];
-       pproc->sv_stdin[1]  = (int) stdin_pipes[1];
-       pproc->sv_stdout[0] = (int) stdout_pipes[0];
-       pproc->sv_stdout[1] = (int) stdout_pipes[1];
-       pproc->sv_stderr[0] = (int) stderr_pipes[0];
-       pproc->sv_stderr[1] = (int) stderr_pipes[1];
+       pproc->sv_stdin[0]  = (intptr_t) stdin_pipes[0];
+       pproc->sv_stdin[1]  = (intptr_t) stdin_pipes[1];
+       pproc->sv_stdout[0] = (intptr_t) stdout_pipes[0];
+       pproc->sv_stdout[1] = (intptr_t) stdout_pipes[1];
+       pproc->sv_stderr[0] = (intptr_t) stderr_pipes[0];
+       pproc->sv_stderr[1] = (intptr_t) stderr_pipes[1];
 
        pproc->using_pipes = 1;
 
@@ -337,9 +338,9 @@ process_init_fd(HANDLE stdinh, HANDLE stdouth, HANDLE stderrh)
         * Just pass the provided file handles to the 'child side' of the
         * pipe, bypassing pipes altogether.
         */
-       pproc->sv_stdin[1]  = (int) stdinh;
-       pproc->sv_stdout[1] = (int) stdouth;
-       pproc->sv_stderr[1] = (int) stderrh;
+       pproc->sv_stdin[1]  = (intptr_t) stdinh;
+       pproc->sv_stdout[1] = (intptr_t) stdouth;
+       pproc->sv_stderr[1] = (intptr_t) stderrh;
 
        pproc->last_err = pproc->lerrno = 0;
 
@@ -575,7 +576,7 @@ process_begin(
                }
        }
 
-       pproc->pid = (int)procInfo.hProcess;
+       pproc->pid = (pid_t)procInfo.hProcess;
        /* Close the thread handle -- we'll just watch the process */
        CloseHandle(procInfo.hThread);