mirror of
https://github.com/vim/vim.git
synced 2025-10-01 04:54:07 -04:00
updated for version 7.4.014
Problem: MS-Windows: check for writing to device does not work. Solution: Fix #ifdefs. (Ken Takata)
This commit is contained in:
17
src/fileio.c
17
src/fileio.c
@@ -428,13 +428,13 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIX
|
|
||||||
/*
|
|
||||||
* On Unix it is possible to read a directory, so we have to
|
|
||||||
* check for it before the mch_open().
|
|
||||||
*/
|
|
||||||
if (!read_stdin && !read_buffer)
|
if (!read_stdin && !read_buffer)
|
||||||
{
|
{
|
||||||
|
#ifdef UNIX
|
||||||
|
/*
|
||||||
|
* On Unix it is possible to read a directory, so we have to
|
||||||
|
* check for it before the mch_open().
|
||||||
|
*/
|
||||||
perm = mch_getperm(fname);
|
perm = mch_getperm(fname);
|
||||||
if (perm >= 0 && !S_ISREG(perm) /* not a regular file ... */
|
if (perm >= 0 && !S_ISREG(perm) /* not a regular file ... */
|
||||||
# ifdef S_ISFIFO
|
# ifdef S_ISFIFO
|
||||||
@@ -457,8 +457,8 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
|
|||||||
msg_scroll = msg_save;
|
msg_scroll = msg_save;
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
# if defined(MSDOS) || defined(MSWIN) || defined(OS2)
|
#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
|
||||||
/*
|
/*
|
||||||
* MS-Windows allows opening a device, but we will probably get stuck
|
* MS-Windows allows opening a device, but we will probably get stuck
|
||||||
* trying to read it.
|
* trying to read it.
|
||||||
@@ -470,9 +470,8 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
|
|||||||
msg_scroll = msg_save;
|
msg_scroll = msg_save;
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/* Set default or forced 'fileformat' and 'binary'. */
|
/* Set default or forced 'fileformat' and 'binary'. */
|
||||||
set_file_options(set_options, eap);
|
set_file_options(set_options, eap);
|
||||||
|
@@ -738,6 +738,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
14,
|
||||||
/**/
|
/**/
|
||||||
13,
|
13,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user