1
0
mirror of https://github.com/golang/go synced 2024-10-04 13:21:22 -06:00
Commit Graph

4270 Commits

Author SHA1 Message Date
Alex Brainman
bc4a9caa41 runtime: free memory returned by windows GetEnvironmentStrings
R=golang-dev
CC=golang-dev
https://golang.org/cl/1917048
2010-08-09 11:30:33 +10:00
Alex Brainman
dbef0711d4 os: fix ForkExec() handling of envv == nil
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1913047
2010-08-09 11:21:20 +10:00
Nigel Tao
893fdbbe5d image: introduce Decode and RegisterFormat.
R=r, rsc
CC=golang-dev
https://golang.org/cl/1849054
2010-08-09 10:44:38 +10:00
Russ Cox
844a86317d net/textproto: new package, with example net/dict
Generic text-based network protcol library for SMTP-like protocols.
HTTP and NNTP should be changed to use this package,
and I expect that SMTP and POP3 will be able to use it too.

R=cemeyer, nigeltao_golang, r
CC=golang-dev, petar-m
https://golang.org/cl/889041
2010-08-06 17:37:45 -07:00
Rob Pike
18063d4686 fmt.Scan: empty strings are errors
Fixes #1002.

R=rsc
CC=golang-dev
https://golang.org/cl/1882046
2010-08-07 10:02:04 +10:00
Kai Backman
df88fc6109 arm: bugfixes and syscall
- integer divide by zero raises panic
- float comparisons involving NaNs work
- syscall interface actually handles return
  values and errno correctly.

R=rsc, bradfitzpatrick
CC=golang-dev
https://golang.org/cl/1847047
2010-08-06 16:57:49 -07:00
Charles L. Dorian
c8c2bdbc59 math: fix amd64 Hypot.
Underflow/overflow tests for exp_amd64.s

Fixes #957.

R=rsc
CC=golang-dev
https://golang.org/cl/1817041
2010-08-06 16:50:48 -07:00
Roger Peppe
b92db49c26 encoding/binary: add complex
R=rsc
CC=golang-dev
https://golang.org/cl/1879043
2010-08-06 16:44:38 -07:00
Anschel Schaffer-Cohen
8055f47029 exp/iterable: add UintArray
all other basic types seem to be represented.

R=rsc
CC=golang-dev
https://golang.org/cl/1919042
2010-08-06 16:39:18 -07:00
Alex Brainman
e96b6835a9 fix windows build
R=rsc
CC=golang-dev
https://golang.org/cl/1890045
2010-08-06 09:42:55 +10:00
Rob Pike
c78be462a0 once: replace all uses of package once with sync.Once.
package once remains for now; will be deleted after next release.

R=golang-dev, brainman
CC=golang-dev
https://golang.org/cl/1914046
2010-08-06 06:14:41 +10:00
Christian Himpel
75f6a0c759 bytes: add IndexRune, FieldsFunc and To*Special
Basically these functions are implemented the same way as the
corresponding functions in the strings package.  Test functions
are implemented for IndexRune and FieldsFunc.

Additionally two typos are fixed in packages bytes and strings.

R=r
CC=golang-dev
https://golang.org/cl/1696062
2010-08-05 23:11:06 +10:00
Rob Pike
895c5db6df sync: add sync.Once, a proposed replacement for package once.
This implementation is simpler and more useful, since it can work
with methods.

R=rsc
CC=golang-dev
https://golang.org/cl/1864051
2010-08-05 13:31:10 +10:00
Alex Brainman
8251e72aea path: fix comment for Split()
R=golang-dev
CC=golang-dev
https://golang.org/cl/1905050
2010-08-05 11:43:53 +10:00
Robert Griesemer
d9e2631b53 go/parser.ParseFiles: don't override error (to nil) if there is one
Also: Return first instead of last error as that seems more useful.

R=r
CC=golang-dev
https://golang.org/cl/1897050
2010-08-04 18:02:43 -07:00
Robert Griesemer
ed8c23149f fix build: literal types cannot be parenthesized anymore
R=rsc
CC=golang-dev
https://golang.org/cl/1849055
2010-08-04 17:58:56 -07:00
Russ Cox
e473f42b2d amd64: use segment memory for thread-local storage
Returns R14 and R15 to the available register pool.
Plays more nicely with ELF ABI C code.
In particular, our signal handlers will no longer crash
when a signal arrives during execution of a cgo C call.

