]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years agoio: Avoid another race condition in pipes.
Ian Lance Taylor [Wed, 21 Jul 2010 17:57:46 +0000 (10:57 -0700)]
io: Avoid another race condition in pipes.

Goroutine 1:
  Call Read on read half of pipe, entering pipeHalf.rw.
  Check ioclosed field, which is false.
  Send data to p.c1
  Wait for response on p.c2.

Goroutine 2:
  Call Close on read half of pipe, entering pipeHalf.close.
  Set closed field.
  Send error to p.cclose.
  Set ioclosed field.
  Send 1 to p.done.
  Return and exit goroutine.

Goroutine 3:
  This is the goroutine running pipe.run, and for some reason
  it has started late.
  Read error from p.rclose; set rerr and continue.
  Read 1 from p.done; increment ndone and continue.
  Read data from r1 (sent by goroutine 1); set r1 = nil and continue

Now goroutine 1 is waiting for a response, and goroutine 3 is
waiting for something else to happen.

This patch fixes the race by having the runner check whether
the read half is closed when it is asked for read data, and
similarly for the corresponding race on the write half.

This patch also fixes the similar race in which ndone gets
bumped up to 2 while there is a reader or writer waiting.

There is still another race to fix.  It is possible for the
read half and the write half to both be closed, and for the
runner goroutine to exit, all before the runner goroutine sees
the request from a reader.  E.g., in the above, have goroutine
2 also close the write half, and have goroutine 3 see both
done messages before it sees the request from goroutine 1.

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

14 years agosyscall: On Windows, Errstr FormatMessage has no values to insert.
Peter Mundy [Wed, 21 Jul 2010 16:40:08 +0000 (09:40 -0700)]
syscall: On Windows, Errstr FormatMessage has no values to insert.

For the Windows version of syscall Errstr, set the
FORMAT_MESSAGE_IGNORE_INSERTS value of the FormatMessage
Flags argument when there are no values to insert.

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

14 years agocrypto/tls: add client-side SNI support and PeerCertificates.
Adam Langley [Wed, 21 Jul 2010 15:36:01 +0000 (11:36 -0400)]
crypto/tls: add client-side SNI support and PeerCertificates.

SNI (Server Name Indication) is a way for a TLS client to
indicate to the server which name it knows the server by. This
allows the server to have several names and return the correct
certificate for each (virtual hosting).

PeerCertificates returns the list of certificates presented by
server.

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

14 years ago crypto/ocsp: add package to parse OCSP responses.
Adam Langley [Wed, 21 Jul 2010 14:07:22 +0000 (10:07 -0400)]
crypto/ocsp: add package to parse OCSP responses.

        OCSP is the preferred X.509 revocation mechanism. X.509 certificates
        can contain a URL from which can be fetched a signed response saying
        "this certificate is valid until $x" (where $x is usually 7 days in the
        future). These are called OCSP responses and they can also be included
        in the TLS handshake itself ("OCSP stapling")

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

14 years agoarm: fic build3, disable flaky 64 bit test
Kai Backman [Wed, 21 Jul 2010 12:59:11 +0000 (15:59 +0300)]
arm: fic build3, disable flaky 64 bit test

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

14 years agoarm: fix build2, tweak test/nul1.go arm exclusion
Kai Backman [Wed, 21 Jul 2010 11:51:03 +0000 (14:51 +0300)]
arm: fix build2, tweak test/nul1.go arm exclusion

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

14 years agoarm: fix build by disabling list copying optimization for 5g.
Kai Backman [Wed, 21 Jul 2010 11:14:21 +0000 (14:14 +0300)]
arm: fix build by disabling list copying optimization for 5g.

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

14 years agoos: change comment on O_APPEND to be more accurate
Andrew Gerrand [Wed, 21 Jul 2010 07:11:28 +0000 (17:11 +1000)]
os: change comment on O_APPEND to be more accurate

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

