summaryrefslogtreecommitdiff
path: root/src/lib9/flag.c
diff options
context:
space:
mode:
authorAkshat Kumar <seed@mail.nanosouffle.net>2013-01-22 17:23:36 -0500
committerAkshat Kumar <seed@mail.nanosouffle.net>2013-01-22 17:23:36 -0500
commit81497d984170b9f559eb4cbb63b2e310e0a0423e (patch)
treec5e0617048723433fa87369b72659a7f01bd8bfe /src/lib9/flag.c
parent5d463b99b605c2758ea09d6aae1e314d06d01b82 (diff)
downloadgo-81497d984170b9f559eb4cbb63b2e310e0a0423e.tar.gz
lib9: declare __fixargv0 before use in flag.c
The Plan 9 compilers complain about not having type information for the function, which sets off type signature problems during the linking stage. R=rsc, ality, iant CC=golang-dev https://codereview.appspot.com/7058054 Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/lib9/flag.c')
-rw-r--r--src/lib9/flag.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib9/flag.c b/src/lib9/flag.c
index 39441b908..7c79c1a6d 100644
--- a/src/lib9/flag.c
+++ b/src/lib9/flag.c
@@ -26,6 +26,14 @@ static Flag *curflag;
static Flag *fhash[512];
static Flag *first, *last;
+char *argv0;
+
+/*
+ * Mac OS can't deal with files that only declare data.
+ * ARGBEGIN mentions this function so that this file gets pulled in.
+ */
+void __fixargv0(void) { }
+
// FNV-1 hash. http://isthe.com/chongo/tech/comp/fnv/
static uint32
fnv(char *p, int n)
@@ -221,7 +229,6 @@ flagparse(int *argcp, char ***argvp, void (*usage)(void))
argc = *argcp;
argv = *argvp;
- __fixargv0();
argv0 = argv[0];
argc--;
argv++;