summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2002-05-13 14:06:22 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2002-05-13 14:06:22 (GMT)
commit52bc7742c8816dd82b1f811d1e993e66973d69d9 (patch)
tree8436c2e0cbc3456d1c8b6c101eda67413cf30838
parent18b4a36a1a37a62808c9caa0b3d6eb1882c3ed65 (diff)
downloadtcl-52bc7742c8816dd82b1f811d1e993e66973d69d9.zip
tcl-52bc7742c8816dd82b1f811d1e993e66973d69d9.tar.gz
tcl-52bc7742c8816dd82b1f811d1e993e66973d69d9.tar.bz2
Stop Solaris from generating a warning; the second argument to ioctl has been
observed to be either signed (Solaris) or unsigned (Linux)...
-rw-r--r--ChangeLog7
-rw-r--r--unix/tclUnixChan.c8
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e3733c5..5125517 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-05-13 Donal K. Fellows <fellowsd@cs.man.ac.uk>
+
+ * unix/tclUnixChan.c (SETBREAK): Solaris thinks ioctl() takes a
+ signed second argument, and Linux thinks ioctl() takes an unsigned
+ second argument. So need a longer definition of this macro to get
+ neither to spew warnings...
+
2002-05-13 Vince Darley <vincentdarley@users.sourceforge.net>
* generic/tclEvent.c:
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index a77cf22..dd9a3b3 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -10,7 +10,7 @@
* 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.32 2002/03/05 20:55:36 hobbs Exp $
+ * RCS: @(#) $Id: tclUnixChan.c,v 1.33 2002/05/13 14:06:22 dkf Exp $
*/
#include "tclInt.h" /* Internal definitions for Tcl. */
@@ -82,7 +82,11 @@
# endif
# if defined(TIOCSBRK) && defined(TIOCCBRK)
# define SETBREAK(fd, flag) \
- ioctl((fd), (unsigned) ((flag) ? TIOCSBRK:TIOCCBRK), NULL)
+ if (flag) { \
+ ioctl((fd), TIOCSBRK, NULL);\
+ } else { \
+ ioctl((fd), TIOCCBRK, NULL);\
+ }
# endif
# if !defined(CRTSCTS) && defined(CNEW_RTSCTS)
# define CRTSCTS CNEW_RTSCTS