1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Work around VC's inability to cast unsigned __int64 to void.

This commit is contained in:
hniksic 2003-09-16 14:16:59 -07:00
parent df117e2a10
commit c95d75292b
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2003-09-16 Hrvoje Niksic <hniksic@xemacs.org>
* utils.c (wtimer_sys_diff): Convert the time difference to signed
__int64, then to double. This works around MS VC++ 6 which can't
convert unsigned __int64 to double directly.
2003-09-16 Hrvoje Niksic <hniksic@xemacs.org>
* Makefile.in (clean): Also remove the core.<number> files

View File

@ -1648,7 +1648,10 @@ wtimer_sys_diff (wget_sys_time *wst1, wget_sys_time *wst2)
#endif
#ifdef WINDOWS
return (double)(wst1->QuadPart - wst2->QuadPart) / 10000;
/* VC++ 6 doesn't support direct cast of uint64 to double. To work
around this, we subtract, then convert to signed, then finally to
double. */
return (double)(signed __int64)(wst1->QuadPart - wst2->QuadPart) / 10000;
#endif
}