Coding standards for 32/64-bits data

OBATA Akio obata at lins.jp
Thu Jun 30 21:46:05 EDT 2011


On Fri, 01 Jul 2011 00:10:50 +0900, Bron Gondwana <brong at fastmail.fm> wrote:

> On Thu, Jun 30, 2011 at 10:54:43PM +0900, OBATA Akio wrote:
>> For ticket 3376 (time_t != unsigned long), I would be helpful if TIME_T_FMT is also introduced.
>> (or use fixed type (uint64_t?) for network protocol/database timestamp instead of time_t?)
>
> To be honest, you can mostly use uint32_t for times in Cyrus
> still - because all the timestamps get stored down into 32
> bit fields in the binary formats.
>
> But it might make sense to pass it around in 64 bit format
> everywhere that we're not actually storing to disk...

I want to clear following issue before NetBSD-6.0 release.
   http://gnats.netbsd.org/44275

Then, workaround until 32-bits time_t overflow is "cast to `unsigned long'"
time_t data to pass snprintf with "%lu" format?

I can find it in imap/mailbox.c and imap/sync_client.c.
(other issues are not discovered for me at the moment).
-- 
OBATA Akio / obata at lins.jp


More information about the Cyrus-devel mailing list