Diff
Not logged in

Differences From Artifact [ed5eba460b]:

To Artifact [f2083057d2]:


1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
16








-
+







/*
 * tclUnixCompat.c
 *
 * Written by: Zoran Vasiljevic (vasiljevic@users.sourceforge.net).
 *
 * 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.11 2007/11/13 14:39:15 dkf Exp $
 * RCS: @(#) $Id: tclUnixCompat.c,v 1.1.2.12 2007/12/14 12:45:48 vasiljevic Exp $
 *
 */

#include "tclInt.h"
#include "tclPort.h"
#include <pwd.h>
#include <grp.h>
581
582
583
584
585
586
587
588
589
590
591





592
593
594
595
596
597
598
581
582
583
584
585
586
587




588
589
590
591
592
593
594
595
596
597
598
599







-
-
-
-
+
+
+
+
+







#if defined(HAVE_GETHOSTBYNAME_R_5)
    int h_errno;
    return gethostbyname_r(name, &tsdPtr->hent, tsdPtr->hbuf,
			   sizeof(tsdPtr->hbuf), &h_errno);

#elif defined(HAVE_GETHOSTBYNAME_R_6)
    struct hostent *hePtr;
    int h_errno;
    return (gethostbyname_r(name, &tsdPtr->hent, tsdPtr->hbuf,
			    sizeof(tsdPtr->hbuf), &hePtr, &h_errno) == 0) ?
	&hePtr : NULL;
    int result, h_errno;

    result = gethostbyname_r(name, &tsdPtr->hent, tsdPtr->hbuf,
            sizeof(tsdPtr->hbuf), &hePtr, &h_errno);
    return (result == 0) ? hePtr : NULL;

#elif defined(HAVE_GETHOSTBYNAME_R_3)
    struct hostent_data data;
    return (gethostbyname_r(name, &tsdPtr->hent, &data) == 0) ?
	&tsdPtr->hent : NULL;
#else
    struct hostent *hePtr;