]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agomake.bash: fix old builds
Russ Cox [Wed, 7 Mar 2012 16:38:05 +0000 (11:38 -0500)]
make.bash: fix old builds

Fixes #3222.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5761044

13 years agodoc: delete faq question about 6g
Russ Cox [Wed, 7 Mar 2012 16:37:56 +0000 (11:37 -0500)]
doc: delete faq question about 6g

Fixes #3230.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5753071

13 years agotest: add inherited interface test to ddd.go
Ian Lance Taylor [Wed, 7 Mar 2012 16:24:10 +0000 (08:24 -0800)]
test: add inherited interface test to ddd.go

The gccgo compiler incorrectly gave an error for this code.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5767043

13 years agotest: fix typo
Russ Cox [Wed, 7 Mar 2012 15:21:56 +0000 (10:21 -0500)]
test: fix typo

R=ken2
CC=golang-dev
https://golang.org/cl/5752073

13 years agoundo CL 5754063 / e23b66fcfc94
Russ Cox [Wed, 7 Mar 2012 15:15:20 +0000 (10:15 -0500)]
undo CL 5754063 / e23b66fcfc94

Does not actually test so files.

««« original CL description
misc/cgo: re-enable testso

Also enabled it for darwin.

R=rsc
CC=golang-dev
https://golang.org/cl/5754063

»»»

R=golang-dev, minux.ma, r, f
CC=golang-dev
https://golang.org/cl/5756075

13 years agonet: use IANA reserved port to test dial timeout
Mikio Hara [Wed, 7 Mar 2012 07:28:40 +0000 (16:28 +0900)]
net: use IANA reserved port to test dial timeout

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5757060

13 years agocmd/gc: unnamed struct types can have methods
Russ Cox [Wed, 7 Mar 2012 07:27:15 +0000 (02:27 -0500)]
cmd/gc: unnamed struct types can have methods

Fixes #3143.

R=ken2
CC=golang-dev
https://golang.org/cl/5752070

13 years agotest/run: fix builders
Russ Cox [Wed, 7 Mar 2012 07:22:08 +0000 (02:22 -0500)]
test/run: fix builders

Let the outer environment filter down to the commands being run.

TBR=r
CC=golang-dev
https://golang.org/cl/5758066

13 years agocmd/gc: do not confuse unexported methods of same name
Russ Cox [Wed, 7 Mar 2012 06:55:17 +0000 (01:55 -0500)]
cmd/gc: do not confuse unexported methods of same name

Fixes #3146.

R=ken2
CC=golang-dev
https://golang.org/cl/5756074

13 years agotest: invoke go command in run.go
Russ Cox [Wed, 7 Mar 2012 06:54:39 +0000 (01:54 -0500)]
test: invoke go command in run.go

Lets us run multifile tests and tests with arguments.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5753068

13 years agoexp/wingui: getting relocated to
Alex Brainman [Wed, 7 Mar 2012 06:48:09 +0000 (17:48 +1100)]
exp/wingui: getting relocated to

go get code.google.com/p/gowingui

R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/5752067

13 years agocmd/go: always provide .exe suffix on windows
Shenghou Ma [Wed, 7 Mar 2012 06:25:24 +0000 (14:25 +0800)]
cmd/go: always provide .exe suffix on windows
        Fixes #3190.

R=rsc, tjyang2001, rsc
CC=golang-dev
https://golang.org/cl/5759056

13 years agocmd/dist: fix build for Linux/ARM
Shenghou Ma [Wed, 7 Mar 2012 06:24:28 +0000 (14:24 +0800)]
cmd/dist: fix build for Linux/ARM
        find() returns -1 when not found.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5752068

13 years agohgignore: ignore run.out generated by misc/cgo/stdio/test.bash
Francisco Souza [Wed, 7 Mar 2012 06:21:38 +0000 (01:21 -0500)]
hgignore: ignore run.out generated by misc/cgo/stdio/test.bash

R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/5757059

13 years agosync/atomic: disable store and load test on a single processor machine
Mikio Hara [Wed, 7 Mar 2012 05:51:20 +0000 (14:51 +0900)]
sync/atomic: disable store and load test on a single processor machine

Fixes #3226.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5756073

13 years agonet: fix TestDialTimeout on windows builder
Russ Cox [Wed, 7 Mar 2012 05:41:24 +0000 (00:41 -0500)]
net: fix TestDialTimeout on windows builder