14 years agonet(windows): properly handle EOF in (*netFD).Read().
Alex Brainman [Wed, 21 Jul 2010 06:51:07 +0000 (23:51 -0700)]
net(windows): properly handle EOF in (*netFD).Read().

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

14 years agogc: various bug fixes
Russ Cox [Wed, 21 Jul 2010 06:45:33 +0000 (23:45 -0700)]
gc: various bug fixes

Fixes #935.
Fixes #936.
Fixes #941.

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

14 years agobytes: add Title
Rob Pike [Wed, 21 Jul 2010 02:53:59 +0000 (19:53 -0700)]
bytes: add Title

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

14 years agogobs: fix bug in singleton arrays
Rob Pike [Wed, 21 Jul 2010 02:53:28 +0000 (19:53 -0700)]
gobs: fix bug in singleton arrays
Fixes #934.

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

14 years agogofmt: fix some linebreak issues
Robert Griesemer [Tue, 20 Jul 2010 16:29:31 +0000 (09:29 -0700)]
gofmt: fix some linebreak issues

- don't lose empty lines after labels
- canonicalize number of line breaks
- gofmt src misc, fixes a couple of irregular breaks

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

14 years agofix build
Kai Backman [Tue, 20 Jul 2010 13:20:35 +0000 (16:20 +0300)]
fix build

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

14 years agomore soft float support. passes several basic tests
Kai Backman [Tue, 20 Jul 2010 12:53:16 +0000 (15:53 +0300)]
more soft float support. passes several basic tests
but with less precision than hardware counterparts.

fixed a number of tests to output BUG when they failed.
changed the runner to distinghuish between output
and output containing ^BUG

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

14 years agogccgo_install.html: Description of the port to RTEMS added.
Vinu Rajashekhar [Tue, 20 Jul 2010 07:06:20 +0000 (00:06 -0700)]
gccgo_install.html: Description of the port to RTEMS added.

R=iant, r
CC=gofrontend-dev, golang-dev, joel.sherrill
https://golang.org/cl/1846047

14 years agostrings: add Title
Rob Pike [Tue, 20 Jul 2010 07:03:59 +0000 (00:03 -0700)]
strings: add Title
strings.ToTitle converts all characters to title case, which for consistency with the
other To* functions it should continue to do.  This CL adds string.Title, which
does a proper title-casing of the string.
A similar function for package bytes will follow once this is settled.
Fixes #933.

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

14 years agochange floating literal normalization
Ken Thompson [Mon, 19 Jul 2010 23:10:46 +0000 (16:10 -0700)]
change floating literal normalization
from word-oriented to bit-oriented.
this will increase fp literal precision
by up to a full word.

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

14 years agotabwriter: fix a comment to fix godoc output
Robert Griesemer [Mon, 19 Jul 2010 18:33:11 +0000 (11:33 -0700)]
tabwriter: fix a comment to fix godoc output

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

14 years ago asn1: Enumerated, Flag and GeneralizedTime support.
Adam Langley [Mon, 19 Jul 2010 15:11:40 +0000 (11:11 -0400)]
asn1: Enumerated, Flag and GeneralizedTime support.

        Add support for ASN.1 ENUMERATED types.

        Add a magic type, asn1.Flag, for the cases where the presence of an
        empty explicit tag is semantically meaningful.

        Add support for GeneralizedTime.

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

14 years agotime: fix parsing of minutes in time zones.
Adam Langley [Mon, 19 Jul 2010 15:08:04 +0000 (11:08 -0400)]
time: fix parsing of minutes in time zones.

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

14 years agominor error checking to android launcher
Kai Backman [Mon, 19 Jul 2010 08:43:33 +0000 (11:43 +0300)]
minor error checking to android launcher

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

14 years agohgignore: adds bin/ to support setting $GOBIN to $GOROOT/bin
James Whitehead [Mon, 19 Jul 2010 04:10:00 +0000 (14:10 +1000)]
hgignore: adds bin/ to support setting $GOBIN to $GOROOT/bin

R=PeterGo, adg
CC=golang-dev, jnw
https://golang.org/cl/1699046

