cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: 7.21.4: Win32 warning C4244 in transfer.c line 553 introduced

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Thu, 24 Feb 2011 22:15:03 +0100

On Thursday 24 February 2011 09:24:18 Daniel Stenberg wrote:
> On Wed, 23 Feb 2011, Kamil Dudka wrote:
> > Thank you for the report. Does the attached patch solve the problem?
>
> I think it is a step in the right direction, but it shows we have another
> generic win64 problem:
>
> time_t is 64bit, long is 32bit [*]
>
> We must use time_t types to store time and we cannot use longs to hold
> them... (thus curl_easy_getinfo's CURLINFO_FILETIME for example is
> currently broken...)
>
> [*] = http://msdn.microsoft.com/en-us/library/3b2e7499%28v=vs.80%29.aspx

Thanks for the link. As far as I understand, the type cast from 64bit time_t
to 32bit long should be safe for values below January 19, 2038. So we still
have some time to improve the API.

Kamil
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-24