Fixes #720.

R=ken2, r
CC=golang-dev
https://golang.org/cl/1847051
2010-08-04 17:50:22 -07:00
Robert Griesemer
03f42934c1 gofmt/go/parser: strengthen syntax checks
- don't allow parenthesized receiver base types or anonymous fields
- fixed a couple of other omissions
- adjusted gofmt test script
- removed several TODOs

R=rsc
CC=golang-dev
https://golang.org/cl/1897043
2010-08-04 17:21:02 -07:00
Alex Brainman
12576f9e70 goinstall: check for error from exec.*Cmd.Wait() before using its result
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/1923043
2010-08-04 17:18:57 -07:00
Christian Himpel
6b8ec5c572 cgo: generate correct multiple return value function invocations
Fixes #967.

R=rsc
CC=golang-dev
https://golang.org/cl/1855051
2010-08-04 17:15:04 -07:00
Robert Griesemer
a6449b66a4 gofmt: make code more readable by avoiding redeclaration
R=r
CC=golang-dev
https://golang.org/cl/1910045
2010-08-03 23:39:01 -07:00
Scott Lawrence
99aab8bacb bytes: added test case for explode with blank string.
Tests for the equivalent of the strings.explode("") panic bug (issue 980).

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1850052
2010-08-04 13:33:24 +10:00
Anthony Martin
2db4c3d779 json: object members must have a value
R=rsc
CC=golang-dev
https://golang.org/cl/1847050
2010-08-03 17:05:00 -07:00
Nigel Tao
27e249049e bufio: introduce Peek.
I'll leave whether or not this obsoletes UnreadByte for a future CL.

R=r, rsc
CC=golang-dev
https://golang.org/cl/1912042
2010-08-04 09:44:02 +10:00
Rob Pike
e45b58fe96 os: change the type of permissions argument for Open etc. to uint32.
Besides being more correct, it protects against people accidentally
exchanging the permission and open mode arguments to Open.

R=rsc
CC=golang-dev
https://golang.org/cl/1904045
2010-08-04 08:34:52 +10:00
Tarmigan Casebolt
1badb46313 websocket: correct challenge response
Tested against latest Chrome.

R=ukai, rsc
CC=golang-dev
https://golang.org/cl/1743053
2010-08-03 14:34:44 -07:00
Peter Mundy
12befd063b os: Null device
R=rsc, cw
CC=golang-dev
https://golang.org/cl/1854042
2010-08-03 13:03:50 -07:00
Kai Backman
311973ea56 arm: remove old qemu dependency from gotest
R=rsc
CC=golang-dev
https://golang.org/cl/1678063
2010-08-03 13:03:40 -07:00
Adam Langley
7748a7f159 crypto/x509: unwrap Subject Key Identifier
RFC 5280, 4.2.1.2 says:
  SubjectKeyIdentifier ::= KeyIdentifier
  KeyIdentifier ::= OCTET STRING

Previously, we were failing to unwrap the second level of OCTET STRING
encoding.

Fixes #993.

R=rsc
CC=golang-dev
https://golang.org/cl/1917044
2010-08-03 12:26:48 -04:00
Russ Cox
3f19d8ae8d gc: empty select
R=ken2
CC=golang-dev
https://golang.org/cl/1871057
2010-08-03 01:07:57 -07:00
Russ Cox
585eae3bce gc: bug301
Fixes #990.

R=ken2
CC=golang-dev
https://golang.org/cl/1742055
2010-08-03 01:07:40 -07:00
Russ Cox
c6cb303a8a gc: bug299, bug300
R=ken2
CC=golang-dev
https://golang.org/cl/1731057
2010-08-03 00:53:32 -07:00
Russ Cox
9bac9d23d3 gc: index bounds tests and fixes
move constant index checking to front end
x[2:1] is a compile-time error now too

R=ken2
CC=golang-dev
https://golang.org/cl/1848056
2010-08-03 00:26:02 -07:00
Scott Lawrence
0cd8777255 strings: fix Split("", "", -1)
Fixes #980.

Made it return an empty array, rather than crash.
Added relevant test cases to strings.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1914041
2010-08-03 13:35:14 +10:00
Alex Brainman
a79a9098da syscall: make sure go error numbers do not clash with windows system errors
R=rsc
CC=golang-dev
https://golang.org/cl/1857049
2010-08-03 12:04:41 +10:00
Nigel Tao
244b6583b7 image: introduce Gray and Gray16 types, and remove the named colors
except for Black and White.