14 years agohttp/transferWriter: Write body when content length unknown
James Whitehead [Mon, 19 Jul 2010 04:05:27 +0000 (14:05 +1000)]
http/transferWriter: Write body when content length unknown

Fixes #923.

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

14 years agolinux/386: use Xen-friendly ELF TLS instruction sequence
Russ Cox [Sat, 17 Jul 2010 23:54:03 +0000 (16:54 -0700)]
linux/386: use Xen-friendly ELF TLS instruction sequence

Fixes #465.

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

14 years agoutf16: fix cyclic dependency when testing on Windows
Peter Mundy [Sat, 17 Jul 2010 23:52:53 +0000 (16:52 -0700)]
utf16: fix cyclic dependency when testing on Windows

(on Windows, syscall depends on utf16)

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

14 years ago1. got 29 (Mpscale) more bits of precision
Ken Thompson [Sat, 17 Jul 2010 23:32:40 +0000 (16:32 -0700)]
1. got 29 (Mpscale) more bits of precision
out of floating constant multiply
2. added rounding code to "const fix=float"
to allow up to 29 (Mpscale) bits of
slop and still get an exact fixed constant.

fixes #931

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

14 years agogc: print error detail about failure to open import
Russ Cox [Sat, 17 Jul 2010 04:38:51 +0000 (21:38 -0700)]
gc: print error detail about failure to open import

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

14 years agocodereview: make 'hg submit' work with Mercurial 1.6
Russ Cox [Sat, 17 Jul 2010 01:54:38 +0000 (18:54 -0700)]
codereview: make 'hg submit' work with Mercurial 1.6

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

14 years ago5l, 6l, 8l: reject invalid input files
Russ Cox [Fri, 16 Jul 2010 23:16:17 +0000 (16:16 -0700)]
5l, 6l, 8l: reject invalid input files

Fixes #925.
Fixes #926.
Fixes #927.
Fixes #928.
Fixes #929.
Fixes #930.

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

14 years agofix typo in lex.c comment
Rob Pike [Fri, 16 Jul 2010 22:08:31 +0000 (15:08 -0700)]
fix typo in lex.c comment

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

14 years agochange line pragma from
Ken Thompson [Fri, 16 Jul 2010 20:34:36 +0000 (13:34 -0700)]
change line pragma from
//line number file
to
//line file:number

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

14 years agobig: attempt to fix arm build
Russ Cox [Fri, 16 Jul 2010 18:18:45 +0000 (11:18 -0700)]
big: attempt to fix arm build

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

14 years agoRemove unused declaration.
Ian Lance Taylor [Fri, 16 Jul 2010 18:05:38 +0000 (11:05 -0700)]
Remove unused declaration.

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

14 years agocgo: If CC is set in environment, use it rather than "gcc".
Ian Lance Taylor [Fri, 16 Jul 2010 18:01:04 +0000 (11:01 -0700)]
cgo: If CC is set in environment, use it rather than "gcc".

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

14 years agointerpret lines that look like
Ken Thompson [Fri, 16 Jul 2010 03:21:33 +0000 (20:21 -0700)]
interpret lines that look like
//line 10 units.y
which is equiv to c
#line 10 units.y
the purpose is to generate diagnostics
that correctly point to preprocessed source.

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

14 years agocodereview: don't run gofmt with an empty file list
Russ Cox [Thu, 15 Jul 2010 23:43:06 +0000 (16:43 -0700)]
codereview: don't run gofmt with an empty file list

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

14 years agogc: bug294
Russ Cox [Thu, 15 Jul 2010 23:42:32 +0000 (16:42 -0700)]
gc: bug294

Fixes #800.

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

14 years agogc: bug293
Russ Cox [Thu, 15 Jul 2010 23:14:06 +0000 (16:14 -0700)]
gc: bug293

Fixes #846.

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

14 years agogc: bug292
Russ Cox [Thu, 15 Jul 2010 23:13:47 +0000 (16:13 -0700)]
gc: bug292

