Back to index

cell-binutils  2.17cvs20070401
Functions
rename.c File Reference
#include "ansidecl.h"
#include <errno.h>

Go to the source code of this file.

Functions

int rename (const char *zfrom, const char *zto)

Function Documentation

int rename ( const char *  zfrom,
const char *  zto 
)

Definition at line 25 of file rename.c.

{
  if (link (zfrom, zto) < 0)
    {
      if (errno != EEXIST)
       return -1;
      if (unlink (zto) < 0
         || link (zfrom, zto) < 0)
       return -1;
    }
  return unlink (zfrom);
}

Here is the caller graph for this function: