Add roken/rename.c to fix non-standard rename()

roken/rename.c is for platforms where the native rename()
implementation does not replace the target if it already exists.  This
implementation isn't atomic, but should be close enough for most
purposes.

For correct behavior, rk_rename() should be used instead of rename().
rk_rename() is #defined to be rename() on platforms where this fix is
not necessary.
This commit is contained in:
Asanka Herath
2010-08-24 00:34:18 -04:00
committed by Asanka C. Herath
parent 6cc480fc09
commit 4b36b36e0b
4 changed files with 58 additions and 18 deletions

View File

@@ -75,6 +75,7 @@ libroken_la_OBJS = \
$(OBJ)\parse_time.obj \
$(OBJ)\parse_units.obj \
$(OBJ)\realloc.obj \
$(OBJ)\rename.obj \
$(OBJ)\resolve.obj \
$(OBJ)\roken_gethostby.obj \
$(OBJ)\rtbl.obj \