ack/lang/cem/libcc.ansi/stdio/rename.c
1994-06-24 14:02:31 +00:00

18 lines
263 B
C

/*
* rename.c - rename a file
*/
/* $Id$ */
#if !defined(_POSIX_SOURCE)
#include <stdio.h>
int _link(const char *name1, const char *name2);
int
rename(const char *old, const char *new) {
if (!_link(old, new))
return remove(old);
else return -1;
}
#endif