diff options
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 32 |
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> |