summaryrefslogtreecommitdiff
path: root/src/vim.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-05-31 21:59:46 +0200
committerBram Moolenaar <Bram@vim.org>2010-05-31 21:59:46 +0200
commit914703bee2422e2797576e06145380389096ec09 (patch)
treec0d46af3b55b2ddcc5aa9453b0c9b575dd56070a /src/vim.h
parent20a825ae0f90099249924740a5113e6ed413bc66 (diff)
downloadvim-914703bee2422e2797576e06145380389096ec09.zip
Correct use of long instead of off_t for file size. (James Vega)
Diffstat (limited to 'src/vim.h')
-rw-r--r--src/vim.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vim.h b/src/vim.h
index 8ae68562c..a5d736438 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -411,6 +411,16 @@ typedef long __w64 long_i;
#define PRINTF_DECIMAL_LONG_U SCANF_DECIMAL_LONG_U
/*
+ * Only systems which use configure will have SIZEOF_OFF_T and SIZEOF_LONG
+ * defined, which is ok since those are the same systems which can have
+ * varying sizes for off_t. The other systems will continue to use "%ld" to
+ * print off_t since off_t is simply a typedef to long for them.
+ */
+#if defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T > SIZEOF_LONG)
+# define LONG_LONG_OFF_T
+#endif
+
+/*
* The characters and attributes cached for the screen.
*/
typedef char_u schar_T;