diff options
author | vasiljevic <zv@archiware.com> | 2006-09-07 08:50:35 (GMT) |
---|---|---|
committer | vasiljevic <zv@archiware.com> | 2006-09-07 08:50:35 (GMT) |
commit | 6bf316cc8d180ece75a2b6b0af4594401fde93de (patch) | |
tree | 630550c33708da4db9bfae0e0d0e97e56d313261 /unix/tclUnixSock.c | |
parent | 48340de4f3c6a13746e2c082d9ed8cf5c42b8a99 (diff) | |
download | tcl-6bf316cc8d180ece75a2b6b0af4594401fde93de.zip tcl-6bf316cc8d180ece75a2b6b0af4594401fde93de.tar.gz tcl-6bf316cc8d180ece75a2b6b0af4594401fde93de.tar.bz2 |
Rewritten MT-safe wrappers to return ptrs to TSD storage
Diffstat (limited to 'unix/tclUnixSock.c')
-rw-r--r-- | unix/tclUnixSock.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index 8d6114f..eae4906 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixSock.c,v 1.6.2.2 2006/09/06 13:08:30 vasiljevic Exp $ + * RCS: @(#) $Id: tclUnixSock.c,v 1.6.2.3 2006/09/07 08:50:36 vasiljevic Exp $ */ #include "tcl.h" @@ -88,12 +88,7 @@ Tcl_GetHostName() #ifndef NO_UNAME (VOID *) memset((VOID *) &u, (int) 0, sizeof(struct utsname)); if (uname(&u) > -1) { /* INTL: Native. */ -#ifdef TCL_THREADS - hp = TclpGetHostByName( /* INTL: Native. */ - u.nodename, &he, buf, buflen, &herrno); -#else - hp = gethostbyname(u.nodename); /* INTL: Native. */ -#endif + hp = TclpGetHostByName(u.nodename); /* INTL: Native. */ if (hp == NULL) { /* * Sometimes the nodename is fully qualified, but gets truncated @@ -105,11 +100,7 @@ Tcl_GetHostName() char *node = ckalloc((unsigned) (dot - u.nodename + 1)); memcpy(node, u.nodename, (size_t) (dot - u.nodename)); node[dot - u.nodename] = '\0'; -#ifdef TCL_THREADS - hp = TclpGetHostByName(node, &he, buf, buflen, &herrno); -#else - hp = gethostbyname(node); -#endif + hp = TclpGetHostByName(node); ckfree(node); } } |