diff options
author | Sam Hartman <hartmans@mit.edu> | 1996-07-30 22:47:08 +0000 |
---|---|---|
committer | Sam Hartman <hartmans@mit.edu> | 1996-07-30 22:47:08 +0000 |
commit | a7c4c09e3d048b35c40463edeae05cea89e9710b (patch) | |
tree | 6e2e8ee1bf328a6372d027abdafc29379e7aa4f2 /src/lib/rpc | |
parent | 6fe419b7c1a626aff75fe73ce23e35a69277fd07 (diff) | |
download | krb5-a7c4c09e3d048b35c40463edeae05cea89e9710b.zip krb5-a7c4c09e3d048b35c40463edeae05cea89e9710b.tar.gz krb5-a7c4c09e3d048b35c40463edeae05cea89e9710b.tar.bz2 |
Deal with a /usr/include/netdb.h that contains struct rpcent
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8864 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/rpc')
-rw-r--r-- | src/lib/rpc/ChangeLog | 10 | ||||
-rw-r--r-- | src/lib/rpc/configure.in | 10 | ||||
-rw-r--r-- | src/lib/rpc/netdb.h | 6 | ||||
-rw-r--r-- | src/lib/rpc/types.hin | 4 |
4 files changed, 25 insertions, 5 deletions
diff --git a/src/lib/rpc/ChangeLog b/src/lib/rpc/ChangeLog index 942a4bf..d128f38 100644 --- a/src/lib/rpc/ChangeLog +++ b/src/lib/rpc/ChangeLog @@ -1,3 +1,13 @@ +Mon Jul 29 22:02:47 1996 Sam Hartman <hartmans@tertius.mit.edu> + + * configure.in: Determine whether netdb.h defines struct rpcent. + + * types.hin: Expand rpcent_define to be a null string or a #define + on Linux. + + * netdb.h: Include rpc/types.h and only define struct rpcent if + needed. + Wed Jul 24 07:58:38 1996 Ezra Peisach <epeisach@kangaroo.mit.edu> * pmap_rmt.c (clnt_broadcast): Use memset insetad of bzero. diff --git a/src/lib/rpc/configure.in b/src/lib/rpc/configure.in index 6084638..e5ef77b 100644 --- a/src/lib/rpc/configure.in +++ b/src/lib/rpc/configure.in @@ -4,7 +4,15 @@ AC_PROG_ARCHIVE AC_PROG_ARCHIVE_ADD AC_PROG_RANLIB AC_PROG_INSTALL - +AC_TRY_COMPILE([ +#include <netdb.h> + ],[ + struct rpcent e; + char c = e.r_name[0]; + int i = e.r_number; + ], [rpcent_define='#define STRUCT_RPCENT_ALREADY_PROVIDED'], + [rpcent_define='']) dnl +AC_SUBST(rpcent_define) AC_CHECK_SIZEOF(int) SIZEOF_INT=$ac_cv_sizeof_int AC_SUBST(SIZEOF_INT) diff --git a/src/lib/rpc/netdb.h b/src/lib/rpc/netdb.h index f6b6374..628efc2 100644 --- a/src/lib/rpc/netdb.h +++ b/src/lib/rpc/netdb.h @@ -31,20 +31,20 @@ * Mountain View, California 94043 */ /* @(#)rpc.h 1.8 87/07/24 SMI */ - +#include <rpc/types.h> /* since the gssrpc library requires that any application using it be built with these header files, I am making the decision that any app which uses the rpcent routines must use this header file, or something compatible (which most <netdb.h> are) --marc */ /* Really belongs in <netdb.h> */ - +#ifndef STRUCT_RPCENT_ALREADY_PROVIDED struct rpcent { char *r_name; /* name of server for this rpc program */ char **r_aliases; /* alias list */ int r_number; /* rpc program number */ }; - +#endif /*STRUCT_RPCENT_ALREADY_PROVIDED*/ struct rpcent *getrpcbyname(), *getrpcbynumber(), *getrpcent(); #endif diff --git a/src/lib/rpc/types.hin b/src/lib/rpc/types.hin index 619a9ce..e959041 100644 --- a/src/lib/rpc/types.hin +++ b/src/lib/rpc/types.hin @@ -36,7 +36,8 @@ #define __TYPES_RPC_HEADER__ #include <sys/types.h> - +/* This is for rpc/netdb.h */ +@rpcent_define@ /* this is a 32-bit int type */ #if @SIZEOF_INT@ == 4 @@ -88,3 +89,4 @@ typedef unsigned long rpc_u_int32; #endif #endif /* ndef __TYPES_RPC_HEADER__ */ + |