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

4772 Commits

Author SHA1 Message Date
Russ Cox
b11740fb6d build: fixes for native arm build
R=kaib
CC=golang-dev
https://golang.org/cl/2254044
2010-09-21 22:41:32 -04:00
Russ Cox
a2450c1456 cgo: bug fixes
* Add documentation about array arguments.  Fixes issue 1125.
* Do not interpret x, y := z, w as special errno form.  Fixes issue 952.
* Fix nested Go calls (brainman).  Fixes issue 907.

R=r
CC=golang-dev
https://golang.org/cl/2214044
2010-09-21 22:41:19 -04:00
Nigel Tao
58795ea31a exp/4s, exp/nacl/av: sync to recent exp/draw changes.
R=rsc
CC=golang-dev
https://golang.org/cl/2257042
2010-09-22 12:20:56 +10:00
Ian Lance Taylor
7d03d0ec6b syscall: Use vsyscall for syscall.Gettimeofday and .Time on linux amd64.
Regenerate zsyscall_linux_*.go files with recent changes to
mksyscall.sh.

Add socketpair to syscall_linux_amd64.go; for some reason it
was in the generated file but not in the source file.

R=rsc, r2
CC=golang-dev
https://golang.org/cl/2190044
2010-09-21 06:49:56 -07:00
Rob Pike
4659f6de38 regexp: delete Iter methods
They are unused and not that useful anyway.

R=rsc
CC=golang-dev
https://golang.org/cl/2225045
2010-09-21 21:21:44 +10:00
Alex Brainman
a33ad247a6 env.bash: fix building in directory with spaces in the path.
Fixes #1122.
Thanks to BigBoss1964 for the solution.

R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/2246042
2010-09-21 16:43:31 +10:00
Nigel Tao
bd77a889e6 exp/nacl/av: update color to max out at 1<<16-1 instead of 1<<32-1.
Fix missing return in Set(x, y, color).

R=r
CC=golang-dev
https://golang.org/cl/2256042
2010-09-21 16:13:19 +10:00
Robert Griesemer
c20e024df3 godoc: default filter file name should be ""
R=rsc
CC=golang-dev
https://golang.org/cl/2241043
2010-09-20 16:19:17 -07:00
Ken Thompson
103d756663 loader fix
static init redo

R=rsc
CC=golang-dev
https://golang.org/cl/2254041
2010-09-20 14:23:25 -07:00
Luuk van Dijk
eb572e0174 6l/8l: emit DWARF frame info.
R=rsc, ken2, r
CC=golang-dev
https://golang.org/cl/2151044
2010-09-20 18:44:19 +02:00
Adam Langley
8e5f673dac crypto/x509, crypto/tls: improve root matching and observe CA flag.
The key/value format of X.500 names means that it's possible to encode
a name with multiple values for, say, organisation. RFC5280
doesn't seem to consider this, but there are Verisign root
certificates which do this and, in order to find the correct
root certificate in some cases, we need to handle it.

Also, CA certificates should set the CA flag and we now check
this. After looking at the other X.509 extensions it appears
that they are universally ignored/bit rotted away so we ignore
them.

R=rsc
CC=golang-dev
https://golang.org/cl/2249042
2010-09-20 12:17:31 -04:00
Adam Langley
6989f6e312 Fix certificate validation.
asn1: add support for T61String because this is the string type which
    several www.google.com certificates are now using for fields like
    CommonName
tls: force a handshake in Dial so that certificates are ready
    afterwards.

Fixes #1114.

R=rsc
CC=golang-dev
https://golang.org/cl/2216043
2010-09-20 10:32:08 -04:00
Rob Pike
724886b0c0 netchan: fix unimportant typo in test error call.
R=adg
CC=golang-dev
https://golang.org/cl/2211044
2010-09-20 17:24:40 +10:00
Rob Pike
da705c6212 netchan: provide a method (Importer.Errors()) to recover protocol errors.
R=rsc
CC=golang-dev
https://golang.org/cl/2229044
2010-09-20 15:28:38 +10:00
Alex Brainman
8a313e201a Make.inc: make GOOS detection work on windows
R=rsc, Joe Poirier, r
CC=golang-dev
https://golang.org/cl/2248041
2010-09-20 15:19:13 +10:00
Russ Cox
950ee18366 syscall: fix NaCl
missing from last CL, sorry

R=r
CC=golang-dev
https://golang.org/cl/2214043
2010-09-19 23:28:45 -04:00
Russ Cox
d4baf3ccb7 runtime: better panic for send to nil channel
*Much* better on NaCl, where memory faults are deadly.

R=r
CC=golang-dev
https://golang.org/cl/2249041
2010-09-19 23:28:12 -04:00
Russ Cox
e769342614 nacl: fix zero-length writes
NaCl rejects zero-length write using nil pointer.

R=r
CC=golang-dev
https://golang.org/cl/2237042
2010-09-19 22:52:30 -04:00
Russ Cox
af12feb8d5 6l, 8l: clean up ELF code, fix NaCl
R=r
CC=golang-dev
https://golang.org/cl/2221042
2010-09-19 22:10:34 -04:00
Nigel Tao
afbee9d87d exp/draw/x11: mouse location is a signed integer.
R=r
CC=golang-dev
https://golang.org/cl/2192043
2010-09-20 10:18:09 +10:00
Rob Pike
1e4b1f9337 netchan: handle closing of channels.
This also silences some misleading logging.
Also improve logging.

R=rsc
CC=golang-dev
https://golang.org/cl/2245041
2010-09-20 10:14:39 +10:00
Russ Cox
63623ba2d8 5l: avoid fixed buffers in list
R=ken2
CC=golang-dev
https://golang.org/cl/2204045
2010-09-19 19:44:52 -04:00
Rob Pike
c8b3d02939 gob: make robust when decoding a struct with non-struct data.
The decoder was crashing when handling an rpc that expected
a struct but was delivered something else.  This diagnoses the
problem.  The other direction (expecting non-struct but getting
one) was already handled.

R=rsc
CC=golang-dev
https://golang.org/cl/2246041
2010-09-20 07:37:06 +10:00
Rob Pike
42a61b920e windows: fix netchan test by using 127.0.0.1.
Re-enable the test on Windows.

R=brainman, alex.brainman
CC=golang-dev
https://golang.org/cl/2244041
2010-09-18 11:43:10 +10:00
Alex Brainman
289432daff pkg/Makefile: disable netchan test to fix windows build
R=r
CC=golang-dev
https://golang.org/cl/2225042
2010-09-18 11:09:08 +10:00
Alex Brainman
9997dae7a3 os: make RemoveAll() work on windows
R=golang-dev, rsc1
CC=golang-dev
https://golang.org/cl/2212041
2010-09-17 12:35:34 +10:00
Robert Griesemer
7534d40f64 fix various comments
(os package comments were duplicates)

R=rsc
CC=golang-dev
https://golang.org/cl/2205042
2010-09-16 18:21:01 -07:00
Ken Thompson
d348971103 add readonly flag to static initialization
R=rsc
CC=golang-dev
https://golang.org/cl/2187042
2010-09-16 16:42:38 -07:00
Rob Pike
19075ea609 netchan: add a cross-connect test.
Suggested in a bug report (since addressed) by Axel Schreiner.

R=rsc
CC=golang-dev
https://golang.org/cl/2228041
2010-09-17 07:12:54 +10:00
Robert Griesemer
b410be31b6 godoc: show "Last update" info for directory listings.
Use -timestamps=false flag to disable.

(This used to be shown on the front-page below the
build information with the old godoc. However, the
time stamps are directory-specific and should be
shown with the directory.)

R=rsc
CC=golang-dev
https://golang.org/cl/2233044
2010-09-16 13:45:40 -07:00
Russ Cox
d19fcd0784 gc: spell debug['u'] correctly
R=ken2
CC=golang-dev
https://golang.org/cl/2214042
2010-09-16 15:50:46 -04:00
Russ Cox
555f5b6b24 gc: make sure path names are canonical
R=ken2
CC=golang-dev
https://golang.org/cl/2209042
2010-09-16 15:37:57 -04:00
Robert Griesemer
fcb24e8c62 gofmt: add another exception to test cases
R=rsc
CC=golang-dev
https://golang.org/cl/2233043
2010-09-16 11:03:28 -07:00
Robert Griesemer
599f758d42 godoc: don't use quadratic algorithm to filter paths
R=rsc
CC=golang-dev
https://golang.org/cl/2212042
2010-09-16 10:40:07 -07:00
Eric Clark
b610a78b6e cgo: show preamble gcc errors
Fixes #1081

