summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2006-09-08 19:24:30 (GMT)
committerandreas_kupries <akupries@shaw.ca>2006-09-08 19:24:30 (GMT)
commit4fb991a000060da5d543e5b9408e22a85e8559b0 (patch)
treec6429f15d298911e45d6b8e3b47400b1dbf426ec /unix
parentc9b8654c4e4be91809a9c18d5bedf7ed63c3b9b6 (diff)
downloadtcl-4fb991a000060da5d543e5b9408e22a85e8559b0.zip
tcl-4fb991a000060da5d543e5b9408e22a85e8559b0.tar.gz
tcl-4fb991a000060da5d543e5b9408e22a85e8559b0.tar.bz2
* unix/tclUnixCompat.c: Fixed conditions for CopyArray/CopyString,
and CopyHostent. Also fixed bad var names in TclpGetHostByName.
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixCompat.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c
index b0e0ae8..c2ed2ed 100644
--- a/unix/tclUnixCompat.c
+++ b/unix/tclUnixCompat.c
@@ -6,7 +6,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixCompat.c,v 1.4 2006/09/07 18:53:11 vasiljevic Exp $
+ * RCS: @(#) $Id: tclUnixCompat.c,v 1.5 2006/09/08 19:24:32 andreas_kupries Exp $
*
*/
@@ -57,8 +57,8 @@ static Tcl_ThreadDataKey dataKey;
Tcl_Mutex compatLock;
-#if (!defined(HAVE_GETHOSTBYNAME_R) && !defined(HAVE_GETHOSTBYADDR_R)) || \
- (!defined(HAVE_GETPWUID_R) && !defined(HAVE_GETGRGID_R))
+#if (!defined(HAVE_GETHOSTBYNAME_R) || !defined(HAVE_GETHOSTBYADDR_R)) || \
+ (!defined(HAVE_GETPWUID_R) || !defined(HAVE_GETGRGID_R))
/*
@@ -156,7 +156,7 @@ CopyString(char *src, char *buf, int buflen)
!defined(HAVE_GETPWUID_R) && !defined(HAVE_GETGRGID_R) */
-#if !defined(HAVE_GETHOSTBYNAME_R) && !defined(HAVE_GETHOSTBYADDR_R)
+#if !defined(HAVE_GETHOSTBYNAME_R) || !defined(HAVE_GETHOSTBYADDR_R)
/*
*---------------------------------------------------------------------------
@@ -580,8 +580,8 @@ TclpGetHostByName(const char *name)
#elif defined(HAVE_GETHOSTBYNAME_R_3)
struct hostent_data data;
- return (gethostbyname_r(host, &tsdPtr->hent, &data) == 0) ?
- &tsdPtr->buf.hent : NULL;
+ return (gethostbyname_r(name, &tsdPtr->hent, &data) == 0) ?
+ &tsdPtr->hent : NULL;
#else
struct hostent *hePtr;
Tcl_MutexLock(&compatLock);