aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/globals.h
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-06-07 14:05:46 +0000
committerGitHub <noreply@github.com>2017-06-07 14:05:46 +0000
commitd3d0c9a7b11cad3f277f732dee6c782d1d911b48 (patch)
tree9440bfffd38ff3cdf98127c95764db1f84adadb7 /src/nvim/globals.h
parentcb0abce5be1dd6212425589b61826332834dc977 (diff)
parentca1ba1085a2be1f8963b48c9ccf3936359959924 (diff)
downloadrneovim-d3d0c9a7b11cad3f277f732dee6c782d1d911b48.tar.gz
rneovim-d3d0c9a7b11cad3f277f732dee6c782d1d911b48.tar.bz2
rneovim-d3d0c9a7b11cad3f277f732dee6c782d1d911b48.zip
Merge pull request #5621 from jamessan/vim-7.4.1975
vim-patch:7.4.1975,7.4.1976,7.4.1977,7.4.1978,7.4.1979,7.4.1986,7.4.2029,7.4.2224,8.0.0219,8.0.0614
Diffstat (limited to 'src/nvim/globals.h')
-rw-r--r--src/nvim/globals.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index a3657f2122..785c9fade9 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -97,6 +97,34 @@ typedef enum {
EXTERN long Rows INIT(= DFLT_ROWS); // nr of rows in the screen
EXTERN long Columns INIT(= DFLT_COLS); // nr of columns in the screen
+// We use 64-bit file functions here, if available. E.g. ftello() returns
+// off_t instead of long, which helps if long is 32 bit and off_t is 64 bit.
+// We assume that when fseeko() is available then ftello() is too.
+// Note that Windows has different function names.
+#if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__)
+typedef __int64 off_T;
+# ifdef __MINGW32__
+# define vim_lseek lseek64
+# define vim_fseek fseeko64
+# define vim_ftell ftello64
+# else
+# define vim_lseek _lseeki64
+# define vim_fseek _fseeki64
+# define vim_ftell _ftelli64
+# endif
+#else
+typedef off_t off_T;
+# ifdef HAVE_FSEEKO
+# define vim_lseek lseek
+# define vim_ftell ftello
+# define vim_fseek fseeko
+# else
+# define vim_lseek lseek
+# define vim_ftell ftell
+# define vim_fseek(a, b, c) fseek(a, (long)b, c)
+# endif
+#endif
+
/*
* The characters and attributes cached for the screen.
*/
@@ -987,7 +1015,7 @@ EXTERN int did_cursorhold INIT(= false); // set when CursorHold t'gerd
// for CursorMoved event
EXTERN pos_T last_cursormoved INIT(= INIT_POS_T(0, 0, 0));
-EXTERN int last_changedtick INIT(= 0); // for TextChanged event
+EXTERN varnumber_T last_changedtick INIT(= 0); // for TextChanged event
EXTERN buf_T *last_changedtick_buf INIT(= NULL);
EXTERN int postponed_split INIT(= 0); /* for CTRL-W CTRL-] command */