Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Feb 1998 01:08:11 +0200
From:      Anatoly Vorobey <mellon@pobox.com>
To:        John Birrell <jb@cimlogic.com.au>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: RE: New utilities: factor(1) and wid(1)?
Message-ID:  <19980226010811.44978@techunix.technion.ac.il>
In-Reply-To: <199802252248.JAA00900@cimlogic.com.au>; from John Birrell on Thu, Feb 26, 1998 at 09:48:34AM %2B1100
References:  <19980226002846.05689@techunix.technion.ac.il> <199802252248.JAA00900@cimlogic.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
You, John Birrell, were spotted writing this on Thu, Feb 26, 1998 at 09:48:34AM +1100:
> Anatoly Vorobey wrote:
> > P.S. What's the "politically correct" way to specify a long long
> > in FreeBSD: 'long long'? 'int64_t'? 'quad_t'?
> 
> long long, IMO. There is nothing to say how many bytes in a 'long long'.

I understand that historically, it was a hack to avoid sizeof(long)==8
which would break too many existing sloppy sources?

> I'd be included to stay away from quad_t. For instance, printf formats
> that use %q need a long long, not a quad_t. 

However, that's not what man 3 printf says:

    o   The optional character q, specifying that a following d, i, o, u, x,   
        or X conversion corresponds to a quad int or unsigned quad int argu-   
        ment, or that a following n conversion corresponds to a pointer to a   
        quad int argument.    

Maybe it should get fixed then?

> I'm having to fix things like
> this to get the FreeBSD source to work on alpha. FWIW, gcc 2.7.2.2 on alpha
> has sizeof(long) = sizeof(long long) = 8.

That's probably the Right Thing to do. Or maybe even better would be
to sizeof(long)==8, sizeof(long long)==16? 

I'd expect it to break an awful lot of things anyhow.

-- 
Anatoly Vorobey,
mellon@pobox.com http://pobox.com/~mellon/
"Angels can fly because they take themselves lightly" - G.K.Chesterton

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980226010811.44978>