R=rsc
CC=golang-dev, mpl, r
https://golang.org/cl/1903049
2010-08-03 10:57:53 +10:00
Rob Pike
3f5966dcc0 io: consolidate multi_reader and multi_writer into a single file, multi.go
R=rsc
CC=golang-dev
https://golang.org/cl/1860046
2010-08-03 08:04:33 +10:00
Nigel Tao
55badd474b image/png: use image-specific methods for checking opacity.
R=rsc
CC=golang-dev, mpl
https://golang.org/cl/1894047
2010-08-02 09:52:15 +10:00
Bill Neubauer
6d37724c15 websocket: fix bug involving spaces in header keys
R=rsc, ukai
CC=golang-dev
https://golang.org/cl/1669056
2010-07-30 12:27:03 -07:00
Russ Cox
68b0a87966 runtime: do not fall through in SIGBUS/SIGSEGV
Faults beyond the first page are not expected
and should fail loudly.  They are not subject to recover.

R=r
CC=golang-dev
https://golang.org/cl/1915042
2010-07-30 11:32:55 -07:00
Kai Backman
8d76a15122 arm: bugfixes (stack clobbering, indices)
also changed zerodivide to output "BUG"

R=rsc
CC=golang-dev
https://golang.org/cl/1871055
2010-07-30 10:37:51 +03:00
Andrew Gerrand
3402c5e8fe misc/builder: support for uploading tarballs to googlecode
R=rsc
CC=golang-dev
https://golang.org/cl/1784042
2010-07-30 14:00:59 +10:00
Joe Poirier
b57ffae094 cov and prof: implement windows version (just function stubs and build mods)
R=brainman, rsc
CC=golang-dev
https://golang.org/cl/1676054
2010-07-30 11:47:11 +10:00
Yuusei Kuwana
c21e2f3925 mime: add AddExtensionType
For example:
mime.AddExtensionType(".m3u8", "application/x-mpegURL")
mime.AddExtensionType(".ts", "video/MP2T")

R=rsc, rsc1
CC=golang-dev
https://golang.org/cl/1698046
2010-07-29 14:12:04 -07:00
Robert Griesemer
bc0a1c61f7 scanner: better comment
R=rsc
CC=golang-dev
https://golang.org/cl/1900044
2010-07-29 13:02:27 -07:00
Rob Pike
2c0bbf99b9 fmt.Print: fix bug in placement of spaces introduced when ...T went in.
Fixes #976.

R=rsc, chris tighe, r
CC=golang-dev
https://golang.org/cl/1697057
2010-07-29 10:50:09 -07:00
Alex Brainman
45e12c7cd3 runtime: fix bug introduced in revision 4a01b8d28570
R=rsc
CC=golang-dev
https://golang.org/cl/1874046
2010-07-29 16:54:01 +10:00
Wei Guangjing
adc13b1e48 net: implement windows version of LookupHost/Port/SRV
R=brainman, rsc
CC=golang-dev
https://golang.org/cl/1748042
2010-07-29 14:58:28 +10:00
Russ Cox
491a3ca5b7 gc: fix SIGBUS
R=ken2
CC=golang-dev
https://golang.org/cl/1906042
2010-07-28 18:21:50 -07:00
Fazlul Shahriar
4f64ecfdda http: add https client support
Fixes #851.

R=rsc
CC=golang-dev
https://golang.org/cl/1729052
2010-07-28 18:13:56 -07:00
Rob Pike
518df525d8 fmt: move comment into doc.go.
Fix the documentation of newline handling in *f routines
to match the implementation.

R=rsc
CC=golang-dev
https://golang.org/cl/1899042
2010-07-28 13:11:22 -07:00
Brad Fitzpatrick
719cde2c47 io: MultiReader and MultiWriter
Little helpers I've found useful.

R=adg, rsc, r, gri
CC=golang-dev
https://golang.org/cl/1764043
2010-07-28 11:30:00 -07:00
Kai Backman
fa4da33315 arm: minor bugfixes.
R=rsc
CC=golang-dev
https://golang.org/cl/1692057
2010-07-28 15:58:35 +03:00
Russ Cox
f930d28164 5g: fix build
R=ken2
CC=golang-dev
https://golang.org/cl/1893042
2010-07-27 13:43:58 -07:00
Andrew Gerrand
4501e18aa5 bufio: fix optimisation test
Fixes #949.

