(Partially) unify XDR for libuafs and libafs
authorBenjamin Kaduk <kaduk@mit.edu>
Wed, 15 Oct 2014 23:49:12 +0000 (19:49 -0400)
committerD Brashear <shadow@your-file-system.com>
Wed, 5 Nov 2014 13:35:47 +0000 (08:35 -0500)
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 <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>

src/fsint/afsaux.c
src/libafs/Makefile.common.in

index 2c3cd4d..604c9b6 100644 (file)
@@ -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 */
 
index 325863f..1822294 100644 (file)
@@ -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