mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
remove mch_access macro as it is only used in fs.c
This commit is contained in:
parent
f762a9e195
commit
5a2c9e123e
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user