R=rsc
CC=golang-dev
https://golang.org/cl/2112046
2010-09-16 13:38:23 -04:00
Fazlul Shahriar
dd0dec6290 net/dict: parse response correctly + typo
* SHOW DB responds with a
  "110 n databases present - text follows" -- parse it.
* Doing a Define() on a non-existing word gives error
  "invalid definition count: no", when we really
  want "552 no match".

R=rsc
CC=golang-dev
https://golang.org/cl/2211041
2010-09-16 13:37:35 -04:00
Rob Pike
381ab58e2c netchan: fix bug for imported send.
Also add a bit of debugging and sanitation code.
Fixes #769.

R=adg
CC=golang-dev
https://golang.org/cl/2206042
2010-09-16 13:59:31 +10:00
Robert Griesemer
304d72be8c os: error in documentation
R=r
CC=golang-dev
https://golang.org/cl/2225041
2010-09-15 15:38:16 -07:00
Robert Griesemer
108f5c913c godoc: only show directories containing true package files
(ignore directories containing *.go files that don't
actually start with a package clause)

R=r
CC=golang-dev
https://golang.org/cl/2223041
2010-09-15 15:07:52 -07:00
Ken Thompson
abb73a4a86 fix line number printing
with //line directives.

R=rsc
CC=golang-dev
https://golang.org/cl/2224041
2010-09-15 14:32:09 -07:00
Russ Cox
34706ac974 libmach: fix build on arm host
Fixes #1079.

R=r, trufae, fgergo
CC=golang-dev
https://golang.org/cl/2103048
2010-09-15 16:52:11 -04:00
Rob Pike
8d831de685 netchan: make -1 unlimited, as advertised.
R=adg
CC=golang-dev
https://golang.org/cl/2198042
2010-09-14 23:41:37 -07:00
Robert Griesemer
7f0ddd682a godoc: better handling of deep directory trees
also: fix a logic error with filter use at startup

R=rsc
CC=golang-dev
https://golang.org/cl/2184044
2010-09-14 18:58:09 -07:00
Robert Griesemer
4398768b84 godoc: atomically update filter file
R=rsc
CC=golang-dev
https://golang.org/cl/2206041
2010-09-14 16:54:38 -07:00
Robert Griesemer
bce8f51b2b godoc: use correct delay time (bug fix)
R=rsc
CC=golang-dev
https://golang.org/cl/2201041
2010-09-14 13:59:45 -07:00
Robert Griesemer
b6f294def3 godoc documentation: fixed typo, more precise comment
R=iant
CC=golang-dev
https://golang.org/cl/2184042
2010-09-14 12:03:26 -07:00
Robert Griesemer
ec81b1259b godoc: better support for directory trees for user-defined
file systems provided via -path

R=rsc
CC=golang-dev
https://golang.org/cl/2182041
2010-09-14 11:16:36 -07:00
Russ Cox
d64a2bddf0 tabs
TBR=lvd
CC=golang-dev
https://golang.org/cl/2194041
2010-09-14 11:16:57 -04:00
Russ Cox
b7e9e9188a 6l, 8l: make etext accurate; introduce rodata, erodata.
Makes binaries work with 6cov again.

R=ken2
CC=golang-dev
https://golang.org/cl/2192041
2010-09-14 11:13:04 -04:00
Sebastien Binet
caf3b4a749 Preliminary support for 'copy' builtin function in exp/eval
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/2157042
2010-09-14 17:25:34 +10:00
Rob Pike
6ee7997366 fmt.Fscan: use UnreadRune to preserve data across calls.
Fixes #1055.
(About as well as it can be fixed without changing the API.)

R=rsc
CC=golang-dev
https://golang.org/cl/2156047
2010-09-14 11:06:17 +10:00
Russ Cox
23bd214aee gc: implement new comparison rule
The new comparison rule was added to the spec by

	changeset:   5605:33abb649cb63
	user:        Robert Griesemer <gri@golang.org>
	date:        Thu Jun 03 16:55:50 2010 -0700
	files:       doc/go_spec.html
	description:
	go spec: Base comparison compatibility on assignment compatibility.

	Specifically:
	- Simplified definition of comparison compatibility and folded into
	  section on comparison operators since it's only used there.

	This is a small language change/cleanup. As a consequence:
	- An interface value may now be compared against a non-interface value.
	- Channels with opposite directions cannot be compared directly anymore
	  (per discussion with rsc).

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

but never implemented.

Fixes #1070.

R=ken2
CC=golang-dev
https://golang.org/cl/2116047
2010-09-13 15:42:47 -04:00
Russ Cox
c3900387db gc: bug306
Fixes #1040.

R=ken2
CC=golang-dev
https://golang.org/cl/2132047
2010-09-13 15:42:14 -04:00
Scott Lawrence
c5a51cc90f json: Add package comment
R=golang-dev, r2, r
CC=golang-dev
https://golang.org/cl/2149047
2010-09-13 16:03:27 +10:00
Joe Poirier
479cbd6d34 (windows) disable tests that cause the build to fail
R=rsc, brainman
CC=golang-dev
https://golang.org/cl/2171044
2010-09-13 13:36:51 +10:00
Nigel Tao
86b821f92b libcgo: fix NaCl build.
R=r, rsc, nigeltao
CC=golang-dev
https://golang.org/cl/2110046
2010-09-13 13:12:46 +10:00
Scott Lawrence
25c8d4e932 goinstall: warn when http:// is found at beginning of package name
Fixes #860.

R=golang-dev, adg1, rsc, adg
CC=golang-dev
https://golang.org/cl/2124046
2010-09-13 12:59:59 +10:00
Alex Brainman
77a70ddb7b gc: fix symbol table generation on windows
gc records full, '/' delimited, filenames now.

R=rsc
CC=golang-dev
https://golang.org/cl/1962042
2010-09-12 18:07:13 +10:00
Rob Pike
acb695f421 bufio: add UnreadRune.
R=rsc
CC=golang-dev
https://golang.org/cl/2103046
2010-09-12 17:40:27 +10:00
Joe Poirier
b155a76a40 exec.LookPath() unix/windows separation
R=brainman, rsc, vcc, rsc1
CC=golang-dev
https://golang.org/cl/2068041
2010-09-12 17:38:36 +10:00
Nigel Tao
e181bf6e2f libmach: fix whitespace.
R=rsc, r
CC=golang-dev
https://golang.org/cl/2149046
2010-09-12 16:40:31 +10:00
Russ Cox
f47d403cb4 gc: make string x + y + z + ... + w efficient
1 malloc per concatenation.

R=ken2
CC=golang-dev
https://golang.org/cl/2124045
2010-09-12 00:53:04 -04:00
Russ Cox
698fb4f192 6g, 6l, 8g, 8l: move read-only data to text segment
Changing 5g and 5l too, but it doesn't work yet.

R=ken2
CC=golang-dev
https://golang.org/cl/2136047
2010-09-12 00:17:44 -04:00
Russ Cox
be443ee8bc 5g: register allocation bugs
Fixes #1099.

R=ken2, r
CC=golang-dev
https://golang.org/cl/2147047
2010-09-12 00:06:45 -04:00
Russ Cox
323a116fd0 libmach: fix new thread race with Linux
If you look at the sequence of values returned
by waitpid, it simply tells us about the child of
clone before it tells us that the parent called clone.
There's nothing we can do but assume unexpected
tids are newly cloned children.

Tested with 6prof on godoc.

Fixes #251.

R=r
CC=golang-dev
https://golang.org/cl/2167045
2010-09-11 23:42:04 -04:00
Russ Cox
ca9d3f3463 build: avoid bad environment interactions
Specifically, $LIB is set on Windows.

Also diagnose attempt to build GOOS=darwin GOARCH=arm.
Otherwise the build fails mysteriously in package runtime.

Fixes #1065.

R=r
CC=golang-dev
https://golang.org/cl/2162043
2010-09-11 23:41:40 -04:00
Russ Cox
6e6fc67425 math: make portable Tan(Pi/2) return NaN
The panic NaN was a translation error.
The earliest version said panic "return sys.NaN()",
and when sys.NaN came along, it changed
to "panic sys.NaN()" instead of "return sys.NaN()".

