summaryrefslogtreecommitdiff
path: root/libiberty/pex-win32.c
diff options
context:
space:
mode:
authordannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-31 10:32:58 +0000
committerdannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-31 10:32:58 +0000
commit155c5d86b5f03ce60f34d522fd46e66ccba46d51 (patch)
tree14e7f0bf8984621cbd408c8bcf26cbc787fe83b8 /libiberty/pex-win32.c
parent6bfc819a83816e600727601a26c4f7c771a13f5b (diff)
downloadgcc-155c5d86b5f03ce60f34d522fd46e66ccba46d51.tar.gz
* pex-win32.c (fix_argv): Expand comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82482 138bc75d-0d04-0410-961f-82ee72b054a4
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 = '\\';