linux netbsd

This commit is contained in:
Mark Andrews
2001-06-22 05:11:05 +00:00
parent 855bf2b910
commit 7ae2ccb5d1
9 changed files with 50 additions and 18 deletions

View File

@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
AC_REVISION($Revision: 1.49 $)
AC_REVISION($Revision: 1.50 $)
AC_INIT(resolv/herror.c)
AC_PREREQ(2.13)
@@ -183,6 +183,9 @@ if test "X$CC" = "X" ; then
*-hp-hpux*)
CC="cc"
;;
*linux*)
CC="gcc -D_GNU_SOURCE"
;;
mips-sgi-irix*)
CC="cc"
;;
@@ -1242,6 +1245,14 @@ AC_CHECK_FUNC(pselect,
[NEED_PSELECT="#undef NEED_PSELECT"],
[NEED_PSELECT="#define NEED_PSELECT"])
AC_SUBST(NEED_PSELECT)
AC_CHECK_FUNC(gettimeofday,
[NEED_GETTIMEOFDAY="#undef NEED_GETTIMEOFDAY"],
[NEED_GETTIMEOFDAY="#define NEED_GETTIMEOFDAY 1"])
AC_SUBST(NEED_GETTIMEOFDAY)
AC_CHECK_FUNC(strndup,
[HAVE_STRNDUP="#define HAVE_STRNDUP 1"],
[HAVE_STRNDUP="#undef HAVE_STRNDUP"])
AC_SUBST(HAVE_STRNDUP)
#
# Look for a sysctl call to get the list of network interfaces.

View File

@@ -16,7 +16,7 @@
*/
/*
* $Id: irs.h,v 1.1 2001/03/29 06:31:34 marka Exp $
* $Id: irs.h,v 1.2 2001/06/22 05:10:58 marka Exp $
*/
#ifndef _IRS_H_INCLUDED
@@ -30,7 +30,6 @@
#include <netdb.h>
#include <resolv.h>
#include <pwd.h>
#include <netgroup.h>
/*
* This is the group map class.

View File

@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] = "$Id: getgrent_r.c,v 1.4 2001/05/28 08:38:25 marka Exp $";
static const char rcsid[] = "$Id: getgrent_r.c,v 1.5 2001/06/22 05:11:00 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <port_before.h>
@@ -30,6 +30,7 @@ static const char rcsid[] = "$Id: getgrent_r.c,v 1.4 2001/05/28 08:38:25 marka E
#if (defined(POSIX_GETGRNAM_R) || defined(POSIX_GETGRGID_R)) && \
defined(_POSIX_PTHREAD_SEMANTICS)
/* turn off solaris remapping in <grp.h> */
#define _UNIX95
#undef _POSIX_PTHREAD_SEMANTICS
#include <grp.h>
#define _POSIX_PTHREAD_SEMANTICS 1

View File

@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] = "$Id: getnetgrent_r.c,v 1.1 2001/03/29 06:31:47 marka Exp $";
static const char rcsid[] = "$Id: getnetgrent_r.c,v 1.2 2001/06/22 05:11:01 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <port_before.h>
@@ -29,7 +29,6 @@ static const char rcsid[] = "$Id: getnetgrent_r.c,v 1.1 2001/03/29 06:31:47 mark
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <netgroup.h>
#include <port_after.h>
#ifdef NGR_R_RETURN

View File

@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] = "$Id: getpwent_r.c,v 1.3 2001/05/28 08:38:26 marka Exp $";
static const char rcsid[] = "$Id: getpwent_r.c,v 1.4 2001/06/22 05:11:02 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <port_before.h>
@@ -27,13 +27,17 @@ static const char rcsid[] = "$Id: getpwent_r.c,v 1.3 2001/05/28 08:38:26 marka E
#include <string.h>
#include <stdio.h>
#include <sys/types.h>
#if (defined(POSIX_GETPWNAM_R) || defined(POSIX_GETPWUID_R)) && \
defined(_POSIX_PTHREAD_SEMANTICS)
#if (defined(POSIX_GETPWNAM_R) || defined(POSIX_GETPWUID_R))
#if defined(_POSIX_PTHREAD_SEMANTICS)
/* turn off solaris remapping in <grp.h> */
#undef _POSIX_PTHREAD_SEMANTICS
#include <pwd.h>
#define _POSIX_PTHREAD_SEMANTICS 1
#else
#define _UNIX95 1
#include <pwd.h>
#endif
#else
#include <pwd.h>
#endif
#include <port_after.h>

