diff src/fileio.c @ 9911:74e345d2878c v7.4.2229

commit https://github.com/vim/vim/commit/f04507d132fbcb63999167ec006fc6e700b5af4f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 20 15:05:39 2016 +0200 patch 7.4.2229 Problem: Startup test fails on Solaris. Solution: Recognize a character device. (Danek Duvall)
author Christian Brabandt <cb@256bit.org>
date Sat, 20 Aug 2016 15:15:06 +0200
parents e84e45786691
children 4aead6a9b7a9
line wrap: on
line diff
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -27,10 +27,6 @@
 /* Is there any system that doesn't have access()? */
 #define USE_MCH_ACCESS
 
-#if (defined(sun) || defined(__FreeBSD__)) && defined(S_ISCHR)
-# define OPEN_CHR_FILES
-static int is_dev_fd_file(char_u *fname);
-#endif
 #ifdef FEAT_MBYTE
 static char_u *next_fenc(char_u **pp);
 # ifdef FEAT_EVAL
@@ -2718,14 +2714,14 @@ failed:
     return OK;
 }
 
-#ifdef OPEN_CHR_FILES
+#if defined(OPEN_CHR_FILES) || defined(PROTO)
 /*
  * Returns TRUE if the file name argument is of the form "/dev/fd/\d\+",
  * which is the name of files used for process substitution output by
  * some shells on some operating systems, e.g., bash on SunOS.
  * Do not accept "/dev/fd/[012]", opening these may hang Vim.
  */
-    static int
+    int
 is_dev_fd_file(char_u *fname)
 {
     return (STRNCMP(fname, "/dev/fd/", 8) == 0