Subject: long long vs. -ansi...
To: None <current-users@NetBSD.ORG>
From: Ted Lemon <mellon@hoffman.vix.com>
List: current-users
Date: 04/07/1997 20:22:09
It turns out that -current headers are not ANSI-safe on the i386.
Programs that include headers like <sys/types.h> or headers that
require definitions from <sys/types.h> can't be compiled with -ansi.
This also appears to be the case on other 32-bit architectures (e.g.,
m68k).

I ran into this while trying to build -current - apparently back in
December, in a fit of optimism, Chris decided that tip should be
compiled with -ansi -pedantic.

There are two fixes for this problem that I'd like to propose.   The
first is that -ansi -pedantic be removed from the tip Makefile - it
doesn't build right now, and this is bad.

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.

Does this sound reasonable?

			       _MelloN_