File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -539,9 +539,6 @@ mf_sync(memfile_T *mfp, int flags)
539539{
540540 int status ;
541541 bhdr_T * hp ;
542- #if defined(SYNC_DUP_CLOSE )
543- int fd ;
544- #endif
545542 int got_int_save = got_int ;
546543
547544 if (mfp -> mf_fd < 0 ) /* there is no file, nothing to do */
@@ -624,13 +621,9 @@ mf_sync(memfile_T *mfp, int flags)
624621 status = FAIL ;
625622 }
626623#endif
627- #ifdef SYNC_DUP_CLOSE
628- /*
629- * Win32 is a bit more work: Duplicate the file handle and close it.
630- * This should flush the file to disk.
631- */
632- if ((fd = dup (mfp -> mf_fd )) >= 0 )
633- close (fd );
624+ #ifdef WIN32
625+ if (_commit (mfp -> mf_fd ))
626+ status = FAIL ;
634627#endif
635628#ifdef AMIGA
636629# if defined(__AROS__ ) || defined(__amigaos4__ )
Original file line number Diff line number Diff line change 101101#define HAVE_AVAIL_MEM
102102
103103#ifndef HAVE_CONFIG_H
104- /* #define SYNC_DUP_CLOSE sync() a file with dup() and close() */
105104# define HAVE_STRING_H
106105# define HAVE_STRCSPN
107106# define HAVE_MEMSET
Original file line number Diff line number Diff line change 2626
2727#define BINARY_FILE_IO
2828#define USE_EXE_NAME /* use argv[0] for $VIM */
29- #define SYNC_DUP_CLOSE /* sync() a file with dup() and close() */
3029#define USE_TERM_CONSOLE
3130#ifndef HAVE_STRING_H
3231# define HAVE_STRING_H
Original file line number Diff line number Diff line change @@ -794,6 +794,8 @@ static char *(features[]) =
794794
795795static int included_patches [] =
796796{ /* Add new patch number below this line */
797+ /**/
798+ 423 ,
797799/**/
798800 422 ,
799801/**/
You can’t perform that action at this time.
0 commit comments