R=rsc
CC=golang-dev
https://golang.org/cl/1886046
2010-07-27 17:22:45 +10:00
Andrew Gerrand
fc4ba1546c net: add nil checks to several String methods to avoid panics
Fixes #945.

R=r
CC=golang-dev
https://golang.org/cl/1848049
2010-07-27 17:22:22 +10:00
Andrew Gerrand
8b821696cc bytes, strings: mention the n < 0 case in Split/SplitAfter doc comment
R=r, rsc
CC=golang-dev
https://golang.org/cl/1669055
2010-07-27 15:06:08 +10:00
Russ Cox
711f075987 gc: include signal.h (fix build)
R=ken2
CC=golang-dev
https://golang.org/cl/1871049
2010-07-26 18:41:36 -07:00
Robert Griesemer
0b133d8ac1 godoc: accept '.', '!', and '?' as end of first sentence of package documentation
R=rsc
CC=golang-dev
https://golang.org/cl/1875049
2010-07-26 17:34:40 -07:00
Russ Cox
f20c2e1cf5 gc: more crash avoidance
Fixes #961.
Fixes #962.

R=ken2
CC=golang-dev
https://golang.org/cl/1903043
2010-07-26 17:34:17 -07:00
Russ Cox
9a442211c6 6l: more invalid input files
Fixes #963.
Fixes #964.

R=r
CC=golang-dev
https://golang.org/cl/1874045
2010-07-26 17:34:02 -07:00
Russ Cox
b49561d884 gc: graceful exit on seg fault
R=ken2
CC=golang-dev
https://golang.org/cl/1882043
2010-07-26 16:52:51 -07:00
Rob Pike
a59e113fcb fmt.Scanf: handle trailing spaces.
Fixes #954.

R=rsc
CC=golang-dev
https://golang.org/cl/1864046
2010-07-26 16:38:35 -07:00
Peter Mundy
036584395d runtime: fix goc2c for rename to goc2c and *.goc
Release 2010-04-27. runtime: rename cgo2c, *.cgo to goc2c, *.goc
to avoid confusion with real cgo.

R=rsc
CC=golang-dev
https://golang.org/cl/1868047
2010-07-26 16:21:27 -07:00
Russ Cox
5ee02eef4c net: TCPConn.SetNoDelay, back by popular demand
R=r
CC=golang-dev
https://golang.org/cl/1880047
2010-07-26 16:19:39 -07:00
Robert Griesemer
4188504f38 godoc: display synopses for all packages that have some kind of documentation.
Fixes #953.

R=rsc
CC=golang-dev
https://golang.org/cl/1862046
2010-07-26 15:27:42 -07:00
Russ Cox
607eaea456 gc: fix smaller-than-pointer-sized receivers in interfaces
Fixes #812.

R=ken2
CC=golang-dev
https://golang.org/cl/1904041
2010-07-26 15:25:10 -07:00
Russ Cox
7b240e8135 gc: import dot shadowing bug
R=ken2
CC=golang-dev
https://golang.org/cl/1873047
2010-07-26 14:21:39 -07:00
Wei Guangjing
ad4f95d365 syscall: add windows version of Pipe()
R=brainman, rsc
CC=golang-dev
https://golang.org/cl/1715046
2010-07-26 15:55:01 +10:00
Andrew Gerrand
f656a87697 prof: fix typo in usage string
Fixes #948.

R=rsc
CC=golang-dev
https://golang.org/cl/1890043
2010-07-26 14:46:53 +10:00
Alex Brainman
4d87e8ab08 net: fix crashing Read/Write when passed empty slice on windows
Fixes #921.

R=rsc
CC=golang-dev
https://golang.org/cl/1862043
2010-07-26 12:50:03 +10:00
Alex Brainman
eee095399f syscall: improve windows errno handling
R=rsc, Joe Poirier, PeterGo
CC=golang-dev
https://golang.org/cl/1872045
2010-07-26 10:24:48 +10:00
Alex Brainman
aa4639faf1 fix windows Make.cmd:
- TARG had extra space at the end;
- it should be set before "all" target.

