mirror of https://github.com/golang/go.git
misc/cgo: fix test on iOS
The test in CL 123715 doesn't work on iOS, it needs to use a different version scheme to determine whether SecKeyAlgorithm and friends exist. Restrict the old version test to OSX only. The same problem occurs on iOS: the functions tested don't exist before iOS 10. But we don't have builders below iOS 10, so it isn't a big issue. If we ever get older builders, or someone wants to run all.bash on an old iOS, they'll need to figure out the right incantation. Update #24161 Update #26355 Change-Id: Ia3ace86b00486dc172ed00c0c6d668a95565bff7 Reviewed-on: https://go-review.googlesource.com/123959 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
c2eba53e7f
commit
2598ed0758
|
|
@ -9,9 +9,10 @@ package issue24161e0
|
|||
/*
|
||||
#cgo CFLAGS: -x objective-c
|
||||
#cgo LDFLAGS: -framework CoreFoundation -framework Security
|
||||
#include <TargetConditionals.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <Security/Security.h>
|
||||
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200
|
||||
#if TARGET_OS_OSX && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200
|
||||
typedef CFStringRef SecKeyAlgorithm;
|
||||
static CFDataRef SecKeyCreateSignature(SecKeyRef key, SecKeyAlgorithm algorithm, CFDataRef dataToSign, CFErrorRef *error){return NULL;}
|
||||
#define kSecKeyAlgorithmECDSASignatureDigestX962SHA1 foo()
|
||||
|
|
|
|||
|
|
@ -9,9 +9,10 @@ package issue24161e1
|
|||
/*
|
||||
#cgo CFLAGS: -x objective-c
|
||||
#cgo LDFLAGS: -framework CoreFoundation -framework Security
|
||||
#include <TargetConditionals.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <Security/Security.h>
|
||||
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200
|
||||
#if TARGET_OS_OSX && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200
|
||||
typedef CFStringRef SecKeyAlgorithm;
|
||||
static CFDataRef SecKeyCreateSignature(SecKeyRef key, SecKeyAlgorithm algorithm, CFDataRef dataToSign, CFErrorRef *error){return NULL;}
|
||||
#define kSecKeyAlgorithmECDSASignatureDigestX962SHA1 foo()
|
||||
|
|
|
|||
|
|
@ -9,9 +9,10 @@ package issue24161e2
|
|||
/*
|
||||
#cgo CFLAGS: -x objective-c
|
||||
#cgo LDFLAGS: -framework CoreFoundation -framework Security
|
||||
#include <TargetConditionals.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <Security/Security.h>
|
||||
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200
|
||||
#if TARGET_OS_OSX && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200
|
||||
typedef CFStringRef SecKeyAlgorithm;
|
||||
static CFDataRef SecKeyCreateSignature(SecKeyRef key, SecKeyAlgorithm algorithm, CFDataRef dataToSign, CFErrorRef *error){return NULL;}
|
||||
#define kSecKeyAlgorithmECDSASignatureDigestX962SHA1 foo()
|
||||
|
|
|
|||
Loading…
Reference in New Issue