summaryrefslogtreecommitdiff
path: root/src/vim.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2008-07-24 18:51:11 +0000
committerBram Moolenaar <Bram@vim.org>2008-07-24 18:51:11 +0000
commite6a91fd99467f5259d675047760088efcbaf050e (patch)
tree8069170910a43a284f0b472553994a7edf89a075 /src/vim.h
parent7693ec6e8a32787136081a66e0c6e4a620369173 (diff)
downloadvim-git-e6a91fd99467f5259d675047760088efcbaf050e.tar.gz
updated for version 7.2b-019v7.2b.019
Diffstat (limited to 'src/vim.h')
-rw-r--r--src/vim.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/vim.h b/src/vim.h
index 111723f47..87a80b82a 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -352,8 +352,8 @@ typedef unsigned char char_u;
typedef unsigned short short_u;
typedef unsigned int int_u;
/* Make sure long_u is big enough to hold a pointer.
- * On Win64 longs are 32 bit and pointers 64 bit.
- * For printf() and scanf() we need to take care of long_u specifically. */
+ * On Win64, longs are 32 bits and pointers are 64 bits.
+ * For printf() and scanf(), we need to take care of long_u specifically. */
#ifdef _WIN64
typedef unsigned __int64 long_u;
typedef __int64 long_i;
@@ -361,8 +361,16 @@ typedef __int64 long_i;
# define SCANF_DECIMAL_LONG_U "%Iu"
# define PRINTF_HEX_LONG_U "0x%Ix"
#else
-typedef unsigned long long_u;
-typedef long long_i;
+ /* Microsoft-specific. The __w64 keyword should be specified on any typedefs
+ * that change size between 32-bit and 64-bit platforms. For any such type,
+ * __w64 should appear only on the 32-bit definition of the typedef.
+ * Define __w64 as an empty token for everything but MSVC 7.x or later.
+ */
+# if !defined(_MSC_VER) || (_MSC_VER < 1300)
+# define __w64
+# endif
+typedef unsigned long __w64 long_u;
+typedef long __w64 long_i;
# define SCANF_HEX_LONG_U "%lx"
# define SCANF_DECIMAL_LONG_U "%lu"
# define PRINTF_HEX_LONG_U "0x%lx"