diff --git a/ChangeLog b/ChangeLog index 7a226449e..a1048b619 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-07-07 Riccardo Mottola + + * Source/NSProcessInfo.m: + Fix GetTickCount()/GetTickCount64() for different Windows versions. + 2017-07-04 Richard Frith-Macdonald * Source/NSObject.m: When an object's retain count is incremented too diff --git a/Source/NSProcessInfo.m b/Source/NSProcessInfo.m index b4c4df2fc..da94da15c 100644 --- a/Source/NSProcessInfo.m +++ b/Source/NSProcessInfo.m @@ -1,5 +1,5 @@ /** Implementation for NSProcessInfo for GNUStep - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2017 Free Software Foundation, Inc. Written by: Georg Tuparev Heidelberg, Germany @@ -1470,7 +1470,13 @@ static void determineOperatingSystem() NSUInteger uptime = 0; #if defined(_WIN32) + +#if _WIN32_WINNT < 0x0600 /* less than Vista */ + uptime = GetTickCount() / 1000; +#else uptime = GetTickCount64() / 1000; +#endif + #elif defined(HAVE_SYSCTLBYNAME) struct timeval tval; size_t len = sizeof(tval);