summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-11-20 19:35:45 +0000
committerChristopher Faylor <me@cgf.cx>2000-11-20 19:35:45 +0000
commit099efae038316c57af95c01abddaf246e3b6028d (patch)
treea663fe07d6ccaff68d04eefed2ceed71d1658952
parent975aa482436a4d4e48c070afb7bd63fa8e4c0b71 (diff)
downloadcygnal-099efae038316c57af95c01abddaf246e3b6028d.tar.gz
cygnal-099efae038316c57af95c01abddaf246e3b6028d.tar.bz2
cygnal-099efae038316c57af95c01abddaf246e3b6028d.zip
* 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.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/child_info.h2
-rw-r--r--winsup/cygwin/include/sys/mount.h15
-rw-r--r--winsup/cygwin/spawn.cc7
4 files changed, 22 insertions, 9 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index e466f493e..929caf528 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+Mon Nov 20 14:26:38 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * 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 <corinna@vinschen.de>
* 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 9c2a7f647..a8922fc07 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 13963f957..04341f8d6 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 097ecedc9..211c15c04 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);
}