summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-01-24 02:30:16 (GMT)
committerhobbs <hobbs>2000-01-24 02:30:16 (GMT)
commit73759975a6600b92114fc4d1b3549c1d3ef19373 (patch)
tree9bb7c963e7a49291228a78ce28428e1a723389b8
parent3aa0e680ba354f6091a8fe8deec74179089430e9 (diff)
downloadtcl-73759975a6600b92114fc4d1b3549c1d3ef19373.zip
tcl-73759975a6600b92114fc4d1b3549c1d3ef19373.tar.gz
tcl-73759975a6600b92114fc4d1b3549c1d3ef19373.tar.bz2
* unix/tclUnixPort.h: moved include of <utime.h> lower since some
systems (UTS) require sys/types.h to be included first [Bug: 4031] * unix/tclUnixChan.c (CreateSocketAddress): changed comparison with -1 to 0xFFFFFFFFFFFFFFF, which is the pedantic way to say -1 for both 32 bit and 64 bit systems. [Bug: 3878]
-rw-r--r--unix/tclUnixChan.c8
-rw-r--r--unix/tclUnixPort.h4
2 files changed, 8 insertions, 4 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index aa38d28..7d063f3 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.11 1999/10/29 03:04:58 hobbs Exp $
+ * RCS: @(#) $Id: tclUnixChan.c,v 1.12 2000/01/24 02:30:16 hobbs Exp $
*/
#include "tclInt.h" /* Internal definitions for Tcl. */
@@ -2122,7 +2122,11 @@ CreateSocketAddress(sockaddrPtr, host, port)
native = Tcl_UtfToExternalDString(NULL, host, -1, &ds);
}
addr.s_addr = inet_addr(native); /* INTL: Native. */
- if (addr.s_addr == -1) {
+ /*
+ * 0xFFFFFFFFFFFFFFF is the pedantic way to say -1
+ * for either 32 or 64 bits systems.
+ */
+ if (addr.s_addr == 0xFFFFFFFFFFFFFFF) {
hostent = gethostbyname(native); /* INTL: Native. */
if (hostent != NULL) {
memcpy((VOID *) &addr,
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index a3c2df4..b7b0215 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.12 1999/10/29 03:04:58 hobbs Exp $
+ * RCS: @(#) $Id: tclUnixPort.h,v 1.13 2000/01/24 02:30:17 hobbs Exp $
*/
#ifndef _TCLUNIXPORT
@@ -36,7 +36,6 @@
*---------------------------------------------------------------------------
*/
-#include <utime.h>
#include <errno.h>
#include <fcntl.h>
#ifdef HAVE_NET_ERRNO_H
@@ -94,6 +93,7 @@
# include <sys/ioctl.h> /* For FIONBIO. */
# endif
#endif /* USE_FIONBIO */
+#include <utime.h>
/*
* Socket support stuff: This likely needs more work to parameterize for