mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 10:56:31 +00:00
vim-patch:7.4.1975
Problem: On MS-Windows large files (> 2Gbyte) cause problems.
Solution: Use "off_T" instead of "off_t". Use "stat_T" instead of "struct
stat". Use 64 bit system functions if available. (Ken Takata)
8767f52fbf
Only the off_T changes are relevant, since all the "struct stat" usage
is abstracted by libuv.
This commit is contained in:
@@ -763,7 +763,7 @@ void ml_recover(void)
|
||||
int idx;
|
||||
int top;
|
||||
int txt_start;
|
||||
off_t size;
|
||||
off_T size;
|
||||
int called_from_main;
|
||||
int serious_error = TRUE;
|
||||
long mtime;
|
||||
@@ -914,7 +914,7 @@ void ml_recover(void)
|
||||
msg_end();
|
||||
goto theend;
|
||||
}
|
||||
if ((size = lseek(mfp->mf_fd, (off_t)0L, SEEK_END)) <= 0)
|
||||
if ((size = vim_lseek(mfp->mf_fd, (off_T)0L, SEEK_END)) <= 0)
|
||||
mfp->mf_blocknr_max = 0; /* no file or empty file */
|
||||
else
|
||||
mfp->mf_blocknr_max = size / mfp->mf_page_size;
|
||||
|
Reference in New Issue
Block a user