Fixes #843.

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

14 years agobignum: delete package - functionality subsumed by package big
Robert Griesemer [Thu, 15 Jul 2010 23:08:53 +0000 (16:08 -0700)]
bignum: delete package - functionality subsumed by package big

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

14 years agogc: issue 894
Russ Cox [Thu, 15 Jul 2010 22:25:32 +0000 (15:25 -0700)]
gc: issue 894

Fixes #894.

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

14 years agogc: issue 901
Russ Cox [Thu, 15 Jul 2010 22:22:51 +0000 (15:22 -0700)]
gc: issue 901

Fixes #901.

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

14 years agogc: bug291
Russ Cox [Thu, 15 Jul 2010 22:17:42 +0000 (15:17 -0700)]
gc: bug291

Fixes #915.

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

14 years agogc: bug274
Russ Cox [Thu, 15 Jul 2010 22:05:56 +0000 (15:05 -0700)]
gc: bug274

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

14 years agogc: fix handling of types inside function bodies
Russ Cox [Thu, 15 Jul 2010 21:25:50 +0000 (14:25 -0700)]
gc: fix handling of types inside function bodies

Fixes #849.
Fixes #920.

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

14 years agoBuild libcgo.so with $(CC), not the gcc on PATH.
Ian Lance Taylor [Thu, 15 Jul 2010 21:15:39 +0000 (14:15 -0700)]
Build libcgo.so with $(CC), not the gcc on PATH.

Change make.bash to make sure that $(CC) is defined to match
the compiler used to build the tools.

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

14 years agoClarify that a new goroutine is not started for each finalizer.
Ian Lance Taylor [Thu, 15 Jul 2010 19:32:38 +0000 (12:32 -0700)]
Clarify that a new goroutine is not started for each finalizer.

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

14 years agocgo: use new command line syntax: -- separates cgo flags from gcc flags
Russ Cox [Thu, 15 Jul 2010 16:41:21 +0000 (09:41 -0700)]
cgo: use new command line syntax: -- separates cgo flags from gcc flags

Fixes #922.

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

14 years agorelease.2010-07-14 release
Andrew Gerrand [Thu, 15 Jul 2010 03:07:35 +0000 (13:07 +1000)]
release.2010-07-14 release

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

14 years agorelease.2010-07-14 weekly.2010-07-14
Andrew Gerrand [Thu, 15 Jul 2010 03:04:04 +0000 (13:04 +1000)]
release.2010-07-14

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

14 years agomime/multipart and HTTP multipart/form-data support
Brad Fitzpatrick [Thu, 15 Jul 2010 00:26:14 +0000 (17:26 -0700)]
mime/multipart and HTTP multipart/form-data support

Somewhat of a work-in-progress (in that MIME is a large spec), but this is
functional and enough for discussion and/or code review.

In addition to the unit tests, I've tested with curl and Chrome with
a variety of test files, making sure the digests of files are unaltered
when read via a multipart Part.

R=rsc, adg, dsymonds1, agl1
CC=golang-dev
https://golang.org/cl/1681049

14 years agoos: use /tmp again
Russ Cox [Thu, 15 Jul 2010 00:25:46 +0000 (17:25 -0700)]
os: use /tmp again

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

