aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memline.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-11-16 09:24:10 -0500
committerJames McCoy <jamessan@jamessan.com>2017-06-04 22:12:13 -0400
commit953f26bace041f481e79b67b64401aa07259055c (patch)
treeaf054b1eac1ffaefa9643deca7100ecb74f89138 /src/nvim/memline.c
parent018383096c40aca83a76e1ae2a3ba8c5aac9b9af (diff)
downloadrneovim-953f26bace041f481e79b67b64401aa07259055c.tar.gz
rneovim-953f26bace041f481e79b67b64401aa07259055c.tar.bz2
rneovim-953f26bace041f481e79b67b64401aa07259055c.zip
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) https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe Only the off_T changes are relevant, since all the "struct stat" usage is abstracted by libuv.
Diffstat (limited to 'src/nvim/memline.c')
-rw-r--r--src/nvim/memline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index 40a6761225..b9ab576460 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -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;