From 5a2c9e123e4f42a037dbd652c6c42cae943a5654 Mon Sep 17 00:00:00 2001 From: Stefan Hoffmann Date: Sun, 16 Mar 2014 17:45:25 +0100 Subject: remove mch_access macro as it is only used in fs.c --- src/macros.h | 1 - src/os/fs.c | 4 ++-- src/os_unix_defs.h | 6 ------ src/vim.h | 7 ------- 4 files changed, 2 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/macros.h b/src/macros.h index db68b8a11d..361f5a0421 100644 --- a/src/macros.h +++ b/src/macros.h @@ -120,7 +120,6 @@ * On VMS file names are different and require a translation. * On the Mac open() has only two arguments. */ -# define mch_access(n, p) access((n), (p)) # define mch_fopen(n, p) fopen((n), (p)) # define mch_fstat(n, p) fstat((n), (p)) # ifdef STAT_IGNORES_SLASH diff --git a/src/os/fs.c b/src/os/fs.c index db366769b2..fdf9d0795e 100644 --- a/src/os/fs.c +++ b/src/os/fs.c @@ -281,7 +281,7 @@ int os_file_exists(const char_u *name) // return TRUE if a file appears to be read-only from the file permissions. int os_file_is_readonly(const char *name) { - if (mch_access(name, W_OK) == 0) { + if (access(name, W_OK) == 0) { return FALSE; } else { return TRUE; @@ -292,7 +292,7 @@ int os_file_is_readonly(const char *name) // rights to write into. int os_file_is_writable(const char *name) { - if (mch_access(name, W_OK) == 0) { + if (access(name, W_OK) == 0) { if (os_isdir((char_u *)name)) { return 2; } diff --git a/src/os_unix_defs.h b/src/os_unix_defs.h index 9ce17410b0..f9f53a8d8e 100644 --- a/src/os_unix_defs.h +++ b/src/os_unix_defs.h @@ -18,12 +18,6 @@ # include - - -/* On AIX 4.2 there is a conflicting prototype for ioctl() in stropts.h and - * unistd.h. This hack should fix that (suggested by Jeff George). - * But on AIX 4.3 it's alright (suggested by Jake Hamby). */ - #ifdef HAVE_UNISTD_H # include #endif diff --git a/src/vim.h b/src/vim.h index 0438d49208..4df2207ad6 100644 --- a/src/vim.h +++ b/src/vim.h @@ -1016,13 +1016,6 @@ typedef enum { # define O_NOFOLLOW 0 #endif -#ifndef W_OK -# define W_OK 2 /* for systems that don't have W_OK in unistd.h */ -#endif -#ifndef R_OK -# define R_OK 4 /* for systems that don't have R_OK in unistd.h */ -#endif - /* * defines to avoid typecasts from (char_u *) to (char *) and back * (vim_strchr() and vim_strrchr() are now in alloc.c) -- cgit