aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/htmlroff
diff options
context:
space:
mode:
authorDan Cross <cross@gajendra.net>2025-07-23 06:47:21 -0400
committerDan Cross <cross@gajendra.net>2025-07-25 12:25:11 -0400
commit156e745be9f6a1b19b0f8e2a931148786d7acad4 (patch)
treec853bc58f9d7e88d84de2da625bc4dddcdf46780 /src/cmd/htmlroff
parent1e6e30e91e7a2712d9507072b5ff3b59a73e5dfe (diff)
all: remove need for `-fcommon`
Use `extern` where appropriate so that we can remove `-fcommon` on macOS and others. On macOS, `-fcommon` generates a number of linker warnings. I've tested building on macOS, Linux, FreeBSD, NetBSD, OpenBSD and illumos. I am not in a position to test on AIX or other more esoteric platforms, however.
Diffstat (limited to 'src/cmd/htmlroff')
-rw-r--r--src/cmd/htmlroff/a.h6
-rw-r--r--src/cmd/htmlroff/roff.c1
-rw-r--r--src/cmd/htmlroff/t16.c5
3 files changed, 6 insertions, 6 deletions
diff --git a/src/cmd/htmlroff/a.h b/src/cmd/htmlroff/a.h
index a4209178..1df612c2 100644
--- a/src/cmd/htmlroff/a.h
+++ b/src/cmd/htmlroff/a.h
@@ -30,7 +30,9 @@ enum
ArgMode = 1<<3,
HtmlMode = 1<<4,
- MaxLine = 1024
+ MaxLine = 1024,
+
+ MAXIF = 20
};
Rune* L(char*);
@@ -77,7 +79,7 @@ int linefmt(Fmt*);
void nr(Rune*, int);
void _nr(Rune*, Rune*);
void out(Rune*);
-void (*outcb)(Rune);
+extern void (*outcb)(Rune);
void outhtml(Rune*);
void outrune(Rune);
void outtrap(void);
diff --git a/src/cmd/htmlroff/roff.c b/src/cmd/htmlroff/roff.c
index f52e0734..4ac4f980 100644
--- a/src/cmd/htmlroff/roff.c
+++ b/src/cmd/htmlroff/roff.c
@@ -6,7 +6,6 @@ enum
MAXRAW = 40,
MAXESC = 60,
MAXLINE = 1024,
- MAXIF = 20,
MAXARG = 10
};
diff --git a/src/cmd/htmlroff/t16.c b/src/cmd/htmlroff/t16.c
index 9389a59a..8da1d1ff 100644
--- a/src/cmd/htmlroff/t16.c
+++ b/src/cmd/htmlroff/t16.c
@@ -16,9 +16,8 @@
* .if .ie .el
*
*/
-
-int iftrue[20];
-int niftrue;
+extern int iftrue[MAXIF];
+extern int niftrue;
void
startbody(void)