On Mon, Jan 28, 2008 at 12:14:35PM +0100, Erik Trulsson wrote:
> On Mon, Jan 28, 2008 at 11:55:29AM +0100, Dag-Erling Sm?rgrav wrote:
> > 
> > > Userland code should be portable and useful to other systems in the
> > > chosen domain of compatibility, e.g., C99 or POSIX, unless there
> > > are substantial reasons for it not to.  That's how different projects
> > > can benefit from each other's work.
> > 
> > Both C99 and POSIX *require* int64_t and uint64_t on all platforms that
> > have 64-bit integer types.
> > 
> > FreeBSD has never run on any platform that doesn't.  I don't think
> > NetBSD or OpenBSD has either, nor Solaris, nor Linux to my knowledge.
> 
> Those are all good reasons for why using 'int64_t' would be OK.
> None of it is a reason for why using 'long long' would not be OK when you
> want at least 64 bits, but do not require exactly 64 bits.

Thank you for telling this very valid point.  People tend to forget
that [u]intN_t types are actually called for only when a particular
_exact_ bit width is needed, e.g., to get unsigned arithmetics
modulo 2^N, or to match a hardware register or a network packet field.

-- 
Yar
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to