R=rsc, Joe Poirier
CC=golang-dev
https://golang.org/cl/1846042
2010-07-26 09:55:25 +10:00
Daniel Theophanes
7f9e247489 syscall: add ForkExec, Syscall12 on Windows
R=brainman, rsc
CC=golang-dev
https://golang.org/cl/1578041
2010-07-26 09:43:35 +10:00
Vinu Rajashekhar
e57657683f runtime/extern.go: clear a small error in a comment.
R=iant, rsc
CC=golang-dev
https://golang.org/cl/1741058
2010-07-24 19:10:21 -07:00
Fazlul Shahriar
e356f1d88f bytes: port IndexFunc and LastIndexFunc from strings package
This CL basically applies the same changes as

	http://code.google.com/p/go/source/detail?r=5e0a29014e8e

but for bytes package.

R=r, rog
CC=golang-dev
https://golang.org/cl/1670052
2010-07-23 12:34:35 -07:00
Russ Cox
fa3d86ca39 libmach: correct handling of .5 files with D_REGREG addresses
undo workaround in gc

Fixes #943.

R=kaib
CC=golang-dev
https://golang.org/cl/1889041
2010-07-22 09:00:34 -07:00
Russ Cox
2cc9d339e6 fix build
bug introduced in https://golang.org/cl/1886043

R=r
CC=golang-dev
https://golang.org/cl/1848047
2010-07-22 08:55:56 -07:00
Andrew Gerrand
d34174cfb5 build: clean.bash to check that GOOS and GOARCH are set
R=rsc
CC=golang-dev
https://golang.org/cl/1843046
2010-07-22 10:15:36 +10:00
Micah Stetson
d1e7cffe6c gotest: fix the glob pattern in the top-of-file comment
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/1847042
2010-07-22 10:07:26 +10:00
Russ Cox
916f896a3b ld: various bug fixes
Fixes #937.
Fixes #938.
Fixes #939.
Fixes #940.

R=r
CC=golang-dev
https://golang.org/cl/1886043
2010-07-21 13:44:49 -07:00
Andrey Mirtchovski
8629e5a648 strings.Bytes: fix typo in comment
R=adg, rsc
CC=golang-dev
https://golang.org/cl/1886042
2010-07-21 12:01:15 -07:00
Ian Lance Taylor
9a2f0029bc 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
2010-07-21 10:57:46 -07:00
Peter Mundy
6a6d8fdcd3 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
2010-07-21 09:40:08 -07:00
Adam Langley
7be849d4a6 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
2010-07-21 11:36:01 -04:00
Adam Langley
8286ee4c5b 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
2010-07-21 10:07:22 -04:00
Kai Backman
47b6400556 arm: fix build by disabling list copying optimization for 5g.
R=rsc
CC=golang-dev
https://golang.org/cl/1697053
2010-07-21 14:14:21 +03:00
Andrew Gerrand
61fb9ccc8d os: change comment on O_APPEND to be more accurate
R=rsc
CC=golang-dev
https://golang.org/cl/1870042
2010-07-21 17:11:28 +10:00
Alex Brainman
42dd7a6dae net(windows): properly handle EOF in (*netFD).Read().
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/1848045
2010-07-20 23:51:07 -07:00
Russ Cox
0decedf636 gc: various bug fixes
Fixes #935.
Fixes #936.
Fixes #941.

R=ken2
CC=golang-dev
https://golang.org/cl/1867042
2010-07-20 23:45:33 -07:00
Rob Pike
de228c0e0c bytes: add Title
R=rsc
CC=golang-dev
https://golang.org/cl/1872042
2010-07-20 19:53:59 -07:00
Rob Pike
a0d1c9263e gobs: fix bug in singleton arrays
Fixes #934.

R=rsc
CC=golang-dev
https://golang.org/cl/1869043
2010-07-20 19:53:28 -07:00
Robert Griesemer
8f9aeb5a66 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
2010-07-20 09:29:31 -07:00
Kai Backman
36057e721e 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
2010-07-20 15:53:16 +03:00
Rob Pike
8684a08989 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
2010-07-20 00:03:59 -07:00
Ken Thompson
f6b93ab432 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
2010-07-19 16:10:46 -07:00
Robert Griesemer
a5fe54aa2b tabwriter: fix a comment to fix godoc output
R=r
CC=golang-dev
https://golang.org/cl/1857043
2010-07-19 11:33:11 -07:00
Adam Langley
9929ee92e7 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
2010-07-19 11:11:40 -04:00
Adam Langley
02786d263c time: fix parsing of minutes in time zones.
R=r
CC=golang-dev
https://golang.org/cl/1830041
2010-07-19 11:08:04 -04:00
James Whitehead
18d8c7dac6 http/transferWriter: Write body when content length unknown
Fixes #923.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/1846043
2010-07-19 14:05:27 +10:00
Russ Cox
2d6ae385e1 linux/386: use Xen-friendly ELF TLS instruction sequence
Fixes #465.

