summaryrefslogtreecommitdiff
path: root/libiberty/pex-win32.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2006-10-26 04:18:42 +0000
committerDJ Delorie <dj@delorie.com>2006-10-26 04:18:42 +0000
commitbe1a2dfa850d659031ffcb7f49920ff42857718c (patch)
tree2877db7772e815590a62bbfff3f7ff4094e9719c /libiberty/pex-win32.c
parent5e18f1320da88d37c5cc9726e1a746857e0769c3 (diff)
downloadgdb-be1a2dfa850d659031ffcb7f49920ff42857718c.tar.gz
merge from gcc
Diffstat (limited to 'libiberty/pex-win32.c')
-rw-r--r--libiberty/pex-win32.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c
index aef386d3cc2..90a9ed1f950 100644
--- a/libiberty/pex-win32.c
+++ b/libiberty/pex-win32.c
@@ -1,6 +1,6 @@
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. Generic Win32 specialization.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of the libiberty library.
@@ -358,7 +358,7 @@ argv_to_cmdline (char *const *argv)
cmdline_len += j;
cmdline_len += 3; /* for leading and trailing quotes and space */
}
- cmdline = xmalloc (cmdline_len);
+ cmdline = XNEWVEC (char, cmdline_len);
p = cmdline;
for (i = 0; argv[i]; i++)
{
@@ -433,7 +433,7 @@ find_executable (const char *program, BOOL search)
q++;
}
fe_len = fe_len + 1 + proglen + (has_extension ? 1 : 5);
- full_executable = xmalloc (fe_len);
+ full_executable = XNEWVEC (char, fe_len);
p = path;
do
@@ -557,14 +557,14 @@ win32_spawn (const char *executable,
/* Windows needs the members of the block to be sorted by variable
name. */
- env_copy = alloca (sizeof (char *) * env_size);
+ env_copy = (char **) alloca (sizeof (char *) * env_size);
memcpy (env_copy, env, sizeof (char *) * env_size);
qsort (env_copy, env_size, sizeof (char *), env_compare);
for (var = 0; var < env_size; var++)
total_size += strlen (env[var]) + 1;
- env_block = malloc (total_size);
+ env_block = XNEWVEC (char, total_size);
bufptr = env_block;
for (var = 0; var < env_size; var++)
bufptr = stpcpy (bufptr, env_copy[var]) + 1;