File:  [MW Coherent from dump] / coherent / b / lib / libc / XSTDIO / rename.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:36 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

/*
 * libc/stdio/rename.c
 * ANSI-compliant C standard i/o library.
 * ANSI 4.9.4.2.
 * Rename a file.
 * Implementation defined behavior:
 *	rename(old, new) fails and returns -1 if new exists.
 */

#include <stdio.h>

int
rename(old, new) char *old, *new;
{
	return (link(old, new) == -1 || unlink(old) == -1) ? -1 : 0;
}

/* end of libc/stdio/rename.c */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.