Coding standards for 32/64-bits data

Bron Gondwana brong at fastmail.fm
Fri Jul 1 13:46:34 EDT 2011


On Fri, Jul 01, 2011 at 05:05:41PM +0900, OBATA Akio wrote:
> For printf format, how about to detect it in configure script?
> 
>  if (sizeof(time_t) == sizeof(unsigned long long))
>      #define TIME_T_FMT "%llu"
>  else
>      #define TIME_T_FMT "%lu"

Fine.

> I saw some bare binary time_t data input/output, and it will wreak some database incompatibility
> at converting to different time_t size and/or endian platform, but it is different issue.

Yes, particularly the duplicate DB, it's disgusting and wrong,
and we should fix it when we add the Date header and fix the
binary spew to syslog too.

Bron.


More information about the Cyrus-devel mailing list