64-bit integer constants need an "LL" suffix when compiling with g++.
Thanks to Carlo Wood for reporting this.
This commit is contained in:
parent
22ae14b233
commit
d6d4832ff8
@ -64,11 +64,13 @@ public:
|
|||||||
// Get the current time.
|
// Get the current time.
|
||||||
static win_time now()
|
static win_time now()
|
||||||
{
|
{
|
||||||
SYSTEMTIME system_time;
|
|
||||||
::GetSystemTime(&system_time);
|
|
||||||
FILETIME file_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;
|
const LONGLONG FILETIME_to_ctime = 116444736000000000;
|
||||||
|
#endif
|
||||||
LONGLONG file_time_64 = file_time.dwHighDateTime;
|
LONGLONG file_time_64 = file_time.dwHighDateTime;
|
||||||
file_time_64 <<= 32;
|
file_time_64 <<= 32;
|
||||||
file_time_64 += file_time.dwLowDateTime;
|
file_time_64 += file_time.dwLowDateTime;
|
||||||
|
Loading…
Reference in New Issue
Block a user