libgo: Update to October 24 version of master library.

From-SVN: r204466
This commit is contained in:
Ian Lance Taylor 2013-11-06 19:49:01 +00:00
parent f20f261304
commit f038dae646
596 changed files with 32029 additions and 7466 deletions

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin freebsd linux netbsd openbsd
// +build darwin dragonfly freebsd linux netbsd openbsd
package net
@ -12,14 +12,11 @@ import (
)
func newFileFD(f *os.File) (*netFD, error) {
syscall.ForkLock.RLock()
fd, err := syscall.Dup(int(f.Fd()))
fd, err := dupCloseOnExec(int(f.Fd()))
if err != nil {
syscall.ForkLock.RUnlock()
return nil, os.NewSyscallError("dup", err)
}
syscall.CloseOnExec(fd)
syscall.ForkLock.RUnlock()
if err = syscall.SetNonblock(fd, true); err != nil {
closesocket(fd)
return nil, err
@ -70,6 +67,10 @@ func newFileFD(f *os.File) (*netFD, error) {
closesocket(fd)
return nil, err
}
if err := netfd.init(); err != nil {
netfd.Close()
return nil, err
}
netfd.setAddr(laddr, raddr)
return netfd, nil
}