summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixCompat.c
diff options
context:
space:
mode:
authorandreas_kupries <andreas_kupries@noemail.net>2006-09-08 19:25:11 (GMT)
committerandreas_kupries <andreas_kupries@noemail.net>2006-09-08 19:25:11 (GMT)
commitbd9c388dba6ba0a277f6e33cae5ca4b20ac6658a (patch)
tree3272be83b34fc28e97a9d4ededdeba363865394b /unix/tclUnixCompat.c
parentfb48a263381bb27e0129753faf5d40154cd19ddc (diff)
downloadtcl-bd9c388dba6ba0a277f6e33cae5ca4b20ac6658a.zip
tcl-bd9c388dba6ba0a277f6e33cae5ca4b20ac6658a.tar.gz
tcl-bd9c388dba6ba0a277f6e33cae5ca4b20ac6658a.tar.bz2
* unix/tclUnixCompat.c: Fixed conditions for CopyArray/CopyString,
and CopyHostent. Also fixed bad var names in TclpGetHostByName. FossilOrigin-Name: 6744e9959771d71fc12babc8f23f8c4599777018
Diffstat (limited to 'unix/tclUnixCompat.c')
-rw-r--r--unix/tclUnixCompat.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c
index 5ab7ea3..a7d40a7 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.1.2.6 2006/09/08 11:15:14 vasiljevic Exp $
+ * RCS: @(#) $Id: tclUnixCompat.c,v 1.1.2.7 2006/09/08 19:25:13 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);