Commit e9990579 by Richard Kenner

(fix_argv): Removed call to free.

Changed WINNT to _WIN32.

From-SVN: r9731
parent 6518a809
...@@ -36,7 +36,7 @@ compilation is specified by a string called a "spec". */ ...@@ -36,7 +36,7 @@ compilation is specified by a string called a "spec". */
#include <sys/stat.h> #include <sys/stat.h>
#include <errno.h> #include <errno.h>
#ifndef WINNT #ifndef _WIN32
#include <sys/file.h> /* May get R_OK, etc. on some systems. */ #include <sys/file.h> /* May get R_OK, etc. on some systems. */
#else #else
#include <process.h> #include <process.h>
...@@ -2012,7 +2012,7 @@ pexecute (search_flag, program, argv, not_last) ...@@ -2012,7 +2012,7 @@ pexecute (search_flag, program, argv, not_last)
#endif #endif
#if !defined(__MSDOS__) && !defined(OS2) && !defined(WINNT) #if !defined(__MSDOS__) && !defined(OS2) && !defined(_WIN32)
static int static int
pexecute (search_flag, program, argv, not_last) pexecute (search_flag, program, argv, not_last)
...@@ -2102,11 +2102,11 @@ pexecute (search_flag, program, argv, not_last) ...@@ -2102,11 +2102,11 @@ pexecute (search_flag, program, argv, not_last)
} }
} }
#endif /* not __MSDOS__ and not OS2 and not WINNT */ #endif /* not __MSDOS__ and not OS2 and not _WIN32 */
#if defined(OS2) || defined(WINNT) #if defined(OS2) || defined(_WIN32)
#ifdef WINNT #ifdef _WIN32
/* This is a kludge to get around the Microsoft C spawn functions' propensity /* This is a kludge to get around the Microsoft C spawn functions' propensity
to remove the outermost set of double quotes from all arguments. */ to remove the outermost set of double quotes from all arguments. */
...@@ -2133,7 +2133,6 @@ fix_argv (argvec) ...@@ -2133,7 +2133,6 @@ fix_argv (argvec)
newtemp [j] = '\\'; newtemp [j] = '\\';
strncpy (&newtemp [j+1], &temp [j], len-j); strncpy (&newtemp [j+1], &temp [j], len-j);
newtemp [len+1] = 0; newtemp [len+1] = 0;
free (temp);
temp = newtemp; temp = newtemp;
len++; len++;
j++; j++;
...@@ -2163,7 +2162,7 @@ pexecute (search_flag, program, argv, not_last) ...@@ -2163,7 +2162,7 @@ pexecute (search_flag, program, argv, not_last)
{ {
return (search_flag ? spawnv : spawnvp) (1, program, FIX_ARGV (argv)); return (search_flag ? spawnv : spawnvp) (1, program, FIX_ARGV (argv));
} }
#endif /* OS2 or WINNT */ #endif /* OS2 or _WIN32 */
/* Execute the command specified by the arguments on the current line of spec. /* Execute the command specified by the arguments on the current line of spec.
...@@ -2287,7 +2286,7 @@ execute () ...@@ -2287,7 +2286,7 @@ execute ()
#ifdef __MSDOS__ #ifdef __MSDOS__
status = pid = commands[i].pid; status = pid = commands[i].pid;
#else #else
#ifdef WINNT #ifdef _WIN32
pid = cwait (&status, commands[i].pid, WAIT_CHILD); pid = cwait (&status, commands[i].pid, WAIT_CHILD);
#else #else
pid = wait (&status); pid = wait (&status);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment