diff options
Diffstat (limited to 'src/vim.h')
-rw-r--r-- | src/vim.h | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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" |