forked from aniani/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)
This commit is contained in:
@@ -256,7 +256,7 @@ getConnInfo(char *file, char **host, char **port, char **auth)
|
||||
char_u *lp;
|
||||
char_u *nlp;
|
||||
#ifdef UNIX
|
||||
struct stat st;
|
||||
stat_T st;
|
||||
|
||||
/*
|
||||
* For Unix only accept the file when it's not accessible by others.
|
||||
@@ -561,7 +561,7 @@ static void addsigntype(nbbuf_T *, int localsigntype, char_u *typeName,
|
||||
char_u *tooltip, char_u *glyphfile,
|
||||
char_u *fg, char_u *bg);
|
||||
static void print_read_msg(nbbuf_T *buf);
|
||||
static void print_save_msg(nbbuf_T *buf, off_t nchars);
|
||||
static void print_save_msg(nbbuf_T *buf, off_T nchars);
|
||||
|
||||
static int curPCtype = -1;
|
||||
|
||||
@@ -1741,7 +1741,7 @@ nb_do_cmd(
|
||||
buf->bufp->b_changed = TRUE;
|
||||
else
|
||||
{
|
||||
struct stat st;
|
||||
stat_T st;
|
||||
|
||||
/* Assume NetBeans stored the file. Reset the timestamp to
|
||||
* avoid "file changed" warnings. */
|
||||
@@ -3470,7 +3470,7 @@ pos2off(buf_T *buf, pos_T *pos)
|
||||
print_read_msg(nbbuf_T *buf)
|
||||
{
|
||||
int lnum = buf->bufp->b_ml.ml_line_count;
|
||||
off_t nchars = buf->bufp->b_orig_size;
|
||||
off_T nchars = buf->bufp->b_orig_size;
|
||||
char_u c;
|
||||
|
||||
msg_add_fname(buf->bufp, buf->bufp->b_ffname);
|
||||
@@ -3504,7 +3504,7 @@ print_read_msg(nbbuf_T *buf)
|
||||
* writing a file.
|
||||
*/
|
||||
static void
|
||||
print_save_msg(nbbuf_T *buf, off_t nchars)
|
||||
print_save_msg(nbbuf_T *buf, off_T nchars)
|
||||
{
|
||||
char_u c;
|
||||
char_u *p;
|
||||
|
Reference in New Issue
Block a user