Mercurial > vim
comparison src/vim.h @ 9347:25c562442f8c v7.4.1955
commit https://github.com/vim/vim/commit/f4fba6dcd508cb369ffa6916d9cb3fcf3d7ed548
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 26 16:44:24 2016 +0200
patch 7.4.1955
Problem: Using 32-bit Perl with 64-bit time_t causes memory corruption.
(Christian Brabandt)
Solution: Use time_T instead of time_t for global variables. (Ken Takata)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 26 Jun 2016 16:45:05 +0200 |
parents | 78712a2f687a |
children | f094d4085014 |
comparison
equal
deleted
inserted
replaced
9346:14bbb4a8b05d | 9347:25c562442f8c |
---|---|
1759 # endif | 1759 # endif |
1760 #else | 1760 #else |
1761 typedef int proftime_T; /* dummy for function prototypes */ | 1761 typedef int proftime_T; /* dummy for function prototypes */ |
1762 #endif | 1762 #endif |
1763 | 1763 |
1764 /* | |
1765 * When compiling with 32 bit Perl time_t is 32 bits in the Perl code but 64 | |
1766 * bits elsewhere. That causes memory corruption. Define time_T and use it | |
1767 * for global variables to avoid that. | |
1768 */ | |
1769 #ifdef WIN3264 | |
1770 typedef __time64_t time_T; | |
1771 #else | |
1772 typedef time_t time_T; | |
1773 #endif | |
1774 | |
1764 #ifdef _WIN64 | 1775 #ifdef _WIN64 |
1765 typedef __int64 sock_T; | 1776 typedef __int64 sock_T; |
1766 #else | 1777 #else |
1767 typedef int sock_T; | 1778 typedef int sock_T; |
1768 #endif | 1779 #endif |