summaryrefslogtreecommitdiffstats
path: root/src/cmd/plumb
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/plumb
parent1e6e30e91e7a2712d9507072b5ff3b59a73e5dfe (diff)
downloadplan9port-156e745be9f6a1b19b0f8e2a931148786d7acad4.tar.gz
plan9port-156e745be9f6a1b19b0f8e2a931148786d7acad4.zip
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/plumb')
-rw-r--r--src/cmd/plumb/plumber.c3
-rw-r--r--src/cmd/plumb/plumber.h16
2 files changed, 10 insertions, 9 deletions
diff --git a/src/cmd/plumb/plumber.c b/src/cmd/plumb/plumber.c
index 5ead2e93..86bec15c 100644
--- a/src/cmd/plumb/plumber.c
+++ b/src/cmd/plumb/plumber.c
@@ -7,10 +7,11 @@
#include "plumber.h"
int debug;
+int nports;
+char **ports;
int foreground=0;
char *plumbfile;
char *user;
-char *home;
char *progname;
Ruleset **rules;
int printerrors=1;
diff --git a/src/cmd/plumb/plumber.h b/src/cmd/plumb/plumber.h
index 9ffe74d2..4eb7f131 100644
--- a/src/cmd/plumb/plumber.h
+++ b/src/cmd/plumb/plumber.h
@@ -89,11 +89,11 @@ void makeports(Ruleset*[]);
void printinputstack(void);
int popinput(void);
-Ruleset **rules;
-char *user;
-char *home;
-jmp_buf parsejmp;
-char *lasterror;
-char **ports;
-int nports;
-int debug;
+extern Ruleset **rules;
+extern char *user;
+extern char *home;
+extern jmp_buf parsejmp;
+extern char *lasterror;
+extern char **ports;
+extern int nports;
+extern int debug;