I don't know what's out there, but something
is answering to 127.0.71.111:80 on our builder,
so use a different port.

Also insert a check that the dial fails, which
would have diagnosed this problem.

Fixes #3016.

R=golang-dev, mikioh.mikioh, r
CC=golang-dev
https://golang.org/cl/5754062

13 years agomisc/cgo: re-enable testso
Francisco Souza [Wed, 7 Mar 2012 05:40:16 +0000 (00:40 -0500)]
misc/cgo: re-enable testso

Also enabled it for darwin.

R=rsc
CC=golang-dev
https://golang.org/cl/5754063

13 years agonet: disable another external network test
Russ Cox [Wed, 7 Mar 2012 05:02:07 +0000 (00:02 -0500)]
net: disable another external network test

I don't know enough about multicast.
Should this be disabled on all systems, not just Windows?

R=golang-dev
CC=golang-dev
https://golang.org/cl/5754060

13 years agocmd/go: fix run errors
Russ Cox [Wed, 7 Mar 2012 05:01:57 +0000 (00:01 -0500)]
cmd/go: fix run errors

$ go run
go run: no go files listed
$ go run ../../pkg/math/bits.go
go run: cannot run non-main package
$

Fixes #3168.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5755064

13 years agotest/run: use all available cores on ARM system
Shenghou Ma [Wed, 7 Mar 2012 04:43:25 +0000 (12:43 +0800)]
test/run: use all available cores on ARM system

R=rsc
CC=golang-dev
https://golang.org/cl/5753054

13 years agocmd/go, cmd/godoc, net: fix typo
Shenghou Ma [Wed, 7 Mar 2012 04:41:43 +0000 (12:41 +0800)]
cmd/go, cmd/godoc, net: fix typo

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5757050

13 years agomisc/cgo/test: fix build
Russ Cox [Wed, 7 Mar 2012 04:38:54 +0000 (23:38 -0500)]
misc/cgo/test: fix build

The last CL forgot the all-important 'backdoor' package.
Cgo-using packages compile .c files with gcc, but we want
to compile this one with 6c, so put it in a non-cgo package.

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5758063

13 years agonet: disable use of external listen along with other external network uses
Russ Cox [Wed, 7 Mar 2012 04:35:31 +0000 (23:35 -0500)]
net: disable use of external listen along with other external network uses

By default the all.bash tests must not ever announce
on an external address.  It's not just an OS X issue.

R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5753067

13 years agogo_faq: a simple binary is a little smaller now
Rob Pike [Wed, 7 Mar 2012 04:29:26 +0000 (15:29 +1100)]
go_faq: a simple binary is a little smaller now
About 10% for hello, world.
Maybe more reductions will come.
Also clarify that we're comparing printf against Printf
(gcc can optimize aggressively, making this a different
sort of comparison).

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5756070

13 years agomisc/cgo: re-enable some tests
Russ Cox [Wed, 7 Mar 2012 04:27:30 +0000 (23:27 -0500)]
misc/cgo: re-enable some tests

The testso directory still needs to be enabled.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5731048

13 years agofmt, log: stop using unicode
Russ Cox [Wed, 7 Mar 2012 04:27:11 +0000 (23:27 -0500)]
fmt, log: stop using unicode

$ go list -f '{{.ImportPath}} {{.Deps}}' fmt log
fmt [errors io math os reflect runtime strconv sync sync/atomic syscall time unicode/utf8 unsafe]
log [errors fmt io math os reflect runtime strconv sync sync/atomic syscall time unicode/utf8 unsafe]

R=bradfitz, rogpeppe, r, r, rsc
CC=golang-dev
https://golang.org/cl/5753055

13 years agogo/build: delete Makefile
Rob Pike [Wed, 7 Mar 2012 03:10:49 +0000 (14:10 +1100)]
go/build: delete Makefile
We can write syslist.go by hand.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5757057

13 years ago.hgignore: delete references to Make.inc and syslist.go
Rob Pike [Wed, 7 Mar 2012 03:07:22 +0000 (14:07 +1100)]
.hgignore: delete references to Make.inc and syslist.go

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5752066

13 years agoexp/wingui: remove reference to Make.inc
Rob Pike [Wed, 7 Mar 2012 03:06:16 +0000 (14:06 +1100)]
exp/wingui: remove reference to Make.inc

