diff --git a/lib/bind/configure.in b/lib/bind/configure.in index 9db48d27b6..0799371b29 100644 --- a/lib/bind/configure.in +++ b/lib/bind/configure.in @@ -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. diff --git a/lib/bind/include/irs.h b/lib/bind/include/irs.h index 8680469d8f..d7fc7b4d5f 100644 --- a/lib/bind/include/irs.h +++ b/lib/bind/include/irs.h @@ -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 #include #include -#include /* * This is the group map class. diff --git a/lib/bind/irs/getgrent_r.c b/lib/bind/irs/getgrent_r.c index 2949b18864..c31b4e2b6a 100644 --- a/lib/bind/irs/getgrent_r.c +++ b/lib/bind/irs/getgrent_r.c @@ -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 @@ -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 */ +#define _UNIX95 #undef _POSIX_PTHREAD_SEMANTICS #include #define _POSIX_PTHREAD_SEMANTICS 1 diff --git a/lib/bind/irs/getnetgrent_r.c b/lib/bind/irs/getnetgrent_r.c index b0a25afd3e..06d7af8e50 100644 --- a/lib/bind/irs/getnetgrent_r.c +++ b/lib/bind/irs/getnetgrent_r.c @@ -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 @@ -29,7 +29,6 @@ static const char rcsid[] = "$Id: getnetgrent_r.c,v 1.1 2001/03/29 06:31:47 mark #include #include #include -#include #include #ifdef NGR_R_RETURN diff --git a/lib/bind/irs/getpwent_r.c b/lib/bind/irs/getpwent_r.c index bfafe92d60..0f89c63a62 100644 --- a/lib/bind/irs/getpwent_r.c +++ b/lib/bind/irs/getpwent_r.c @@ -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 @@ -27,13 +27,17 @@ static const char rcsid[] = "$Id: getpwent_r.c,v 1.3 2001/05/28 08:38:26 marka E #include #include #include -#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 */ #undef _POSIX_PTHREAD_SEMANTICS #include #define _POSIX_PTHREAD_SEMANTICS 1 #else +#define _UNIX95 1 +#include +#endif +#else #include #endif #include diff --git a/lib/bind/irs/irp_pw.c b/lib/bind/irs/irp_pw.c index 567ef24a10..5c035672db 100644 --- a/lib/bind/irs/irp_pw.c +++ b/lib/bind/irs/irp_pw.c @@ -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); diff --git a/lib/bind/port_after.h.in b/lib/bind/port_after.h.in index d6d47a5479..b8404216f3 100644 --- a/lib/bind/port_after.h.in +++ b/lib/bind/port_after.h.in @@ -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 diff --git a/lib/bind/resolv/res_findzonecut.c b/lib/bind/resolv/res_findzonecut.c index 8bb9dc5a60..3846a1f6ea 100644 --- a/lib/bind/resolv/res_findzonecut.c +++ b/lib/bind/resolv/res_findzonecut.c @@ -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); diff --git a/lib/bind/resolv/res_update.c b/lib/bind/resolv/res_update.c index 630fbc5498..3e731514a7 100644 --- a/lib/bind/resolv/res_update.c +++ b/lib/bind/resolv/res_update.c @@ -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);