Imported from ../bash-2.03.tar.gz.

This commit is contained in:
Jari Aalto 1999-02-19 17:11:39 +00:00
commit b72432fdcc
191 changed files with 10113 additions and 3553 deletions

27
lib/sh/rename.c Normal file
View file

@ -0,0 +1,27 @@
/*
* rename - rename a file
*/
#include <config.h>
#if !defined (HAVE_RENAME)
#include <bashtypes.h>
#if defined (HAVE_UNISTD_H)
# include <unistd.h>
#endif
#include <stdc.h>
int
rename (from, to)
const char *from, *to;
{
unlink (to);
if (link (from, to) < 0)
return (-1);
unlink (from);
return (0);
}
#endif /* !HAVE_RENAME */