Skip to content

Commit 1bff9e1

Browse files
committed
remove darwin pins
1 parent 4f87ad6 commit 1bff9e1

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

cmd/mkcgo/generate.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -683,34 +683,34 @@ func isOpenSSLErrorCheckFunction(fn *mkcgo.Func) bool {
683683
// Most OpenSSL functions that return int follow the pattern:
684684
// 1 = success, 0 = failure for boolean-style functions
685685
// > 0 = success, <= 0 = failure for size/count functions
686-
686+
687687
// Skip functions that don't return integers
688688
goRetType, _ := cTypeToGo(fn.Ret, false)
689689
if strings.HasPrefix(goRetType, "*") {
690690
// Pointer return functions typically return NULL on failure
691691
return true
692692
}
693-
693+
694694
// Check if it's an integer type that could be an error code
695695
if goRetType == "int32" || goRetType == "int" || goRetType == "uint32" {
696696
// Skip functions that are clearly not error-returning
697697
name := fn.Name
698-
698+
699699
// Functions that return version numbers, sizes, or other values should not be error-checked
700-
if strings.Contains(name, "version") ||
701-
strings.Contains(name, "size") ||
702-
strings.Contains(name, "get_bits") ||
703-
strings.Contains(name, "num_") ||
704-
strings.HasSuffix(name, "_id") ||
705-
strings.Contains(name, "nid2") ||
706-
name == "ERR_get_error_line" ||
707-
name == "ERR_get_error_all" {
700+
if strings.Contains(name, "version") ||
701+
strings.Contains(name, "size") ||
702+
strings.Contains(name, "get_bits") ||
703+
strings.Contains(name, "num_") ||
704+
strings.HasSuffix(name, "_id") ||
705+
strings.Contains(name, "nid2") ||
706+
name == "ERR_get_error_line" ||
707+
name == "ERR_get_error_all" {
708708
return false
709709
}
710-
710+
711711
return true
712712
}
713-
713+
714714
return false
715715
}
716716

@@ -786,7 +786,7 @@ func needsAssembly(src *mkcgo.Source) bool {
786786
func generateNocgoGo(src *mkcgo.Source, w io.Writer) {
787787
// Output header notice and package declaration.
788788
printHeader(w)
789-
fmt.Fprintf(w, "//go:build !cgo && darwin\n\n")
789+
fmt.Fprintf(w, "//go:build !cgo\n\n")
790790
fmt.Fprintf(w, "package %s\n\n", *packageName)
791791

792792
needsRuntime := false

internal/ossl/zdl_nocgo.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/ossl/zossl_nocgo.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)