apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <brian.p...@cnet.com>
Subject Re: [PATCH 3] example binary BUSEC for discussion
Date Thu, 11 Jul 2002 23:13:07 GMT
William A. Rowe, Jr. wrote:

> Just as a trivial example of using apr_time_sec_get... it helps us
> avoid casting over in the new poll/unix/poll.c line 164, where
>
>         tv.tv_sec = apr_time_sec_get(timeout);
>
> avoids a compiler emit that we are downcasting an in64 to a long. 


What's your strategy for updating the macro when we
someday start supporting 64-bit seconds in the apr_time
code?  Change the macro definition to cast to apr_uint64_t
instead of apr_uint32_t, or leave the 32-bit cast in place?
I have reservations about the latter, as it would create a
hidden Y2038 problem in code like your example above.

--Brian



Mime
View raw message