diff src/vim.h @ 2241:60da25e3aab7 vim73

Correct use of long instead of off_t for file size. (James Vega)
author Bram Moolenaar <bram@vim.org>
date Mon, 31 May 2010 21:59:46 +0200
parents 120502692d82
children 1bac28a53fae
line wrap: on
line diff
--- 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;