This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch] libiberty/pex-win32.c: Expain why we use '\\' here.
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 30 May 2004 02:49:30 +0100
- Subject: [Patch] libiberty/pex-win32.c: Expain why we use '\\' here.
- Reply-to: Danny Smith <dannysmith at users dot sourceforge dot net>
This is just a doco path to pex-win32.c to explain why we are changing the command line
argument for spawn back to win32 backslashes.
Danny
libiberty/Changelog
2004-05-30 Danny Smith dannysmith@users.sourceforeg.net
* pex-win32.c (fix_argv): Expand comment.
Index: pex-win32.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/pex-win32.c,v
retrieving revision 1.3
diff -c -3 -p -r1.3 pex-win32.c
*** pex-win32.c 5 Jul 2003 00:52:07 -0000 1.3
--- pex-win32.c 30 May 2004 01:51:35 -0000
*************** fix_argv (argvec)
*** 59,65 ****
int i;
char * command0 = argvec[0];
! /* Ensure that the executable pathname uses Win32 backslashes. */
for (; *command0 != '\0'; command0++)
if (*command0 == '/')
*command0 = '\\';
--- 59,70 ----
int i;
char * command0 = argvec[0];
! /* 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 = '\\';