]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.10] misc/cgo/test: fix issue 24161 test for 1.11 and earlier
authorKeith Randall <khr@google.com>
Thu, 12 Jul 2018 23:51:27 +0000 (16:51 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 8 Aug 2018 00:26:58 +0000 (00:26 +0000)
commit61e4c116931fe56c6693134743b5773bbce89e79
tree5f0fc29683a140b9b70c9f66e57c667b5e72e5f1
parent424f4ea0bd02c47fe424193924f94670d3db9e4d
[release-branch.go1.10] misc/cgo/test: fix issue 24161 test for 1.11 and earlier

The test uses functions from C that were introduced in OSX 1.12.
Include stubs for those functions when compiling for 1.11 and earlier.
This test really a compile-time test, it doesn't matter much what the
executed code actually does.
Use a nasty #define hack to work around the fact that cgo doesn't
support static global variables.

Update #25036

Change-Id: Icf6f7bc9b6b36cacc81d5d0e033a2ebaff7e0298
Reviewed-on: https://go-review.googlesource.com/123715
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/124216
misc/cgo/test/issue24161e0/main.go
misc/cgo/test/issue24161e1/main.go
misc/cgo/test/issue24161e2/main.go