OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgo/] [go/] [syscall/] [errstr_linux.go] - Blame information for rev 848

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 747 jeremybenn
// errstr_rtems.go -- RTEMS specific error strings.
2
 
3
// Copyright 2010 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.
6
 
7
package syscall
8
 
9
import "unsafe"
10
 
11
//sysnb strerror_r(errnum int, b []byte) (errstr *byte)
12
//strerror_r(errnum int, b *byte, len Size_t) *byte
13
 
14
func Errstr(errnum int) string {
15
        a := make([]byte, 128)
16
        p := strerror_r(errnum, a)
17
        b := (*[1000]byte)(unsafe.Pointer(p))
18
        i := 0
19
        for b[i] != 0 {
20
                i++
21
        }
22
        return string(b[:i])
23
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.