summaryrefslogtreecommitdiffstats
path: root/libiberty/pex-win32.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-03 04:21:13 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-03 04:21:13 +0000
commiteeaf6b144edb90ff6ff95822bab05f1470afb521 (patch)
treed1cc6bda2fe6015dd6a2674ee25e7ae059f6d3d9 /libiberty/pex-win32.c
parent007403f60d7d77197e7ea925518820206606ddd7 (diff)
downloadppe42-gcc-eeaf6b144edb90ff6ff95822bab05f1470afb521.tar.gz
ppe42-gcc-eeaf6b144edb90ff6ff95822bab05f1470afb521.zip
2003-07-02 Danny Smith <dannysmith@users.source.forge.net>
* pex-win32.c (fix_argv): Ensure that the executable pathname uses Win32 backslashes. (pexecute): Cast away constness when assigning *errmsg_arg. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68862 138bc75d-0d04-0410-961f-82ee72b054a4
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 bd097a4bb05..24a55e8bc0d 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;
}
OpenPOWER on IntegriCloud