Delay inclusion of <stdint.h> when compiling comm2.y
authorGeorge Koehler <xkernigh@netscape.net>
Tue, 17 Jan 2017 03:39:44 +0000 (22:39 -0500)
committerGeorge Koehler <xkernigh@netscape.net>
Tue, 17 Jan 2017 03:39:44 +0000 (22:39 -0500)
commit916d270534fb154d15f0633911bb223a190bf48a
tree08f525fe291b8f66da33a6c99fdd2267c4cfd99c
parente97116c0370426dc3568230df1e31d76a69ed39f
Delay inclusion of <stdint.h> when compiling comm2.y

See issue #1 (https://github.com/davidgiven/ack/issues/1).  The file
mach/proto/as/comm2.y goes through cpp twice.  The _include macro,
defined in comm2.y and used in comm0.h, delays the inclusion of system
header files.  The inclusion of <stdint.h> wasn't delayed.  This
caused multiple inclusions of <sys/_types.h> in FreeBSD and
<machine/_types.h> in OpenBSD.

Use _include to delay <stdint.h>.  Also use _include for "arch.h" and
"out.h", because h/out.h includes <stdint.h> and h/arch.h might
include it in the future.

Sort the system includes in comm0.h by moving them up to be with
<stdint.h>.  Must include <stdint.h> before "mach0.c", because
mach/powerpc/as/mach0.c needs it.  Must include "mach0.c" before
checking ASLD.
mach/proto/as/comm0.h