Re: Coding standards for 32/64-bits data

2011-07-23 Thread Alexey Melnikov
[A very late comment in support of this proposal.] Julien Coloos wrote: Le 29/06/2011 15:32, Bron Gondwana a écrit : On Wed, Jun 29, 2011 at 02:21:17PM +0200, Julien Coloos wrote: Hi there, ... Leaving aside legacy data, the question is how to handle new ones (like the feature I worked on) ?

Re: Coding standards for 32/64-bits data

2011-07-01 Thread OBATA Akio
On Fri, 01 Jul 2011 14:57:01 +0900, Bron Gondwana br...@fastmail.fm wrote: On Fri, Jul 01, 2011 at 10:46:05AM +0900, OBATA Akio wrote: 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

Re: Coding standards for 32/64-bits data

2011-07-01 Thread Bron Gondwana
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

Re: Coding standards for 32/64-bits data

2011-06-30 Thread OBATA Akio
On Wed, 29 Jun 2011 22:32:23 +0900, Bron Gondwana br...@fastmail.fm wrote: On Wed, Jun 29, 2011 at 02:21:17PM +0200, Julien Coloos wrote: Hi there, I am currently wondering how to properly handle (ex-32/)64-bits data in cyrus code. Since this may be useful for other developpers willing to

Re: Coding standards for 32/64-bits data

2011-06-30 Thread Bron Gondwana
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

Re: Coding standards for 32/64-bits data

2011-06-30 Thread Bron Gondwana
On Fri, Jul 01, 2011 at 10:46:05AM +0900, OBATA Akio wrote: 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

Re: Coding standards for 32/64-bits data

2011-06-29 Thread Bron Gondwana
On Wed, Jun 29, 2011 at 02:21:17PM +0200, Julien Coloos wrote: Hi there, I am currently wondering how to properly handle (ex-32/)64-bits data in cyrus code. Since this may be useful for other developpers willing to contribute to cyrus, I am asking on the mailing list instead of IRC channel