View File

@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] = "$Id: irp_pw.c,v 1.1 2001/03/29 06:31:49 marka Exp $";
static const char rcsid[] = "$Id: irp_pw.c,v 1.2 2001/06/22 05:11:03 marka Exp $";
#endif /* LIBC_SCCS and not lint */
/* Extern */
@@ -340,8 +340,10 @@ free_passwd(struct passwd *pw) {
if (pw->pw_passwd != NULL)
free(pw->pw_passwd);
#ifdef HAVE_PW_CLASS
if (pw->pw_class != NULL)
free(pw->pw_class);
#endif
if (pw->pw_gecos != NULL)
free(pw->pw_gecos);

View File

@@ -20,6 +20,8 @@
@NEED_IN6ADDR_ANY@
@HAS_IN_ADDR6@
@HAVE_SOCKADDR_STORAGE@
@NEED_GETTIMEOFDAY@
@HAVE_STRNDUP@
/* XXX sunos and cygwin needs O_NDELAY */
#define PORT_NONBLOCK O_NONBLOCK
@@ -295,6 +297,20 @@ void endpwent_r(void);
int setpassent(int stayopen);
#endif
struct timeval; /* silence warning */
struct timezone; /* silence warning */
int isc__gettimeofday(struct timeval *tp, struct timezone *tzp);
int getnetgrent(const char **machinep, const char **userp,
const char **domainp);
int getnetgrent_r(char **machinep, char **userp, char **domainp, NGR_R_ARGS);
void setnetgrent(const char *netgroup);
void endnetgrent(void);
int innetgr(const char *netgroup, const char *machine,
const char *user, const char *domain);
#endif

View File

@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "$Id: res_findzonecut.c,v 1.1 2001/03/29 06:31:58 marka Exp $";
static const char rcsid[] = "$Id: res_findzonecut.c,v 1.2 2001/06/22 05:11:04 marka Exp $";
#endif /* not lint */
/*
@@ -78,13 +78,13 @@ static void free_nsrr(rrset_ns *, rr_ns *);
static rr_ns * find_ns(rrset_ns *, const char *);
static int do_query(res_state, const char *, ns_class, ns_type,
u_char *, ns_msg *);
static void dprintf(const char *, ...);
static void res_dprintf(const char *, ...);
/* Macros. */
#define DPRINTF(x) do {\
int save_errno = errno; \
if ((statp->options & RES_DEBUG) != 0) dprintf x; \
if ((statp->options & RES_DEBUG) != 0) res_dprintf x; \
errno = save_errno; \
} while (0)
@@ -592,7 +592,7 @@ do_query(res_state statp, const char *dname, ns_class class, ns_type qtype,
}
static void
dprintf(const char *fmt, ...) {
res_dprintf(const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);

View File

@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "$Id: res_update.c,v 1.4 2001/06/21 08:26:27 marka Exp $";
static const char rcsid[] = "$Id: res_update.c,v 1.5 2001/06/22 05:11:05 marka Exp $";
#endif /* not lint */
/*
@@ -80,13 +80,13 @@ struct zonegrp {
static int nscopy(union res_sockaddr_union *,
const union res_sockaddr_union *, int);
static int nsprom(union res_sockaddr_union *, const struct in_addr *, int);
static void dprintf(const char *, ...);
static void res_dprintf(const char *, ...);
/* Macros. */
#define DPRINTF(x) do {\
int save_errno = errno; \
if ((statp->options & RES_DEBUG) != 0) dprintf x; \
if ((statp->options & RES_DEBUG) != 0) res_dprintf x; \
errno = save_errno; \
} while (0)
@@ -233,7 +233,7 @@ nsprom(union res_sockaddr_union *dst, const struct in_addr *src, int n) {
}
static void
dprintf(const char *fmt, ...) {
res_dprintf(const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);