Source file src/cmd/cgo/internal/test/test_windows.go
1 // Copyright 2019 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package cgotest 6 7 import ( 8 "internal/syscall/windows" 9 "syscall" 10 "testing" 11 ) 12 13 var syscall_dot_SIGCHLD syscall.Signal 14 15 // usesUCRT reports whether the test is using the Windows UCRT (Universal C Runtime). 16 func usesUCRT(t *testing.T) bool { 17 name, err := syscall.UTF16PtrFromString("ucrtbase.dll") 18 if err != nil { 19 t.Fatal(err) 20 } 21 h, err := windows.GetModuleHandle(name) 22 return err == nil && h != 0 23 } 24