X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libiberty%2Fpex-win32.c;h=2b4abdffbf95cd82761be411cf01f8f2eb7fb2cc;hb=7fcf593786536c9ce6a574ea12e5a44cfeca19f3;hp=24a55e8bc0d83aa6735654c904a46f8752d785b2;hpb=eeaf6b144edb90ff6ff95822bab05f1470afb521;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c index 24a55e8bc0d..2b4abdffbf9 100644 --- a/libiberty/pex-win32.c +++ b/libiberty/pex-win32.c @@ -59,7 +59,12 @@ fix_argv (argvec) int i; char * command0 = argvec[0]; - /* Ensure that the executable pathname uses Win32 backslashes. */ + /* Ensure that the executable pathname uses Win32 backslashes. This + is not necessary on NT, but on W9x, forward slashes causes failure + of spawn* and exec* functions (and probably any function that + calls CreateProcess) *iff* the executable pathname (argvec[0]) is + a quoted string. And quoting is necessary in case a pathname + contains embedded white space. You can't win. */ for (; *command0 != '\0'; command0++) if (*command0 == '/') *command0 = '\\'; @@ -136,15 +141,16 @@ int pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags) const char *program; char * const *argv; - const char *this_pname; - const char *temp_base; + const char *this_pname ATTRIBUTE_UNUSED; + const char *temp_base ATTRIBUTE_UNUSED; char **errmsg_fmt, **errmsg_arg; int flags; { int pid; - int pdes[2], org_stdin, org_stdout; + int pdes[2]; + int org_stdin = -1; + int org_stdout = -1; int input_desc, output_desc; - int retries, sleep_interval; /* Pipe waiting from last process, to be used as input for the next one. Value is STDIN_FILE_NO if no pipe is waiting @@ -227,7 +233,7 @@ int pwait (pid, status, flags) int pid; int *status; - int flags; + int flags ATTRIBUTE_UNUSED; { int termstat;