summaryrefslogtreecommitdiffstats
path: root/src/lib/rpc
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>1996-08-31 06:11:43 +0000
committerKen Raeburn <raeburn@mit.edu>1996-08-31 06:11:43 +0000
commitbe76f0c2ef42620a1d9d61a214a487973a8c5ff8 (patch)
tree7f0885280f415d865d520e352acf6f28e25b3346 /src/lib/rpc
parent7d0ab7f3c7d18e7cc56557689faae028355f1492 (diff)
downloadkrb5-be76f0c2ef42620a1d9d61a214a487973a8c5ff8.tar.gz
krb5-be76f0c2ef42620a1d9d61a214a487973a8c5ff8.tar.xz
krb5-be76f0c2ef42620a1d9d61a214a487973a8c5ff8.zip
* pmap_rmt.c (getbroadcastnets): Tweak conditional layout to make emacs
indentation code happier. * netdb.h: Comment fix. * configure.in, getrpcent.c: Use configure to the return types of setrpcent() and getrpcent(). Also, check for struct rpcent in the system <netdb.h>, and only define the structure in rpc/netdb.h if it's not in the system file. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9019 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/rpc')
-rw-r--r--src/lib/rpc/ChangeLog14
-rw-r--r--src/lib/rpc/configure.in22
-rw-r--r--src/lib/rpc/getrpcent.c15
-rw-r--r--src/lib/rpc/netdb.h3
-rw-r--r--src/lib/rpc/pmap_rmt.c5
5 files changed, 41 insertions, 18 deletions
diff --git a/src/lib/rpc/ChangeLog b/src/lib/rpc/ChangeLog
index 3add15aaf..e23c9b000 100644
--- a/src/lib/rpc/ChangeLog
+++ b/src/lib/rpc/ChangeLog
@@ -1,3 +1,17 @@
+Sat Aug 31 01:46:45 1996 Ken Raeburn <raeburn@cygnus.com>
+
+ * pmap_rmt.c (getbroadcastnets): Tweak conditional layout to make
+ emacs indentation code happier.
+
+ * netdb.h: Comment fix.
+
+ Tue Aug 6 18:52:47 1996 Marc Horowitz <marc@mit.edu>
+
+ * configure.in, getrpcent.c: Use configure to the return types of
+ setrpcent() and getrpcent(). Also, check for struct rpcent in the
+ system <netdb.h>, and only define the structure in rpc/netdb.h if
+ it's not in the system file.
+
Tue Aug 13 15:18:16 1996 Tom Yu <tlyu@mit.edu>
* getrpcent.c: Add PROTOTYPE and conditionalize function
diff --git a/src/lib/rpc/configure.in b/src/lib/rpc/configure.in
index 7fe2f069a..fede09104 100644
--- a/src/lib/rpc/configure.in
+++ b/src/lib/rpc/configure.in
@@ -43,6 +43,28 @@ AC_CHECK_SIZEOF(long)
SIZEOF_LONG=$ac_cv_sizeof_long
AC_SUBST(SIZEOF_LONG)
+AC_MSG_CHECKING([return type of setrpcent])
+AC_CACHE_VAL(k5_cv_type_setrpcent,
+[AC_TRY_COMPILE([#include <netdb.h>
+#ifdef __cplusplus
+extern "C"
+#endif
+extern void setrpcent();],
+[int i;], k5_cv_type_setrpcent=void, k5_cv_type_setrpcent=int)])dnl
+AC_MSG_RESULT($k5_cv_type_setrpcent)
+AC_DEFINE_UNQUOTED(SETRPCENT_TYPE, $k5_cv_type_setrpcent)
+dnl
+AC_MSG_CHECKING([return type of endrpcent])
+AC_CACHE_VAL(k5_cv_type_endrpcent,
+[AC_TRY_COMPILE([#include <netdb.h>
+#ifdef __cplusplus
+extern "C"
+#endif
+extern void endrpcent();],
+[int i;], k5_cv_type_endrpcent=void, k5_cv_type_endrpcent=int)])dnl
+AC_MSG_RESULT($k5_cv_type_endrpcent)
+AC_DEFINE_UNQUOTED(ENDRPCENT_TYPE, $k5_cv_type_endrpcent)
+
DECLARE_SYS_ERRLIST
V5_SHARED_LIB_OBJS
diff --git a/src/lib/rpc/getrpcent.c b/src/lib/rpc/getrpcent.c
index d30f276f3..506ebce90 100644
--- a/src/lib/rpc/getrpcent.c
+++ b/src/lib/rpc/getrpcent.c
@@ -43,21 +43,6 @@ static char sccsid[] = "@(#)getrpcent.c 1.9 87/08/11 Copyr 1984 Sun Micro";
#include <string.h>
#include <sys/socket.h>
-/* setrpcent is declared as int-returning in netdb.h on hpux */
-/* setrpcent is declared as int-returning in rpc/rpcent.h on Solaris */
-#if !defined(hpux) && !(defined(sun) && defined(__svr4__))
-#define SETRPCENT_TYPE void
-#else
-#define SETRPCENT_TYPE int
-#endif
-
-/* endrpcent is declared as int-returning in netdb.h on hpux */
-#ifndef hpux
-#define ENDRPCENT_TYPE void
-#else
-#define ENDRPCENT_TYPE int
-#endif
-
/*
* Make sure we have a definition for PROTOTYPE.
*/
diff --git a/src/lib/rpc/netdb.h b/src/lib/rpc/netdb.h
index 60f5fab54..cbc5fb1d0 100644
--- a/src/lib/rpc/netdb.h
+++ b/src/lib/rpc/netdb.h
@@ -44,7 +44,8 @@ struct rpcent {
char **r_aliases; /* alias list */
int r_number; /* rpc program number */
};
-#endif /*STRUCT_RPCENT_ALREADY_PROVIDED*/
+#endif /*STRUCT_RPCENT_IN_RPC_NETDB_H*/
+
struct rpcent *getrpcbyname(), *getrpcbynumber(), *getrpcent();
#endif
diff --git a/src/lib/rpc/pmap_rmt.c b/src/lib/rpc/pmap_rmt.c
index 743d7fc30..9dd922c8f 100644
--- a/src/lib/rpc/pmap_rmt.c
+++ b/src/lib/rpc/pmap_rmt.c
@@ -199,10 +199,11 @@ getbroadcastnets(addrs, sock, buf)
#if 0 /* this is uuuuugly */
addrs[i++] = inet_makeaddr(inet_netof
#if defined(hpux) || (defined(sparc) && defined(__svr4__)) || defined(linux) || (defined(__osf__) && defined(__alpha__))
- (sin->sin_addr), INADDR_ANY);
+ (sin->sin_addr),
#else /* hpux or solaris */
- (sin->sin_addr.s_addr), INADDR_ANY);
+ (sin->sin_addr.s_addr),
#endif
+ INADDR_ANY);
#endif
} else {
addrs[i++] = ((struct sockaddr_in*)