aboutsummaryrefslogtreecommitdiff
path: root/libiberty/pex-win32.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2003-07-03 14:00:54 +0000
committerDJ Delorie <dj@redhat.com>2003-07-03 14:00:54 +0000
commitab8c7bb13f6916e68cf5e83d4523890e1f9f95b7 (patch)
treecf1430f7c208024897aa35b461234c56f0dfee17 /libiberty/pex-win32.c
parent3a871b371bd72137b4fc4fc504f02080878e2540 (diff)
downloadgdb-ab8c7bb13f6916e68cf5e83d4523890e1f9f95b7.zip
gdb-ab8c7bb13f6916e68cf5e83d4523890e1f9f95b7.tar.gz
gdb-ab8c7bb13f6916e68cf5e83d4523890e1f9f95b7.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/pex-win32.c')
-rw-r--r--libiberty/pex-win32.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c
index bd097a4..24a55e8 100644
--- a/libiberty/pex-win32.c
+++ b/libiberty/pex-win32.c
@@ -57,7 +57,13 @@ fix_argv (argvec)
char **argvec;
{
int i;
+ char * command0 = argvec[0];
+ /* Ensure that the executable pathname uses Win32 backslashes. */
+ for (; *command0 != '\0'; command0++)
+ if (*command0 == '/')
+ *command0 = '\\';
+
for (i = 1; argvec[i] != 0; i++)
{
int len, j;
@@ -203,7 +209,7 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
if (pid == -1)
{
*errmsg_fmt = install_error_msg;
- *errmsg_arg = program;
+ *errmsg_arg = (char*) program;
return -1;
}