]> Cypherpunks repositories - gostls13.git/commitdiff
doc/progs: skip cgo1 and cgo2 on freebsd
authorAndrew Gerrand <adg@golang.org>
Tue, 13 Mar 2012 00:55:16 +0000 (11:55 +1100)
committerAndrew Gerrand <adg@golang.org>
Tue, 13 Mar 2012 00:55:16 +0000 (11:55 +1100)
FreeBSD's srandom has a different signature to darwin/linux.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5795067

doc/progs/run

index 8b383e5903635226f4ef71da44379e912d725112..4d183530cb9cb84bcd478110894f964f3efc250c 100755 (executable)
@@ -5,6 +5,8 @@
 
 set -e
 
+goos=$(go env GOOS)
+
 defer_panic_recover="
        defer
        defer2
@@ -29,11 +31,15 @@ law_of_reflection="
 "
 
 c_go_cgo="
-    cgo1
-    cgo2
-    cgo3
-    cgo4
+       cgo1
+       cgo2
+       cgo3
+       cgo4
 "
+# cgo1 and cgo2 don't run on freebsd, srandom has a different signature
+if [ "$goos" == "freebsd" ]; then
+       c_go_cgo="cgo3 cgo4"
+fi
 
 all=$(echo $defer_panic_recover $effective_go $error_handling $law_of_reflection $c_go_cgo slices go1)