aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroni-link <knil.ino@gmail.com>2014-04-01 12:46:00 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-02 18:52:16 -0300
commita96f2949ccd01482beb3c88c7d183f3b9d7720fc (patch)
treecef9990bf9f114fffb83a051a470558df201d8a0 /src
parent3da084d61288f0776c993e62d6ce360f815b16e0 (diff)
downloadrneovim-a96f2949ccd01482beb3c88c7d183f3b9d7720fc.tar.gz
rneovim-a96f2949ccd01482beb3c88c7d183f3b9d7720fc.tar.bz2
rneovim-a96f2949ccd01482beb3c88c7d183f3b9d7720fc.zip
remove HAVE_RENAME
rename is a C99 standard function.
Diffstat (limited to 'src')
-rw-r--r--src/os_unix.c23
-rw-r--r--src/os_unix_defs.h6
2 files changed, 1 insertions, 28 deletions
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);
diff --git a/src/os_unix_defs.h b/src/os_unix_defs.h
index cb7d888bb1..94ff9ffb68 100644
--- a/src/os_unix_defs.h
+++ b/src/os_unix_defs.h
@@ -253,11 +253,7 @@
# define DFLT_MAXMEMTOT (10*1024) /* use up to 10 Mbyte for Vim */
# endif
-# ifdef HAVE_RENAME
-# define mch_rename(src, dst) rename(src, dst)
-# else
-int mch_rename(const char *src, const char *dest);
-# endif
+#define mch_rename(src, dst) rename(src, dst)
#if !defined(S_ISDIR) && defined(S_IFDIR)
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)