From 062211a0c69f1507c99f7d02e8fdce603f15e0e3 Mon Sep 17 00:00:00 2001 From: cgf Date: Mon, 20 Nov 2000 19:35:44 +0000 Subject: [PATCH] * spawn.cc (spawn_guts): YA tweak for dealing with arcane rules of quoting in "normal" Microsoft programs. * child_info.h: Bump fork magic number. * include/sys/mount.h: Add an entry for mixed mode. --- winsup/cygwin/ChangeLog | 7 +++++++ winsup/cygwin/child_info.h | 2 +- winsup/cygwin/include/sys/mount.h | 15 ++++++++------- winsup/cygwin/spawn.cc | 7 ++++++- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e466f493ee..929caf528e 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +Mon Nov 20 14:26:38 2000 Christopher Faylor + + * spawn.cc (spawn_guts): YA tweak for dealing with arcane rules of + quoting in "normal" Microsoft programs. + * child_info.h: Bump fork magic number. + * include/sys/mount.h: Add an entry for mixed mode. + Fri Nov 17 12:28:00 2000 Corinna Vinschen * path.cc (normalize_posix_path): Special care for root directory diff --git a/winsup/cygwin/child_info.h b/winsup/cygwin/child_info.h index 9c2a7f647a..a8922fc078 100644 --- a/winsup/cygwin/child_info.h +++ b/winsup/cygwin/child_info.h @@ -12,7 +12,7 @@ details. */ enum { - PROC_MAGIC = 0xaf0af000, + PROC_MAGIC = 0xaf0bf000, PROC_FORK = PROC_MAGIC + 1, PROC_EXEC = PROC_MAGIC + 2, PROC_SPAWN = PROC_MAGIC + 3, diff --git a/winsup/cygwin/include/sys/mount.h b/winsup/cygwin/include/sys/mount.h index 13963f9578..04341f8d67 100644 --- a/winsup/cygwin/include/sys/mount.h +++ b/winsup/cygwin/include/sys/mount.h @@ -7,13 +7,14 @@ extern "C" { enum { - MOUNT_SYMLINK = 1, /* "mount point" is a symlink */ - MOUNT_BINARY = 2, /* "binary" format read/writes */ - MOUNT_SYSTEM = 8, /* mount point came from system table */ - MOUNT_EXEC = 16, /* Any file in the mounted directory gets 'x' bit */ - MOUNT_AUTO = 32, /* mount point refers to auto device mount */ - MOUNT_CYGWIN_EXEC = 64/* file or directory is or contains a cygwin - executable */ + MOUNT_SYMLINK = 0x001, /* "mount point" is a symlink */ + MOUNT_BINARY = 0x002, /* "binary" format read/writes */ + MOUNT_SYSTEM = 0x008, /* mount point came from system table */ + MOUNT_EXEC = 0x010, /* Any file in the mounted directory gets 'x' bit */ + MOUNT_AUTO = 0x020, /* mount point refers to auto device mount */ + MOUNT_CYGWIN_EXEC = 0x040, /* file or directory is or contains a cygwin + executable */ + MOUNT_MIXED = 0x080, /* reads are text, writes are binary */ }; int mount (const char *, const char *, unsigned __flags); diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 097ecedc9e..211c15c04a 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -483,7 +483,12 @@ spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv, for (; (p = strpbrk (a, "\"\\")); a = ++p) { one_line.add (a, p - a); - if ((*p == '\\' && p[1] == '"') || *p == '"') + if (*p == '\\' && p[1] == '\\') + { + one_line.add ("\\\\\\", 3); + p++; + } + else if ((*p == '\\' && p[1] == '"') || *p == '"') one_line.add ("\\", 1); one_line.add (p, 1); } -- 2.11.0