R=golang-dev, bradfitz, alex.brainman
CC=golang-dev
https://golang.org/cl/5757058

13 years agoall: remove some references to Make.inc etc.
Rob Pike [Wed, 7 Mar 2012 02:51:49 +0000 (13:51 +1100)]
all: remove some references to Make.inc etc.
There are a few more but these are the easiest ones.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5756067

13 years agostrconv: remove dependence on unicode and strings
Rob Pike [Wed, 7 Mar 2012 02:50:31 +0000 (13:50 +1100)]
strconv: remove dependence on unicode and strings
We need a compact, reasonably efficient IsPrint. That adds about 2K of data,
plus a modest amount of code, but now strconv is a near-leaf package.

R=r, bradfitz, adg, rsc, minux.ma
CC=golang-dev
https://golang.org/cl/5756050

13 years agomisc/dist: fix glob pattern under windows
Andrew Gerrand [Wed, 7 Mar 2012 02:34:01 +0000 (13:34 +1100)]
misc/dist: fix glob pattern under windows

R=bradfitz
CC=golang-dev
https://golang.org/cl/5753066

13 years agomisc/dist: prepare source archives
Andrew Gerrand [Wed, 7 Mar 2012 02:13:26 +0000 (13:13 +1100)]
misc/dist: prepare source archives

Fixes #95.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5756066

13 years agodoc: add note about import . to Go 1 compatibility notes
Ian Lance Taylor [Wed, 7 Mar 2012 01:50:11 +0000 (17:50 -0800)]
doc: add note about import . to Go 1 compatibility notes

R=r
CC=golang-dev
https://golang.org/cl/5752065

13 years agodatabase/sql: add docs about connection state, pooling
Brad Fitzpatrick [Wed, 7 Mar 2012 01:44:47 +0000 (17:44 -0800)]
database/sql: add docs about connection state, pooling

Fixes #3223

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5755063

13 years agodoc: fix typos in laws_of_reflection article, add copyright notice.
Johan Euphrosine [Wed, 7 Mar 2012 00:24:00 +0000 (11:24 +1100)]
doc: fix typos in laws_of_reflection article, add copyright notice.

Update #2547.

R=golang-dev, minux.ma, r, r, adg
CC=golang-dev
https://golang.org/cl/5755051

13 years agoos: fix SameFile to work for directories on windows
Alex Brainman [Wed, 7 Mar 2012 00:01:23 +0000 (11:01 +1100)]
os: fix SameFile to work for directories on windows

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5756064

13 years agodeps: allow crypto/x509 cgo and io/ioutil.
Adam Langley [Tue, 6 Mar 2012 22:18:09 +0000 (17:18 -0500)]
deps: allow crypto/x509 cgo and io/ioutil.

In order to land 5700087 (which moves the knowledge of how to get the
root certificates for the system from crypto/tls to crypto/x509), we
need to relax the restrictions on crypto/x509. Afterwards, we can
probably tighten them up in crypto/tls.

R=golang-dev, rsc, krautz
CC=golang-dev
https://golang.org/cl/5753060

13 years agodatabase/sql: fix typo bug resulting in double-Prepare
Brad Fitzpatrick [Tue, 6 Mar 2012 22:10:58 +0000 (14:10 -0800)]
database/sql: fix typo bug resulting in double-Prepare

Bug reported by Blake Mizerany found while writing
his new Postgres driver.

R=golang-dev, blake.mizerany
CC=golang-dev
https://golang.org/cl/5754057

13 years agodoc: update links
Shenghou Ma [Tue, 6 Mar 2012 21:15:47 +0000 (08:15 +1100)]
doc: update links

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5754051

13 years agopath/filepath: disable AbsTest on windows
Rob Pike [Tue, 6 Mar 2012 21:14:12 +0000 (08:14 +1100)]
path/filepath: disable AbsTest on windows
SameFile has a bug.

R=golang-dev
TBR=rsc
CC=golang-dev
https://golang.org/cl/5754055

