Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1354)

Unified Diff: misc/cgo/test/basic.go

Issue 6853059: code review 6853059: cgo: enable cgo on openbsd (Closed)
Patch Set: diff -r e08535d6901d https://go.googlecode.com/hg/ Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « doc/progs/run ('k') | src/pkg/go/build/build.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: misc/cgo/test/basic.go
===================================================================
--- a/misc/cgo/test/basic.go
+++ b/misc/cgo/test/basic.go
@@ -56,6 +56,7 @@
*/
import "C"
import (
+ "runtime"
"syscall"
"testing"
"unsafe"
@@ -119,7 +120,12 @@
func testMultipleAssign(t *testing.T) {
p := C.CString("234")
n, m := C.strtol(p, nil, 345), C.strtol(p, nil, 10)
- if n != 0 || m != 234 {
+ if runtime.GOOS == "openbsd" {
+ // Bug in OpenBSD strtol(3) - base > 36 succeeds.
+ if (n != 0 && n != 239089) || m != 234 {
+ t.Fatal("Strtol x2: ", n, m)
+ }
+ } else if n != 0 || m != 234 {
t.Fatal("Strtol x2: ", n, m)
}
C.free(unsafe.Pointer(p))
« no previous file with comments | « doc/progs/run ('k') | src/pkg/go/build/build.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b