• Keith Randall's avatar
    misc/cgo/test: fix issue 24161 test for 1.11 and earlier · a2419221
    Keith Randall authored
    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 #24161
    Fixes #26355
    
    Change-Id: Icf6f7bc9b6b36cacc81d5d0e033a2ebaff7e0298
    Reviewed-on: https://go-review.googlesource.com/123715
    Run-TryBot: Keith Randall <khr@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    a2419221
main.go 876 Bytes