summaryrefslogtreecommitdiff
path: root/src/pkg/syscall/syscall_unix.go
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2010-03-19 15:21:37 -0700
committerAlex Brainman <alex.brainman@gmail.com>2010-03-19 15:21:37 -0700
commit26e6e41206e12afcd0739ea5ed131c75c36f8d86 (patch)
tree0767d62c0aabb2f5f4c099523b94839386a3a524 /src/pkg/syscall/syscall_unix.go
parent9b164deec034c92082ea11f907c0e0e47668309e (diff)
downloadgolang-26e6e41206e12afcd0739ea5ed131c75c36f8d86.tar.gz
syscall: mingw implemntation of Errstr()
R=golang-dev, rsc CC=golang-dev http://codereview.appspot.com/621041 Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/pkg/syscall/syscall_unix.go')
-rw-r--r--src/pkg/syscall/syscall_unix.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pkg/syscall/syscall_unix.go b/src/pkg/syscall/syscall_unix.go
new file mode 100644
index 000000000..a32c275d5
--- /dev/null
+++ b/src/pkg/syscall/syscall_unix.go
@@ -0,0 +1,12 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package syscall
+
+func Errstr(errno int) string {
+ if errno < 0 || errno >= int(len(errors)) {
+ return "error " + str(errno)
+ }
+ return errors[errno]
+}