942. [port] libbind: GETNETBYADDR_ADDR_T was not correctly

defined on some platforms.
This commit is contained in:
Mark Andrews 2001-07-20 11:06:05 +00:00
parent d3243476c2
commit 2da0b7dfbd
3 changed files with 88 additions and 17 deletions

View file

@ -1,3 +1,6 @@
942. [port] libbind: GETNETBYADDR_ADDR_T was not correctly
defined on some platforms.
941. [bug] The configuration checker crashed if a slave
zone didn't contain a masters statement. [RT #1514]

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.76 $)
AC_REVISION($Revision: 1.77 $)
AC_INIT(resolv/herror.c)
AC_PREREQ(2.13)
@ -1162,22 +1162,6 @@ AC_TRY_COMPILE([
ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"])
AC_SUBST(ISC_LWRES_ENDHOSTENTINT)
case "$host" in
*-solaris2.8*)
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long";;
*)
AC_MSG_CHECKING(for getnetbyaddr(in_addr_t, ...))
AC_TRY_COMPILE([
#include <netdb.h>
struct netent *getnetbyaddr(in_addr_t, int);],
[],
[AC_MSG_RESULT(yes)
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T in_addr_t"],
[AC_MSG_RESULT(no)
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"])
esac
AC_SUBST(GETNETBYADDR_ADDR_T)
AC_MSG_CHECKING(for int setnetent)
AC_TRY_COMPILE([
#include <netdb.h>],
@ -1377,6 +1361,8 @@ NET_R_COPY_ARGS="#define NET_R_COPY_ARGS NET_R_ARGS"
NET_R_OK="#define NET_R_OK nptr"
NET_R_SETANSWER="#undef NET_R_SETANSWER"
NET_R_RETURN="#define NET_R_RETURN struct netent *"
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
NETENT_DATA="#undef NETENT_DATA"
],
AC_TRY_COMPILE(
[#include <netdb.h>
@ -1392,7 +1378,44 @@ NET_R_COPY_ARGS="#define NET_R_COPY_ARGS char *buf, size_t buflen"
NET_R_OK="#define NET_R_OK 0"
NET_R_SETANSWER="#define NET_R_SETANSWER 1"
NET_R_RETURN="#define NET_R_RETURN int"
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T unsigned long int"
NETENT_DATA="#undef NETENT_DATA"
],
AC_TRY_COMPILE(
[#define _REENTRANT
#include <netdb.h>
int getnetbyaddr_r(int, int, struct netent *, struct netent_data *);
],
[return (0)],
[
NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"
NET_R_BAD="#define NET_R_BAD (-1)"
NET_R_COPY="#define NET_R_COPY ndptr"
NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"
NET_R_OK="#define NET_R_OK 0"
NET_R_SETANSWER="#undef NET_R_SETANSWER"
NET_R_RETURN="#define NET_R_RETURN int"
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T int"
NETENT_DATA="#define NETENT_DATA 1"
],
AC_TRY_COMPILE(
[#include <netdb.h>
int getnetbyaddr_r (long, int, struct netent *, struct netent_data *);
],
[return (0)],
[
NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"
NET_R_BAD="#define NET_R_BAD (-1)"
NET_R_COPY="#define NET_R_COPY ndptr"
NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"
NET_R_OK="#define NET_R_OK 0"
NET_R_SETANSWER="#undef NET_R_SETANSWER"
NET_R_RETURN="#define NET_R_RETURN int"
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
NETENT_DATA="#define NETENT_DATA 1"
],
)
)
)
)
,
@ -1403,6 +1426,8 @@ NET_R_COPY_ARGS="#define NET_R_COPY_ARGS NET_R_ARGS"
NET_R_OK="#define NET_R_OK nptr"
NET_R_SETANSWER="#undef NET_R_SETANSWER"
NET_R_RETURN="#define NET_R_RETURN struct netent *"
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
NETENT_DATA="#undef NETENT_DATA"
)
AC_SUBST(NET_R_ARGS)
AC_SUBST(NET_R_BAD)
@ -1411,8 +1436,31 @@ AC_SUBST(NET_R_COPY_ARGS)
AC_SUBST(NET_R_OK)
AC_SUBST(NET_R_SETANSWER)
AC_SUBST(NET_R_RETURN)
AC_SUBST(GETNETBYADDR_ADDR_T)
AC_SUBST(NETENT_DATA)
AC_CHECK_FUNC(setnetent_r,
AC_TRY_COMPILE(
[
#include <netdb.h>
void setnetent_r (int);
] ,[return (0);],[
NET_R_ENT_ARGS="#undef NET_R_ENT_ARGS /*empty*/"
NET_R_SET_RESULT="#undef NET_R_SET_RESULT /*empty*/"
NET_R_SET_RETURN="#define NET_R_SET_RETURN void"
],
AC_TRY_COMPILE(
[
#define _REENTRANT
#include <netdb.h>
extern int setnetent_r(int, struct netent_data *);
] ,[return (0);],[
NET_R_ENT_ARGS="#define NET_R_ENT_ARGS struct netent_data *ndptr"
NET_R_SET_RESULT="#define NET_R_SET_RESULT NET_R_OK"
NET_R_SET_RETURN="#define NET_R_SET_RETURN int"
],
)
)
,
NET_R_ENT_ARGS="#undef NET_R_ENT_ARGS /*empty*/"
NET_R_SET_RESULT="#undef NET_R_SET_RESULT /*empty*/"
@ -1423,6 +1471,25 @@ AC_SUBST(NET_R_SET_RESULT)
AC_SUBST(NET_R_SET_RETURN)
AC_CHECK_FUNC(endnetent_r,
AC_TRY_COMPILE(
[
#include <netdb.h>
void endnetent_r (void);
] ,[return (0);],[
NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
NET_R_END_RETURN="#define NET_R_END_RETURN void"
],
AC_TRY_COMPILE(
[
#define _REENTRANT
#include <netdb.h>
extern int endnetent_r(struct netent_data *);
] ,[return (0);],[
NET_R_END_RESULT="#define NET_R_END_RESULT(x) return (x)"
NET_R_END_RETURN="#define NET_R_END_RETURN int"
],
)
)
,
NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
NET_R_END_RETURN="#define NET_R_END_RETURN void"

View file

@ -37,6 +37,7 @@ struct timezone; /* silence warning */
@NET_R_SET_RESULT@
@NET_R_SETANSWER@
@NET_R_SET_RETURN@
@NETENT_DATA@
@GROUP_R_RETURN@
@GROUP_R_SET_RETURN@