aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hoffmann <stefan991@gmail.com>2014-03-16 17:45:25 +0100
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-03 10:30:03 -0300
commit5a2c9e123e4f42a037dbd652c6c42cae943a5654 (patch)
treef8fb3908300aa9ed5154d0273f4b69351e959a2c
parentf762a9e195cdd1db3d57561a5e82a1ea6799d8ba (diff)
downloadrneovim-5a2c9e123e4f42a037dbd652c6c42cae943a5654.tar.gz
rneovim-5a2c9e123e4f42a037dbd652c6c42cae943a5654.tar.bz2
rneovim-5a2c9e123e4f42a037dbd652c6c42cae943a5654.zip
remove mch_access macro as it is only used in fs.c
-rw-r--r--src/macros.h1
-rw-r--r--src/os/fs.c4
-rw-r--r--src/os_unix_defs.h6
-rw-r--r--src/vim.h7
4 files changed, 2 insertions, 16 deletions
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 <stdlib.h>
-
-
-/* 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 <unistd.h>
#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)