/* * rename.c - rename a file */ /* $Header$ */ #include 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; }