R=r
CC=golang-dev
https://golang.org/cl/2106049
2010-09-11 23:41:25 -04:00
Russ Cox
a4514c42dd http: check https certificate against host name
Fixes #1093.

R=agl, agl1
CC=golang-dev
https://golang.org/cl/2115045
2010-09-11 23:41:12 -04:00
Russ Cox
eddddf042d arm: make libcgo build during OS X cross-compile
The gcc on OS X seems pickier about noticing
symbols that are referred to but not found during
the link of a .so file.

R=r
CC=golang-dev
https://golang.org/cl/2098047
2010-09-11 23:36:06 -04:00
Alex Brainman
e3a0c2f6cf net: disable tests for functions not available on windows
R=r, Joe Poirier, rsc
CC=golang-dev
https://golang.org/cl/2123044
2010-09-12 12:02:29 +10:00
Alex Brainman
f95a2f2b97 runtime(windows): make sure scheduler runs on os stack and new stdcall implementation
R=rsc
CC=golang-dev
https://golang.org/cl/2009045
2010-09-12 11:45:16 +10:00
Russ Cox
0acb63769c gc: const nil bug
Fixes #1073.

R=ken2
CC=golang-dev
https://golang.org/cl/2169043
2010-09-11 15:47:56 -04:00
Jukka-Pekka Kekkonen
50e0fb4c79 websocket: Add support for secure WebSockets
Fixes #842.
Fixes #1061.

R=rsc
CC=golang-dev
https://golang.org/cl/2119042
2010-09-11 00:27:16 -04:00
Russ Cox
befecf6b59 runtime: fix crash trace on amd64
g is not in r15 anymore.
now it's in a per-thread memory segment,
which is valid even inside a signal handler,
so we can just refer to g directly.

Fixes #1082.

R=r
CC=golang-dev
https://golang.org/cl/2149045
2010-09-11 00:26:56 -04:00
Rob Pike
0aa2317096 arm: work around reg allocator bug in 5g, in two parts.
1) hack regalloc to leave R9 (m) and R10 (g) alone.
the real fix is tricker, but this gets us running
2) fix up the few places in the package sources that
the shortage of registers affects, by simplifying
some expressions.

all of this should be reverted when the right fix is in.

Fixes #1084.

R=rsc
CC=golang-dev
https://golang.org/cl/2132046
2010-09-10 20:55:29 -07:00
Adam Langley
5011c27018 crypto/tls: don't return an error from Close()
Fixes #1037.

R=adg, rsc1
CC=golang-dev
https://golang.org/cl/2107048
2010-09-10 15:55:35 -04:00
Russ Cox
0f5830b9c3 net: fix windows build
R=adg
CC=golang-dev
https://golang.org/cl/2111045
2010-09-10 15:50:29 -04:00
Russ Cox
9c1b6dffd6 net: fix freebsd build
R=adg
CC=golang-dev
https://golang.org/cl/2174043
2010-09-10 14:40:56 -04:00
Joe Poirier
41e5a78441 windows: disable unimplemented tests
Add windows NOTEST list to pkg make file.
5a make file. the change removes a space
character that was included when appending
an extension to TARG.

R=brainman, rsc
CC=golang-dev
https://golang.org/cl/2140046
2010-09-10 14:05:57 -04:00
Dan Sinclair
122f3980c7 ld: handle quoted spaces in package path
Fixes #1087.

R=rsc
CC=golang-dev
https://golang.org/cl/2172041
2010-09-10 13:59:20 -04:00
Russ Cox
2cda191aef 6c, 8c: show line numbers in -S output
R=ken2
CC=golang-dev
https://golang.org/cl/2107047
2010-09-10 11:53:51 -04:00
Russ Cox
82ee481dfc gc: remove &[10]int -> []int conversion
Fixes #829.

R=ken2
CC=golang-dev
https://golang.org/cl/2124044
2010-09-10 11:53:27 -04:00
Nigel Tao
5801928817 exp/draw: fast path for drawing overlapping image.RGBAs.
R=r, nigeltao
CC=golang-dev
https://golang.org/cl/2145045
2010-09-10 20:09:56 +10:00
Nigel Tao
d660d4a6d0 exp/draw: fix double-counting of pt.Min for the src and mask points.
The min is typically zero, which is why this hasn't bitten us yet.

R=r
CC=golang-dev
https://golang.org/cl/2119048
2010-09-10 19:48:27 +10:00
Rob Pike
66f676b8ef arm: fix a couple of build bugs.
tests have not been run yet

R=stephenm
CC=golang-dev
https://golang.org/cl/2165046
2010-09-09 23:31:33 -07:00
Alex Brainman
f5089ffff4 syscall: fix windows Gettimeofday
Fixes #1092.

R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/2121048
2010-09-10 15:39:45 +10:00
Robert Griesemer
0eb0afde9a fix build
R=rsc, ken2
CC=golang-dev
https://golang.org/cl/2118050
2010-09-09 14:42:49 -07:00
Russ Cox
1678dcc378 gc: more accurate line numbers for ATEXT
and other begin and end of function code

R=ken2
CC=golang-dev
https://golang.org/cl/2158044
2010-09-09 17:11:51 -04:00
Nigel Tao
2deee2936c exp/draw: clip destination rectangle to the image bounds.
image: introduce Intersect and Union rectangle methods.

R=r, rog, nigeltao
CC=golang-dev
https://golang.org/cl/2115043
2010-09-09 19:12:54 +10:00
Nigel Tao
6c8b85273c exp/draw: rename Context to Window, and add a Close method.
exp/draw/x11: allow clean shutdown when the user closes the window.

R=r
CC=golang-dev
https://golang.org/cl/2134045
2010-09-09 18:06:59 +10:00
Joe Poirier
1d62becbd8 build: generate, clean .exe files on Windows
R=rsc, brainman, vcc
CC=golang-dev
https://golang.org/cl/2165044
2010-09-09 01:42:55 -04:00
Ivan Krasin
dfb2af6099 path: add IsAbs
R=rsc, imkrasin, r
CC=golang-dev
https://golang.org/cl/1969042
2010-09-09 01:42:43 -04:00
Rob Pike
e56c0555da Make.inc: fix build for tiny.
Suggested by paulzhol@gmail.com

R=rsc
CC=golang-dev
https://golang.org/cl/2122049
2010-09-09 15:14:38 +10:00
Robert Griesemer
c4e27b7cfb gofmt, go/printer: update internal estimated position correctly
Fixes #1089.

R=rsc
CC=golang-dev
https://golang.org/cl/2172043
2010-09-08 22:01:48 -07:00
Rob Pike
ba5175401e runtime: fix bug in tracebacks
Need to correct for deferproc's extra 2 words of stack or in some
cases (such as memory profiling) traceback can cause a crash.
Also bulletproof the closure test.

R=rsc
CC=golang-dev
https://golang.org/cl/2138047
2010-09-09 14:28:56 +10:00
Joe Poirier
e21b3a40ac build: test for _WIN32, not _MINGW32
Use OS rather than compiler specific flag the same way that
__FreeBSD__, __APPLE__, __OpenBSD__, and __linux__ are used.

_WIN32 is defined by GCC (and others) on windows for Win32
and Win64 applications. _WIN32 is set by default for several
other windows based compilers: DMC, MSVC, Intel, Watcom, LCC.

Although the change is for consistency, it allows the Go tools
to be compiled with non-Mingw GCC distributions and non-GCC
compilers that support the GCC extensions.

R=rsc, brainman, vcc
CC=golang-dev
https://golang.org/cl/2168043
2010-09-08 22:20:35 -04:00
Scott Lawrence
fce222a95b gc: implement new slice spec
Fixes #382.

R=gri, cw, r, rsc
CC=golang-dev
https://golang.org/cl/1957045
2010-09-08 22:20:29 -04:00
Alex Brainman
89e9231865 runtime: fix windows build
R=rsc, r2
CC=golang-dev
https://golang.org/cl/2135045
2010-09-09 12:09:10 +10:00
Andrew Gerrand
e1b79b712c cgo: add typedef for uintptr in generated headers
Fixes #1046.

R=rsc, iant
CC=golang-dev
https://golang.org/cl/2102043
2010-09-09 09:24:53 +10:00
Andrew Gerrand
55986c1329 path: fix typo in path.Visitor
Fixes #1088.

R=gri, iant
CC=golang-dev
https://golang.org/cl/2157043
2010-09-09 09:24:27 +10:00
Jukka-Pekka Kekkonen
f7a71c6505 http: do not cache CanonicalHeaderKey
Fixes #1080.

