Skip to content

Commit c643a48

Browse files
committed
updated for version 7.4.014
Problem: MS-Windows: check for writing to device does not work. Solution: Fix #ifdefs. (Ken Takata)
1 parent 5dcb846 commit c643a48

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/fileio.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -428,13 +428,13 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
428428
}
429429
}
430430

431-
#ifdef UNIX
432-
/*
433-
* On Unix it is possible to read a directory, so we have to
434-
* check for it before the mch_open().
435-
*/
436431
if (!read_stdin && !read_buffer)
437432
{
433+
#ifdef UNIX
434+
/*
435+
* On Unix it is possible to read a directory, so we have to
436+
* check for it before the mch_open().
437+
*/
438438
perm = mch_getperm(fname);
439439
if (perm >= 0 && !S_ISREG(perm) /* not a regular file ... */
440440
# ifdef S_ISFIFO
@@ -457,8 +457,8 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
457457
msg_scroll = msg_save;
458458
return FAIL;
459459
}
460-
461-
# if defined(MSDOS) || defined(MSWIN) || defined(OS2)
460+
#endif
461+
#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
462462
/*
463463
* MS-Windows allows opening a device, but we will probably get stuck
464464
* trying to read it.
@@ -470,9 +470,8 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
470470
msg_scroll = msg_save;
471471
return FAIL;
472472
}
473-
# endif
474-
}
475473
#endif
474+
}
476475

477476
/* Set default or forced 'fileformat' and 'binary'. */
478477
set_file_options(set_options, eap);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
14,
741743
/**/
742744
13,
743745
/**/

0 commit comments

Comments
 (0)