]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1] cmd/5c, cmd/5g, cmd/5l: fix cross compilation failure on darwin
authorDave Cheney <dave@cheney.net>
Wed, 13 Jun 2012 20:24:54 +0000 (16:24 -0400)
committerDave Cheney <dave@cheney.net>
Wed, 13 Jun 2012 20:24:54 +0000 (16:24 -0400)
««« backport 432f2b7f5458
cmd/5c, cmd/5g, cmd/5l: fix cross compilation failure on darwin

Fixes #3708.

The fix to allow 5{c,g,l} to compile under clang 3.1 broke cross
compilation on darwin using the Apple default compiler on 10.7.3.

This failure was introduced in 9b455eb64690.

This has been tested by cross compiling on darwin/amd64 to linux/arm using

* gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
* clang version 3.1 (branches/release_31)

As well as on linux/arm using

* gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
* Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0)
* Debian clang version 3.1-4 (branches/release_31) (based on LLVM 3.1)

R=consalus, rsc
CC=golang-dev
https://golang.org/cl/6307058

»»»

src/cmd/5c/list.c
src/cmd/5g/list.c
src/cmd/5l/list.c

index 86a31ae7a9da6a67e2eff03a1970cfed08899c59..30b88400fe9b60dd8e852c8028189ce4f11429c5 100644 (file)
@@ -140,7 +140,7 @@ Dconv(Fmt *fp)
 {
        char str[STRINGSZ];
        Adr *a;
-       char *op;
+       const char *op;
        int v;
 
        a = va_arg(fp->args, Adr*);
index 3105d5669ebd35ad14b5795c299f63d5dfe8f5b6..f0da24742eefe862cb00e21ef77597ecdb3800e8 100644 (file)
@@ -83,7 +83,7 @@ int
 Dconv(Fmt *fp)
 {
        char str[STRINGSZ];
-       char *op;
+       const char *op;
        Addr *a;
        int i;
        int32 v;
index 89c1c630267dd3855b351cd56de6bb58563d37bc..293fee3c6c78df3c8bad82c8c78787c2aec5232c 100644 (file)
@@ -161,7 +161,7 @@ int
 Dconv(Fmt *fp)
 {
        char str[STRINGSZ];
-       char *op;
+       const char *op;
        Adr *a;
        int32 v;