]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: more build fixes
authorRuss Cox <rsc@golang.org>
Sat, 4 Feb 2012 06:46:46 +0000 (01:46 -0500)
committerRuss Cox <rsc@golang.org>
Sat, 4 Feb 2012 06:46:46 +0000 (01:46 -0500)
Flush stdout before writing to stderr, to avoid
reordering output.

Allow amd64 from uname -m (FreeBSD).

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5629051

src/cmd/dist/unix.c

index 2c3624ad54bee04f323ee06b84cfbc3bf370d428..348b01e08bfb60a3e2331a7f77578da6d74220e6 100644 (file)
@@ -470,6 +470,7 @@ fatal(char *msg, ...)
 {
        va_list arg;
        
+       fflush(stdout);
        fprintf(stderr, "go tool dist: ");
        va_start(arg, msg);
        vfprintf(stderr, msg, arg);
@@ -654,7 +655,7 @@ main(int argc, char **argv)
        if(gohostarch == nil) {
                if(uname(&u) < 0)
                        fatal("uname: %s", strerror(errno));
-               if(contains(u.machine, "x86_64"))
+               if(contains(u.machine, "x86_64") || contains(u.machine, "amd64"))
                        gohostarch = "amd64";
                else if(hassuffix(u.machine, "86"))
                        gohostarch = "386";