summaryrefslogtreecommitdiff
blob: 076d22952a51bcf6ee2d34f0934636d150c0f630 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
gcc-10 defaults to -fno-common. Causes linker errors for
duplicate 'buffer' definition.
--- a/mmix-config.w
+++ b/mmix-config.w
@@ -357,7 +357,7 @@ print error messages.
 
 @<Global variables@>=
 FILE *config_file; /* input comes from here */
-char buffer[BUF_SIZE]; /* input lines go here */
+static char buffer[BUF_SIZE]; /* input lines go here */
 char token[BUF_SIZE]; /* and tokens are copied to here */
 char *buf_pointer=buffer; /* this is our current position */
 bool token_prescanned; /* does |token| contain the next token already? */
--- a/mmmix.w
+++ b/mmmix.w
@@ -115,7 +115,7 @@ and \Hex{fedcba9876543210} into location \Hex{0123456789b0}.
 octa cur_loc;
 octa cur_dat;
 bool new_chunk;
-char buffer[BUF_SIZE];
+static char buffer[BUF_SIZE];
 FILE *prog_file;
 
 @ @<Input a rudimentary hexadecimal file@>=