Mercurial > vim
diff src/vim.h @ 1686:c7c53db66b55 v7.2b.019
updated for version 7.2b-019
author | vimboss |
---|---|
date | Thu, 24 Jul 2008 18:51:11 +0000 |
parents | 0b796e045c42 |
children | 5232b9862f23 |
line wrap: on
line diff
--- 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"