net: fix windows build

R=golang-dev, iant
CC=golang-dev
https://codereview.appspot.com/7392054
exp/ssa: a number of bug fixes.

ssadump:
- permit naming a package (not just *.go files) on command line.
- set BuildSerially flag when setting Log* flags
  (Q. should instead the logging functions take a lock?)

Builder:
- fixed bug when calling variadic function with zero '...'-params.
  Added regression test.

interp:
- more external functions:
   the 'error' interface
   bytes.{Equal,IndexByte}
   reflect.(Value).{Bool,NumOut,Out}
   syscall.{Close,Fstat,Read,Open,Stat,Lstat,Fstat,
     Getdents,ParseDirents,Getwd}
- permit comparisons between *Function and *closure.

With this CL, ssadump can now interpret ssadump itself (!),
loading, parsing, typing, SSA-building, and running
println("Hello, World!").  While a fmt-based equivalent still
lacks some external routines, e.g. math/big, I think there are
diminishing returns in expanding the interpreter (and
debugging it is starting to feel like "Inception").

I'm pretty confident this package is now good enough for wider use.

R=gri
CC=golang-dev
https://codereview.appspot.com/7392053
exp/ssa: fix *bsd breakage.

Use portable ReadDirent, not linux Getdents.

R=gri
TBR=gri
CC=golang-dev
https://codereview.appspot.com/7405051
go/types: don't crash when assigning to undefined variables

R=adonovan
CC=golang-dev
https://codereview.appspot.com/7369059
doc/effective_go.html: use correct name in Interface Checks section
Fixes issue 4897.

R=golang-dev, adg
CC=golang-dev
https://codereview.appspot.com/7377061
api: update next.txt

R=golang-dev, adg
CC=golang-dev
https://codereview.appspot.com/7420043
net/http: add Transport.CancelRequest

Permits all sorts of custom HTTP timeout policies without
adding a new Transport timeout Duration for each combination
of HTTP phases.

This keeps track internally of which TCP connection a given
Request is on, and lets callers forcefully close the TCP
connection for a given request, without actually getting
the net.Conn directly.

Additionally, a future CL will implement res.Body.Close (Issue
3672) in terms of this.

Update issue 3362
Update issue 3672

R=golang-dev, rsc, adg
CC=golang-dev
https://codereview.appspot.com/7372054
go/types: don't crash if there are no hints

R=r
CC=golang-dev
https://codereview.appspot.com/7375060
misc/osx: remove legacy packaging scripts

These are superseded by the tool at misc/dist.

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/7420044
cmd/vet: continue past first error
Also delete bogus tests for f.pkg (does the file have a package) since all
files have a package attached. The tests for pkg.types and pkg.values
suffice.

R=golang-dev, adg
CC=golang-dev
https://codereview.appspot.com/7418043
syscall: add MSG_FASTOPEN to Linux

Update issue 4842

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/7369060
builtin: document appending a string to a byte slice
Fixes issue 4873.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7421043
net/http: don't drop error on request write

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7230059
exp/cookiejar: add some more tests

New tests added for port handling and IDNA domains.
A new test case contains several redundant
tests but provides a nice documentation of the
implemented rules for domain handling.

R=nigeltao
CC=golang-dev
https://codereview.appspot.com/7393070

Committer: Nigel Tao <nigeltao@golang.org>
exp/cookiejar: eliminate some "."+str garbage.

It's not a big deal, but it's easy to fix.

R=dsymonds
CC=dr.volker.dobler, golang-dev
https://codereview.appspot.com/7425043
cmd/cgo: add implementation comment

R=golang-dev, r, bradfitz, iant
CC=golang-dev
https://codereview.appspot.com/7407050
A+C: Tyler Bunnell (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://codereview.appspot.com/7432043
misc/dist: handle previous installation

The installer package will now detect a previous installation and warn the user
that the previous installation will be deleted. If the user continues, the
installer will delete the previous installation and install the package as
usual.

Fixes issue 4293.

R=adg
CC=golang-dev
https://codereview.appspot.com/7427044

Committer: Andrew Gerrand <adg@golang.org>
syscall: Plan 9: keep a consistent environment array

Map order is non-deterministic. Introduce a new
environment string array that tracks the env map.
This allows us to produce identical results for
Environ() upon successive calls, as expected by the
TestConsistentEnviron test in package os.

R=rsc, ality, rminnich, bradfitz, r
CC=golang-dev
https://codereview.appspot.com/7411047

Committer: Ron Minnich <rminnich@gmail.com>
net, os, syscall: Plan 9: adjust error handling

syscall: Use NewError for all system errors and introduce
        some new errors for compatibility with other packages
        and proper error handling in net. Also introduce
        Temporary and Timeout methods on ErrorString.

net: Make errors from dial, accept, listen functions follow the
        OpError standard and discern whether the underlying
        error came from syscall. Since Plan 9 uses a correspondence
        between file and network operations, all system error
        reporting happens through the underlying file operation.
        In Go code, we go through package os for file operations,
        so there is another level of indirection in error types.
        This change allows us to compare the errors with those in
        package syscall, when appropriate.

os: Just use the error string already present in package os,
        instead of calling out to package syscall.

R=rsc, ality, rminnich, bradfitz
CC=golang-dev
https://codereview.appspot.com/7398054

Committer: Ron Minnich <rminnich@gmail.com>