R=iant
CC=golang-dev
https://golang.org/cl/1665051
2010-07-17 16:54:03 -07:00
Peter Mundy
bc2ee6b8c6 utf16: fix cyclic dependency when testing on Windows
(on Windows, syscall depends on utf16)

R=rsc
CC=golang-dev
https://golang.org/cl/1664053
2010-07-17 16:52:53 -07:00
Ken Thompson
95b93c28e3 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
2010-07-17 16:32:40 -07:00
Russ Cox
b693847ea8 gc: print error detail about failure to open import
R=ken2
CC=golang-dev
https://golang.org/cl/1872041
2010-07-16 21:38:51 -07:00
Russ Cox
e692977af3 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
2010-07-16 16:16:17 -07:00
Rob Pike
8519134b98 fix typo in lex.c comment
R=rsc
CC=golang-dev
https://golang.org/cl/1862044
2010-07-16 15:08:31 -07:00
Ken Thompson
19d7fc4026 change line pragma from
//line number file
to
	//line file:number

R=rsc
CC=golang-dev
https://golang.org/cl/1868041
2010-07-16 13:34:36 -07:00
Russ Cox
d1e2f73b1d big: attempt to fix arm build
R=gri
CC=golang-dev
https://golang.org/cl/1752043
2010-07-16 11:18:45 -07:00
Ian Lance Taylor
385bfd4ca0 Remove unused declaration.
R=rsc
CC=golang-dev
https://golang.org/cl/1686054
2010-07-16 11:05:38 -07:00
Ian Lance Taylor
8a95821694 cgo: If CC is set in environment, use it rather than "gcc".
R=rsc
CC=golang-dev
https://golang.org/cl/1842042
2010-07-16 11:01:04 -07:00
Ken Thompson
444066e56d 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
2010-07-15 20:21:33 -07:00
Russ Cox
4c0de303ce gc: bug294
Fixes #800.

R=ken2
CC=golang-dev
https://golang.org/cl/1855043
2010-07-15 16:42:32 -07:00
Russ Cox
ece6a8c549 gc: bug293
Fixes #846.

R=ken2
CC=golang-dev
https://golang.org/cl/1862042
2010-07-15 16:14:06 -07:00
Russ Cox
cdb446feb5 gc: bug292
Fixes #843.

R=ken2
CC=golang-dev
https://golang.org/cl/1729051
2010-07-15 16:13:47 -07:00
Robert Griesemer
496a935376 bignum: delete package - functionality subsumed by package big
R=rsc
CC=golang-dev
https://golang.org/cl/1742045
2010-07-15 16:08:53 -07:00
Russ Cox
b2a919fc29 gc: issue 894
Fixes #894.

R=ken2
CC=golang-dev
https://golang.org/cl/1701051
2010-07-15 15:25:32 -07:00
Russ Cox
31c07dfddf gc: issue 901
Fixes #901.

R=ken2
CC=golang-dev
https://golang.org/cl/1674049
2010-07-15 15:22:51 -07:00
Russ Cox
08a263a991 gc: bug291
Fixes #915.

R=ken2
CC=golang-dev
https://golang.org/cl/1856042
2010-07-15 15:17:42 -07:00
Russ Cox
691d765121 gc: bug274
R=ken2
CC=golang-dev
https://golang.org/cl/1742044
2010-07-15 15:05:56 -07:00
Russ Cox
17f90c68c6 gc: fix handling of types inside function bodies
Fixes #849.
Fixes #920.

R=ken2
CC=golang-dev
https://golang.org/cl/1841042
2010-07-15 14:25:50 -07:00
Ian Lance Taylor
84f67eb8e6 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
2010-07-15 14:15:39 -07:00
Ian Lance Taylor
5958fd7f89 Clarify that a new goroutine is not started for each finalizer.
R=rsc
CC=golang-dev
https://golang.org/cl/1698051
2010-07-15 12:32:38 -07:00
Russ Cox
9867ced972 cgo: use new command line syntax: -- separates cgo flags from gcc flags
Fixes #922.