13 years agodoc: remove unsued progs and makehtml script, update progs/run
Shenghou Ma [Tue, 6 Mar 2012 21:05:10 +0000 (08:05 +1100)]
doc: remove unsued progs and makehtml script, update progs/run
        Due to removal of go_tutorial, unused programs are removed.
        makehtml is unnecessary (it also gives wrong messages when
        the destination file doesn't exist)
        progs/run now compiles all remaining programs under doc/progs.
        Fixes #3076 (again)

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5755053

13 years agopath/filepath/path_test.go: repair and enable TestAbs
Rob Pike [Tue, 6 Mar 2012 20:54:56 +0000 (07:54 +1100)]
path/filepath/path_test.go: repair and enable TestAbs

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5759051

13 years agodoc: add "The go command" article based on Russ' mail
Andrew Gerrand [Tue, 6 Mar 2012 20:40:21 +0000 (07:40 +1100)]
doc: add "The go command" article based on Russ' mail

This is a philosophical document. We can soup it up at a later stage,
but for now it's nice to have a URL to point to that isn't a mailing
list post.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5676061

13 years agogo/parser: fix build (temporarily disable recent change)
Robert Griesemer [Tue, 6 Mar 2012 19:23:27 +0000 (11:23 -0800)]
go/parser: fix build (temporarily disable recent change)

R=golang-dev
CC=golang-dev
https://golang.org/cl/5752059

13 years agogo/parser: better error sync. if commas are missing
Robert Griesemer [Tue, 6 Mar 2012 19:05:16 +0000 (11:05 -0800)]
go/parser: better error sync. if commas are missing

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5756045

13 years agocrypto/tls: make the package description more accurate and less aspirational.
Adam Langley [Tue, 6 Mar 2012 17:49:29 +0000 (12:49 -0500)]
crypto/tls: make the package description more accurate and less aspirational.

Fixes #3216.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5755056

13 years agotime: during short test, do not bother tickers take longer than expected
Shenghou Ma [Tue, 6 Mar 2012 17:10:55 +0000 (01:10 +0800)]
time: during short test, do not bother tickers take longer than expected

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5752058

13 years agoruntime: remove unused runtime·signame and runtime·newError
Ian Lance Taylor [Tue, 6 Mar 2012 17:07:00 +0000 (09:07 -0800)]
runtime: remove unused runtime·signame and runtime·newError

R=golang-dev
CC=golang-dev
https://golang.org/cl/5756044

13 years agocmd/go: honour buildflags in go run
Maxim Pimenov [Tue, 6 Mar 2012 14:33:35 +0000 (09:33 -0500)]
cmd/go: honour buildflags in go run

Either documentation or implementation
of go run's flags is wrong currently.
This change assumes the documentation
to be right.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5752054

13 years agonet: do not use reflect for DNS messages.
Rémy Oudompheng [Tue, 6 Mar 2012 07:02:39 +0000 (08:02 +0100)]
net: do not use reflect for DNS messages.

Fixes #3201.

R=bradfitz, bradfitz, rsc
CC=golang-dev, remy
https://golang.org/cl/5753045

13 years agonet: add skip message to test
Mikio Hara [Tue, 6 Mar 2012 06:41:17 +0000 (15:41 +0900)]
net: add skip message to test

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5753048

13 years agocmd/go: allow go get with arbitrary URLs
Brad Fitzpatrick [Tue, 6 Mar 2012 06:36:15 +0000 (22:36 -0800)]
cmd/go: allow go get with arbitrary URLs

This CL permits using arbitrary, non-VCS-qualified URLs as
aliases for fully VCS-qualified and/or well-known code hosting
sites.

Example 1) A VCS-qualified URL can now be shorter.

Before:
$ go get camlistore.org/r/p/camlistore.git/pkg/blobref
After:
$ go get camlistore.org/pkg/blobref

Example 2) A custom domain can be used as the import,
referencing a well-known code hosting site.

Before:
$ go get github.com/bradfitz/sonden
After:
$ go get bradfitz.com/pkg/sonden

The mechanism used is a <meta> tag in the HTML document
retrieved from fetching:

    https://<import>?go-get=1  (preferred)
    http://<import>?go-get=1   (fallback)

The meta tag should look like:

<meta name="go-import" content="import-alias-prefix vcs full-repo-root">

The full-repo-root must be a full URL root to a repository containing
a scheme and *not* containing a ".vcs" qualifier.

The vcs is one of "git", "hg", "svn", etc.

The import-alias-prefix must be a prefix or exact match of the
package being fetched with "go get".

If there are multiple meta tags, only the one with a prefix
matching the import path is used. It is an error if multiple
go-import values match the import prefix.

