From e3731492820cee09a934e7a1305b79b6988b7450 Mon Sep 17 00:00:00 2001 From: jenglish Date: Thu, 28 Feb 2008 20:14:06 +0000 Subject: Reduce scope of and #includes. --- ChangeLog | 26 +++++++++++++++++++------- unix/tclUnixChan.c | 28 +--------------------------- unix/tclUnixCompat.c | 13 ++++++++++++- unix/tclUnixPort.h | 16 +--------------- 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 + + * unix/tclPort.h, unix/tclCompat.h, unix/tclUnixChan.h: + Reduce scope of and #includes. + +2008-02-28 Joe English + + * 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 * 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 - - * 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 * 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 + + * 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 * 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 #include +/* See also: SC_BLOCKING_STYLE in unix/tcl.m4 + */ +#ifdef USE_FIONBIO +# ifdef HAVE_SYS_FILIO_H +# include /* For FIONBIO. */ +# endif +# ifdef HAVE_SYS_IOCTL_H +# include +# 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 /* For FIONBIO. */ -# endif - -# ifdef HAVE_SYS_IOCTL_H -# include /* For FIONBIO. */ -# endif -#endif /* USE_FIONBIO */ MODULE_SCOPE int TclUnixSetBlockingMode(int fd, int mode); -- cgit v0.12