From a96f2949ccd01482beb3c88c7d183f3b9d7720fc Mon Sep 17 00:00:00 2001 From: oni-link Date: Tue, 1 Apr 2014 12:46:00 +0200 Subject: remove HAVE_RENAME rename is a C99 standard function. --- src/os_unix.c | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/os_unix.c') diff --git a/src/os_unix.c b/src/os_unix.c index 8da7c4701f..69c913e306 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -2370,29 +2370,6 @@ char_u **file; return FALSE; } -#ifndef HAVE_RENAME -/* - * Scaled-down version of rename(), which is missing in Xenix. - * This version can only move regular files and will fail if the - * destination exists. - */ -int mch_rename(src, dest) -const char *src, *dest; -{ - struct stat st; - - if (stat(dest, &st) >= 0) /* fail if destination exists */ - return -1; - if (link(src, dest) != 0) /* link file to new name */ - return -1; - if (mch_remove(src) == 0) /* delete link to old name */ - return 0; - return -1; -} -#endif /* !HAVE_RENAME */ - - - #if defined(FEAT_LIBCALL) || defined(PROTO) typedef char_u * (*STRPROCSTR)(char_u *); typedef char_u * (*INTPROCSTR)(int); -- cgit