OSDN Git Service

* splay-tree.c (splay_tree_delete_helper): Redesign the logic so
[pf3gnuchains/gcc-fork.git] / libiberty / pex-win32.c
index 24a55e8..2b4abdf 100644 (file)
@@ -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;