Commit graph

18 commits

Author SHA1 Message Date
George Koehler ac4cbd735e Use libc assert(); fix dependencies; unbreak isduo().
Switch from custom assert() to libc assert() in mach/proto/as.
Continue to disable asserts if DEBUG == 0.

This change found a problem in the build system; comm2.y was missing
depedencies on comm0.h and comm1.h.  Add the missing dependencies to
the cppfile rule.  Allow the dependencies by modifying cppfile in
first/build.lua to act like cfile if t.dir is false.

Now that comm2.y gets rebuilt, I must fix the wrong prototype of
yyparse() in comm1.h.

I got unlucky as induo() in comm5.c was reading beyond the end of the
array.  It found an operator "= " ('=' then space) in the garbage, so
it returned a garbage token number, and "VAR = 123" became a syntax
error.  Unbreak induo() by terminating the array.
2017-11-11 16:09:05 -05:00
George Koehler 916d270534 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.
2017-01-16 22:39:44 -05:00
David Given 4a093b9eba Add li and mr pseudoinstructions. 2016-10-18 00:21:32 +02:00
David Given c5018d7088 64-bit-ify (adhoc varargs are evil). 2015-03-23 00:07:59 +01:00
David Given c93cb69959 Check in incomplete Linux PowerPC and M68K work.
--HG--
branch : dtrg-experimental-powerpc
2013-05-08 00:48:48 +01:00
dtrg 4c0a0e6119 Rationalised use of #includes to be more standards-compliant. 2006-07-18 17:10:29 +00:00
ceriel 1db6a3029b Header --> Id 1994-06-24 14:02:31 +00:00
ceriel 53c4951b29 Do not use '#endif/#else xxx'; it is not allowed for ANSI C 1991-12-17 15:05:43 +00:00
ceriel 0c59e2e12d Prevent name clashes with sys/types.h on system V 1991-12-16 15:24:24 +00:00
ceriel 0b26bdf5fb Some changes in search for more efficiency 1991-01-11 14:20:59 +00:00
ceriel 99bfba6a45 Added Johan's changes 1990-11-16 15:58:36 +00:00
ceriel a0934dc7e0 made bittable dynamic 1988-06-16 13:24:10 +00:00
ceriel 0be2e884b1 some last-minute minor changes 1988-05-06 17:03:30 +00:00
ceriel f00c143b28 added declaration for fopen 1987-09-01 15:58:30 +00:00
ceriel 6eaf182cee Added Rcs Id 1987-03-10 11:49:39 +00:00
ceriel 815166e421 Added copyright notice 1987-03-09 19:15:41 +00:00
ceriel e188fe0956 Version that uses libobject.a 1986-12-01 15:41:29 +00:00
keie 772b64fabd *** empty log message *** 1985-04-12 16:56:43 +00:00