summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-06-04 20:32:58 +0000
committerChristopher Faylor <me@cgf.cx>2006-06-04 20:32:58 +0000
commitc0ac34fda03d4e1691035f13615fdcaa10af94e5 (patch)
treec7bef32a7af0beebbb7b6643943d7c7ac8001178
parente73b03adcca4543c0ecde8603d9f51dbd5b1f5de (diff)
downloadcygnal-c0ac34fda03d4e1691035f13615fdcaa10af94e5.tar.gz
cygnal-c0ac34fda03d4e1691035f13615fdcaa10af94e5.tar.bz2
cygnal-c0ac34fda03d4e1691035f13615fdcaa10af94e5.zip
* ioctl.cc (ioctl): Accommodate change in reported pty master device number.
* select.cc (peek_pipe): Ditto.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/ioctl.cc7
-rw-r--r--winsup/cygwin/select.cc5
3 files changed, 13 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 21ab4f0da..fd7ab6e54 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,11 @@
2006-06-04 Christopher Faylor <cgf@timesys.com>
+ * ioctl.cc (ioctl): Accommodate change in reported pty master device
+ number.
+ * select.cc (peek_pipe): Ditto.
+
+2006-06-04 Christopher Faylor <cgf@timesys.com>
+
* cygtls.h (CYGTLS_PADSIZE): Reset to a size that XP SP1 seems to like.
* tlsoffsets.h: Regenerate.
diff --git a/winsup/cygwin/ioctl.cc b/winsup/cygwin/ioctl.cc
index bd9b3ca3c..62e533678 100644
--- a/winsup/cygwin/ioctl.cc
+++ b/winsup/cygwin/ioctl.cc
@@ -1,6 +1,6 @@
/* ioctl.cc: ioctl routines.
- Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+ Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2006 Red Hat, Inc.
Written by Doug Evans of Cygnus Support
dje@cygnus.com
@@ -38,7 +38,10 @@ ioctl (int fd, int cmd, ...)
debug_printf ("fd %d, cmd %x", fd, cmd);
int res;
- if (cfd->is_tty () && cfd->get_device () != FH_PTYM)
+ /* FIXME: This stinks. There are collisions between cmd types
+ depending on whether fd is associated with a pty master or not.
+ Something to fix for Cygwin2. CGF 2006-06-04 */
+ if (cfd->is_tty () && cfd->get_major () != DEV_TTYM_MAJOR)
switch (cmd)
{
case TCGETA:
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index 84424bcc2..5383aa9d6 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -457,10 +457,9 @@ peek_pipe (select_record *s, bool from_select)
goto out;
}
- switch (fh->get_device ())
+ switch (fh->get_major ())
{
- case FH_PTYM:
- case FH_TTYM:
+ case DEV_TTYM_MAJOR:
if (((fhandler_pty_master *) fh)->need_nl)
{
gotone = s->read_ready = true;