If the import-alias-prefix is not an exact match for the import,
another HTTP fetch is performed, at the declared root (which does
*not* need to be the domain's root).

For example, assuming that "camlistore.org/pkg/blobref" declares
in its HTML head:

<meta name="go-import" content="camlistore.org git https://camlistore.org/r/p/camlistore" />

... then:

$ go get camlistore.org/pkg/blobref

... looks at the following URLs:

   https://camlistore.org/pkg/blobref?go-get=1
   http://camlistore.org/pkg/blobref?go-get=1
   https://camlistore.org/?go-get=1
   http://camlistore.org/?go-get=1

Ultimately it finds, at the root (camlistore.org/), the same go-import:

<meta name="go-import" content="camlistore.org git https://camlistore.org/r/p/camlistore" />

... and proceeds to trust it, checking out git //camlistore.org/r/p/camlistore at
the import path of "camlistore.org" on disk.

Fixes #3099

R=r, rsc, gary.burd, eikeon, untheoretic, n13m3y3r, rsc
CC=golang-dev
https://golang.org/cl/5660051

13 years agocmd/dist: use correct hg tag for go version
Alex Brainman [Tue, 6 Mar 2012 06:21:39 +0000 (17:21 +1100)]
cmd/dist: use correct hg tag for go version

When looking for suitable tag always start
from current version, not the tip.

R=minux.ma, rsc
CC=golang-dev
https://golang.org/cl/5731059

13 years agodoc/gopher: flip frontpage gopher's eyes
Andrew Gerrand [Tue, 6 Mar 2012 05:56:30 +0000 (16:56 +1100)]
doc/gopher: flip frontpage gopher's eyes

R=r, r
CC=golang-dev
https://golang.org/cl/5759045

13 years agocmd/go: add -compiler
Russ Cox [Tue, 6 Mar 2012 05:36:24 +0000 (00:36 -0500)]
cmd/go: add -compiler
go/build: add Context.Compiler

Fixes #3157.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5756047

13 years agostrconv: add table-based isPrint
Russ Cox [Tue, 6 Mar 2012 05:36:12 +0000 (00:36 -0500)]
strconv: add table-based isPrint

Not used yet for simpler merge.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5756048

13 years agogo/build: fix windows and plan9 builds
Brad Fitzpatrick [Tue, 6 Mar 2012 05:33:44 +0000 (21:33 -0800)]
go/build: fix windows and plan9 builds

Bit of a band-aid fix.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5757045

13 years agostrconv: remove dependency on bytes
Rob Pike [Tue, 6 Mar 2012 04:25:42 +0000 (15:25 +1100)]
strconv: remove dependency on bytes

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5759044

13 years agogodoc: switch on +1 buttons
Andrew Gerrand [Tue, 6 Mar 2012 04:16:45 +0000 (15:16 +1100)]
godoc: switch on +1 buttons

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5754048

13 years agodoc: update install docs for Windows and Go 1, add golang-announce to /project
Andrew Gerrand [Tue, 6 Mar 2012 04:16:02 +0000 (15:16 +1100)]
doc: update install docs for Windows and Go 1, add golang-announce to /project

R=golang-dev, bradfitz, r, rsc
CC=golang-dev
https://golang.org/cl/5758044

13 years agogo/build: add dependency test
Russ Cox [Tue, 6 Mar 2012 04:13:00 +0000 (23:13 -0500)]
go/build: add dependency test

This exercises the Import function but more importantly
gives us a place to write down the policy for dependencies
within the Go tree.  It also forces us to look at the dependencies,
which may lead to adjustments.

Surprises:
 - go/doc imports text/template, for HTMLEscape (could fix)
 - it is impossible to use math/big without fmt (unfixable)
 - it is impossible to use crypto/rand without math/big (unfixable)

R=golang-dev, bradfitz, gri, r
CC=golang-dev
https://golang.org/cl/5732062

13 years agounicode/utf16: delete dependence on package unicode
Rob Pike [Tue, 6 Mar 2012 03:58:08 +0000 (14:58 +1100)]
unicode/utf16: delete dependence on package unicode
In the test, verify the copied constants are correct.
Also put the test into package utf16 rather than utf16_test;
the old location was probably due creating the test from
utf8, but the separation is not needed here.

R=golang-dev, bradfitz, rsc, rsc, r
CC=golang-dev
https://golang.org/cl/5752047

13 years agocmd/godoc: fixes
Russ Cox [Tue, 6 Mar 2012 03:47:35 +0000 (22:47 -0500)]
cmd/godoc: fixes

These appear to have been left out of the CL I submitted earlier.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5759043

13 years agobuild: use run.go for running tests
Russ Cox [Tue, 6 Mar 2012 03:47:23 +0000 (22:47 -0500)]
build: use run.go for running tests

Also, tweak run.go to use no more than 2x the
number of CPUs, and only one on ARM.

53.85u 13.33s 53.69r   ./run
50.68u 12.13s 18.85r   go run run.go

Fixes #2833.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5754047

13 years agoruntime: add Compiler
Russ Cox [Tue, 6 Mar 2012 03:28:02 +0000 (22:28 -0500)]
runtime: add Compiler

R=iant, r, gri
CC=golang-dev
https://golang.org/cl/5720073

13 years agonet: silence another epoll print
Russ Cox [Tue, 6 Mar 2012 03:07:22 +0000 (22:07 -0500)]
net: silence another epoll print

R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5752048

13 years agodoc: add more gophers
Andrew Gerrand [Tue, 6 Mar 2012 01:50:52 +0000 (12:50 +1100)]
doc: add more gophers

R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5753047

13 years agonet: fix windows build
Mikio Hara [Tue, 6 Mar 2012 01:07:08 +0000 (10:07 +0900)]
net: fix windows build

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5755045

13 years agonet: improve server and file tests
Mikio Hara [Tue, 6 Mar 2012 00:43:45 +0000 (09:43 +0900)]
net: improve server and file tests

* Splits into three server tests.
  - TestStreamConnServer for tcp, tcp4, tcp6 and unix networks
  - TestSeqpacketConnServer for unixpacket networks
  - TestDatagramPacketConnServer for udp, udp4, udp6 and unixgram networks
* Adds both PacketConn and Conn test clients to datagram packet conn tests.
* Fixes wildcard listen test cases on dual IP stack platform.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5701066

13 years agotest: match gccgo error messages for bug388.go
Ian Lance Taylor [Tue, 6 Mar 2012 00:21:46 +0000 (16:21 -0800)]
test: match gccgo error messages for bug388.go

As runtime.UintType is no longer defined, the gccgo error
messages have changed.

bug388.go:12:10: error: reference to undefined identifier ‘runtime.UintType’
bug388.go:12:10: error: invalid named/anonymous mix
bug388.go:13:21: error: reference to undefined identifier ‘runtime.UintType’
bug388.go:17:10: error: reference to undefined identifier ‘runtime.UintType’
bug388.go:18:18: error: reference to undefined identifier ‘runtime.UintType’
bug388.go:22:9: error: non-name on left side of ‘:=’
bug388.go:27:10: error: expected type
bug388.go:32:9: error: expected type
bug388.go:23:14: error: reference to field ‘i’ in object which has no fields or methods

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5755044

13 years agounicode/utf8: remove dependence on unicode.
Rob Pike [Tue, 6 Mar 2012 00:14:45 +0000 (11:14 +1100)]
unicode/utf8: remove dependence on unicode.
The dependency was there only to pull in two constants.
Now we define them locally and verify equality in the test.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5754046

13 years agoreflect: fix comment spacing
Ian Lance Taylor [Mon, 5 Mar 2012 23:51:58 +0000 (15:51 -0800)]
reflect: fix comment spacing

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5757043

13 years agomisc/xcode: fix typos
Robert Griesemer [Mon, 5 Mar 2012 23:50:48 +0000 (15:50 -0800)]
misc/xcode: fix typos

R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5756043

13 years agoXcode: Example install of language specification for Xcode 4.x.
Emil Hessman [Mon, 5 Mar 2012 23:11:08 +0000 (15:11 -0800)]
Xcode: Example install of language specification for Xcode 4.x.

go.xclangspec is identical to the one in misc/xcode/3/, except for the heading.

Partial workaround for issue 2401.

R=gri
CC=golang-dev
https://golang.org/cl/5732051

13 years agoC+A: adding c.emil.hessman@gmail.com
Robert Griesemer [Mon, 5 Mar 2012 23:10:58 +0000 (15:10 -0800)]
C+A: adding c.emil.hessman@gmail.com

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5754044

13 years agoexpvar: add locking to String, and use RWMutex properly throughout.
David Symonds [Mon, 5 Mar 2012 22:13:26 +0000 (09:13 +1100)]
expvar: add locking to String, and use RWMutex properly throughout.

R=bradfitz
CC=golang-dev
https://golang.org/cl/5754043

13 years agomisc/dist: add windows packaging support
Andrew Gerrand [Mon, 5 Mar 2012 21:55:53 +0000 (08:55 +1100)]
misc/dist: add windows packaging support

R=golang-dev, bsiegert, jdpoirier
CC=golang-dev
https://golang.org/cl/5727059

13 years agoruntime: wait for main goroutine before setting GOMAXPROCS.
Rémy Oudompheng [Mon, 5 Mar 2012 21:40:27 +0000 (16:40 -0500)]
runtime: wait for main goroutine before setting GOMAXPROCS.

Fixes #3182.

R=golang-dev, dvyukov, rsc
CC=golang-dev, remy
https://golang.org/cl/5732057

13 years agonet: remove all direct fmt and bytes imports
Brad Fitzpatrick [Mon, 5 Mar 2012 21:36:05 +0000 (13:36 -0800)]
net: remove all direct fmt and bytes imports

Once dnsMsg stops using reflect, we lose even more
indirect dependencies.

R=rsc
CC=golang-dev
https://golang.org/cl/5751043

13 years agocmd/gc: if $GOROOT_FINAL is set, rewrite file names in object files
Russ Cox [Mon, 5 Mar 2012 21:13:33 +0000 (16:13 -0500)]
cmd/gc: if $GOROOT_FINAL is set, rewrite file names in object files

GOROOT_FINAL is a build parameter that means "eventually
the Go tree will be installed here".  Make the file name information
match that eventual location.

Fixes #3180.

R=ken, ken
CC=golang-dev
https://golang.org/cl/5742043

13 years agoruntime/debug: fix test when source cannot be found
Russ Cox [Mon, 5 Mar 2012 21:13:15 +0000 (16:13 -0500)]
runtime/debug: fix test when source cannot be found

This happens with GOROOT_FINAL=/somewhere/else

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5727069

13 years agocmd/godoc: remove extra / in paths
Ugorji Nwoke [Mon, 5 Mar 2012 20:36:33 +0000 (15:36 -0500)]
cmd/godoc: remove extra / in paths

If I click on links which should send you to source code (e.g. type, function, etc),
the link is to //src/... (instead of /src/...).
This causes a DNS resolution failure on the browser.

Quick fix is to remove the leading / from package.html
(since godoc.go src links automatically add a leading / as necessary).

Fixes #3193.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5730059

13 years agoA+C: Ugorji Nwoke (individual CLA)
Russ Cox [Mon, 5 Mar 2012 20:36:20 +0000 (15:36 -0500)]
A+C: Ugorji Nwoke (individual CLA)

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5746043

13 years agonet: remove more use of fmt
Brad Fitzpatrick [Mon, 5 Mar 2012 20:20:58 +0000 (12:20 -0800)]
net: remove more use of fmt

Also add a TODO for the broken *dnsMsg String method.

R=golang-dev, rsc, borman
CC=golang-dev
https://golang.org/cl/5720075

13 years agomisc/emacs: fix extra indentation after comments that end with a period
Sameer Ajmani [Mon, 5 Mar 2012 19:58:35 +0000 (14:58 -0500)]
misc/emacs: fix extra indentation after comments that end with a period
in emacs go mode.  Thanks Alex Shinn for the patch.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5728063

13 years agonet: don't import bytes or fmt in mac.go
Brad Fitzpatrick [Mon, 5 Mar 2012 19:43:28 +0000 (11:43 -0800)]
net: don't import bytes or fmt in mac.go

Also add some more MAC tests.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5728065

13 years agocmd/go: sync type Package and go list doc
Russ Cox [Mon, 5 Mar 2012 19:41:30 +0000 (14:41 -0500)]
cmd/go: sync type Package and go list doc

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5730061

13 years agotest/run.go: fix build
Shenghou Ma [Mon, 5 Mar 2012 19:34:53 +0000 (03:34 +0800)]
test/run.go: fix build

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5727068

13 years agosyscall: fix mkall.sh, mksyscall_linux.pl, and regen for Linux/ARM
Shenghou Ma [Mon, 5 Mar 2012 19:12:11 +0000 (03:12 +0800)]
syscall: fix mkall.sh, mksyscall_linux.pl, and regen for Linux/ARM
CL 3075041 says ARM is not little-endian, but my test suggests otherwise.
My test program is:

    package main
    import ("fmt"; "syscall"; "os")
    func main() {
       err := syscall.Fallocate(1, 1/*FALLOC_FL_KEEP_SIZE*/, 0, int64(40960));
       fmt.Fprintln(os.Stderr, err)
    }

Without this CL, ./test > testfile will show: file too large; and strace shows:
    fallocate(1, 01, 0, 175921860444160)    = -1 EFBIG (File too large)
With this CL, ./test > testfile will show: <nil>; and strace shows:
    fallocate(1, 01, 0, 40960)              = 0

Quoting rsc:
"[It turns out that] ARM syscall ABI requires 64-bit arguments to use an
(even, odd) register pair, not an (odd, even) pair. Switching to "big-endian"
worked because it ended up using the high 32-bits (always zero in the tests
we had) as the padding word, because the 64-bit argument was the last one,
and because we fill in zeros for the rest of the system call arguments, up to
six. So it happened to work."

I updated mksyscall_linux.pl to accommodate the register pair ABI requirement,
and removed all hand-tweaked syscall routines in favor of the auto-generated
ones. These including: Ftruncate, Truncate, Pread and Pwrite.

Some recent Linux/ARM distributions do not bundle kernel asm headers,
so instead we always get latest asm/unistd.h from git.kernel.org (just like
what we do for FreeBSD).

R=ken, r, rsc, r, dave, iant
CC=golang-dev
https://golang.org/cl/5726051

13 years agoexpvar: add missing locking in String methods
Brad Fitzpatrick [Mon, 5 Mar 2012 19:09:50 +0000 (11:09 -0800)]
expvar: add missing locking in String methods

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5726062

13 years agocmd/go: honor buildflags in go test.
Rémy Oudompheng [Mon, 5 Mar 2012 18:58:04 +0000 (19:58 +0100)]
cmd/go: honor buildflags in go test.

Fixes #3196.

R=golang-dev, rsc
CC=golang-dev, remy
https://golang.org/cl/5725044

13 years agocmd/gc: must not inline panic, recover
Russ Cox [Mon, 5 Mar 2012 18:51:44 +0000 (13:51 -0500)]
cmd/gc: must not inline panic, recover

R=lvd, gri
CC=golang-dev
https://golang.org/cl/5731061

13 years agocmd/gc: show duplicate key in error
Russ Cox [Mon, 5 Mar 2012 18:47:36 +0000 (13:47 -0500)]
cmd/gc: show duplicate key in error

R=ken2
CC=golang-dev
https://golang.org/cl/5728064

13 years agocsv: clarify what a negative FieldsPerRecord means
Paul Borman [Mon, 5 Mar 2012 18:34:12 +0000 (13:34 -0500)]
csv: clarify what a negative FieldsPerRecord means

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5729068

13 years agoencoding/json: document that nil slice encodes as `null`
Russ Cox [Mon, 5 Mar 2012 18:29:22 +0000 (13:29 -0500)]
encoding/json: document that nil slice encodes as `null`

Fixes #3189.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5730058

13 years agogodoc: quiet log spam
Russ Cox [Mon, 5 Mar 2012 18:29:13 +0000 (13:29 -0500)]
godoc: quiet log spam

Fixes #3191.
Sorry.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5726059

13 years agocrypto/x509: enforce path length constraint.
Adam Langley [Mon, 5 Mar 2012 17:08:42 +0000 (12:08 -0500)]
crypto/x509: enforce path length constraint.

An X.509 path length constrains the number of certificate that may
follow in the chain. This is a little simplistic for a first pass as it
doesn't check self-signed certificates (which don't count towards the
length), but it's conservatively simplistic.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5727057

13 years agocrypto/x509: don't include empty additional primes in PKCS#1 private key.
Adam Langley [Mon, 5 Mar 2012 17:04:18 +0000 (12:04 -0500)]
crypto/x509: don't include empty additional primes in PKCS#1 private key.

asn1 didn't have an omitempty tag, so the list of additional primes in
an RSA private key was serialised as an empty SEQUENCE, even for
version 1 structures. This tripped up external code that didn't handle
v2.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5729062

13 years agoencoding/asn1: handle UTCTime before the year 2000
Adam Langley [Mon, 5 Mar 2012 16:31:24 +0000 (11:31 -0500)]
encoding/asn1: handle UTCTime before the year 2000

UTCTime only has a two digit date field and year values from 50 should
be 1950, not 2050.

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5729063