OSDN Git Service

syscall: Fix Errstr on systems without strerror_r.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 31 Oct 2011 21:55:22 +0000 (21:55 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 31 Oct 2011 21:55:22 +0000 (21:55 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180714 138bc75d-0d04-0410-961f-82ee72b054a4

libgo/go/syscall/errstr_nor.go

index b331d0e..2fb61c2 100644 (file)
@@ -11,7 +11,7 @@ import (
        "unsafe"
 )
 
-//sysnb        strerror(errnum int) *byte
+//sysnb        strerror(errnum int) (buf *byte)
 //strerror(errnum int) *byte
 
 var errstr_lock sync.Mutex
@@ -19,7 +19,7 @@ var errstr_lock sync.Mutex
 func Errstr(errno int) string {
        errstr_lock.Lock()
 
-       bp := libc_strerror(errno)
+       bp := strerror(errno)
        b := (*[1000]byte)(unsafe.Pointer(bp))
        i := 0
        for b[i] != 0 {