summaryrefslogtreecommitdiff
path: root/bcc/input.c
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2010-07-19 19:26:16 +0200
committerLubomir Rintel <lkundrak@v3.sk>2013-10-29 16:30:52 +0100
commitc507d2f4b685874573fe0bb85a1a3a7d4d32dbd0 (patch)
treecd1fb27ebc2d2fc3e9f4cc95e786e2bbe8c1ae2e /bcc/input.c
parenta971aeabb4caf06339d9c53265b034d3cd9349bd (diff)
downloaddev86-c507d2f4b685874573fe0bb85a1a3a7d4d32dbd0.tar.gz
Add -7 option to compiler to enable ancient construct
Following commits add various funcitonality that is likely to be unwanted for the most, but is vital to compile really old C code, such as Seventh Edition UNIX code.
Diffstat (limited to 'bcc/input.c')
-rw-r--r--bcc/input.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/bcc/input.c b/bcc/input.c
index a17af4a..9ef19e3 100644
--- a/bcc/input.c
+++ b/bcc/input.c
@@ -12,6 +12,9 @@
#include "sc.h"
#include "scan.h"
#include "table.h"
+#ifndef VERY_SMALL_MEMORY
+#include "parse.h"
+#endif
#undef EXTERN
#define EXTERN
@@ -539,6 +542,9 @@ char *argv[];
#endif
case 't': /* print source code in asm output */
case 'w': /* watch location counter */
+#ifndef VERY_SMALL_MEMORY
+ case '7': /* accept ancient K&R code */
+#endif
case 'O': /* Optimisation. */
if (arg[2] == 0)
flag[(int)arg[1]] = TRUE;
@@ -631,6 +637,13 @@ ts_s_includelist += sizeof *incnew;
definestring("__POS_INDEPENDENT__");
}
#endif
+#ifndef VERY_SMALL_MEMORY
+ if (flag['7'])
+ {
+ ancient = TRUE;
+ definestring("__ANCIENT__");
+ }
+#endif
if (flag['O'])
{
optimise = TRUE;