1 // errstr.go -- Error strings when there is no strerror_r.
3 // Copyright 2011 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
14 func libc_strerror(int) *byte __asm__ ("strerror")
16 var errstr_lock sync.Mutex
18 func Errstr(errno int) string {
21 bp := libc_strerror(errno)
22 b := (*[1000]byte)(unsafe.Pointer(bp))