summaryrefslogtreecommitdiff
path: root/libiberty/pex-win32.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2004-05-31 13:27:45 +0000
committerDJ Delorie <dj@redhat.com>2004-05-31 13:27:45 +0000
commit9f7d3e7dfa3082c694b49213310649c5d61a3ac4 (patch)
treee4e5fb6056d468d5220e399dc6fcd191c111b12e /libiberty/pex-win32.c
parent6cfb204197ab46ab8aec26a1ed22d4c23aab8bc1 (diff)
downloadbinutils-gdb-9f7d3e7dfa3082c694b49213310649c5d61a3ac4.tar.gz
merge from gcc
Diffstat (limited to 'libiberty/pex-win32.c')
-rw-r--r--libiberty/pex-win32.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c
index 27a5bb4e309..2b4abdffbf9 100644
--- a/libiberty/pex-win32.c
+++ b/libiberty/pex-win32.c
@@ -59,7 +59,12 @@ fix_argv (argvec)
int i;
char * command0 = argvec[0];
- /* Ensure that the executable pathname uses Win32 backslashes. */
+ /* Ensure that the executable pathname uses Win32 backslashes. This
+ is not necessary on NT, but on W9x, forward slashes causes failure
+ of spawn* and exec* functions (and probably any function that
+ calls CreateProcess) *iff* the executable pathname (argvec[0]) is
+ a quoted string. And quoting is necessary in case a pathname
+ contains embedded white space. You can't win. */
for (; *command0 != '\0'; command0++)
if (*command0 == '/')
*command0 = '\\';