From: Michael Meffie Date: Thu, 5 Nov 2015 21:29:05 +0000 (-0500) Subject: roken: do not include the rk_rename() implementation on unix X-Git-Tag: openafs-stable-1_8_0pre1~108 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=8bf89fdbc251822b6a3149088f5634bb40e5c225 roken: do not include the rk_rename() implementation on unix libroken provides roken/rename.c for platforms where the native rename() implementation does not replace the target if it already exists. As designed, rk_rename() should be used instead of rename() everywhere and rk_rename() is #defined to be rename() on platforms where this fix is not necessary. Do not include the rk_rename() implementation on platforms which do not need the rk_rename since it is not used on those platforms. Note: This fix also avoids a recursive rename(). As currently implemented, the rk_rename() function is redefined to rename() within the roken/rename.c module when RENAME_DOES_NOT_UNLINK is not defined. This can mask the standard library rename() and leads to a recursive call to rename(). Change-Id: I47a1fcd21939b161aaa7df7ffab26dc84e7b75ed Reviewed-on: https://gerrit.openafs.org/12091 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Benjamin Kaduk --- diff --git a/src/roken/Makefile.in b/src/roken/Makefile.in index 18d97dc..873746b 100644 --- a/src/roken/Makefile.in +++ b/src/roken/Makefile.in @@ -13,7 +13,7 @@ LT_age = 0 # need to replace/provide. The values contained therein include a prefix # ${LIBOBJDIR}, which is not set, so they will be sought in this directory. LT_objs = $(ROKEN_LTLIBOBJS) base64.lo cloexec.lo ct.lo hex.lo issuid.lo \ - mkdir.lo net_read.lo net_write.lo rename.lo socket.lo snprintf.lo \ + mkdir.lo net_read.lo net_write.lo socket.lo snprintf.lo \ warnerr.lo HEADERS = ${TOP_INCDIR}/base64.h \ @@ -131,9 +131,6 @@ net_read.lo: ${UPSTREAM}/net_read.c ${HEADERS} net_write.lo: ${UPSTREAM}/net_write.c ${HEADERS} $(LT_CCRULE) $(UPSTREAM)/net_write.c -rename.lo: ${UPSTREAM}/rename.c ${HEADERS} - $(LT_CCRULE) $(UPSTREAM)/rename.c - setenv.lo: ${UPSTREAM}/setenv.c ${HEADERS} $(LT_CCRULE) $(UPSTREAM)/setenv.c