R=rsc
CC=golang-dev
https://golang.org/cl/2158043
2010-09-08 10:20:21 -04:00
Russ Cox
5baaa490d6 gc: better printing of named constants, func literals
R=ken2
CC=golang-dev
https://golang.org/cl/2121045
2010-09-08 10:12:56 -04:00
Robert Griesemer
889377c572 godoc: moved package directory support code into separate file
- in prep. for some restructuring to be able to better deal
  with very large file systems
- moved a utility function into index.go
- no functionality changes, only code reorg.

R=r, adg1
CC=golang-dev
https://golang.org/cl/2098044
2010-09-07 17:21:00 -07:00
Russ Cox
e50611d235 os, exec: rename argv0 to name
R=r, gri1
CC=golang-dev
https://golang.org/cl/2119044
2010-09-07 16:29:07 -04:00
Jukka-Pekka Kekkonen
1cec72cff1 build: work with GNU Make 3.82
Fix building on GNU Make 3.82 (caused by mixed implicit and normal
rules).

The issue was introduced in changeset 6110:ca0beac3b543.

R=rsc
CC=golang-dev
https://golang.org/cl/2100044
2010-09-07 15:14:14 -04:00
Russ Cox
636342292c runtime: fix linux/amd64 build: wrong name for munmap
TBR=r
CC=golang-dev
https://golang.org/cl/2140043
2010-09-07 13:17:10 -04:00
Russ Cox
d4cc557b0d runtime: use manual stack for garbage collection
Old code was using recursion to traverse object graph.
New code uses an explicit stack, cutting the per-pointer
footprint to two words during the recursion and avoiding
the standard allocator and stack splitting code.

in test/garbage:

Reduces parser runtime by 2-3%
Reduces Peano runtime by 40%
Increases tree runtime by 4-5%

R=r
CC=golang-dev
https://golang.org/cl/2150042
2010-09-07 09:57:22 -04:00
Russ Cox
2eb00d57b4 cgo: silence warning for C call returning const pointer
Fix suggested by Albert Strasheim.

R=adg
CC=golang-dev
https://golang.org/cl/2154041
2010-09-07 09:54:20 -04:00
Nigel Tao
fa92b113b1 exp/draw: reintroduce the MouseEvent.Nsec timestamp.
R=rsc
CC=golang-dev
https://golang.org/cl/2166042
2010-09-07 23:42:01 +10:00
Brad Fitzpatrick
34c312e11e arm: use the correct stat syscalls
We were using the 64-bit struct with the old 32-bit
system calls.

http://code.google.com/p/go/issues/detail?id=1083

This also fixes up mksyscall.sh to generate
gofmt-compliant code.

R=rsc
CC=golang-dev, kaib
https://golang.org/cl/2148042
2010-09-07 09:23:49 -04:00
Nigel Tao
832ed355fe image: change a ColorImage's minimum point from (0, 0) to (-1e9, -1e9).
R=r
CC=golang-dev
https://golang.org/cl/2138045
2010-09-07 19:16:59 +10:00
Nigel Tao
c849b23ce9 exp/draw: unify a draw.Context's keyboard, mouse, etc. channels into a
single event channel.

A quit event is now represented by closing that channel.

R=r, rsc, nigeltao
CC=golang-dev
https://golang.org/cl/2114042
2010-09-06 19:22:49 +10:00
Anthony Martin
68cce4ab20 fmt.Scan: fix integer overflow on 32-bit machines
R=r, rsc
CC=golang-dev
https://golang.org/cl/2144043
2010-09-06 08:04:53 +10:00
Rob Pike
d54b921c9b netchan: use acknowledgements on export send.
Also add exporter.Drain() to wait for completion.
This makes it possible for an Exporter to fire off a message
and wait (by calling Drain) for the message to be received,
even if a client has yet to call to retrieve it.

Once this design is settled, I'll do the same for import send.

Testing strategies welcome.  I have some working stand-alone
tests.

