diff options
author | jenglish <jenglish@flightlab.com> | 2008-02-28 20:14:06 (GMT) |
---|---|---|
committer | jenglish <jenglish@flightlab.com> | 2008-02-28 20:14:06 (GMT) |
commit | e3731492820cee09a934e7a1305b79b6988b7450 (patch) | |
tree | c4223d0df8163c3ddaa0f6453bcd43e56995d01b /unix | |
parent | 6e9187684c687eab654ee37f1d4a9aa9caff97a2 (diff) | |
download | tcl-e3731492820cee09a934e7a1305b79b6988b7450.zip tcl-e3731492820cee09a934e7a1305b79b6988b7450.tar.gz tcl-e3731492820cee09a934e7a1305b79b6988b7450.tar.bz2 |
Reduce scope of <sys/filio.h> and <sys/ioctl.h> #includes.
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); |