Subject: Re: long long vs. -ansi...
To: Ted Lemon <mellon@hoffman.vix.com>
From: Andrew Reilly <andrew@zeta.org.au>
List: current-users
Date: 04/08/1997 14:02:58
On Mon, Apr 07, 1997 at 08:22:09PM -0700, Ted Lemon wrote:
> 
> The second, and more correct solution, however, is to protect non-ANSI
> constructs in our header files with ``#ifdef __STDC__''.   Probably
> the right thing to do in machine/types.h would be to define quad_t and
> u_quad_t as arrays of characters of the right size.   This avoids
> propogating ansification into header files that use quad_t.   Programs
> that try to do math on quad_t values will have to either be compiled
> without -ansi, or will have to be compiled on machines that support
> 64-bit integers as a native type.

I would suggest that a struct {unsigned long; long;} would
be better than an array of char, mostly because there is
some hope of copy sematics applying for return values of
this type, but partly because I've recently had experience
(DSP) of a machine that had an ANSI C compiler but all types
(including char) were 32 bits and had sizeof(long)=1.  Word
addressable, you see.

-- Andrew

"The steady state of disks is full."
				-- Ken Thompson