diff options
author | das <das@noemail.net> | 2006-12-19 04:34:02 (GMT) |
---|---|---|
committer | das <das@noemail.net> | 2006-12-19 04:34:02 (GMT) |
commit | 0af686b8a2d597eaabb9acda71e9c3ef11cca841 (patch) | |
tree | fe5a3eb1723886d58d47829d717d2a802a99650b /unix | |
parent | f3be28dbe022615cd8a071f82c9199192618c0bb (diff) | |
download | tcl-0af686b8a2d597eaabb9acda71e9c3ef11cca841.zip tcl-0af686b8a2d597eaabb9acda71e9c3ef11cca841.tar.gz tcl-0af686b8a2d597eaabb9acda71e9c3ef11cca841.tar.bz2 |
* unix/tclUnixThrd.c (TclpInetNtoa): fix for 64 bit.
FossilOrigin-Name: 7f3db43666a57f4a490187dc9dce0440b215edae
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixThrd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 073e44c..aecfcbe 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -20,7 +20,7 @@ #include "pthread.h" typedef struct ThreadSpecificData { - char nabuf[16]; + char nabuf[17]; } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; @@ -832,8 +832,8 @@ TclpInetNtoa(struct in_addr addr) { #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 |