From: Benjamin Kaduk Date: Wed, 15 Oct 2014 23:49:12 +0000 (-0400) Subject: (Partially) unify XDR for libuafs and libafs X-Git-Tag: upstream/1.8.0_pre1^2~496 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=c7f1db24d5d0e1fdc956896c7b9804657e4d5b28;p=packages%2Fo%2Fopenafs.git (Partially) unify XDR for libuafs and libafs The libuafs build was getting xdr_vector() from both afsaux.c and xdr_update.c, but because of the rules for creating static libraries, this did not cause build errors. The libafs build is sensitive to duplicate symbols, and was only getting xdr_vector() from afsaux.c; libafs was not building xdr_update.c or xdr_refernce.c (that is not a typo). Remove duplicate xdr_vector() from afsaux.c, and build xdr_update.c and xdr_refernce.c into libafs. Remove the unused #define of AUTH_DES. Change-Id: I58ea595d424801697acb07406664ede33aeaf026 Reviewed-on: http://gerrit.openafs.org/11545 Tested-by: BuildBot Reviewed-by: D Brashear --- diff --git a/src/fsint/afsaux.c b/src/fsint/afsaux.c index 2c3cd4d48..604c9b6aa 100644 --- a/src/fsint/afsaux.c +++ b/src/fsint/afsaux.c @@ -58,9 +58,6 @@ static afs_int32 bslosers = 0; only for the kernel system. Later, when R is expunged, we'll remove the ifdef */ #ifdef KERNEL #ifndef AFS_USR_DARWIN_ENV -#ifdef AFS_AIXNFS11 -#define AUTH_DES 1 -#endif /* * Wrapper for xdr_string that can be called directly from * routines like clnt_call; from user-mode xdr package. @@ -78,32 +75,6 @@ xdr_wrapstring(XDR * xdrs, char **cpp) #endif /* AFS_HPUX110_ENV */ #endif /* AFS_SUN5_ENV */ -/* - * xdr_vector(): - * - * XDR a fixed length array. Unlike variable-length arrays, - * the storage of fixed length arrays is static and unfreeable. - * > basep: base of the array - * > size: size of the array - * > elemsize: size of each element - * > xdr_elem: routine to XDR each element - */ -bool_t -xdr_vector(XDR * xdrs, char *basep, u_int nelem, - u_int elemsize, xdrproc_t xdr_elem) -{ - u_int i; - char *elptr; - - elptr = basep; - for (i = 0; i < nelem; i++) { - if (!(*xdr_elem) (xdrs, elptr, (u_int) (~0))) { - return (FALSE); - } - elptr += elemsize; - } - return (TRUE); -} #endif #endif /* KERNEL */ diff --git a/src/libafs/Makefile.common.in b/src/libafs/Makefile.common.in index 325863f10..18222940c 100644 --- a/src/libafs/Makefile.common.in +++ b/src/libafs/Makefile.common.in @@ -131,6 +131,8 @@ AFSAOBJS = \ afs_volume.o \ afs_warn.o \ afsaux.o \ + xdr_update.o \ + xdr_refernce.o \ Kvice.xdr.o \ xdr_arrayn.o \ xdr_array.o \ @@ -241,6 +243,8 @@ AFSPAGOBJS = \ afs_tokens.o \ afs_warn.o \ afsaux.o \ + xdr_update.o \ + xdr_refernce.o \ xdr_arrayn.o \ xdr_array.o \ xdr_int32.o \ @@ -498,6 +502,10 @@ Krmtsys.cs.o: $(TOP_OBJ_SYS)/Krmtsys.cs.c $(CRULE_NOOPT) $(TOP_OBJ_SYS)/Krmtsys.cs.c afsaux.o: $(TOP_SRC_FSINT)/afsaux.c $(CRULE_NOOPT) $(TOP_SRC_FSINT)/afsaux.c +xdr_update.o: $(TOP_SRC_RX)/xdr_update.c + $(CRULE_NOOPT) $(TOP_SRC_RX)/xdr_update.c +xdr_refernce.o: $(TOP_SRC_RX)/xdr_refernce.c + $(CRULE_NOOPT) $(TOP_SRC_RX)/xdr_refernce.c xdr_arrayn.o: $(TOP_SRC_RX)/xdr_arrayn.c $(CRULE_NOOPT) $(TOP_SRC_RX)/xdr_arrayn.c xdr_array.o: $(TOP_SRC_RX)/xdr_array.c