summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2008-02-28 20:14:06 (GMT)
committerjenglish <jenglish@flightlab.com>2008-02-28 20:14:06 (GMT)
commite3731492820cee09a934e7a1305b79b6988b7450 (patch)
treec4223d0df8163c3ddaa0f6453bcd43e56995d01b
parent6e9187684c687eab654ee37f1d4a9aa9caff97a2 (diff)
downloadtcl-e3731492820cee09a934e7a1305b79b6988b7450.zip
tcl-e3731492820cee09a934e7a1305b79b6988b7450.tar.gz
tcl-e3731492820cee09a934e7a1305b79b6988b7450.tar.bz2
Reduce scope of <sys/filio.h> and <sys/ioctl.h> #includes.
-rw-r--r--ChangeLog26
-rw-r--r--unix/tclUnixChan.c28
-rw-r--r--unix/tclUnixCompat.c13
-rw-r--r--unix/tclUnixPort.h16
4 files changed, 33 insertions, 50 deletions
diff --git a/ChangeLog b/ChangeLog
index 23d13bd..bdb60ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2008-02-28 Joe English <jenglish@users.sourceforge.net>
+
+ * unix/tclPort.h, unix/tclCompat.h, unix/tclUnixChan.h:
+ Reduce scope of <sys/filio.h> and <sys/ioctl.h> #includes.
+
+2008-02-28 Joe English <jenglish@users.sourceforge.net>
+
+ * unix/tclUnixChan.c, unix/tclUnixNotfy.c, unix/tclUnixPipe.c:
+ Consolidate all code conditionalized on -DUSE_FIONBIO into one place.
+ * unix/tclUnixPort.h, unix/tclUnixCompat.c: New routine
+ TclUnixSetBlockingMode().
+
2008-02-28 Don Porter <dgp@users.sourceforge.net>
* generic/tclStringObj.c (Tcl_AppendFormatToObj): [format %llx $big]
@@ -12,12 +24,6 @@
* library/http/http.tcl: bug #705956 - fix inverted logic when
cleaning up socket error in geturl.
-2008-02-22 Joe English <jenglish@users.sourceforge.net>
-
- * generic/tclIOUtil.c, unix/tclUnixPort.h, unix/tclUnixChan.c:
- Remove dead/unused portability-related #defines and
- unused conditional code. See [Patch 1901828] for discussion.
-
2008-02-27 Kevin B. Kenny <kennykb@acm.org>
* doc/clock.n: Corrected minor indentation gaffe in the
@@ -30,7 +36,13 @@
localized date/time formats were used. [Bug 1902423]
* tests/clock.test (clock-61.*, clock-62.1): Regression tests
for [Bug 1862555] and [Bug 1902423].
-
+
+2008-02-26 Joe English <jenglish@users.sourceforge.net>
+
+ * generic/tclIOUtil.c, unix/tclUnixPort.h, unix/tclUnixChan.c:
+ Remove dead/unused portability-related #defines and
+ unused conditional code. See [Patch 1901828] for discussion.
+
2008-02-26 Joe English <jenglish@users.sourceforge.net>
* generic/tclIORChan.c(enum MethodName),
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 3e1c72d..96a4665 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -10,38 +10,12 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixChan.c,v 1.91 2008/02/28 20:12:09 jenglish Exp $
+ * RCS: @(#) $Id: tclUnixChan.c,v 1.92 2008/02/28 20:14:12 jenglish Exp $
*/
#include "tclInt.h" /* Internal definitions for Tcl. */
#include "tclIO.h" /* To get Channel type declaration. */
-/*
- * sys/ioctl.h has already been included by tclPort.h. Including termios.h or
- * termio.h causes a bunch of warning messages because some duplicate (but not
- * contradictory) #defines exist in termios.h and/or termio.h
- */
-
-#undef NL0
-#undef NL1
-#undef CR0
-#undef CR1
-#undef CR2
-#undef CR3
-#undef TAB0
-#undef TAB1
-#undef TAB2
-#undef XTABS
-#undef BS0
-#undef BS1
-#undef FF0
-#undef FF1
-#undef ECHO
-#undef NOFLSH
-#undef TOSTOP
-#undef FLUSHO
-#undef PENDIN
-
#define SUPPORTS_TTY
#undef DIRECT_BAUD
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c
index c26bef5..3123ac0 100644
--- a/unix/tclUnixCompat.c
+++ b/unix/tclUnixCompat.c
@@ -6,7 +6,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixCompat.c,v 1.14 2008/02/28 20:12:09 jenglish Exp $
+ * RCS: @(#) $Id: tclUnixCompat.c,v 1.15 2008/02/28 20:14:12 jenglish Exp $
*
*/
@@ -16,6 +16,17 @@
#include <errno.h>
#include <string.h>
+/* See also: SC_BLOCKING_STYLE in unix/tcl.m4
+ */
+#ifdef USE_FIONBIO
+# ifdef HAVE_SYS_FILIO_H
+# include <sys/filio.h> /* For FIONBIO. */
+# endif
+# ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+# endif
+#endif /* USE_FIONBIO */
+
/*
*---------------------------------------------------------------------------
*
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index a7313ca..ed75135 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -19,7 +19,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixPort.h,v 1.63 2008/02/28 20:12:10 jenglish Exp $
+ * RCS: @(#) $Id: tclUnixPort.h,v 1.64 2008/02/28 20:14:12 jenglish Exp $
*/
#ifndef _TCLUNIXPORT
@@ -108,20 +108,6 @@ typedef off_t Tcl_SeekOffset;
#else
# include "../compat/unistd.h"
#endif
-#ifdef USE_FIONBIO
- /*
- * Not using the Posix fcntl(...,O_NONBLOCK,...) interface, instead
- * we are using ioctl(..,FIONBIO,..).
- */
-
-# ifdef HAVE_SYS_FILIO_H
-# include <sys/filio.h> /* For FIONBIO. */
-# endif
-
-# ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h> /* For FIONBIO. */
-# endif
-#endif /* USE_FIONBIO */
MODULE_SCOPE int TclUnixSetBlockingMode(int fd, int mode);