diff options
author | jenglish <jenglish@noemail.net> | 2008-02-28 20:14:06 (GMT) |
---|---|---|
committer | jenglish <jenglish@noemail.net> | 2008-02-28 20:14:06 (GMT) |
commit | bd91b068bb7c8ceeef429db2809b6582fbf944db (patch) | |
tree | c4223d0df8163c3ddaa0f6453bcd43e56995d01b /unix | |
parent | bcaa606fbd266f7b87349b0f3d254b362ce15937 (diff) | |
download | tcl-bd91b068bb7c8ceeef429db2809b6582fbf944db.zip tcl-bd91b068bb7c8ceeef429db2809b6582fbf944db.tar.gz tcl-bd91b068bb7c8ceeef429db2809b6582fbf944db.tar.bz2 |
Reduce scope of <sys/filio.h> and <sys/ioctl.h> #includes.
FossilOrigin-Name: 7eb313d9d876b30425033adec10265ec1bfc90a9
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixChan.c | 28 | ||||
-rw-r--r-- | unix/tclUnixCompat.c | 13 | ||||
-rw-r--r-- | unix/tclUnixPort.h | 16 |
3 files changed, 14 insertions, 43 deletions
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); |