/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1998-1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#endif /* LIBC_SCCS and not lint */
#include <port_before.h>
#if !defined(_REENTRANT) || !defined(DO_PTHREADS)
static int gethostent_r_not_required = 0;
#else
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <netdb.h>
#include <port_after.h>
#ifdef HOST_R_RETURN
static HOST_R_RETURN
#ifdef HOST_R_SETANSWER
int n = 0;
#endif
#ifdef HOST_R_ERRNO
#endif
#ifdef HOST_R_SETANSWER
else
return (n);
#else
return (HOST_R_BAD);
#endif
}
#ifdef HOST_R_SETANSWER
int n = 0;
#endif
#ifdef HOST_R_ERRNO
#endif
#ifdef HOST_R_SETANSWER
else
return (n);
#else
return (HOST_R_BAD);
#endif
}
/*%
* These assume a single context is in operation per thread.
* If this is not the case we will need to call irs directly
* rather than through the base functions.
*/
#ifdef HOST_R_SETANSWER
int n = 0;
#endif
#ifdef HOST_R_ERRNO
#endif
#ifdef HOST_R_SETANSWER
else
return (n);
#else
return (HOST_R_BAD);
#endif
}
#ifdef HOST_R_ENT_ARGS
#else
sethostent_r(int stay_open)
#endif
{
#ifdef HOST_R_ENT_ARGS
#endif
#ifdef HOST_R_SET_RESULT
return (HOST_R_SET_RESULT);
#endif
}
#ifdef HOST_R_ENT_ARGS
#else
endhostent_r(void)
#endif
{
#ifdef HOST_R_ENT_ARGS
#endif
endhostent();
}
/* Private */
#ifndef HOSTENT_DATA
static HOST_R_RETURN
char *cp;
char **ptr;
int i, n;
/* Find out the amount of space required to store the answer. */
}
}
return (HOST_R_BAD);
}
/* copy address size and type */
/* copy address list */
cp += n;
}
ptr++;
/* copy official name */
cp += n;
/* copy aliases */
cp += n;
}
return (HOST_R_OK);
}
#else /* !HOSTENT_DATA */
static int
int i, n;
/* copy address size and type */
/* copy up to first 35 addresses */
i = 0;
cp += n;
} else {
break;
}
i++;
}
/* copy official name */
cp += n;
} else {
return (-1);
}
/* copy aliases */
i = 0;
cp += n;
} else {
break;
}
i++;
}
return (HOST_R_OK);
}
#endif /* !HOSTENT_DATA */
#else /* HOST_R_RETURN */
static int gethostent_r_unknown_system = 0;
#endif /* HOST_R_RETURN */
#endif /* !defined(_REENTRANT) || !defined(DO_PTHREADS) */
/*! \file */