mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
aix & hp
This commit is contained in:
@@ -19,7 +19,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
||||
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
|
||||
AC_DIVERT_POP()dnl
|
||||
|
||||
AC_REVISION($Revision: 1.54 $)
|
||||
AC_REVISION($Revision: 1.55 $)
|
||||
|
||||
AC_INIT(resolv/herror.c)
|
||||
AC_PREREQ(2.13)
|
||||
@@ -1646,6 +1646,24 @@ NGR_R_OK="#define NGR_R_OK 1"
|
||||
NGR_R_RETURN="#define NGR_R_RETURN int"
|
||||
]
|
||||
,
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
#include <netdb.h>
|
||||
extern int getnetgrent_r( char **, char **, char **, void **);
|
||||
]
|
||||
,
|
||||
[return (0);],
|
||||
[
|
||||
NGR_R_ARGS="#define NGR_R_ARGS void **buf"
|
||||
NGR_R_BAD="#define NGR_R_BAD (0)"
|
||||
NGR_R_COPY="#define NGR_R_COPY buf"
|
||||
NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
|
||||
NGR_R_OK="#define NGR_R_OK 1"
|
||||
NGR_R_RETURN="#define NGR_R_RETURN int"
|
||||
NGR_R_PRIVATE="#define NGR_R_PRIVATE 1"
|
||||
]
|
||||
,
|
||||
)
|
||||
)
|
||||
)
|
||||
,
|
||||
@@ -1662,8 +1680,12 @@ AC_SUBST(NGR_R_COPY)
|
||||
AC_SUBST(NGR_R_COPY_ARGS)
|
||||
AC_SUBST(NGR_R_OK)
|
||||
AC_SUBST(NGR_R_RETURN)
|
||||
AC_SUBST(NGR_R_PRIVATE)
|
||||
|
||||
AC_CHECK_FUNC(endnetgrent_r,
|
||||
NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) return (x)"
|
||||
NGR_R_END_RETURN="#define NGR_R_END_RETURN int"
|
||||
NGR_R_ENT_ARGS="#define NGR_R_ENT_ARGS NGR_R_ARGS"
|
||||
,
|
||||
NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /*empty*/"
|
||||
NGR_R_END_RETURN="#define NGR_R_END_RETURN void"
|
||||
@@ -1675,10 +1697,11 @@ AC_SUBST(NGR_R_END_RETURN)
|
||||
AC_SUBST(NGR_R_ENT_ARGS)
|
||||
|
||||
AC_CHECK_FUNC(setnetgrent_r,
|
||||
NGR_R_SET_RESULT="#define NGR_R_SET_RESULT NGR_R_OK"
|
||||
NGR_R_SET_RETURN="#define NGR_R_SET_RETURN int"
|
||||
,
|
||||
NGR_R_SET_RESULT="#undef NGR_R_SET_RESULT /*empty*/"
|
||||
NGR_R_SET_RETURN="#define NGR_R_SET_RETURN void"
|
||||
AC_DEFINE(NEED_SETNETGRENT_R)
|
||||
)
|
||||
AC_SUBST(NGR_R_SET_RESULT)
|
||||
AC_SUBST(NGR_R_SET_RETURN)
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static const char rcsid[] = "$Id: getnetgrent_r.c,v 1.2 2001/06/22 05:11:01 marka Exp $";
|
||||
static const char rcsid[] = "$Id: getnetgrent_r.c,v 1.3 2001/06/25 13:22:29 marka Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <port_before.h>
|
||||
@@ -29,6 +29,7 @@ static const char rcsid[] = "$Id: getnetgrent_r.c,v 1.2 2001/06/22 05:11:01 mark
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#include <stdlib.h>
|
||||
#include <port_after.h>
|
||||
|
||||
#ifdef NGR_R_RETURN
|
||||
@@ -70,6 +71,9 @@ setnetgrent_r(const char *netgroup)
|
||||
#endif
|
||||
{
|
||||
setnetgrent(netgroup);
|
||||
#ifdef NGR_R_PRIVATE
|
||||
*buf = NULL;
|
||||
#endif
|
||||
#ifdef NGR_R_SET_RESULT
|
||||
return (NGR_R_SET_RESULT);
|
||||
#endif
|
||||
@@ -83,6 +87,11 @@ endnetgrent_r(void)
|
||||
#endif
|
||||
{
|
||||
endnetgrent();
|
||||
#ifdef NGR_R_PRIVATE
|
||||
if (*buf != NULL)
|
||||
free(*buf);
|
||||
*buf = NULL;
|
||||
#endif
|
||||
NGR_R_END_RESULT(NGR_R_OK);
|
||||
}
|
||||
|
||||
@@ -102,10 +111,17 @@ copy_protoent(char **machinep, char **userp, char **domainp,
|
||||
if (up != NULL) len += strlen(up) + 1;
|
||||
if (dp != NULL) len += strlen(dp) + 1;
|
||||
|
||||
#ifdef NGR_R_PRIVATE
|
||||
free(*buf);
|
||||
*buf = malloc(len);
|
||||
if (*buf == NULL)
|
||||
return(NGR_R_BAD);
|
||||
#else
|
||||
if (len > buflen) {
|
||||
errno = ERANGE;
|
||||
return (NGR_R_BAD);
|
||||
}
|
||||
#endif
|
||||
|
||||
cp = buf;
|
||||
|
||||
|
@@ -297,6 +297,7 @@ void endpwent_r(void);
|
||||
int setpassent(int stayopen);
|
||||
#endif
|
||||
|
||||
#define gettimeofday isc__gettimeofday
|
||||
struct timeval; /* silence warning */
|
||||
struct timezone; /* silence warning */
|
||||
int isc__gettimeofday(struct timeval *tp, struct timezone *tzp);
|
||||
|
@@ -4,13 +4,13 @@
|
||||
#ifdef HAVE_SYS_TIMERS_H
|
||||
#include <sys/timers.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
@WANT_IRS_GR@
|
||||
@WANT_IRS_NIS@
|
||||
@WANT_IRS_PW@
|
||||
|
||||
#define gettimeofday isc__gettimeofday
|
||||
@BSD_COMP@
|
||||
|
||||
@DO_PTHREADS@
|
||||
@@ -66,6 +66,7 @@
|
||||
@NGR_R_RETURN@
|
||||
@NGR_R_SET_RESULT@
|
||||
@NGR_R_SET_RETURN@
|
||||
@NGR_R_PRIVATE@
|
||||
|
||||
@PROTO_R_ARGS@
|
||||
@PROTO_R_BAD@
|
||||
|
Reference in New Issue
Block a user