From de1ab89f03a9a22a919fe051bb7251178c80279c Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 6 Aug 2014 06:11:41 -0700 Subject: [PATCH] dist: fix Plan 9 build Since CL 115060044, mkanames declares an empty array in anames8.c and anames6.c, which is not valid for the Plan 9 compiler. char* cnames8[] = { }; This change makes mkanames not declaring the cnames array when no C_ constants are found. LGTM=iant R=minux, iant CC=golang-codereviews https://golang.org/cl/117680043 --- src/cmd/dist/buildgc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cmd/dist/buildgc.c b/src/cmd/dist/buildgc.c index 178fbf9137..66adf6857c 100644 --- a/src/cmd/dist/buildgc.c +++ b/src/cmd/dist/buildgc.c @@ -69,7 +69,7 @@ gcopnames(char *dir, char *file) void mkanames(char *dir, char *file) { - int i, ch; + int i, j, ch; Buf in, b, out, out2; Vec lines; char *p; @@ -108,6 +108,7 @@ mkanames(char *dir, char *file) } bwritestr(&out, "};\n"); + j=0; bprintf(&out2, "char* cnames%c[] = {\n", ch); for(i=0; i0) + bwriteb(&out, &out2); writefile(&out, file, 0); -- 2.48.1