From d6d4832ff8dfaa037f67fceea360aaea1ed8578c Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 22 Sep 2004 12:17:41 +0000 Subject: [PATCH] 64-bit integer constants need an "LL" suffix when compiling with g++. Thanks to Carlo Wood for reporting this. --- asio/include/asio/detail/win_time.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/asio/include/asio/detail/win_time.hpp b/asio/include/asio/detail/win_time.hpp index e35f022c..efd7e332 100644 --- a/asio/include/asio/detail/win_time.hpp +++ b/asio/include/asio/detail/win_time.hpp @@ -64,11 +64,13 @@ public: // Get the current time. static win_time now() { - SYSTEMTIME system_time; - ::GetSystemTime(&system_time); FILETIME file_time; - ::SystemTimeToFileTime(&system_time, &file_time); + ::GetSystemTimeAsFileTime(&file_time); +#if defined(__GNUC__) + const LONGLONG FILETIME_to_ctime = 116444736000000000LL; +#else const LONGLONG FILETIME_to_ctime = 116444736000000000; +#endif LONGLONG file_time_64 = file_time.dwHighDateTime; file_time_64 <<= 32; file_time_64 += file_time.dwLowDateTime;