diff options
author | DJ Delorie <dj@delorie.com> | 2003-07-03 14:00:54 +0000 |
---|---|---|
committer | DJ Delorie <dj@delorie.com> | 2003-07-03 14:00:54 +0000 |
commit | d85bb51d3faa00bde3426b096baa3792a7561b9d (patch) | |
tree | 06878214c32cfbe8f8e7e758d1b189a84260d7de /libiberty | |
parent | d3c8bd69381e81520321e8f95f79780f8f59839a (diff) | |
download | gdb-d85bb51d3faa00bde3426b096baa3792a7561b9d.tar.gz |
merge from gcc
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 6 | ||||
-rw-r--r-- | libiberty/pex-win32.c | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 99f2f0a695a..770ef9533ef 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +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. + 2003-06-26 H.J. Lu <hongjiu.lu@intel.com> * testsuite/demangle-expected: Add more GNU V3 testcases. 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; } |