* cp-tree.h (build_noexcept_spec, add_exception_specifier): Adjust
[official-gcc.git] / libgo / go / syscall / syscall_errno.go
blob01618d173a118c4e1f2436cff73881713caa72da
1 // Copyright 2009 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.
5 package syscall
7 // An Errno is an unsigned number describing an error condition.
8 // It implements the error interface. The zero Errno is by convention
9 // a non-error, so code to convert from Errno to error should use:
10 // err = nil
11 // if errno != 0 {
12 // err = errno
13 // }
14 type Errno uintptr
16 func (e Errno) Error() string {
17 return Errstr(int(e))
20 func (e Errno) Temporary() bool {
21 return e == EINTR || e == EMFILE || e == ECONNRESET || e == ECONNABORTED || e.Timeout()
24 func (e Errno) Timeout() bool {
25 return e == EAGAIN || e == EWOULDBLOCK || e == ETIMEDOUT