14 years agowindows: append executable extension (done as per Russ' suggestion)
Joe Poirier [Thu, 15 Jul 2010 00:21:13 +0000 (17:21 -0700)]
windows: append executable extension (done as per Russ' suggestion)

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

14 years agocgo: various bug fixes
Russ Cox [Thu, 15 Jul 2010 00:17:53 +0000 (17:17 -0700)]
cgo: various bug fixes

* remember #defined names, so that C.stdout can refer
  to the real name (on OS X) __stdoutp.
* better handling of #defined constant expressions
* allow n, err = C.strtol("asdf", 0, 123) to get errno as os.Error
* write all output files to current directory
* don't require gcc output if there was no input

Fixes #533.
Fixes #709.
Fixes #756.

R=r
CC=dho, golang-dev, iant
https://golang.org/cl/1734047

14 years agocodereview: Fix for Mercurial >= 1.6
Evan Shaw [Thu, 15 Jul 2010 00:17:04 +0000 (17:17 -0700)]
codereview: Fix for Mercurial >= 1.6

R=rsc, adg, rsc1
CC=golang-dev
https://golang.org/cl/1804041

14 years agogo spec: clarification of channel close()
Robert Griesemer [Wed, 14 Jul 2010 23:09:22 +0000 (16:09 -0700)]
go spec: clarification of channel close()

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

14 years agotutorial: show how to compile helloworld3, which depends on ./file
Rob Pike [Wed, 14 Jul 2010 20:29:12 +0000 (13:29 -0700)]
tutorial: show how to compile helloworld3, which depends on ./file
make shell prompts consistent

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

14 years agochannel tests: added a couple of tests with closed channels
Robert Griesemer [Wed, 14 Jul 2010 20:18:57 +0000 (13:18 -0700)]
channel tests: added a couple of tests with closed channels

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

14 years agofix build: reverting exp/eval Makefile to old form
Robert Griesemer [Wed, 14 Jul 2010 17:11:12 +0000 (10:11 -0700)]
fix build: reverting exp/eval Makefile to old form
(gofmt doesn't exist when this is built)

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

14 years agoselect statement: initial set of test cases for corner cases
Robert Griesemer [Wed, 14 Jul 2010 16:55:08 +0000 (09:55 -0700)]
select statement: initial set of test cases for corner cases

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

14 years agoexp/eval: Converted from bignum to big
Evan Shaw [Wed, 14 Jul 2010 16:39:59 +0000 (09:39 -0700)]
exp/eval: Converted from bignum to big

Also in this CL:
* Removed util.go, as its functionality is in big
* Removed some semicolons from the code generated by gen.go
* Added a generate target to Makefile
* Removed an outdated TODO from value.go

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

14 years agocrypto/tls: add client OCSP stapling support.
Adam Langley [Wed, 14 Jul 2010 14:40:15 +0000 (10:40 -0400)]
crypto/tls: add client OCSP stapling support.

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

14 years agoruntime: better error for send/recv on nil channel
Russ Cox [Wed, 14 Jul 2010 00:27:26 +0000 (17:27 -0700)]
runtime: better error for send/recv on nil channel

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

14 years agoGo specification: Lock down some details about channels and select:
Rob Pike [Tue, 13 Jul 2010 23:23:54 +0000 (16:23 -0700)]
Go specification: Lock down some details about channels and select:
- nil channel in regular send or receive panics
- empty select blocks forever

R=rsc, gri, iant, ken2
CC=golang-dev
https://golang.org/cl/1825043

14 years agocrypto/rand: add missing Unlock
Russ Cox [Tue, 13 Jul 2010 19:37:47 +0000 (12:37 -0700)]
crypto/rand: add missing Unlock

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

14 years agogo spec: specify len/cap for nil slices, maps, and channels
Robert Griesemer [Tue, 13 Jul 2010 18:54:57 +0000 (11:54 -0700)]
go spec: specify len/cap for nil slices, maps, and channels

Fixes #891.

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

14 years agoruntime/tiny: style and doc tweaks
Andrew Gerrand [Tue, 13 Jul 2010 00:47:52 +0000 (10:47 +1000)]
runtime/tiny: style and doc tweaks

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

14 years agofix build
Russ Cox [Tue, 13 Jul 2010 00:46:03 +0000 (17:46 -0700)]
fix build

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

14 years agoos: Use TempFile with default TempDir for temp test files
Peter Mundy [Tue, 13 Jul 2010 00:31:51 +0000 (10:31 +1000)]
os: Use TempFile with default TempDir for temp test files

Use io/ioutil.TempFile with default os.TempDir for temporary test files.
For os_test.go temporary test files, use a local file system and OS
independent directory names. Avoid problems with NFS.

Fixes #848.

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

14 years agowebsocket: fix comment indentation
Andrew Gerrand [Tue, 13 Jul 2010 00:29:41 +0000 (10:29 +1000)]
websocket: fix comment indentation
To make code samples formatted correctly by godoc.

R=r, ukai, rsc
CC=golang-dev, gri
https://golang.org/cl/1738048

14 years agocontainer/vector: rename Data() -> Copy()
Robert Griesemer [Tue, 13 Jul 2010 00:22:21 +0000 (17:22 -0700)]
container/vector: rename Data() -> Copy()

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

14 years agodashboard: use jQuery Autocomplete plugin from Google AJAX Libs API
Andrew Gerrand [Tue, 13 Jul 2010 00:21:08 +0000 (10:21 +1000)]
dashboard: use jQuery Autocomplete plugin from Google AJAX Libs API

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

14 years agotweak comment for %#X
Rob Pike [Mon, 12 Jul 2010 23:57:11 +0000 (16:57 -0700)]
tweak comment for %#X
Fixes #904.

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

14 years agopem: print \n after 1 header line too
Russ Cox [Mon, 12 Jul 2010 23:48:49 +0000 (16:48 -0700)]
pem: print \n after 1 header line too
rearrange to make reason for if clear.

Fixes #911.

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

14 years agocrypto/rand for Windows
Peter Mundy [Mon, 12 Jul 2010 23:37:53 +0000 (16:37 -0700)]
crypto/rand for Windows

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

14 years agoadd missing argument to usage message.
Rob Pike [Mon, 12 Jul 2010 23:31:51 +0000 (16:31 -0700)]
add missing argument to usage message.
Fixes #912.

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

14 years agohttp: fix ParseURL to handle //relative_path properly
Andrew Gerrand [Mon, 12 Jul 2010 23:21:42 +0000 (09:21 +1000)]
http: fix ParseURL to handle //relative_path properly

Fixes #900.

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

14 years agobig: added a few missing functions:
Robert Griesemer [Mon, 12 Jul 2010 23:09:27 +0000 (16:09 -0700)]
big: added a few missing functions:
- sign to determine if a value is < 0, == 0, > 0
- abs to compute absolute value
- Rat.IsInt to test if a rational number is representable as an integer

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

14 years agofix build
Robert Griesemer [Mon, 12 Jul 2010 21:53:28 +0000 (14:53 -0700)]
fix build

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

14 years agocontainer/vector: remove Iter() from interface
Robert Griesemer [Mon, 12 Jul 2010 20:51:42 +0000 (13:51 -0700)]
container/vector: remove Iter() from interface
(Iter() is almost never the right mechanism to call.
Per discussion with rsc.)

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

14 years agotest/fixedbugs/bug243.go: instead of closing stdout,
Vinu Rajashekhar [Mon, 12 Jul 2010 20:17:32 +0000 (13:17 -0700)]
test/fixedbugs/bug243.go: instead of closing stdout,
remove the print statements.

This change is because of the port of gccgo to RTEMS.
These tests use the GCC DejaGNU framework. In some cases,
the tests need to be run on qemu where the status code
cannot be sent back to DejaGNU, so it prints the exit status
by putting a wrapper around the exit and abort calls.

This testcase closes the stdout, and hence prohibits DejaGNU
from knowing the status in such cases, and causes this test
to be wrongly declared as a failure.

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

14 years agomath: amd64 version of log
Charles L. Dorian [Mon, 12 Jul 2010 18:30:11 +0000 (11:30 -0700)]
math: amd64 version of log

Benchmarks 25ns/op (was 58ns/op) on 2.53GHz Intel Core 2 Duo.

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

14 years agojson: Add HTMLEscape
Micah Stetson [Mon, 12 Jul 2010 18:26:41 +0000 (11:26 -0700)]
json: Add HTMLEscape

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

14 years agoTest case that gccgo fails (crashes rather than printing error).
Ian Lance Taylor [Mon, 12 Jul 2010 13:34:36 +0000 (06:34 -0700)]
Test case that gccgo fails (crashes rather than printing error).

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

14 years agoCorrected a print statement from printing netfd to fd.
Vinu Rajashekhar [Sat, 10 Jul 2010 21:40:48 +0000 (14:40 -0700)]
Corrected a print statement from printing netfd to fd.

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

14 years agofix build: adjustest a few tests that I missed before
Robert Griesemer [Fri, 9 Jul 2010 20:11:20 +0000 (13:11 -0700)]
fix build: adjustest a few tests that I missed before

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

14 years agogofmt: update test script
Robert Griesemer [Fri, 9 Jul 2010 20:03:25 +0000 (13:03 -0700)]
gofmt: update test script

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

14 years agogo/spec: fix typo
Robert Griesemer [Fri, 9 Jul 2010 20:02:54 +0000 (13:02 -0700)]
go/spec: fix typo

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

14 years agogo/parser: require that '...' parameters are followed by a type
Robert Griesemer [Fri, 9 Jul 2010 20:02:32 +0000 (13:02 -0700)]
go/parser: require that '...' parameters are followed by a type
(matching latest syntax changes)

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

14 years agobig: Improvements to Rat.SetString
Evan Shaw [Fri, 9 Jul 2010 18:24:31 +0000 (11:24 -0700)]
big: Improvements to Rat.SetString

* Allow an exponent part. This is necessary for exp/eval.
* Fix a bug for input that had no numbers after the decimal.
* In Int.SetString, allow a leading + sign.
* In Int.SetString, error if the input is "-" with no number.
* In nat.scan, normalize the resulting nat.

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

14 years agoio: fix SectionReader Seek to seek backwards
Peter Mundy [Thu, 8 Jul 2010 06:57:07 +0000 (16:57 +1000)]
io: fix SectionReader Seek to seek backwards

Fixes #899.

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

14 years agoA+C: Markus Duft
Andrew Gerrand [Thu, 8 Jul 2010 02:47:16 +0000 (12:47 +1000)]
A+C: Markus Duft

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

14 years ago runtime/tiny: add destroyLock stub, and docs for additional VMs
Markus Duft [Wed, 7 Jul 2010 14:15:47 +0000 (00:15 +1000)]
runtime/tiny: add destroyLock stub, and docs for additional VMs

    updated thread.c to provide destroylock, which seems to be
      required to link.
        updated README with different virtualization programs.

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

14 years agodoc/go_tutorial: mention order of compilation
Andrew Gerrand [Mon, 5 Jul 2010 06:25:29 +0000 (16:25 +1000)]
doc/go_tutorial: mention order of compilation

In response to this recurring issue:
http://groups.google.com/group/golang-nuts/t/710d1e8347cd51fa

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

14 years ago http, crypto/tls: followup fixes from 1684051.
Adam Langley [Fri, 2 Jul 2010 20:43:48 +0000 (16:43 -0400)]
http, crypto/tls: followup fixes from 1684051.

        (TBR because this is just addressing previous review comments.)

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

14 years agocrypto/tls, http: Make HTTPS servers easier.
Adam Langley [Fri, 2 Jul 2010 17:00:18 +0000 (13:00 -0400)]
crypto/tls, http: Make HTTPS servers easier.

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

14 years agold: fix handling of "". names in #pragma dynimport/dynexport
Russ Cox [Fri, 2 Jul 2010 04:48:13 +0000 (21:48 -0700)]
ld: fix handling of "". names in #pragma dynimport/dynexport

Fixes #728.

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

14 years agoAdd various items to the Go Resources page.
Andrew Gerrand [Fri, 2 Jul 2010 03:32:02 +0000 (13:32 +1000)]
Add various items to the Go Resources page.

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

14 years agogc: implement new len spec, range bug fix, optimization
Russ Cox [Fri, 2 Jul 2010 01:04:25 +0000 (18:04 -0700)]
gc: implement new len spec, range bug fix, optimization

Fixes #885.

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