aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/macros.h14
-rw-r--r--src/misc2.c18
2 files changed, 0 insertions, 32 deletions
diff --git a/src/macros.h b/src/macros.h
index f016da484a..9bfe3d054b 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -98,20 +98,6 @@
#define vim_isbreak(c) (breakat_flags[(char_u)(c)])
# define mch_fopen(n, p) fopen((n), (p))
-# ifdef STAT_IGNORES_SLASH
-/* On Solaris stat() accepts "file/" as if it was "file". Return -1 if
- * the name ends in "/" and it's not a directory. */
-# define mch_stat(n, p) (illegal_slash(n) ? -1 : stat((n), (p)))
-# else
-# define mch_stat(n, p) stat((n), (p))
-# endif
-
-#ifdef HAVE_LSTAT
-# define mch_lstat(n, p) lstat((n), (p))
-#else
-# define mch_lstat(n, p) mch_stat((n), (p))
-#endif
-
# define mch_open(n, m, p) open((n), (m), (p))
/* mch_open_rw(): invoke mch_open() with third argument for user R/W. */
diff --git a/src/misc2.c b/src/misc2.c
index c424dd8709..8d556db347 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -826,24 +826,6 @@ int vim_chdirfile(char_u *fname)
}
#endif
-#if defined(STAT_IGNORES_SLASH) || defined(PROTO)
-/*
- * Check if "name" ends in a slash and is not a directory.
- * Used for systems where stat() ignores a trailing slash on a file name.
- * The Vim code assumes a trailing slash is only ignored for a directory.
- */
-int illegal_slash(char *name)
-{
- if (name[0] == NUL)
- return FALSE; /* no file name is not illegal */
- if (name[strlen(name) - 1] != '/')
- return FALSE; /* no trailing slash */
- if (os_isdir((char_u *)name))
- return FALSE; /* trailing slash for a directory */
- return TRUE;
-}
-#endif
-
/*
* Change directory to "new_dir". If FEAT_SEARCHPATH is defined, search
* 'cdpath' for relative directory names, otherwise just os_chdir().