From: Petter Reinholdtsen Date: Wed, 11 Jun 2003 12:30:47 +0000 (+0000) Subject: Upgrade ypserv patch. X-Git-Url: https://pere.pagekite.me/gitweb/homepage.git/commitdiff_plain/6b1758703d6c614649048b84631133ca4a62e667 Upgrade ypserv patch. --- diff --git a/linux/index.html b/linux/index.html index c92f8ef79b..583556723f 100644 --- a/linux/index.html +++ b/linux/index.html @@ -11,7 +11,7 @@
-
ypserv-2.8.90-20030602.diff - 2003-06-02
+
ypserv-2.8.92-20030610.diff - 2003-06-02
Porting ypserv to non-linux platforms.
gprof-callgraph.pl diff --git a/linux/ypserv-2.8.92-20030611.diff b/linux/ypserv-2.8.92-20030611.diff new file mode 100644 index 0000000000..01ea425a8c --- /dev/null +++ b/linux/ypserv-2.8.92-20030611.diff @@ -0,0 +1,1454 @@ +Changes: + + - Add test for __attribute((unused)) and socklen_t to configure + - only look for getrpcport in rpcsvc if it is missing in the existing + libraries. + - no need to check for or include , as it isn't used any + more. + - Make some compatibility functions: + - A svc_getcaller() returning 'const struct sockaddr_in *', and adapt + the code to accept the 'const'. + - A real getline(). + - _rpc_dtablesize() copied from other parts of the code. + - Some xdr_* functions copied from other parts of the code. + - An inet_pton() with support for IPv4 and inet_aton(). + - Dummy replacement functions for fgetpwent(), putpwent() and + fgetgrent(). + - Drop unused from yp.h, because this break on Tru64 UNIX. + - Make sure is properly protected, and make sure + is included in the files using alloca() as it is + needed on Mac OS X. + - Move some compatibility code into lib/compat.c + - Add some required header files. + - Remove the use of uint32_t, as it is unknown on some platforms, and + use the return type of the function supplying the value instead. + - Try to protect the code handling shadow password files with the + proper #ifdefs. This part is untested. + +diff -ur src-2.8.92/acinclude.m4 src-2.8.92-local/acinclude.m4 +--- src-2.8.92/acinclude.m4 2003-06-05 13:41:45.000000000 +0200 ++++ src-2.8.92-local/acinclude.m4 2003-06-11 11:58:01.000000000 +0200 +@@ -35,3 +35,59 @@ + ;; + esac + ]) ++ ++ ++dnl ++dnl Test for __attribute__ ((unused)) ++dnl Based on code from the tcpdump version 3.7.2 source. ++dnl ++ ++AC_DEFUN(AC_C___ATTRIBUTE__, [ ++AC_MSG_CHECKING(for __attribute__) ++AC_CACHE_VAL(ac_cv___attribute__, [ ++AC_TRY_COMPILE([ ++#include ++], ++[ ++static void foo(void) __attribute__ ((unused)); ++ ++static void ++foo(void) ++{ ++ exit(1); ++} ++], ++ac_cv___attribute__=yes, ++ac_cv___attribute__=no)]) ++if test "$ac_cv___attribute__" = "yes"; then ++ AC_DEFINE(UNUSED, __attribute__ ((unused)), [define if your compiler has __attribute__ ((unused))]) ++else ++ AC_DEFINE(UNUSED,,) ++fi ++AC_MSG_RESULT($ac_cv___attribute__) ++]) ++ ++dnl ++dnl Check whether sys/socket.h defines type socklen_t. Please note ++dnl that some systems require sys/types.h to be included before ++dnl sys/socket.h can be compiled. ++dnl ++dnl Source: http://www.gnu.org/software/ac-archive/htmldoc/type_socklen_t.html ++dnl Version: 1.2 (last modified: 2000-07-19) ++dnl Author: Lars Brinkhoff ++dnl Changed by Petter Reinholdtsen to use the new AC_DEFINE() arguments ++dnl ++AC_DEFUN([TYPE_SOCKLEN_T], ++[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t, ++[ ++ AC_TRY_COMPILE( ++ [#include ++ #include ], ++ [socklen_t len = 42; return 0;], ++ ac_cv_type_socklen_t=yes, ++ ac_cv_type_socklen_t=no) ++]) ++ if test $ac_cv_type_socklen_t != yes; then ++ AC_DEFINE([socklen_t], [int], [Define if socklen_t is missing]) ++ fi ++]) +diff -ur src-2.8.92/configure.in src-2.8.92-local/configure.in +--- src-2.8.92/configure.in 2003-06-05 17:59:52.000000000 +0200 ++++ src-2.8.92-local/configure.in 2003-06-11 11:57:46.000000000 +0200 +@@ -179,9 +179,13 @@ + AC_CHECK_HEADERS(xcrypt.h crypt.h) + fi + AC_SUBST(LIBCRYPT) +-dnl XXX We need to check at first if it is not in libc or libnsl, +-dnl else we could get problems with ypserv on Linux. +-dnl AC_CHECK_LIB(rpcsvc, getrpcport) ++ ++AC_CHECK_FUNCS(getrpcport) ++if test "$ac_cv_func_getrpcport" = no; then ++ AC_CHECK_LIB([rpcsvc], [getrpcport], ++ [ac_cv_func_$1=yes; LIBS="-lrpcsvc $LIBS"]) ++fi ++ + AC_CHECK_LIB(nsl,gethostbyname) + AC_CHECK_LIB(socket,socket) + AC_CHECK_LIB(resolv, res_gethostbyname, RESOLV="-lresolv", RESOLV="") +@@ -199,12 +203,14 @@ + AC_HEADER_SYS_WAIT + AC_CHECK_HEADERS(fcntl.h paths.h sys/file.h sys/time.h syslog.h unistd.h) + AC_CHECK_HEADERS(getopt.h shadow.h rpc/clnt_soc.h rpc/svc_soc.h) +-AC_CHECK_HEADERS(netinet/in.h alloca.h poll.h) ++AC_CHECK_HEADERS(netinet/in.h alloca.h) + AC_CHECK_TYPE(in_addr_t, ,[AC_DEFINE(in_addr_t,int,[Define to int if you don't have in_addr_t])],[#include ]) + + dnl Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST + AC_C_INLINE ++AC_C___ATTRIBUTE__ ++TYPE_SOCKLEN_T + AC_TYPE_PID_T + AC_TYPE_SIZE_T + AC_HEADER_TIME +diff -ur src-2.8.92/lib/access.c src-2.8.92-local/lib/access.c +--- src-2.8.92/lib/access.c 2003-03-03 11:43:39.000000000 +0100 ++++ src-2.8.92-local/lib/access.c 2003-06-10 15:51:32.000000000 +0200 +@@ -37,6 +37,7 @@ + #include "access.h" + #include "yp_db.h" + #include "yp.h" ++#include "compat.h" + + static conffile_t *conf = NULL; + +@@ -130,7 +131,7 @@ + int + is_valid (struct svc_req *rqstp, const char *map, const char *domain) + { +- struct sockaddr_in *sin; ++ const struct sockaddr_in *sin; + int status; + static unsigned long int oldaddr = 0; /* so we dont log multiple times */ + static int oldstatus = -1; +diff -ur src-2.8.92/lib/compat.c src-2.8.92-local/lib/compat.c +--- src-2.8.92/lib/compat.c 2003-06-05 14:14:04.000000000 +0200 ++++ src-2.8.92-local/lib/compat.c 2003-06-11 13:58:13.000000000 +0200 +@@ -48,9 +48,561 @@ + #endif /* not HAVE_GETOPT_LONG */ + + #if !defined(HAVE_GETDELIM) && !defined(HAVE_GETLINE) ++/* copied from cvs 1.11.5 source */ ++/* getline.c -- Replacement for GNU C library function getline ++ ++Copyright (C) 1993 Free Software Foundation, Inc. ++ ++This program is free software; you can redistribute it and/or ++modify it under the terms of the GNU General Public License as ++published by the Free Software Foundation; either version 2 of the ++License, or (at your option) any later version. ++ ++This program is distributed in the hope that it will be useful, but ++WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++General Public License for more details. */ ++ ++/* Written by Jan Brittenson, bson@gnu.ai.mit.edu. */ ++ ++#include ++#include ++#include ++#include ++ ++#define GETLINE_NO_LIMIT -1 ++ ++#if STDC_HEADERS ++#include ++#else ++char *malloc (), *realloc (); ++#endif ++ ++/* Always add at least this many bytes when extending the buffer. */ ++#define MIN_CHUNK 64 ++ ++/* Read up to (and including) a TERMINATOR from STREAM into *LINEPTR ++ + OFFSET (and null-terminate it). If LIMIT is non-negative, then ++ read no more than LIMIT chars. ++ ++ *LINEPTR is a pointer returned from malloc (or NULL), pointing to ++ *N characters of space. It is realloc'd as necessary. ++ ++ Return the number of characters read (not including the null ++ terminator), or -1 on error or EOF. On a -1 return, the caller ++ should check feof(), if not then errno has been set to indicate the ++ error. */ ++ ++int ++getstr (char **lineptr, size_t *n, FILE *stream, int terminator, ++ int offset, int limit) ++{ ++ int nchars_avail; /* Allocated but unused chars in *LINEPTR. */ ++ char *read_pos; /* Where we're reading into *LINEPTR. */ ++ int ret; ++ ++ if (!lineptr || !n || !stream) ++ { ++ errno = EINVAL; ++ return -1; ++ } ++ ++ if (!*lineptr) ++ { ++ *n = MIN_CHUNK; ++ *lineptr = malloc (*n); ++ if (!*lineptr) ++ { ++ errno = ENOMEM; ++ return -1; ++ } ++ *lineptr[0] = '\0'; ++ } ++ ++ nchars_avail = *n - offset; ++ read_pos = *lineptr + offset; ++ ++ for (;;) ++ { ++ int save_errno; ++ register int c; ++ ++ if (limit == 0) ++ break; ++ else ++ { ++ c = getc (stream); ++ ++ /* If limit is negative, then we shouldn't pay attention to ++ it, so decrement only if positive. */ ++ if (limit > 0) ++ limit--; ++ } ++ ++ save_errno = errno; ++ ++ /* We always want at least one char left in the buffer, since we ++ always (unless we get an error while reading the first char) ++ NUL-terminate the line buffer. */ ++ ++ assert((*lineptr + *n) == (read_pos + nchars_avail)); ++ if (nchars_avail < 2) ++ { ++ if (*n > MIN_CHUNK) ++ *n *= 2; ++ else ++ *n += MIN_CHUNK; ++ ++ nchars_avail = *n + *lineptr - read_pos; ++ *lineptr = realloc (*lineptr, *n); ++ if (!*lineptr) ++ { ++ errno = ENOMEM; ++ return -1; ++ } ++ read_pos = *n - nchars_avail + *lineptr; ++ assert((*lineptr + *n) == (read_pos + nchars_avail)); ++ } ++ ++ if (ferror (stream)) ++ { ++ /* Might like to return partial line, but there is no ++ place for us to store errno. And we don't want to just ++ lose errno. */ ++ errno = save_errno; ++ return -1; ++ } ++ ++ if (c == EOF) ++ { ++ /* Return partial line, if any. */ ++ if (read_pos == *lineptr) ++ return -1; ++ else ++ break; ++ } ++ ++ *read_pos++ = c; ++ nchars_avail--; ++ ++ if (c == terminator) ++ /* Return the line. */ ++ break; ++ } ++ ++ /* Done - NUL terminate and return the number of chars read. */ ++ *read_pos = '\0'; ++ ++ ret = read_pos - (*lineptr + offset); ++ return ret; ++} ++ + ssize_t + getline (char **lineptr, size_t * n, FILE * stream) + { +- return 0; ++ return getstr (lineptr, n, stream, '\n', 0, GETLINE_NO_LIMIT); ++} ++ ++int ++getline_safe (char **lineptr, size_t *n, FILE *stream, int limit) ++{ ++ return getstr (lineptr, n, stream, '\n', 0, limit); ++} ++ ++#endif /* not HAVE_GETDELIM and not HAVE_GETLINE */ ++ ++#if !defined(HAVE_SVC_GETCALLER) && !defined(svc_getcaller) ++const struct sockaddr_in * ++svc_getcaller(const SVCXPRT *xprt) ++{ ++# ifdef HAVE_SVC_GETRPCCALLER ++ const struct netbuf *addr; ++ addr = svc_getrpccaller(xprt); ++ fprintf(stderr, "warning: Bogus svc_getcaller() called\n"); ++ /* XXX find out how the result from svc_getrpccaller relates to ++ svc_getcaller */ ++ return addr; ++# else /* not HAVE_SVC_GETRPCCALLER */ ++# error "Missing both svc_getcaller() and svc_getrpccaller()" ++# endif /* not HAVE_SVC_GETRPCCALLER */ ++} ++#endif /* not HAVE_SVC_GETCALLER */ ++ ++ ++#ifndef HAVE__RPC_DTABLESIZE ++# if HAVE_GETDTABLESIZE ++int _rpc_dtablesize() ++{ ++ static int size; ++ ++ if (size == 0) { ++ size = getdtablesize(); ++ } ++ return (size); ++} ++# else ++# include ++int _rpc_dtablesize() ++{ ++ static int size = 0; ++ struct rlimit rlb; ++ ++ if (size == 0) ++ { ++ if (getrlimit(RLIMIT_NOFILE, &rlb) >= 0) ++ size = rlb.rlim_cur; ++ } ++ ++ return size; ++} ++# endif /* not HAVE_GETDTABLESIZE */ ++#endif /* not HAVE__RPC_DTABLESIZE */ ++ ++#ifndef HAVE_INET_ATON ++/* Source: http://mail.gnu.org/archive/html/autoconf/2002-08/msg00036.html */ ++/* $Id: ypserv-2.8.92-20030611.diff,v 1.1 2003/06/11 12:30:47 pere Exp $ ++** ++** Replacement for a missing inet_aton. ++** ++** Written by Russ Allbery ++** This work is hereby placed in the public domain by its author. ++** ++** Provides the same functionality as the standard library routine ++** inet_aton for those platforms that don't have it. inet_aton is ++** thread-safe. ++*/ ++ ++/* #include "config.h" */ ++/* #include "clibrary.h" */ ++#include ++ ++/* If we're running the test suite, rename inet_ntoa to avoid conflicts with ++ the system version. */ ++#if TESTING ++# define inet_aton test_inet_aton ++int test_inet_aton(const char *, struct in_addr *); ++#endif ++ ++int ++inet_aton(const char *s, struct in_addr *addr) ++{ ++ unsigned long octet[4], address; ++ const char *p; ++ int base, i; ++ int part = 0; ++ ++ if (s == NULL) return 0; ++ ++ /* Step through each period-separated part of the address. If we see ++ more than four parts, the address is invalid. */ ++ for (p = s; *p != 0; part++) { ++ if (part > 3) return 0; ++ ++ /* Determine the base of the section we're looking at. Numbers are ++ represented the same as in C; octal starts with 0, hex starts ++ with 0x, and anything else is decimal. */ ++ if (*p == '0') { ++ p++; ++ if (*p == 'x') { ++ p++; ++ base = 16; ++ } else { ++ base = 8; ++ } ++ } else { ++ base = 10; ++ } ++ ++ /* Make sure there's actually a number. (A section of just "0" ++ would set base to 8 and leave us pointing at a period; allow ++ that.) */ ++ if (*p == '.' && base != 8) return 0; ++ octet[part] = 0; ++ ++ /* Now, parse this segment of the address. For each digit, multiply ++ the result so far by the base and then add the value of the ++ digit. Be careful of arithmetic overflow in cases where an ++ unsigned long is 32 bits; we need to detect it *before* we ++ multiply by the base since otherwise we could overflow and wrap ++ and then not detect the error. */ ++ for (; *p != 0 && *p != '.'; p++) { ++ if (octet[part] > 0xffffffffUL / base) return 0; ++ ++ /* Use a switch statement to parse each digit rather than ++ assuming ASCII. Probably pointless portability.... */ ++ switch (*p) { ++ case '0': i = 0; break; ++ case '1': i = 1; break; ++ case '2': i = 2; break; ++ case '3': i = 3; break; ++ case '4': i = 4; break; ++ case '5': i = 5; break; ++ case '6': i = 6; break; ++ case '7': i = 7; break; ++ case '8': i = 8; break; ++ case '9': i = 9; break; ++ case 'A': case 'a': i = 10; break; ++ case 'B': case 'b': i = 11; break; ++ case 'C': case 'c': i = 12; break; ++ case 'D': case 'd': i = 13; break; ++ case 'E': case 'e': i = 14; break; ++ case 'F': case 'f': i = 15; break; ++ default: return 0; ++ } ++ if (i >= base) return 0; ++ octet[part] = (octet[part] * base) + i; ++ } ++ ++ /* Advance over periods; the top of the loop will increment the ++ count of parts we've seen. We need a check here to detect an ++ illegal trailing period. */ ++ if (*p == '.') { ++ p++; ++ if (*p == 0) return 0; ++ } ++ } ++ if (part == 0) return 0; ++ ++ /* IPv4 allows three types of address specification: ++ ++ a.b ++ a.b.c ++ a.b.c.d ++ ++ If there are fewer than four segments, the final segment accounts for ++ all of the remaining portion of the address. For example, in the a.b ++ form, b is the final 24 bits of the address. We also allow a simple ++ number, which is interpreted as the 32-bit number corresponding to ++ the full IPv4 address. ++ ++ The first for loop below ensures that any initial segments represent ++ only 8 bits of the address and builds the upper portion of the IPv4 ++ address. Then, the remaining segment is checked to make sure it's no ++ bigger than the remaining space in the address and then is added into ++ the result. */ ++ address = 0; ++ for (i = 0; i < part - 1; i++) { ++ if (octet[i] > 0xff) return 0; ++ address |= octet[i] << (8 * (3 - i)); ++ } ++ if (octet[i] > (0xffffffffUL >> (i * 8))) return 0; ++ address |= octet[i]; ++ if (addr != NULL) addr->s_addr = htonl(address); ++ return 1; ++} ++#endif /* not HAVE_INET_ATON */ ++ ++ ++#ifndef HAVE_INET_PTON ++#include ++#include ++int ++inet_pton(int af, const char *src, void *dst) ++{ ++ switch (af) { ++ case AF_INET: ++ return inet_aton(src, (struct in_addr *)dst); ++ break; ++#ifdef AF_INET6 ++ case AF_INET6: ++#endif /* AF_INET6 */ ++ default: ++ fprintf(stderr, "warning: Bogus inet_pton() called\n"); ++ errno = EAFNOSUPPORT; ++ return -1; ++ break; ++ } ++} ++#endif /* not HAVE_INET_PTON */ ++ ++#ifndef HAVE_FGETPWENT ++struct passwd * ++fgetpwent(FILE *stream) ++{ ++ fprintf(stderr, "warning: Bogus fgetpwent() called\n"); ++ return NULL; ++} ++#endif /* not HAVE_FGETPWENT */ ++ ++#ifndef HAVE_PUTPWENT ++int ++putpwent(const struct passwd *p, FILE *stream) ++{ ++ fprintf(stderr, "warning: Bogus putpwent() called\n"); ++ return -1; ++} ++#endif /* not HAVE_PUTPWENT */ ++ ++#ifndef HAVE_FGETGRENT ++struct group * ++fgetgrent(FILE *stream) ++{ ++ fprintf(stderr, "warning: Bogus fgetgrent() called\n"); ++ return NULL; ++} ++#endif /* not HAVE_FGETGRENT */ ++ ++#ifndef HAVE_XDR_YPXFRSTAT ++#include ++#include "yp.h" ++bool_t ++xdr_ypxfrstat(XDR *xdrs, ypxfrstat *objp) ++{ ++ if (!xdr_enum(xdrs, (enum_t *)objp)) ++ return FALSE; ++ ++ return TRUE; ++} ++#endif /* not HAVE_XDR_YPXFRSTAT */ ++ ++#ifndef HAVE_XDR_DOMAINNAME ++#include ++bool_t ++xdr_domainname(XDR *xdrs, domainname *objp) ++{ ++ if (!xdr_string(xdrs, objp, YPMAXDOMAIN)) ++ return FALSE; ++ ++ return TRUE; ++} ++#endif /* not HAVE_XDR_DOMAINNAME */ ++ ++#ifndef HAVE_XDR_YPRESP_XFR ++#include ++bool_t ++xdr_ypresp_xfr(XDR *xdrs, ypresp_xfr *objp) ++{ ++ if (!xdr_u_int(xdrs, &objp->transid)) ++ return FALSE; ++ ++ if (!xdr_ypxfrstat(xdrs, &objp->xfrstat)) ++ return FALSE; ++ ++ return TRUE; ++} ++#endif /* not HAVE_XDR_YPRESP_XFR */ ++ ++#ifndef HAVE_XDR_YPMAP_PARMS ++bool_t ++xdr_ypmap_parms(XDR *xdrs, ypmap_parms *objp) ++{ ++ if (!xdr_domainname(xdrs, &objp->domain)) ++ return (FALSE); ++ if (!xdr_mapname(xdrs, &objp->map)) ++ return (FALSE); ++ if (!xdr_u_int(xdrs, &objp->ordernum)) ++ return (FALSE); ++ if (!xdr_peername(xdrs, &objp->peer)) ++ return (FALSE); ++ return (TRUE); ++} ++#endif /* not HAVE_XDR_YPMAP_PARMS */ ++ ++ ++#ifndef HAVE_XDR_YPREQ_XFR ++bool_t ++xdr_ypreq_xfr(XDR *xdrs, ypreq_xfr *objp) ++{ ++ if (!xdr_ypmap_parms(xdrs, &objp->map_parms)) ++ return (FALSE); ++ if (!xdr_u_int(xdrs, &objp->transid)) ++ return (FALSE); ++ if (!xdr_u_int(xdrs, &objp->prog)) ++ return (FALSE); ++ if (!xdr_u_int(xdrs, &objp->port)) ++ return (FALSE); ++ return (TRUE); ++} ++#endif /* not HAVE_XDR_YPREQ_XFR */ ++ ++#ifndef HAVE_XDR_MAPNAME ++bool_t ++xdr_mapname (XDR *xdrs, mapname *objp) ++{ ++ if (!xdr_string (xdrs, objp, YPMAXMAP)) ++ return FALSE; ++ ++ return TRUE; ++} ++#endif /* not HAVE_XDR_MAPNAME */ ++ ++#ifndef HAVE_XDR_PEERNAME ++bool_t ++xdr_peername (XDR *xdrs, peername *objp) ++{ ++ if (!xdr_string (xdrs, objp, YPMAXPEER)) ++ return (FALSE); ++ return (TRUE); ++} ++#endif /* not HAVE_XDR_PEERNAME */ ++ ++#ifndef HAVE_XDR_YPSTAT ++bool_t ++xdr_ypstat (XDR *xdrs, ypstat *objp) ++{ ++ if (!xdr_enum (xdrs, (enum_t *) objp)) ++ return FALSE; ++ ++ return TRUE; ++} ++#endif /* not HAVE_XDR_YPSTAT */ ++ ++#ifndef HAVE_XDR_YPRESP_MASTER ++bool_t ++xdr_ypresp_master (XDR *xdrs, ypresp_master *objp) ++{ ++ if (!xdr_ypstat (xdrs, &objp->stat)) ++ return FALSE; ++ if (!xdr_peername (xdrs, &objp->peer)) ++ return FALSE; ++ return TRUE; ++} ++#endif /* not HAVE_XDR_YPRESP_MASTER */ ++ ++#ifndef HAVE_XDR_YPBIND_BINDING ++bool_t ++xdr_ypbind_binding (XDR *xdrs, ypbind_binding *objp) ++{ ++ if (!xdr_opaque (xdrs, objp->ypbind_binding_addr, 4)) ++ return FALSE; ++ if (!xdr_opaque (xdrs, objp->ypbind_binding_port, 2)) ++ return FALSE; ++ return TRUE; ++} ++#endif /* not HAVE_XDR_YPBIND_BINDING */ ++ ++#ifndef HAVE_XDR_YPREQ_NOKEY ++bool_t ++xdr_ypreq_nokey (XDR *xdrs, ypreq_nokey *objp) ++{ ++ if (!xdr_domainname (xdrs, &objp->domain)) ++ return FALSE; ++ ++ if (!xdr_mapname (xdrs, &objp->map)) ++ return FALSE; ++ ++ return TRUE; ++} ++#endif /* not HAVE_XDR_YPREQ_NOKEY */ ++ ++#ifndef HAVE_XDR_YPPUSH_STATUS ++bool_t ++xdr_yppush_status(XDR *xdrs, yppush_status *objp) ++{ ++ if (!xdr_enum(xdrs, (enum_t *)objp)) ++ return (FALSE); ++ return (TRUE); ++} ++#endif /* not HAVE_XDR_YPPUSH_STATUS */ ++ ++#ifndef HAVE_XDR_YPPUSHRESP_XFR ++bool_t ++xdr_yppushresp_xfr(XDR *xdrs, yppushresp_xfr *objp) ++{ ++ if (!xdr_u_int(xdrs, &objp->transid)) ++ return (FALSE); ++ if (!xdr_yppush_status(xdrs, &objp->status)) ++ return (FALSE); ++ return (TRUE); + } +-#endif /* not HAVE_GETDELIM and not HAVE_GETLINE */ ++#endif /* not HAVE_XDR_YPPUSHRESP_XFR */ +diff -ur src-2.8.92/lib/compat.h src-2.8.92-local/lib/compat.h +--- src-2.8.92/lib/compat.h 2003-06-05 14:01:07.000000000 +0200 ++++ src-2.8.92-local/lib/compat.h 2003-06-10 18:52:06.000000000 +0200 +@@ -19,12 +19,7 @@ + #ifndef _YPSERV_COMPAT_H + #define _YPSERV_COMPAT_H + +-/* __attribute__ is only in GCC */ +-#ifdef __GNUC__ +-#define UNUSED __attribute__ ((unused)) +-#else +-#define UNUSED +-#endif ++#include "config.h" + + #ifndef HAVE_STPCPY + char *stpcpy(char *, const char *); +@@ -52,7 +47,26 @@ + + #if !defined(HAVE_GETDELIM) && !defined(HAVE_GETLINE) + /* Use getline() if getdelim() is missing */ ++#include /* size_t */ ++#include /* FILE */ + ssize_t getline (char **lineptr, size_t *n, FILE *stream); + #endif /* not HAVE_GETDELIM and not HAVE_GETLINE */ + ++#ifndef HAVE_SVC_GETCALLER ++# include ++# if !defined(svc_getcaller) ++struct sockaddr_in; ++const struct sockaddr_in *svc_getcaller(const SVCXPRT *xprt); ++# endif ++#endif /* not HAVE_SVC_GETCALLER */ ++ ++#ifndef HAVE__RPC_DTABLESIZE ++int _rpc_dtablesize(void); ++#endif ++ ++#ifndef HAVE_INET_PTON ++int inet_pton(int af, const char *src, void *dst); ++#endif /* not HAVE_INET_PTON */ ++ ++ + #endif /* not _YPSERV_COMPAT_H */ +diff -ur src-2.8.92/lib/yp.h src-2.8.92-local/lib/yp.h +--- src-2.8.92/lib/yp.h 2003-06-05 16:48:11.000000000 +0200 ++++ src-2.8.92-local/lib/yp.h 2003-06-10 18:54:02.000000000 +0200 +@@ -8,8 +8,6 @@ + + #include + +-#include +- + #ifdef __cplusplus + extern "C" { + #endif +diff -ur src-2.8.92/lib/ypserv_conf.c src-2.8.92-local/lib/ypserv_conf.c +--- src-2.8.92/lib/ypserv_conf.c 2003-06-05 14:02:02.000000000 +0200 ++++ src-2.8.92-local/lib/ypserv_conf.c 2003-06-10 16:04:07.000000000 +0200 +@@ -28,7 +28,10 @@ + #include + #include + #include ++#ifdef HAVE_ALLOCA_H + #include ++#endif /* HAVE_ALLOCA_H */ ++#include + + #include "log_msg.h" + #include "ypserv_conf.h" +diff -ur src-2.8.92/makedbm/makedbm.c src-2.8.92-local/makedbm/makedbm.c +--- src-2.8.92/makedbm/makedbm.c 2003-06-05 13:41:57.000000000 +0200 ++++ src-2.8.92-local/makedbm/makedbm.c 2003-06-10 16:06:46.000000000 +0200 +@@ -22,7 +22,9 @@ + #include "config.h" + #endif + ++#ifdef HAVE_ALLOCA_H + #include ++#endif /* HAVE_ALLOCA_H */ + #include + #include + #include +diff -ur src-2.8.92/rpc.yppasswdd/update.c src-2.8.92-local/rpc.yppasswdd/update.c +--- src-2.8.92/rpc.yppasswdd/update.c 2003-06-05 13:42:08.000000000 +0200 ++++ src-2.8.92-local/rpc.yppasswdd/update.c 2003-06-10 18:38:03.000000000 +0200 +@@ -26,7 +26,10 @@ + #include + #include + #include ++#ifdef HAVE_ALLOCA_H + #include ++#endif /* HAVE_ALLOCA_H */ ++#include + #include + #include + #include +@@ -41,6 +44,7 @@ + #ifdef HAVE_SHADOW_H + #include + #endif ++#include "compat.h" + + #ifndef CHECKROOT + /* Set to 0 if you don't want to check against the root password +@@ -188,7 +192,7 @@ + int retries; + static int res; /* I hate static variables */ + char *logbuf; +- struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); ++ const struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); + + /* Be careful here with the debug option. You can see the old + and new password in clear text !! */ +@@ -277,6 +281,7 @@ + } + else + { ++#ifdef HAVE_LCKPWDF + /* Lock the passwd file. We retry several times. */ + retries = 0; + while (lckpwdf () && retries < MAX_RETRIES) +@@ -291,11 +296,14 @@ + log_msg ("password file locked"); + return &res; + } ++#endif /* HAVE_LCKPWDF */ + + res = update_files (yppw, logbuf, &shadow_changed, &passwd_changed, + &chfn, &chsh); + ++#ifdef HAVE_LCKPWDF + ulckpwdf (); ++#endif /* HAVE_LCKPWDF */ + } + + /* Fork off process to rebuild NIS passwd.* maps. */ +@@ -359,6 +367,7 @@ + { + if (strcmp (pw->pw_passwd, "x") == 0) + { ++#ifdef HAVE_GETSPNAM /* shadow password */ + struct spwd *spw; + + if ((spw = getspnam ("root")) != NULL) +@@ -366,6 +375,7 @@ + rootpass = alloca (strlen (spw->sp_pwdp) + 1); + strcpy (rootpass, spw->sp_pwdp); + } ++#endif /* HAVE_GETSPNAM */ + } + else + { +@@ -403,6 +413,7 @@ + chmod (path_passwd_tmp, passwd_stat.st_mode); + chown (path_passwd_tmp, passwd_stat.st_uid, passwd_stat.st_gid); + ++#ifdef HAVE_GETSPNAM + /* Open the shadow file for reading. */ + if ((oldsf = fopen (path_shadow, "r")) != NULL) + { +@@ -427,6 +438,7 @@ + chmod (path_shadow_tmp, shadow_stat.st_mode); + chown (path_shadow_tmp, shadow_stat.st_uid, shadow_stat.st_gid); + } ++#endif /* HAVE_GETSPNAM */ + + /* Loop over all passwd entries */ + while ((pw = fgetpwent (oldpf)) != NULL) +@@ -443,6 +455,7 @@ + if (oldsf != NULL && + pw->pw_passwd[0] == 'x' && pw->pw_passwd[1] == '\0') + { ++#ifdef HAVE_GETSPNAM /* shadow password */ + /* Search for the shadow entry of this user */ + while ((spw = fgetspent (oldsf)) != NULL) + { +@@ -464,6 +477,7 @@ + goto error; + } + } ++#endif /* HAVE_GETSPNAM */ + } + + /* We don't have a shadow password file or we don't find the +@@ -484,6 +498,7 @@ + yppw->newpw.pw_passwd[1] == '\0') && + yppw->newpw.pw_passwd[0] != '\0') + { ++#ifdef HAVE_GETSPNAM /* shadow password */ + if (spw) + { + /* test if password is expired */ +@@ -526,6 +541,7 @@ + } + } + else /* No shadow entry */ ++#endif /* HAVE_GETSPNAM */ + { + /* set the new passwd */ + pw->pw_passwd = yppw->newpw.pw_passwd; +@@ -594,9 +610,12 @@ + if (pw || spw) + { + unlink (path_passwd_tmp); ++#ifdef HAVE_GETSPNAM + unlink (path_shadow_tmp); ++#endif /* HAVE_GETSPNAM */ + return 1; + } ++#ifdef HAVE_GETSPNAM + if (*shadow_changed) + { + unlink (path_shadow_old); +@@ -605,6 +624,7 @@ + } + else + unlink (path_shadow_tmp); ++#endif /* HAVE_GETSPNAM */ + + if (*passwd_changed) + { +diff -ur src-2.8.92/rpc.yppasswdd/yppasswdd.c src-2.8.92-local/rpc.yppasswdd/yppasswdd.c +--- src-2.8.92/rpc.yppasswdd/yppasswdd.c 2003-06-05 13:42:08.000000000 +0200 ++++ src-2.8.92-local/rpc.yppasswdd/yppasswdd.c 2003-06-10 20:03:52.000000000 +0200 +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff -ur src-2.8.92/rpc.ypxfrd/ypxfrd.c src-2.8.92-local/rpc.ypxfrd/ypxfrd.c +--- src-2.8.92/rpc.ypxfrd/ypxfrd.c 2003-06-05 14:17:26.000000000 +0200 ++++ src-2.8.92-local/rpc.ypxfrd/ypxfrd.c 2003-06-10 20:06:32.000000000 +0200 +@@ -76,40 +76,6 @@ + + char *progname; + +-#if HAVE__RPC_DTABLESIZE +-extern int _rpc_dtablesize(void); +-#elif HAVE_GETDTABLESIZE +-static int +-_rpc_dtablesize() +-{ +- static int size; +- +- if (size == 0) +- { +- size = getdtablesize(); +- } +- return (size); +-} +-#else +- +-#include +- +-static int +-_rpc_dtablesize() +-{ +- static int size = 0; +- struct rlimit rlb; +- +- if (size == 0) +- { +- if (getrlimit(RLIMIT_NOFILE, &rlb) >= 0) +- size = rlb.rlim_cur; +- } +- +- return size; +-} +-#endif +- + /* + ** Needed, if we start rpc.ypxfrd from inetd + */ +diff -ur src-2.8.92/rpc.ypxfrd/ypxfrd_server.c src-2.8.92-local/rpc.ypxfrd/ypxfrd_server.c +--- src-2.8.92/rpc.ypxfrd/ypxfrd_server.c 2002-12-21 14:53:26.000000000 +0100 ++++ src-2.8.92-local/rpc.ypxfrd/ypxfrd_server.c 2003-06-10 16:15:56.000000000 +0200 +@@ -40,6 +40,7 @@ + #include "ypxfrd.h" + #include "access.h" + #include "yp_db.h" ++#include "compat.h" + + static int file = 0; + +@@ -97,7 +98,7 @@ + { + static struct xfr result; + char buf[MAXPATHLEN]; +- struct sockaddr_in *rqhost; ++ const struct sockaddr_in *rqhost; + int valid; + + if (debug_flag) +diff -ur src-2.8.92/rpc.ypxfrd/ypxfrd_svc.c src-2.8.92-local/rpc.ypxfrd/ypxfrd_svc.c +--- src-2.8.92/rpc.ypxfrd/ypxfrd_svc.c 2003-06-05 17:51:39.000000000 +0200 ++++ src-2.8.92-local/rpc.ypxfrd/ypxfrd_svc.c 2003-06-10 16:16:29.000000000 +0200 +@@ -23,6 +23,7 @@ + + #include + #include ++#include + #include + #include + #include +diff -ur src-2.8.92/yphelper/yphelper.c src-2.8.92-local/yphelper/yphelper.c +--- src-2.8.92/yphelper/yphelper.c 2003-06-05 13:42:08.000000000 +0200 ++++ src-2.8.92-local/yphelper/yphelper.c 2003-06-10 18:38:32.000000000 +0200 +@@ -21,17 +21,22 @@ + #include "config.h" + #endif + ++#include + #include + #include + #include + #include + #include + #include ++#include + #include + #include + #include + #include ++#ifdef HAVE_ALLOCA_H + #include ++#endif /* HAVE_ALLOCA_H */ ++#include + #if defined(HAVE_GETOPT_H) + #include + #endif +@@ -314,6 +319,7 @@ + (pwd->pw_passwd[0] == 'x' || pwd->pw_passwd[0] == '*')) + { + pass = NULL; ++#ifdef HAVE_GETSPNAM /* shadow password */ + spd = fgetspent (s_input); + if (spd != NULL) + { +@@ -332,6 +338,7 @@ + } + } + } ++#endif /* HAVE_GETSPNAM */ + if (pass == NULL) + pass = pwd->pw_passwd; + } +@@ -349,6 +356,7 @@ + exit (0); + } + ++#ifdef HAVE_GETSPNAM /* shadow password */ + static struct __sgrp * + fgetsgent (FILE *fp) + { +@@ -379,6 +387,7 @@ + } + return 0; + } ++#endif /* HAVE_GETSPNAM */ + + static void + merge_group (char *group, char *gshadow) +@@ -423,6 +432,7 @@ + (grp->gr_passwd[0] == 'x' || grp->gr_passwd[0] == '*')) + { + pass = NULL; ++#ifdef HAVE_GETSPNAM /* shadow password */ + spd = fgetsgent (s_input); + if (spd != NULL) + { +@@ -441,6 +451,7 @@ + } + } + } ++#endif /* HAVE_GETSPNAM */ + if (pass == NULL) + pass = grp->gr_passwd; + } +diff -ur src-2.8.92/yppush/yppush.c src-2.8.92-local/yppush/yppush.c +--- src-2.8.92/yppush/yppush.c 2003-06-05 13:42:08.000000000 +0200 ++++ src-2.8.92-local/yppush/yppush.c 2003-06-10 20:04:41.000000000 +0200 +@@ -29,6 +29,7 @@ + #include + #include "yp.h" + #include ++#include + #include + #include + #include +@@ -73,38 +74,6 @@ + static u_int maxchildren = 1; + static u_int children = 0; + +-#if HAVE__RPC_DTABLESIZE +-extern int _rpc_dtablesize (void); +-#elif HAVE_GETDTABLESIZE +- +-int +-_rpc_dtablesize () +-{ +- static int size; +- +- if (size == 0) +- size = getdtablesize (); +- +- return size; +-} +-#else +- +-#include +- +-int +-_rpc_dtablesize () +-{ +- static int size = 0; +- struct rlimit rlb; +- +- +- if (size == 0) +- if (getrlimit (RLIMIT_NOFILE, &rlb) >= 0) +- size = rlb.rlim_cur; +- +- return size; +-} +-#endif + + static char * + yppush_err_string (enum yppush_status status) +@@ -164,7 +133,7 @@ + bool_t + yppushproc_xfrresp_1_svc (yppushresp_xfr *req, void *resp, struct svc_req *rqstp) + { +- struct sockaddr_in *sin; ++ const struct sockaddr_in *sin; + char *h; + struct hostent *hp; + +diff -ur src-2.8.92/ypserv/server.c src-2.8.92-local/ypserv/server.c +--- src-2.8.92/ypserv/server.c 2003-06-05 14:21:12.000000000 +0200 ++++ src-2.8.92-local/ypserv/server.c 2003-06-10 20:05:02.000000000 +0200 +@@ -23,13 +23,16 @@ + #define _GNU_SOURCE + + #include ++#include + #include + #include + #include +-#include + #include ++#ifdef HAVE_ALLOCA_H + #include ++#endif /* HAVE_ALLOCA_H */ + #include ++#include + #include + #include + #include +@@ -50,7 +53,7 @@ + { + if (debug_flag) + { +- struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); ++ const struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); + log_msg ("ypproc_null() [From: %s:%d]", + inet_ntoa (rqhost->sin_addr), + ntohs (rqhost->sin_port)); +@@ -69,7 +72,7 @@ + { + if (debug_flag) + { +- struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); ++ const struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); + log_msg ("ypproc_domain(\"%s\") [From: %s:%d]", + *argp, inet_ntoa (rqhost->sin_addr), + ntohs (rqhost->sin_port)); +@@ -104,7 +107,7 @@ + { + if (debug_flag) + { +- struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); ++ const struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); + log_msg ("ypproc_domain_nonack(\"%s\") [From: %s:%d]", + *argp, inet_ntoa (rqhost->sin_addr), + ntohs (rqhost->sin_port)); +@@ -144,7 +147,7 @@ + + if (debug_flag) + { +- struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); ++ const struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); + + log_msg ("ypproc_match(): [From: %s:%d]", + inet_ntoa (rqhost->sin_addr), ntohs (rqhost->sin_port)); +@@ -232,7 +235,7 @@ + + if (debug_flag) + { +- struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); ++ const struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); + log_msg ("ypproc_first(): [From: %s:%d]", + inet_ntoa (rqhost->sin_addr), ntohs (rqhost->sin_port)); + +@@ -327,7 +330,7 @@ + + if (debug_flag) + { +- struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); ++ const struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); + + log_msg ("ypproc_next(): [From: %s:%d]", + inet_ntoa (rqhost->sin_addr), ntohs (rqhost->sin_port)); +@@ -424,7 +427,7 @@ + struct svc_req *rqstp) + { + DB_FILE dbp; +- struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); ++ const struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); + int valid; + + if (debug_flag) +@@ -628,7 +631,7 @@ + { + if (debug_flag) + { +- struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); ++ const struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); + log_msg ("ypproc_clear_2_svc() [From: %s:%d]", + inet_ntoa (rqhost->sin_addr), ntohs (rqhost->sin_port)); + } +@@ -730,7 +733,7 @@ + + if (debug_flag) + { +- struct sockaddr_in *rqhost; ++ const struct sockaddr_in *rqhost; + + rqhost = svc_getcaller (rqstp->rq_xprt); + log_msg ("ypproc_all_2_svc(): [From: %s:%d]", +@@ -901,7 +904,7 @@ + + if (debug_flag) + { +- struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); ++ const struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); + log_msg ("ypproc_master_2_svc(): [From: %s:%d]", + inet_ntoa (rqhost->sin_addr), ntohs (rqhost->sin_port)); + +@@ -1008,7 +1011,7 @@ + + if (debug_flag) + { +- struct sockaddr_in *rqhost; ++ const struct sockaddr_in *rqhost; + + rqhost = svc_getcaller (rqstp->rq_xprt); + +@@ -1132,7 +1135,7 @@ + + if (debug_flag) + { +- struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); ++ const struct sockaddr_in *rqhost = svc_getcaller (rqstp->rq_xprt); + + log_msg ("ypproc_maplist_2_svc(): [From: %s:%d]", + inet_ntoa (rqhost->sin_addr), ntohs (rqhost->sin_port)); +diff -ur src-2.8.92/ypserv/ypserv.c src-2.8.92-local/ypserv/ypserv.c +--- src-2.8.92/ypserv/ypserv.c 2003-06-05 13:42:13.000000000 +0200 ++++ src-2.8.92-local/ypserv/ypserv.c 2003-06-10 20:05:16.000000000 +0200 +@@ -32,7 +32,6 @@ + #if defined(HAVE_GETOPT_H) + #include + #endif +-#include + #include + #include + #include +diff -ur src-2.8.92/ypxfr/ypxfr.c src-2.8.92-local/ypxfr/ypxfr.c +--- src-2.8.92/ypxfr/ypxfr.c 2003-06-05 15:37:26.000000000 +0200 ++++ src-2.8.92-local/ypxfr/ypxfr.c 2003-06-10 20:05:31.000000000 +0200 +@@ -34,8 +34,12 @@ + #include + #include + #include ++#ifdef HAVE_ALLOCA_H + #include ++#endif /* HAVE_ALLOCA_H */ ++#include + #include ++#include + #include "log_msg.h" + #include "yp.h" + #include "ypxfr.h" +@@ -351,7 +355,7 @@ + struct sockaddr_in sockaddr, sockaddr_udp; + struct ypresp_order resp_order; + struct ypreq_nokey req_nokey; +- uint32_t masterOrderNum; ++ time_t masterOrderNum; + struct hostent *h; + int sock, result; + +@@ -451,7 +455,7 @@ + /* If we doesn't force the map, look, if the new map is really newer */ + if (!force) + { +- uint32_t localOrderNum = 0; ++ time_t localOrderNum = 0; + datum inKey, inVal; + + #if defined(HAVE_LIBGDBM) +@@ -689,7 +693,7 @@ + struct in_addr remote_addr; + unsigned int transid = 0; + unsigned short int remote_port = 0; +- uint32_t program_number = 0; ++ unsigned long program_number = 0; + int force = 0; + int noclear = 0; + +diff -ur src-2.8.92/ypxfr/ypxfr_xdr.c src-2.8.92-local/ypxfr/ypxfr_xdr.c +--- src-2.8.92/ypxfr/ypxfr_xdr.c 2003-06-05 16:23:02.000000000 +0200 ++++ src-2.8.92-local/ypxfr/ypxfr_xdr.c 2003-06-10 18:33:16.000000000 +0200 +@@ -39,32 +39,6 @@ + + + bool_t +-xdr_domainname (XDR *xdrs, domainname *objp) +-{ +- if (!xdr_string (xdrs, objp, YPMAXDOMAIN)) +- return (FALSE); +- +- return (TRUE); +-} +- +-bool_t +-xdr_mapname (XDR *xdrs, mapname *objp) +-{ +- if (!xdr_string (xdrs, objp, YPMAXMAP)) +- return FALSE; +- +- return TRUE; +-} +- +-bool_t +-xdr_peername (XDR *xdrs, peername *objp) +-{ +- if (!xdr_string (xdrs, objp, YPMAXPEER)) +- return (FALSE); +- return (TRUE); +-} +- +-bool_t + xdr_keydat (XDR *xdrs, keydat *objp) + { + if (!xdr_bytes (xdrs, (char **) &objp->keydat_val, +@@ -108,16 +82,6 @@ + } + + bool_t +-xdr_ypresp_master (XDR *xdrs, ypresp_master *objp) +-{ +- if (!xdr_ypstat (xdrs, &objp->stat)) +- return FALSE; +- if (!xdr_peername (xdrs, &objp->peer)) +- return FALSE; +- return TRUE; +-} +- +-bool_t + xdr_ypresp_order (XDR *xdrs, ypresp_order *objp) + { + if (!xdr_ypstat (xdrs, &objp->stat)) +@@ -128,16 +92,6 @@ + } + + bool_t +-xdr_ypbind_binding (XDR *xdrs, ypbind_binding *objp) +-{ +- if (!xdr_opaque (xdrs, objp->ypbind_binding_addr, 4)) +- return FALSE; +- if (!xdr_opaque (xdrs, objp->ypbind_binding_port, 2)) +- return FALSE; +- return TRUE; +-} +- +-bool_t + xdr_ypbind_setdom (XDR *xdrs, ypbind_setdom *objp) + { + if (!xdr_domainname (xdrs, &objp->ypsetdom_domain)) +@@ -168,46 +122,6 @@ + } + + bool_t +-xdr_ypreq_nokey (XDR *xdrs, ypreq_nokey *objp) +-{ +- if (!xdr_domainname (xdrs, &objp->domain)) +- return FALSE; +- +- if (!xdr_mapname (xdrs, &objp->map)) +- return FALSE; +- +- return TRUE; +-} +- +-bool_t +-xdr_ypstat (XDR *xdrs, ypstat *objp) +-{ +- if (!xdr_enum (xdrs, (enum_t *) objp)) +- return FALSE; +- +- return TRUE; +-} +- +-bool_t +-xdr_ypxfrstat (XDR *xdrs, ypxfrstat *objp) +-{ +- if (!xdr_enum (xdrs, (enum_t *) objp)) +- return FALSE; +- +- return TRUE; +-} +- +-bool_t +-xdr_ypresp_xfr (XDR * xdrs, ypresp_xfr * objp) +-{ +- if (!xdr_u_int (xdrs, &objp->transid)) +- return FALSE; +- if (!xdr_ypxfrstat (xdrs, &objp->xfrstat)) +- return FALSE; +- return TRUE; +-} +- +-bool_t + ypxfr_xdr_ypresp_all (XDR *xdrs, ypresp_all *objp) + { + int CallAgain = 0;