R=r
CC=golang-dev
https://golang.org/cl/1664051
2010-07-15 09:41:21 -07:00
Brad Fitzpatrick
9b64fef71a 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
2010-07-14 17:26:14 -07:00
Russ Cox
e9bcbc5398 os: use /tmp again
R=adg
CC=golang-dev
https://golang.org/cl/1823041
2010-07-14 17:25:46 -07:00
Joe Poirier
9028d6bf7c windows: append executable extension (done as per Russ' suggestion)
R=rsc
CC=brainman, golang-dev
https://golang.org/cl/1690053
2010-07-14 17:21:13 -07:00
Russ Cox
0432f289f7 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
2010-07-14 17:17:53 -07:00
Robert Griesemer
a3855235cd 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
2010-07-14 10:11:12 -07:00
Evan Shaw
b97292791b 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
2010-07-14 09:39:59 -07:00
Adam Langley
c9406f930d crypto/tls: add client OCSP stapling support.
R=r, rsc
CC=golang-dev
https://golang.org/cl/1750042
2010-07-14 10:40:15 -04:00
Russ Cox
cec007d3d2 runtime: better error for send/recv on nil channel
R=ken2
CC=golang-dev
https://golang.org/cl/1835041
2010-07-13 17:27:26 -07:00
Russ Cox
2e3dc2cc35 crypto/rand: add missing Unlock
R=r
CC=golang-dev
https://golang.org/cl/1812043
2010-07-13 12:37:47 -07:00
Andrew Gerrand
da795fcefc runtime/tiny: style and doc tweaks
R=r, rsc
CC=golang-dev
https://golang.org/cl/1821041
2010-07-13 10:47:52 +10:00
Russ Cox
11f9c03986 fix build
R=gri
CC=golang-dev
https://golang.org/cl/1813042
2010-07-12 17:46:03 -07:00
Peter Mundy
b6850fe739 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
2010-07-13 10:31:51 +10:00
Andrew Gerrand
48e4d67b23 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
2010-07-13 10:29:41 +10:00
Robert Griesemer
d9c47cd8c8 container/vector: rename Data() -> Copy()
R=rsc
CC=golang-dev
https://golang.org/cl/1814043
2010-07-12 17:22:21 -07:00
Rob Pike
18d78dd7b1 tweak comment for %#X
Fixes #904.

R=rsc
CC=golang-dev
https://golang.org/cl/1803043
2010-07-12 16:57:11 -07:00
Russ Cox
36560d2b4a 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
2010-07-12 16:48:49 -07:00
Peter Mundy
ccd28e8eb6 crypto/rand for Windows
R=rsc, brainman
CC=golang-dev
https://golang.org/cl/1773041
2010-07-12 16:37:53 -07:00
Rob Pike
c9f83372d8 add missing argument to usage message.
Fixes #912.

R=rsc
CC=golang-dev
https://golang.org/cl/1819041
2010-07-12 16:31:51 -07:00
Andrew Gerrand
880beafc9f http: fix ParseURL to handle //relative_path properly
Fixes #900.

R=rsc
CC=golang-dev
https://golang.org/cl/1756042
2010-07-13 09:21:42 +10:00
Robert Griesemer
97bcf049f7 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
2010-07-12 16:09:27 -07:00
Robert Griesemer
345f9c9eb2 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
2010-07-12 13:51:42 -07:00
Charles L. Dorian
c28bd5445c 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
2010-07-12 11:30:11 -07:00
Micah Stetson
b5b6ce0804 json: Add HTMLEscape
R=rsc
CC=golang-dev
https://golang.org/cl/1496042
2010-07-12 11:26:41 -07:00
Vinu Rajashekhar
a9a24d4d8a Corrected a print statement from printing netfd to fd.
R=iant
CC=golang-dev
https://golang.org/cl/1805041
2010-07-10 14:40:48 -07:00
Robert Griesemer
71ed4eb7a5 fix build: adjustest a few tests that I missed before
R=r
CC=golang-dev
https://golang.org/cl/1762044
2010-07-09 13:11:20 -07:00
Robert Griesemer
d87f7e2392 gofmt: update test script
R=r
CC=golang-dev
https://golang.org/cl/1791041
2010-07-09 13:03:25 -07:00
Robert Griesemer
7529d32ee1 go/parser: require that '...' parameters are followed by a type
(matching latest syntax changes)

R=r
CC=golang-dev
https://golang.org/cl/1762042
2010-07-09 13:02:32 -07:00