summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordas <das>2006-12-19 04:33:53 (GMT)
committerdas <das>2006-12-19 04:33:53 (GMT)
commit6478f6fa70a97483629a6e6382e817de23fe948d (patch)
tree5fd8122fb3dd8d8986cf78faa572570064519547 /unix
parentf4fdf5029fdd786efd3ac874e5bf2143e93e07ba (diff)
downloadtcl-6478f6fa70a97483629a6e6382e817de23fe948d.zip
tcl-6478f6fa70a97483629a6e6382e817de23fe948d.tar.gz
tcl-6478f6fa70a97483629a6e6382e817de23fe948d.tar.bz2
* unix/tclUnixThrd.c (TclpInetNtoa): fix for 64 bit.
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixThrd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index c0a9500..7fb692d 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -19,7 +19,7 @@
#include "pthread.h"
typedef struct ThreadSpecificData {
- char nabuf[16];
+ char nabuf[17];
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;
@@ -715,8 +715,8 @@ TclpInetNtoa(
{
#ifdef TCL_THREADS
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
- char *b = (char*) &addr.s_addr;
-
+ unsigned char *b = (unsigned char*) &addr.s_addr;
+
sprintf(tsdPtr->nabuf, "%u.%u.%u.%u", b[0], b[1], b[2], b[3]);
return tsdPtr->nabuf;
#else