From 68f2e3f1ff2ab48bbf8e48a801a5ee05d1c19f12 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 13 Feb 2014 07:42:37 +0000 Subject: [PATCH] merged mingw fix from RC_0_16 --- ChangeLog | 1 + include/libtorrent/config.hpp | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index be7439b86..c6d9256e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -43,6 +43,7 @@ 0.16.15 release + * fix mingw time_t 64 bit issue * fix use of SetFileValidData on windows * fix crash when using full allocation storage mode * improve error_code and error_category support in python bindings diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp index 3568747ef..8f82824fa 100644 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -250,8 +250,8 @@ POSSIBILITY OF SUCH DAMAGE. #define TORRENT_MINGW #define TORRENT_WINDOWS #ifndef TORRENT_USE_ICONV -#define TORRENT_USE_ICONV 0 -#define TORRENT_USE_LOCALE 1 +# define TORRENT_USE_ICONV 0 +# define TORRENT_USE_LOCALE 1 #endif #define TORRENT_USE_RLIMIT 0 #define TORRENT_USE_NETLINK 0 @@ -259,7 +259,16 @@ POSSIBILITY OF SUCH DAMAGE. #define TORRENT_HAS_SALEN 0 #define TORRENT_USE_GETIPFORWARDTABLE 1 #ifndef TORRENT_USE_UNC_PATHS -#define TORRENT_USE_UNC_PATHS 1 +# define TORRENT_USE_UNC_PATHS 1 +#endif + +// this is necessary to enable 64-bit +// time_t, specifically used for the stat +// struct. Without this, modification times +// returned by stat may be incorrect and +// consistently fail resume data +#ifndef __MINGW_USE_VC2005_COMPAT +# define __MINGW_USE_VC2005_COMPAT #endif // ==== WINDOWS ===