Add LOOP_VINFO_MAX_VECT_FACTOR
[official-gcc.git] / libgo / go / net / fd_posix.go
blob72304796e4d72b4c1e24b6c9f6dd8628225eb7c9
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 // +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
7 package net
9 import (
10 "io"
11 "syscall"
14 // eofError returns io.EOF when fd is available for reading end of
15 // file.
16 func (fd *netFD) eofError(n int, err error) error {
17 if n == 0 && err == nil && fd.sotype != syscall.SOCK_DGRAM && fd.sotype != syscall.SOCK_RAW {
18 return io.EOF
20 return err