aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authorThomas Wienecke <wienecke.t@gmail.com>2014-03-14 21:54:08 +0100
committerThiago de Arruda <tpadilha84@gmail.com>2014-03-15 11:50:22 -0300
commitc83e8b4dc74ba010e0279b67ef8ffa14103d89f6 (patch)
tree9969fbde12651043e0986c838c3f21ba924e579d /src/os_unix.c
parent1f578ec5a1baa75b557af2261518d9fb8aee488b (diff)
downloadrneovim-c83e8b4dc74ba010e0279b67ef8ffa14103d89f6.tar.gz
rneovim-c83e8b4dc74ba010e0279b67ef8ffa14103d89f6.tar.bz2
rneovim-c83e8b4dc74ba010e0279b67ef8ffa14103d89f6.zip
Move and refactor mch_[gs]etperm to os/fs module.
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 9ed034f4c1..c7e083a2d5 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -1168,38 +1168,6 @@ int len; /* buffer size, only used when name gets longer */
}
#endif
-/*
- * Get file permissions for 'name'.
- * Returns -1 when it doesn't exist.
- */
-long mch_getperm(char_u *name)
-{
- struct stat statb;
-
- /* Keep the #ifdef outside of stat(), it may be a macro. */
- if (stat((char *)name, &statb))
- return -1;
-#ifdef __INTERIX
- /* The top bit makes the value negative, which means the file doesn't
- * exist. Remove the bit, we don't use it. */
- return statb.st_mode & ~S_ADDACE;
-#else
- return statb.st_mode;
-#endif
-}
-
-/*
- * set file permission for 'name' to 'perm'
- *
- * return FAIL for failure, OK otherwise
- */
-int mch_setperm(char_u *name, long perm)
-{
- return chmod((char *)
- name,
- (mode_t)perm) == 0 ? OK : FAIL;
-}
-
#if defined(HAVE_ACL) || defined(PROTO)
# ifdef HAVE_SYS_ACL_H
# include <sys/acl.h>