R=rsc
CC=golang-dev
https://golang.org/cl/2137041
2010-09-04 23:41:54 +10:00
Rob Pike
6405ab0fae fmt: delete erroneous sentence about return value for Sprint*.
R=rsc
CC=golang-dev
https://golang.org/cl/2160041
2010-09-04 22:29:10 +10:00
Russ Cox
ef8af73ef5 build: implement NOINSTALL=1 for Make.ccmd
The makefiles for prof and cov use it already.
(It's also in Make.clib.)

R=adg
CC=golang-dev
https://golang.org/cl/2036045
2010-09-03 15:37:57 -04:00
Russ Cox
a41db4318d goinstall: assume go binaries are in path
(Following new convention.)

Fixes #1063.

R=adg
CC=golang-dev
https://golang.org/cl/2115042
2010-09-03 15:37:45 -04:00
Nigel Tao
2b4218f321 image: introduce Config type and DecodeConfig function, to decode an
image's color model and dimensions without allocating and decoding its
actual pixels.

Fixes #695.

R=r
CC=golang-dev
https://golang.org/cl/2151042
2010-09-03 18:03:08 +10:00
Rob Pike
d94fedabb4 list: update comment to state that the zero value is ready to use.
R=gri
CC=golang-dev
https://golang.org/cl/2147042
2010-09-03 17:11:56 +10:00
Russ Cox
1cb951d994 gc: appease bison version running on FreeBSD builder
R=ken2
CC=golang-dev
https://golang.org/cl/2141042
2010-09-02 14:31:39 -04:00
Robert Griesemer
a37e3697da exp/iterables: fix typo
Fixes #1069.

R=rsc
CC=golang-dev
https://golang.org/cl/2143041
2010-09-02 11:31:00 -07:00
Russ Cox
f699811c14 time: do not crash in String on nil Time
R=r
CC=golang-dev
https://golang.org/cl/2052041
2010-09-02 14:21:40 -04:00
Russ Cox
8d7ae528bf http: add Date to server, Last-Modified and If-Modified-Since to file server
R=r
CC=golang-dev
https://golang.org/cl/2051041
2010-09-02 14:21:11 -04:00
Russ Cox
5bf658cc8f build: create bin and pkg directories as needed; drop from hg
R=dsymonds, r
CC=golang-dev
https://golang.org/cl/2050043
2010-09-02 14:20:02 -04:00
Russ Cox
4e64555894 runtime: add GOOS, GOARCH; fix FuncLine
Changes to FuncLine sync it with symtab.c's funcline.

R=r
CC=girard.m1, golang-dev
https://golang.org/cl/2083041
2010-09-02 14:19:12 -04:00
Russ Cox
dea283750b gc: fix spurious syntax error
Fixes #1071.

R=ken2
CC=golang-dev
https://golang.org/cl/2136043
2010-09-02 14:16:01 -04:00
Scott Lawrence
ebe837d6eb goinstall: added -a flag to mean "all remote packages"
Fixes #897.

goinstall -a can be used to reinstall all packages after an upgrade
goinstall -a -u can be used to update all package
A history of remote package installs is stored in $GOROOT/goinstall.log

R=rsc, adg
CC=golang-dev
https://golang.org/cl/1947041
2010-09-02 13:48:28 -04:00
Alex Brainman
b05679cdd6 8l: suppress emitting DWARF in Windows PE.
Fixes #1064.

R=rsc, lvd, vcc
CC=golang-dev
https://golang.org/cl/2104042
2010-09-02 17:00:24 +10:00
Andrew Gerrand
2fe0f8da52 http: add PostForm function to post url-encoded key/value data.
This is a common task, so it makes sense to have a helper to do it.

(App Engine doesn't like "Transfer-Encoding: chunked" for POST
bodies, which is the default for regular Post.)

R=rsc
CC=golang-dev
https://golang.org/cl/2113041
2010-09-02 10:01:34 +10:00
Kyle Consalus
f8a67d79d1 Fix incorrect reporting of error in Scanner.next() when Read reads > 0 bytes but returns os.EOF.
R=golang-dev, gri1, gri
CC=golang-dev
https://golang.org/cl/2083042
2010-09-01 15:15:37 -07:00
Rob Pike
3d76135ee5 netchan: rather than 0, make -1 mean infinite, by analogy with strings.Split etc.
It's unlikely to affect any extant code, but I wanted to make this API change
before digging in for a rewrite.

R=rsc
CC=golang-dev
https://golang.org/cl/2112041
2010-09-02 08:10:53 +10:00
Luuk van Dijk
728003e340 6l/8l: emit DWARF in macho.
R=rsc, r, ken2
CC=golang-dev
https://golang.org/cl/2128041
2010-09-01 21:54:28 +02:00
Rob Pike
49b19e1b39 fmt: fix typo in package comment.
No semantic change.

R=rsc
CC=golang-dev
https://golang.org/cl/2121041
2010-09-01 22:59:20 +10:00
Scott Lawrence
825e0deece template: fixed documentation formatting
What was meant to be a list appeared as a paragraph with dashes.

R=golang-dev, gri1, gri
CC=golang-dev
https://golang.org/cl/2100041
2010-08-31 19:07:40 -07:00
Robert Griesemer
9f46962c3b big: added RatString, some simplifications
R=rsc
CC=golang-dev
https://golang.org/cl/2095041
2010-08-31 15:18:46 -07:00
Robert Griesemer
3ad995ea88 strconv: fix comment for godoc
R=rsc
CC=golang-dev
https://golang.org/cl/2029042
2010-08-31 14:18:20 -07:00
Ian Lance Taylor
7a2daa7d3a proc, eval: Don't assign address of an array to a slice.
R=rsc
CC=golang-dev
https://golang.org/cl/2084041
2010-08-30 13:47:40 -07:00
Luuk van Dijk
b433552ebc 8l: emit DWARF in ELF.
R=rsc, r, ken2
CC=golang-dev
https://golang.org/cl/2004046
2010-08-30 22:20:38 +02:00
Christian Himpel
5c603dbb75 build: remove unnecessary references to GOBIN and GOROOT
All scripts and makefiles assume that GOBIN is correctly set
in PATH.

R=rsc
CC=golang-dev
https://golang.org/cl/2043041
2010-08-30 15:40:56 -04:00
Rob Pike
ca3b5222eb regexp: interpret all Go characer escapes \a \b \f \n \r \t \v
R=rsc
CC=golang-dev
https://golang.org/cl/2042044
2010-08-30 14:06:59 +10:00
Evan Shaw
3972908ead crypto/tls: Fix doc typo
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/2073041
2010-08-30 09:59:59 +10:00
Rob Pike
64cb9b6f45 rpc: fix bug that caused private methods to attempt to be registered.
Fixes #1056.

R=golang-dev, adg1
CC=golang-dev
https://golang.org/cl/2033043
2010-08-30 08:03:06 +10:00
Rob Pike
b5664ee320 template: finally fix space handling around actions.
Rewrite the code to express the intention more clearly.

Fixes #1042.

R=rsc
CC=golang-dev
https://golang.org/cl/2011046
2010-08-28 07:52:55 +10:00
Robert Griesemer
8935c8489a gofmt: permit omission of first index in slice expression
R=rsc
CC=golang-dev, r
https://golang.org/cl/2053041
2010-08-27 14:49:49 -07:00
Russ Cox
9686ab2da9 8g: use FCHS, not FMUL, for minus float
Fixes #1052.

R=ken2
CC=golang-dev
https://golang.org/cl/2055041
2010-08-27 14:02:00 -04:00
Scott Lawrence
1a0b62a16a go/printer: align ImportPaths in ImportDecls if PackageName is given.
Fixes #1044.

R=gri
CC=golang-dev
https://golang.org/cl/1958047
2010-08-26 22:08:02 -07:00
Russ Cox
9f24d3686f Make.pkg: never use quietgcc
R=iant
CC=golang-dev
https://golang.org/cl/2033041
2010-08-26 20:21:34 -04:00
Charles L. Dorian
bead166a7c math: amd64 version of Sincos
R=rsc
CC=golang-dev
https://golang.org/cl/1939042
2010-08-26 19:03:58 -04:00
Russ Cox
d3a2dcf5a8 build: fix cgo with -j2
a b: c expands to multiple rules,
which then run in parallel.

R=r, iant
CC=golang-dev
https://golang.org/cl/2007047
2010-08-26 18:47:34 -04:00
Kyle Consalus
e24910d09b gc: brace nit from last review
R=rsc
CC=golang-dev
https://golang.org/cl/1997045
2010-08-26 18:46:56 -04:00
Ian Lance Taylor
b279c048e3 netchan: Fix race condition in test.
Two tests start a goroutine which runs exportSend, and then
the tests run importReceive.  exportSend creates an export
channel.  importReceive asks to receive values on that
channel.  Because exportSend runs in a separate goroutine,
it's possible for the export client to receive the request for
values on the channel, from importReceive, before the
goroutine actually creates the export channel.  That causes an
error: "export: no such channel: exportedSend".  This patch
avoids the race by creating the export channel before starting
the goroutine.

There does not seem to be a similar race condition in the
tests which send data in the other direction.

R=r
CC=golang-dev
https://golang.org/cl/2026045
2010-08-26 15:42:18 -07:00
Robert Griesemer
c606b964a0 go/typechecker: 2nd step towards augmenting AST with full type information.
- refine/define Scope, Object, and Type structures
  (note: scope.go has the addition of types, the rest is only re-organized
  for better readability)
- implemented top-level of type checker:
  resolve global type declarations (deal with double decls, cycles, etc.)
- temporary hooks for checking of const/var declarations, function/method bodies
- test harness for fine-grained testing (exact error locations)
  with initial set of tests

This is a subset of the code for easier review.

R=rsc
CC=golang-dev
https://golang.org/cl/1967049
2010-08-26 14:36:13 -07:00
Corey Thomasson
ec72f9bf18 net: add LookupMX
R=rsc
CC=golang-dev
https://golang.org/cl/1976049
2010-08-26 13:32:45 -04:00
Kyle Consalus
4d903504b3 runtime: special case copy, equal for one-word interface values
Based on the observation that a great number of the types that
are copied or compared in interfaces, maps, and channels are
word-sized, this uses specialized copy and equality functions
for them that use a word instead of 4 or 8 bytes. Seems to yield
0-6% improvements in performance in the benchmarks I've run.
For example, with the regexp benchmarks:

Before:
regexp.BenchmarkLiteral   500000       3.26 µs/op
regexp.BenchmarkNotLiteral    100000      13.67 µs/op
regexp.BenchmarkMatchClass    100000      18.72 µs/op
regexp.BenchmarkMatchClass_InRange    100000      20.04 µs/op
regexp.BenchmarkReplaceAll    100000      27.85 µs/op

After:
regexp.BenchmarkLiteral   500000       3.11 µs/op
regexp.BenchmarkNotLiteral    200000      13.29 µs/op
regexp.BenchmarkMatchClass    100000      17.65 µs/op
regexp.BenchmarkMatchClass_InRange    100000      18.49 µs/op
regexp.BenchmarkReplaceAll    100000      26.34 µs/op

R=rsc
CC=golang-dev
https://golang.org/cl/1967047
2010-08-26 13:32:40 -04:00
Jukka-Pekka Kekkonen
ba5b09f786 crypto/hmac: make Sum idempotent
Fixes #978.

R=rsc
CC=golang-dev
https://golang.org/cl/1967045
2010-08-26 13:32:29 -04:00
Evan Shaw
33cb46903e net/textproto: Handle multi-line responses
This is required for FTP and SMTP; maybe others.

R=rsc
CC=golang-dev
https://golang.org/cl/1892052
2010-08-26 13:32:23 -04:00
Scott Lawrence
6752ce9331 http: obscure passwords in return value of URL.String
Fixes #974.

R=rsc
CC=golang-dev
https://golang.org/cl/1742057
2010-08-26 13:32:16 -04:00
Ian Lance Taylor
bbaef5f4dc runtime: Correct commonType.kind values to match compiler.
The copy of these values in the reflect package is already
correct.

R=rsc
CC=golang-dev
https://golang.org/cl/2009044
2010-08-26 08:08:57 -07:00
Russ Cox
dbc6d75315 goinstall: use https for Google Code checkouts
This way, if you later want to check things in,
you can (with appropriate authorization).
Using plain http leads to the cryptic error
abort: HTTP Method Not Allowed.

R=r
CC=golang-dev
https://golang.org/cl/1983050
2010-08-25 18:08:16 -04:00
Russ Cox
423e410258 gotest: allow make test of cgo packages (without make install)
R=r
CC=golang-dev, stevvooe
https://golang.org/cl/1995051
2010-08-25 18:00:42 -04:00
Russ Cox
15f336b675 build: let pkg/Makefile coordinate building of Go commands
Commands written in Go depend on Go packages, so they
cannot be built by src/cmd/make.bash.  They have been
built by src/make.bash after all the packages are done, but
we want to be able to use cgo (written in Go) during the build
of package net.  To make this possible, build the commands
from src/pkg/Makefile instead of src/make.bash, so that they
are included in the package dependency analysis.

R=r
CC=golang-dev
https://golang.org/cl/1972046
2010-08-25 17:54:10 -04:00
Russ Cox
5008927c5c libcgo: update Makefile to use Make.inc
Fix printf format string.

R=r
CC=golang-dev
https://golang.org/cl/1959044
2010-08-25 17:53:24 -04:00
Russ Cox
216f5fff36 build: delete Make.386 Make.amd64 Make.arm
obsoleted by Make.inc.

R=r
CC=golang-dev
https://golang.org/cl/2009041
2010-08-25 17:51:48 -04:00
Jukka-Pekka Kekkonen
9401e3d1e4 websocket: fix missing Sec-WebSocket-Protocol on server response.
Due to header key normalization/typo, the server never responds with
the protocol header in place. This breaks all (draft76) applications
that are using the protocol-header.

R=ukai, rsc
CC=golang-dev
https://golang.org/cl/1969046
2010-08-25 12:52:04 -04:00
Martin Neubauer
9a04cba807 src/pkg/Makefile: delete use of QUOTED_GOBIN
R=rsc
CC=golang-dev
https://golang.org/cl/1997044
2010-08-25 12:44:13 -04:00
Russ Cox
b0729cdfe5 go/doc: use correct escaper for URL
Despite the name, URL escaping is for a small subpiece of the URL only.
This particular URL is being emitted in an <a href=""> tag and in that
context it should be HTML escaped, not URL escaped.

In addition to fixing a bug, this change cuts a dependency chain
from go/doc to net, clearing the way for use of cgo
(which imports go/doc) during the compilation of package net.

R=gri
CC=golang-dev
https://golang.org/cl/1960050
2010-08-25 11:00:38 -04:00
Russ Cox
218afb8fbd syscall: change BUG(brainman) to NOTE(brainman)
Avoids the comment appearing in godoc syscall BUGS section.

R=brainman
CC=golang-dev
https://golang.org/cl/1966048
2010-08-25 01:26:35 -04:00
Rob Pike
d7736413a6 scanner: change package comment to be clearer about its functionality.
No semantic changes.

R=gri, rsc1
CC=golang-dev
https://golang.org/cl/1998045
2010-08-25 13:07:08 +10:00
Russ Cox
2aa77c6b93 gotest: remove lingering references to $GOBIN
(Assumed to be in $PATH.  all.bash ensures that
during the main build and the user must ensure it
when running commands like gotest or gomake
by hand.  This belonged in the earlier CL but I missed it.)

R=r
CC=golang-dev
https://golang.org/cl/1967048
2010-08-24 21:56:32 -04:00
Russ Cox
e3034adfc2 build: fix build again - not sure where the " went. sigh.
R=r
CC=golang-dev
https://golang.org/cl/2024043
2010-08-24 20:43:31 -04:00
Ian Lance Taylor
2b73ad592c time: Remove unused zoneinfo.go (replaced by zoneinfo_unix.go).
R=r, rsc
CC=brainman, golang-dev
https://golang.org/cl/2020043
2010-08-24 17:24:40 -07:00
Russ Cox
8b718b9a37 build: fix build - last CL missed Make.clib
R=r
CC=golang-dev
https://golang.org/cl/1981047
2010-08-24 20:15:52 -04:00
Russ Cox
aafe474ec9 build: $GOBIN defaults to $GOROOT/bin
R=r
CC=golang-dev
https://golang.org/cl/1982049
2010-08-24 20:00:33 -04:00
Jan H. Hosang
2100f57e0f time.Parse should not require minutes for time zone
Fixes #1026.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1962048
2010-08-25 07:41:26 +10:00
Russ Cox
e1e829b786 runtime: fix freebsd/386 mmap
The runtime only passes 32 bits of file offset,
but the kernel wants 64 bits, so have to add
zeros explicitly in a copy of the arguments.

R=adg, Martin Neubauer
CC=golang-dev
https://golang.org/cl/1933044
2010-08-24 13:04:02 -04:00
Russ Cox
b1311cbc93 gc: fix parenthesization check
Cannot use paren field in Node because all
instances of a given symbol name use the same Node.

Fixes #1022.

R=ken2
CC=golang-dev
https://golang.org/cl/2015043
2010-08-23 23:10:25 -04:00
Scott Lawrence
668f05aaf1 os: make return type of FileInfo.Permission() consistent with related functions
(uint32 rather than int)

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1958048
2010-08-24 10:38:52 +10:00
Russ Cox
d0459447fa http: doc nit
R=r
CC=golang-dev
https://golang.org/cl/2013043
2010-08-23 18:06:28 -04:00
Ken Thompson
96cbdd62b6 better job on 2007043
better registerization

R=rsc
CC=golang-dev
https://golang.org/cl/1955049
2010-08-23 12:38:15 -07:00
Kai Backman
534dbc738f arm: fix build, regenerate syscall files
R=r
CC=golang-dev
https://golang.org/cl/1952046
2010-08-23 13:25:14 +03:00
Andrew Gerrand
4642708984 io: prevent ReadAtLeast spinloop if min > len(buf)
R=r, heresy.mc
CC=golang-dev
https://golang.org/cl/2017042
2010-08-23 12:04:15 +10:00
Scott Lawrence
d125faeed0 net/ipsock.go: fix error checking bug
Check oserr, not err for non-nil (err is never changed)

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1965042
2010-08-22 22:12:56 +10:00
Scott Lawrence
e5518feaf8 http: fix typo in http.Request documentation
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/2004044
2010-08-22 14:44:00 +10:00
Russ Cox
c560c8a9c3 libmach: implement register fetch for 32-bit x86 kernel
Also use memmove to silence some gcc warnings.

Fixes #1036.

R=r, EtherealMachine
CC=golang-dev
https://golang.org/cl/1943049
2010-08-20 20:49:47 -04:00
Robert Griesemer
dbbe32ee53 fix build
Also: Copyright notices only need the year the file was created.

R=rsc
CC=golang-dev, krasin
https://golang.org/cl/2021041
2010-08-20 11:20:12 -07:00
Ivan Krasin
5a0274399a syscall: regenerate syscall/z* files for linux/386, linux/amd64
DISTRIB_DESCRIPTION="Ubuntu 10.04 LTS"

Use <sys/user.h> instead of <linux/user.h>
See http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00834.html for more details.

R=imkrasin, rsc
CC=golang-dev
https://golang.org/cl/1957041
2010-08-20 09:12:21 -04:00
Ken Thompson
3dc3ef4cf7 attempt to gete better registeration
from the builtin structures (strings,
slices, interfaces)

R=rsc
CC=golang-dev
https://golang.org/cl/2007043
2010-08-19 18:18:51 -07:00
Robert Griesemer
1a667f52d8 go/ast Fprint: handle cycles in AST
Augmented ASTs may contain cycles. Keep
track of already printed objects and refer
to them with a line number instead of
printing them again.

R=rsc
CC=golang-dev
https://golang.org/cl/1998042
2010-08-19 16:03:02 -07:00
Rob Pike
9d3eb29a29 mime: delete unnecessary constant conversions.
R=rsc
CC=golang-dev
https://golang.org/cl/1984043
2010-08-20 07:42:02 +10:00
Adam Langley
4abfc4fff0 crypto/ocsp: add missing Makefile
R=rsc
CC=golang-dev
https://golang.org/cl/2018041
2010-08-19 16:33:58 -04:00
Robert Griesemer
3112bb0727 go/ast, gofmt: facility for printing AST nodes
go/ast: implement Fprint and print functions to
print AST nodes

gofmt: print AST nodes by setting -ast flag

R=rsc, r
CC=golang-dev
https://golang.org/cl/1981044
2010-08-19 09:39:35 -07:00
Christopher Wedgwood
bdeebf4907 clean.bash: fix standalone runs
R=rsc
CC=golang-dev
https://golang.org/cl/1933043
2010-08-19 00:09:11 -04:00
Eric Clark
95fa16a892 cgo: add C.GoStringN
Function to create a GoString with a known length so it can contain NUL
bytes anywhere in the string. Some C libraries have strings like this.

R=rsc
CC=golang-dev
https://golang.org/cl/2007042
2010-08-18 22:29:05 -04:00
Rob Pike
6e76298744 fmt: add sentence about return values to docs for Printf etc.
R=rsc, gri
CC=golang-dev
https://golang.org/cl/1952045
2010-08-19 12:07:24 +10:00
Luuk van Dijk
ca9098ee94 Dwarf output for 6l.
Part 1, general scaffolding and pc/lc sections.

R=rsc, r, ken2
CC=golang-dev
https://golang.org/cl/1987042
2010-08-18 16:53:22 +02:00
Russ Cox
632417e5e7 run.bash: fix freebsd build (i hope)
R=adg
CC=golang-dev
https://golang.org/cl/2012041
2010-08-18 10:22:57 -04:00
Russ Cox
da392d9136 build: no required environment variables
R=adg, r, PeterGo
CC=golang-dev
https://golang.org/cl/1942044
2010-08-18 10:08:49 -04:00
Russ Cox
31339c3224 cgo: fix build: use $GCC, not $CC
I'm not sure there's a better way.
Cgo is juggling two different C compilers.

Fixes #1008.

R=iant
CC=golang-dev
https://golang.org/cl/1972044
2010-08-18 10:03:01 -04:00
Russ Cox
3bf656327e http: parse query string always, not just in GET
Fixes #985.

R=dsymonds, dsymonds1
CC=golang-dev
https://golang.org/cl/1963044
2010-08-17 20:01:50 -04:00
Russ Cox
8dc4c0b45f jsonrpc: use error: null for success, not error: ""
handle missing id in server.

Fixes #1017.
Fixes #1018.

R=r
CC=golang-dev
https://golang.org/cl/1986044
2010-08-17 18:55:42 -04:00
Luuk van Dijk
340f28deab runtime: correct line numbers for .goc files.
Linenumbers start at 1.
Also call goc2c with an absolute pathi to preserve debug info.

R=rsc, r, ken2
CC=golang-dev
https://golang.org/cl/1954049
2010-08-18 00:16:05 +02:00
Robert Griesemer
a48b35e961 reflect: allow PtrValue.PointTo(nil)
(Argument: For any *PtrValue p, it should
always be possible to do: p.PointTo(p.Elem()),
even if p.Elem() is nil.)

Fixes #1028.

R=rsc
CC=golang-dev, r
https://golang.org/cl/1938044
2010-08-17 15:12:28 -07:00
Scott Lawrence
a240af3822 Make.common: add .PHONY rule
to prevent files named 'clean', 'bench', etc... preventing proper build

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/1976044
2010-08-17 17:35:48 -04:00
Roger Peppe
781c54d06c Fix template package so that data items
preceded by white space parse correctly.

R=r
CC=golang-dev
https://golang.org/cl/2010041
2010-08-17 23:13:07 +10:00
Roger Peppe
e5aad81930 Remove relic "once" import from time/zoneinfo.go
R=rsc, r
CC=golang-dev
https://golang.org/cl/2005042
2010-08-17 23:08:19 +10:00
Robert Griesemer
fa80a73bee gofmt: do not modify multi-line string literals
tabwriter: Introduce a new flag StripEscape to control
if tabwriter.Escape chars should be stripped or passed
through unchanged.

go/printer: Don't modify tabwriter.Escape'd text. This
involved a new implementation of the internal trimmer
object.

Does not affect formatting of any existing code under
$GOROOT/src and $GOROOT/misc.

Fixes #1030.

R=rsc
CC=golang-dev
https://golang.org/cl/1943045
2010-08-16 21:37:10 -07:00
Alex Brainman
b243d57eb4 os: preserve "=C:" like env variables in env block on windows and bug fix in Clearenv()
R=rsc
CC=golang-dev
https://golang.org/cl/1995043
2010-08-17 11:38:26 +10:00
Rob Pike
30ab8cf792 template: retain leading space if the line is not an action.
R=rsc
CC=golang-dev
https://golang.org/cl/1985042
2010-08-17 09:44:16 +10:00
Rob Pike
316961c172 fmt/print: remove a TODO regarding printing renamed byte slices.
the solution must work around a weakness in the reflection library:
there is no way to do type-safe conversions under reflection.

R=rsc
CC=golang-dev
https://golang.org/cl/2000041
2010-08-17 08:34:40 +10:00
Rob Pike
69fe3dd754 regexp: grow slices dynamically in the 'All' routines.
R=rsc
CC=golang-dev
https://golang.org/cl/1953044
2010-08-16 15:17:34 -07:00
Mikkel Krautz
c47123d07b crypto/tls: client certificate support.
This changeset implements client certificate support in crypto/tls
for both handshake_server.go and handshake_client.go

The updated server implementation sends an empty CertificateAuthorities
field in the CertificateRequest, thus allowing clients to send any
certificates they wish. Likewise, the client code will only respond
with its certificate when the server requests a certificate with this
field empty.

R=agl, rsc, agl1
CC=golang-dev
https://golang.org/cl/1975042
2010-08-16 11:22:22 -04:00
Nigel Tao
07053ac6e4 image/png: support 16-bit color.
R=r, mpl
CC=golang-dev
https://golang.org/cl/1944043
2010-08-16 23:33:20 +10:00
Ken Thompson
5b0c317c9c code optimization on slices
R=rsc
CC=golang-dev
https://golang.org/cl/1942043
2010-08-13 19:39:36 -07:00
Rob Pike
b21611b963 fmt/print: give %p priority, analogous to %T
Fixes #1024.

R=rsc
CC=golang-dev
https://golang.org/cl/1961042
2010-08-14 07:37:03 +10:00
Ken Thompson
3efb4c3b63 fix bounds check in error recovery
(thanks to avp@mit.edu)

R=rsc
CC=golang-dev
https://golang.org/cl/1998041
2010-08-13 14:30:18 -07:00
Robert Griesemer
1f9dfa294f go AST: First step towards augmenting AST with full type information.
- change ast.Ident back to contain the name and adjust all dependent code
- identifier object information will be added again through an optional
  typechecker phase (in the works).
- remove tracking of scopes in parser - it's easier to do this in a separate
  phase (in the works)
- in godoc, generate popup info table directly instead of through a formatter
  for simpler data flow (at the expense of a little bit more code)

Runs all tests.

As a result of this change, the currently shown popup information
(const, var, type, func, followed by identifier name) will not be
shown anymore temporarily.

R=rsc
CC=golang-dev
https://golang.org/cl/1994041
2010-08-13 10:42:18 -07:00
Rob Pike
be97fa4c79 fmt/print: honor Formatter in Print, Println.
Rearrange code to clarify handling of %T, Formatter, GoStringer, and Stringer.

R=rsc
CC=golang-dev
https://golang.org/cl/1973043
2010-08-13 17:26:32 +10:00
Russ Cox
e2bde5cf9b runtime: fix another stack split bug
Makes godoc --http=:1234 not crash on linux/amd64.

R=r
CC=golang-dev
https://golang.org/cl/1975044
2010-08-12 23:26:54 -07:00
Alex Brainman
79c62aaa99 os: implement env using native windows api.
Fixes #864.

R=rsc
CC=golang-dev
https://golang.org/cl/1975043
2010-08-13 14:29:23 +10:00
Rob Pike
a621a7ef74 delete pkg/once
R=rsc
CC=golang-dev
https://golang.org/cl/1995041
2010-08-13 12:53:27 +10:00
Robert Griesemer
10ae88f4ab partial correction for CL 1983043: fix various godoc-related regexp calls
R=rsc
CC=golang-dev
https://golang.org/cl/1987041
2010-08-12 11:28:50 -07:00
Rob Pike
079a117469 regexp: delete the deprecated methods and tests.
R=golang-dev
CC=golang-dev
https://golang.org/cl/1956044
2010-08-12 17:16:37 +10:00
Mikio Hara
e41987c821 net: make IPv6 String method standards compliant
draft-ietf-6man-text-addr-representation-07 will introduce
a canonical textual representation format for IPv6 address.

R=rsc
CC=golang-dev
https://golang.org/cl/1856047
2010-08-12 00:03:01 -07:00
Rob Pike
d31ee536e8 update the tree to use the new regexp methods
R=rsc
CC=golang-dev
https://golang.org/cl/1983043
2010-08-12 16:48:41 +10:00
Rob Pike
4fb5883253 testing: delete the less useful methods in the testing regexp package
We can add them back using the new naming scheme should it become important.

R=rsc
CC=golang-dev
https://golang.org/cl/1968042
2010-08-12 16:47:52 +10:00
Russ Cox
1d77ff5b6b 6g, 8g: handle slice by sub-word-sized index (uint8, int8, uint16, int16)
R=ken2
CC=golang-dev
https://golang.org/cl/1960042
2010-08-11 22:27:47 -07:00
Russ Cox
26dde76cee gopack: handle long lines in export data
Also, if the header is bad, exit with a non-zero status.

Other calls to Brdline in the tree, by category:

Reading symbol name from object file:
./cmd/5l/obj.c:486: 		name = Brdline(f, '\0');
./cmd/6l/obj.c:535: 		name = Brdline(f, '\0');
./cmd/8l/obj.c:564: 		name = Brdline(f, '\0');
./libmach/sym.c:292: 		cp = Brdline(bp, '\0');

Reading archive header line (fixed, short):
./cmd/gc/lex.c:287: 	if((a = Brdline(b, '\n')) == nil)
./cmd/gc/lex.c:303: 	if((p = Brdline(b, '\n')) == nil)

Reading object file header line (fixed, short):
./cmd/ld/lib.c:421: 	line = Brdline(f, '\n');

Reading undefined symbol list (unused code):
./cmd/ld/lib.c:773: 	while((l = Brdline(b, '\n')) != nil){

Implementing Brdstr:
./libbio/brdstr.c:36: 		p = Brdline(bp, delim);

The symbol names ones will cause a problem loudly if they
fail: they'll error out with symbol name too long.  This means
that you can't define an enormous struct without giving the
type a name and then stick it in an interface, because the
type's symbol name will be too long for the object file.
Since this will be a loud failure instead of a silent one,
I'm willing to wait until it comes up in practice.

R=r
CC=golang-dev
https://golang.org/cl/1982041
2010-08-11 22:17:20 -07:00
Russ Cox
14e0df34fd 5g, 8g: dead code (already removed from 6g)
R=ken2
CC=golang-dev
https://golang.org/cl/1983041
2010-08-11 21:58:29 -07:00
Rob Pike
6610d79eda regexp: new regularized methods for matching.
The previous set was spotty, incomplete, and confusing.
This CL proposes a regular, clean set with clearer names.
It's also complete.  Many existing methods will be deprecated,
but not in this CL.  Ditto for the tests.

R=rsc, gri
CC=golang-dev, rog
https://golang.org/cl/1946041
2010-08-12 14:41:52 +10:00
Robert Griesemer
d75074974a gofmt: if a semicolon is found unexpectedly, report detailed cause
go/scanner: return information on semicolon (real or inserted) when
	    found in source
go/parser:  better error message when a semicolon is found unexpectedly

For instance, if an unexpected semicolon is found that was automatically
inserted, the parser error message is now:

    "expected '}', found newline"

Fixes #1006.

R=rsc
CC=golang-dev
https://golang.org/cl/1936044
2010-08-11 21:25:52 -07:00
Rob Pike
32a81fa8bb sync.once: document that Do cannot be invoked recursively.
documentation change only.

R=rsc
CC=golang-dev
https://golang.org/cl/1964043
2010-08-12 12:59:37 +10:00
Kyle Consalus
8fcdc6a1e2 Small performance improvements to the HTML tokenizer based on your 'TODO's.
R=nigeltao_golang
CC=golang-dev
https://golang.org/cl/1941042
2010-08-12 09:45:34 +10:00
Scott Lawrence
bca3151042 template: added ParseFile method for template.Template
Fixes #971.

Parse/ParseFile methods of Template now match template.Parse and .ParseFile methods.
Also made tests being run on Parse and ParseFile be run on Template.ParseFile as well.

R=r
CC=golang-dev
https://golang.org/cl/1741059
2010-08-11 14:04:03 +10:00
Russ Cox
a9a62eef6b gc: bug302
Fixed by http://code.google.com/p/go/source/detail?r=d1f41e20a90e
This just adds a test and checks the return value of Bprint.

R=ken2
CC=golang-dev
https://golang.org/cl/1949042
2010-08-10 17:39:38 -07:00
Russ Cox
9d5da464ff libbio: fix Bprint bug
Make Bprint work even when the amount of output
exceeds the available buffer space.

R=r
CC=golang-dev
https://golang.org/cl/1968041
2010-08-10 17:38:28 -07:00
Nigel Tao
753c9b5710 exp/draw: fix drawRGBA when x0 > x1 and we have to draw right-to-left.
R=r
CC=golang-dev
https://golang.org/cl/1940042
2010-08-11 10:10:17 +10:00
Rob Pike
2bf8741c0f rpc: catch errors from ReadResponseBody.
Fixes #1014.

R=rsc
CC=golang-dev
https://golang.org/cl/1941041
2010-08-10 16:55:02 -07:00
Robert Griesemer
b0d0de59a1 fix build: update exp/draw/draw_test.go
R=nigeltao
CC=golang-dev
https://golang.org/cl/1962041
2010-08-10 10:11:28 -07:00
Robert Griesemer
d754309489 godoc: report Status 404 if a pkg or file is not found
Fixes #1005.

R=rsc, r
CC=golang-dev
https://golang.org/cl/1935041
2010-08-10 09:52:02 -07:00
Robert Griesemer
9714c2208b asn1: remove superfluous if's, unused function
R=adg
CC=golang-dev
https://golang.org/cl/1743059
2010-08-10 09:50:21 -07:00
Nigel Tao
7d3173fc1d exp/draw: remove the Color, Point and Rectangle types.
image: introduce Transparent and Opaque.

R=r
CC=golang-dev
https://golang.org/cl/1947042
2010-08-10 22:05:11 +10:00
Scott Lawrence
4368a78755 gopack documentation: fixed typo
(Removed extraneous "program".)

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1950041
2010-08-10 18:01:00 +10:00
Nigel Tao
d4e23b7e37 image: fix comment typo.
R=adg
CC=golang-dev
https://golang.org/cl/1952041
2010-08-10 17:56:57 +10:00
Nigel Tao
b50a3d95e1 image: change image representation from slice-of-slices to linear buffer,
stride and rect.

R=r
CC=golang-dev, rog
https://golang.org/cl/1849041
2010-08-10 16:34:57 +10:00
Nigel Tao
56b989f1b9 First cut of an HTML tokenizer (and eventually a parser).
R=r, rsc, gri, rsc1
CC=golang-dev
https://golang.org/cl/1814044
2010-08-10 16:08:21 +10:00
Nigel Tao
96d7c8d4a8 exp/draw/x11: temporarily workaround compiler bug 1011.
R=r
CC=golang-dev
https://golang.org/cl/1951041
2010-08-10 15:53:19 +10:00
Mathieu Lonjaret
90a6c91890 png: grayscale support.
R=nigeltao_golang, r
CC=golang-dev
https://golang.org/cl/1897049
2010-08-10 12:25:08 +10:00
Nigel Tao
5eb35e4247 image: replace Width and Height by Bounds, and introduce the Point and
Rect types.

The actual image representation is unchanged. A future change will
replace the {[][]color} with {[]color, stride int, r Rectangle} and
possibly a clip region.

The draw.Color, draw.Point and draw.Rect types will be removed in a
future change. Trying to do it in this one polluted the diff with
trivia.

R=r, rsc
CC=golang-dev
https://golang.org/cl/1918047
2010-08-10 12:08:52 +10:00
Rob Pike
46db2e3c25 regexp: document that backslashes are the escape character.
Fixes #1013.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/1938041
2010-08-09 15:11:02 -07:00
Scott Lawrence
d5cfb3b3d5 goinstall docs: fixed typos
(Added mising closing quotes.)

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/1902049
2010-08-09 10:45:20 -07:00
Evan Shaw
28a0971caf big: Several fixes to bitwise functions
Fixed:
* SetString calls in bitwise tests
* Aliasing problem with self bitwise test
* One test case that was just flat out wrong
* Slice panics in nat.or and nat.xor
* Aliasing problems in Int.And, Int.AndNot, Int.Or, Int.Xor

Fixes #1007.

R=gri
CC=golang-dev
https://golang.org/cl/1895049
2010-08-09 10:21:54 -07:00
Nicholas Waples
e2c7e53dcf asn1 incorrectly encoded signed integers. When determining the
encoded length it was not taking into account the sign bit.

Fixes #997.

R=agl1, gri
CC=golang-dev
https://golang.org/cl/1870047
2010-08-09 10:25:54 -04:00
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