1
0
mirror of https://github.com/golang/go synced 2024-10-02 14:28:38 -06:00
Commit Graph

6590 Commits

Author SHA1 Message Date
Ken Rockot
82a8afdf14 syscall: support for tty options in StartProcess
These are the relevant changes to exec_unix.go now that
mkerrors.sh outputs have been updated.

R=rsc
CC=golang-dev
https://golang.org/cl/4648064
2011-06-27 19:07:49 -04:00
Kyle Lemons
abd50de296 xml: add Marshal and MarshalIndent
I have written up a Marshal and MarshalIndent pair that should
closely reflect the way that Unmarshal works.  I would love feedback
on making this code more accessible and efficient... I haven't used
reflecton on this scale before, so there is probably a lot of work
that can be done on that.

Some potentially controversial things:
- All tag names are lower-cased by default.
- Zero-valued struct values are skipped.
- No namespace prefix (o:tag, etc) mechanism is supplied.
- You are allowed to marshal non-struct values (even though unmarshal
  cannot handle them).
- A tag for a non-XMLName struct field that isn't "attr", "chardata",
  or "innerxml" is used as the name of the tag.  This could wreak
  havoc if you try to marshal a protobuf struct.
- The "innerxml" and "chardata" are inserted verbatim.  If you try to
  marshal something straight from unmarshal, the results could be
  unexpected (remove "innerxml" support from Marshal would be one
  possible solution).

R=rsc
CC=golang-dev
https://golang.org/cl/4539082
2011-06-27 19:07:28 -04:00
Brad Fitzpatrick
ac213ab834 http: respect Handlers setting Connection: close in their response
Fixes #2011

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4667043
2011-06-27 15:53:48 -07:00
Russ Cox
8475832f0d testing: scale benchmark precision to 0.01ns if needed
R=dvyukov, r
CC=golang-dev
https://golang.org/cl/4657053
2011-06-27 18:50:27 -04:00
Russ Cox
6aaa86ff66 gc: avoid package name ambiguity in error messages
Fixes #2006.

R=ken2
CC=golang-dev
https://golang.org/cl/4643056
2011-06-27 18:44:30 -04:00
Brad Fitzpatrick
19f795042a http: add FileSystem interface, make FileServer use it
Permits serving from virtual filesystems, such as files linked
into a binary, or from a zip file.

Also adds a gofix for:

http.FileServer(root, prefix) -> http.StripPrefix(prefix, http.FileServer(http.Dir(root)))

R=r, rsc, gri, adg, dsymonds, r, gri
CC=golang-dev
https://golang.org/cl/4629047
2011-06-27 15:26:36 -07:00
Graham Miller
f795bdb979 bufio: do not cache Read errors
Reader previously had cached an error from the underlying reader
and would return it on every subsequent call to Read.  The Reader
will now return the error only once, and subsequent calls will result
in a new Read call to the underlying Reader.

Fixes #1934.

R=bradfitz, rogpeppe, rsc
CC=golang-dev
https://golang.org/cl/4528133
2011-06-27 16:12:04 -04:00
Dmitriy Vyukov
3a4a581c49 sync: add benchmark for Once.
R=r, rsc
CC=golang-dev
https://golang.org/cl/4650054
2011-06-27 16:02:13 -04:00
Lucio De Re
6bcfb95168 8a: fixes for Plan 9 build
8a/a.h:
. Removed <u.h> and <libc.h> includes as they work better in "a.y".
. Made definition of EOF conditional as it's defined in the Plan 9
  header files, but not elsewhere.

8a/a.y:
. Added <u.h> and <libc.h> because <stdio.h> in Plan 9 needs them.
  Sequence <u.h>, <stdio.h>, <libc.h> recommended by RSC.

8a/lex.c:
. Added <u.h> and <libc.h> as now needed by "a.h".
. Dropped <ctype.h>.

cc/lexbody:
. exit() -> exits().
. Dropped unwanted incrementation.

cc/macbody:
. Adjusted a few format specifications.

R=rsc
CC=golang-dev
https://golang.org/cl/4644047
2011-06-27 14:42:18 -04:00
Anthony Martin
10d0dffd76 ld: elide the Go symbol table when using -s
R=rsc, n13m3y3r, gustavo
CC=golang-dev
https://golang.org/cl/4661050
2011-06-27 14:39:38 -04:00
Russ Cox
5f84559e3a build: use correct list of required programs
R=golang-dev, bradfitz, go.peter.90
CC=golang-dev
https://golang.org/cl/4627068
2011-06-27 14:30:02 -04:00
Brad Fitzpatrick
6c6c232072 http: add StripPrefix handler wrapper
R=rsc
CC=golang-dev
https://golang.org/cl/4626067
2011-06-27 11:03:43 -07:00
Brad Fitzpatrick
7e29f1add8 http: do TLS handshake explicitly before copying TLS state
Previously we were snapshotting the TLS state into *Request
before we did the HTTP ReadRequest, the first Read of which
triggered the TLS handshake implicitly.

Fixes #1956

R=golang-dev, rsc
CC=agl, golang-dev
https://golang.org/cl/4630072
2011-06-27 10:37:33 -07:00
Dmitriy Vyukov
9843ca5e2b gotest: add -test.benchtime and -test.cpu flags.
-test.benchtime allows to specify benchmark execution time.
-test.cpu allows to execute tests/benchmarks for several
values of GOMAXPROCS.

R=r, r, rsc
CC=golang-dev
https://golang.org/cl/4662046
2011-06-27 13:31:40 -04:00
Russ Cox
9dd354c63f 5l, 6l, 8l: drop use of ed during build
build runs with chmod 0 /bin/ed now

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4635071
2011-06-27 12:03:19 -04:00
Russ Cox
dfacfd6431 syscall: regenerate zerrors for darwin/linux/freebsd
did darwin on mac with older, not broken xcode.
did linux arm by copying diffs from linux 386.
did freebsd amd64 by copying diffs from freebsd 386.

R=golang-dev, r, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/4629067
2011-06-27 11:02:32 -04:00
Dmitry Chestnykh
d1dbfe5827 crypto: replace "crypto/block" with "crypto/cipher" in comments
Documentation mentioned the obsolete package "crypto/block",
which has been replaced with "crypto/cipher".

R=golang-dev, agl
CC=golang-dev
https://golang.org/cl/4654064
2011-06-27 09:16:42 -04:00
Robert Hencke
da19831c17 gofix: fixes for path/filepath changes
Fixes #1970.

R=rsc, r
CC=golang-dev
https://golang.org/cl/4650050
2011-06-26 11:24:28 +10:00
Robert Hencke
69905c6213 gofix: fixes for sort changes
Fixes #1969.

R=gri, rsc, r
CC=golang-dev
https://golang.org/cl/4634076
2011-06-26 08:48:53 +10:00
Robert Griesemer
f70e8ed0f3 ebnflint: better handling of stdin
- don't rely on /dev/stdin as the name for standard input
- employ EBNF extraction if the source contains tags

"cat source.html | ebnflint" works now

R=r
CC=golang-dev
https://golang.org/cl/4641075
2011-06-24 17:29:19 -07:00
Michael T. Jones
d94e350f48 fmt: Added SkipSpace() function to fmt's ScanState interface.
Users of the Scan() infrastructure that employ ReadRune() rather than
Token() need a way to skip leading spaces and newlines as set by the
the parent, Fscan(), Fscanln, or Fscanf(). As the internal methods and
boolean flags are not exported, this new function was added here and
in the Int and Nat Scan() functions of the big package. (fmt.Rat did
not need change since it uses Token()) Also added Printf style format
code support to int types and tests for same to int_test.go

R=r, r, gri, mtj
CC=golang-dev
https://golang.org/cl/4634074
2011-06-24 17:26:45 -07:00
Brad Fitzpatrick
5d4eea6a2f http: better handling of 0-length Request.Body
As rsc suggested after change 58a6bdac3d12 was committed, we
now read the first byte of Request.Body when the
Request.ContentLength is 0 to disambiguate between a truly
zero-length body and a body of unknown length where the user
didn't set the ContentLength field.

This was also causing the reverse proxy problem where incoming
requests (which always have a body, of private type http.body,
even for 0-lengthed requests) were being relayed to the http
Transport for fetching, which was serializing the request as a
chunked request (since ContentLength was 0 and Body was
non-nil)

Fixes #1999

R=golang-dev, kevlar
CC=golang-dev
https://golang.org/cl/4628063
2011-06-24 16:46:14 -07:00
Brad Fitzpatrick
e16b74075f http: assume ContentLength 0 on GET requests
Incremental step in fix for issue 1999

R=golang-dev, kevlar
CC=golang-dev
https://golang.org/cl/4667041
2011-06-24 13:48:12 -07:00
Pascal S. de Kloe
e0e28d2b93 mime: lower-case media type parameters
RFC 1521 section 4 states "The type, subtype, and parameter names are not case sensitive.".

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4648047
2011-06-24 11:32:06 -07:00
Robert Hencke
7a471eadcc os: remove duplicate package description
file.go contains a more complete package description.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4645058
2011-06-24 11:23:49 -07:00
Alex Brainman
a39ead7ed2 path/filepath: enable TestWalk to run on windows
R=golang-dev
CC=golang-dev
https://golang.org/cl/4630066
2011-06-24 19:18:59 +10:00
Yasuhiro Matsumoto
8ab2c98972 os: fixed PathListSeparator to ';' for windows.
Fixed issue 1992

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/4661047
2011-06-24 15:00:59 +10:00
Brad Fitzpatrick
89873e60e2 http: buffer Request.Write
Fixes #1996

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4639068
2011-06-23 21:10:51 -07:00
Gustavo Niemeyer
65b036c381 runtime: don't use twice the memory with grsec-like kernels
grsec needs the FIXED flag to be provided to mmap, which
works now.  That said, when the allocation fails to be made
in the specific address, we're still given back a writable
page.  This change will unmap that page to avoid using
twice the amount of memory needed.

It'd also be pretty easy to avoid the extra system calls
once we detected that the flag is needed, but I'm not sure
if that edge case is worth the effort.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4634086
2011-06-24 00:29:59 -03:00
Andrew Gerrand
b4bab6f8b3 goinstall: build with make by default, add -make flag
This is a temporary measure until go/build can build cgo packages.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4627056
2011-06-24 13:01:17 +10:00
Yasuhiro Matsumoto
73d741fd5b mime/multipart: remove newline at top of the multipart.
R=golang-dev, bradfitz, arctanofyourface
CC=golang-dev
https://golang.org/cl/4635063
2011-06-23 10:11:33 -07:00
Anthony Martin
d847467041 libmach: fix disassembly of FCMOVcc and FCOMI
The optable for 0xDB is handled specially.

This was the cause of a really weird bug
when using cov (386!) on the math package.

A real head-scratcher.

R=rsc
CC=golang-dev
https://golang.org/cl/4639066
2011-06-23 09:32:29 -04:00
Anthony Martin
8f72a87b4c libmach: fix tracing on linux (for cov)
R=rsc, dave
CC=golang-dev
https://golang.org/cl/4629064
2011-06-22 23:24:14 -04:00
Russ Cox
c475c3071a 5c: do not use R9 and R10
This program used to use R9 and R10.
Now it fails to compile (out of registers).
I used to know a simpler test but can't remember it.

Learned something new: Rietveld refuses change
list descriptions bigger than 10 kB.

int sum(int x, int y, int z, int w) {
        return
        (((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))))*
        ((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))))*
        (((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))))*
        ((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))))
        ;
}

R=ken2
CC=golang-dev
https://golang.org/cl/4650053
2011-06-22 23:22:36 -04:00
Alex Brainman
5d53aab4a2 exec: LookPath should not search %PATH% for files like c:cmd.exe
R=golang-dev
CC=golang-dev
https://golang.org/cl/4632055
2011-06-23 10:56:53 +10:00
Rob Pike
96731619ce exp/template: make -0 be an unsigned int.
Fix (inconsequential) type error in list initializer.

R=rsc
CC=golang-dev
https://golang.org/cl/4638058
2011-06-23 10:19:29 +10:00
Andrew Gerrand
d7df79a7e5 go/build: include Import objects in Script Inputs
This has the effect of making goinstall rebuild a package's
dependencies when they are newer than the current package object.

R=rsc
CC=golang-dev
https://golang.org/cl/4627051
2011-06-23 10:15:46 +10:00
Yasuhiro Matsumoto
88442358a9 net, syscall: interface for windows
R=mikioh.mikioh, alex.brainman, rsc, vincent.vanackere
CC=golang-dev
https://golang.org/cl/4590050
2011-06-23 09:54:57 +10:00
Russ Cox
36b5e1d698 io: clarify Read, ReadAt, Copy, Copyn EOF behavior
R=golang-dev, bradfitz, iant, dsymonds, nigeltao, r
CC=golang-dev
https://golang.org/cl/4629062
2011-06-22 19:33:07 -04:00
Rob Pike
cd7826e5f6 First cut at the parser for the new template package.
This is not a full grammar, but the pieces are there to implement whatever we converge on.

R=rsc
CC=golang-dev
https://golang.org/cl/4629053
2011-06-23 09:27:28 +10:00
Alex Brainman
123549acb1 exec: better error message for windows LookPath
Fixes #1991.

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4648049
2011-06-23 09:16:20 +10:00
Nigel Tao
6b4fb9f85a image: basic test for the 16-bits-per-color-channel types.
R=r
CC=golang-dev
https://golang.org/cl/4635059
2011-06-23 08:39:00 +10:00
Ken Rockot
c8443d7242 syscall: add tty support to StartProcess
These changes add a Ctty int field to the Unix syscall.ProcAttr which,
if set >= 0 in conjuction with Setsid=true, will be used by
forkAndExecInChild as the file descriptor for the new child's
controlling terminal.

Necessary changes have been made to mkerrors.sh to generate defs for
TIOC*, though changes to its output files are not included here.
The changes made should support Linux, FreeBSD and Darwin, at least.

R=iant, bradfitz, r, rsc, borman
CC=golang-dev
https://golang.org/cl/4532075
2011-06-22 18:07:20 -04:00
Russ Cox
2e41120a82 build: explain $PWD use
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4639064
2011-06-22 17:00:46 -04:00
Dmitriy Vyukov
8cab7f5703 sync: restore GOMAXPROCS during benchmarks
R=golang-dev
CC=dvyukov, golang-dev
https://golang.org/cl/4631060
2011-06-22 16:20:37 -04:00
Gustavo Niemeyer
89d334ffe1 ld: don't attempt to build dynamic sections unnecessarily
This prevents ld from generating zeroed symtab entries for
sections that aren't going to be generated because dynamic
linkage has been disabled (-d was used or no dynamic libs
were seen).  Even though they were not explicitly added by
doelf, the section creation process was making them
reachable again.

The windows head is being disconsidered for this because
apparently it's not taking into account debug['d'].

This makes elflint 0.1% happier.

R=golang-dev, rsc, gustavo
CC=golang-dev
https://golang.org/cl/4638050
2011-06-22 15:12:22 -04:00
Brad Fitzpatrick
5dfdccf2b0 Fix Windows build; ErrorString->NewError
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4634080
2011-06-22 11:33:30 -07:00
Robert Griesemer
712fb6dcd3 os.Error API: don't export os.ErrorString, use os.NewError consistently
This is a core API change.

1) gofix misc src
2) Manual adjustments to the following files under src/pkg:
   gob/decode.go
   rpc/client.go
   os/error.go
   io/io.go
   bufio/bufio.go
   http/request.go
   websocket/client.go
as well as:
   src/cmd/gofix/testdata/*.go.in (reverted)
   test/fixedbugs/bug243.go
3) Implemented gofix patch (oserrorstring.go) and test case (oserrorstring_test.go)

Compiles and runs all tests.

R=r, rsc, gri
CC=golang-dev
https://golang.org/cl/4607052
2011-06-22 10:52:47 -07:00
Russ Cox
55b0662465 godefs: remove test from build
The test is only defined on darwin/amd64, and it fails
with recent versions of Xcode, which do not support
-gstabs+ debugging output.  At some point godefs will
have to be replaced, perhaps merged with cgo.
Godefs is not needed during builds anyway (its output files
are checked into the repository in src/pkg/runtime),
so its failure on the newer Xcode is a distraction from an
otherwise usable build.  Disable the test.

Fixes #1985.

R=golang-dev, gri, robert.hencke, r
CC=golang-dev
https://golang.org/cl/4638053
2011-06-21 21:45:13 -04:00
Adam Langley
f2e94de6d6 crypto/openpgp: add ElGamal support.
R=bradfitz, r
CC=golang-dev
https://golang.org/cl/4639049
2011-06-21 21:00:49 -04:00
Lucio De Re
10b5519d3a 8l: more fixes for Plan 9
Once these changes are effected, it is possible to construct
"8l" native on a (386?) Plan 9 system, albeit with assistance
from modules such as mkfiles that are not (yet) included in any
public patches.

8l/asm.c:
. Corrected some format qualifiers.

8l/list.c:
. Cast a print() argument to (int) to match the given format.
  It may be possible to change the format (%R), but I have not
  looked into it.

8l/obj.c:
. Removed some unused code.

8l/span.c:
. Removed unnecessary incrementation on "bp".
. Corrected some format qualifiers.

ld/data.c:
. Corrected some format qualifiers.
. Cast print argument to (int): used as field size.
. Use braces to suppress warning about empty if() statements.

ld/dwarf.c:
. Trivial spelling mistake in comment.

ld/ldelf.c:
. Added USED() statements to silence warnings.
. Dropped redundant address (&) operators.
. corrected some format qualifiers.
. Cast to (int) for switch selection variable.

ld/macho.c:
. Added USED() statements to silence warnings.

ld/ldpe.c:
. Added USED() statements to silence warnings.
. More careful use of "sect" variable.
. Corrected some format qualifiers.
. Removed redundant assignments.
. Minor fix dropped as it was submitted separately.

ld/pe.c:
. Dropped <time.h> which is now in <u.h>.
. Dropped redundant address (&) operators.
. Added a missing variable initialisation.

ld/symtab.c:
. Added USED() statements to silence warnings.
. Removed redundant incrementation.
. Corrected some format qualifiers.

All the above have been tested against a (very) recent release
and do not seem to trigger any regressions.

All review suggestions have been incorporated.

R=rsc
CC=golang-dev
https://golang.org/cl/4633043
2011-06-21 12:14:32 -04:00
Robert Hencke
b88e669a8f nacl, tiny: remove vestiges
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/4635053
2011-06-21 12:02:40 -04:00
Russ Cox
d6be71c788 gopprof: update list of memory allocators
Also import new weblist command from Google version.

R=r, bradfitz
CC=golang-dev
https://golang.org/cl/4650048
2011-06-21 11:27:08 -04:00
Andrew Gerrand
f338d9f73b goinstall: undo 1ad616fb313d (always rebuild...)
CL 4627051 is a better way of doing the same thing.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4654045
2011-06-21 17:13:16 +10:00
Andrew Gerrand
ceae2c9301 goinstall: undo repo peeking code
Keeping the Julian's good refactoring work.

R=rsc
CC=golang-dev
https://golang.org/cl/4638049
2011-06-21 11:28:15 +10:00
Mikio Hara
5d6f118f23 syscall: add socket control message support for darwin, freebsd, linux
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4528113
2011-06-20 18:40:20 -04:00
Rob Pike
97a929aac9 fmt: catch panics from calls to String etc.
This change causes Print et al. to catch panics generated by
calls to String, GoString, and Format.  The panic is formatted
into the output stream as an error, but the program continues.
As a special case, if the argument was a nil pointer, the
result is just "<nil>", because that's almost certainly enough
information and handles the very common case of String
methods that don't guard against nil.

Scan does not want this change. Input must work; output can
be for debugging and it's nice to get output even when you
make a mistake.

R=dsymonds, r, adg, gri, rsc, gri
CC=golang-dev
https://golang.org/cl/4640043
2011-06-21 08:31:02 +10:00
Russ Cox
4bbe9d87d7 all-qemu.bash: cannot test go/build
R=adg, r
CC=golang-dev
https://golang.org/cl/4633054
2011-06-20 17:44:36 -04:00
Brad Fitzpatrick
9ee83f546f http: write Header keys with empty values
R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/4630052
2011-06-20 14:36:03 -07:00
Brad Fitzpatrick
922ceaddd2 http: permit handlers to explicitly remove the Date header
We'll do the right thing by default, but people wanting minimal
response sizes can explicitly remove the Date header.
(empty fields aren't written out)

R=rsc
CC=golang-dev
https://golang.org/cl/4634048
2011-06-20 13:39:03 -07:00
Graham Miller
cf201ed6a0 os: change Waitmsg String method to use pointer receiver
Fixes #1851.

R=rsc
CC=golang-dev
https://golang.org/cl/4628045
2011-06-20 15:42:17 -04:00
Brad Fitzpatrick
c2784340a7 http: add Server.ListenAndServeTLS
Fixes #1964

R=rsc
CC=golang-dev
https://golang.org/cl/4630045
2011-06-20 12:19:26 -07:00
Mikio Hara
10f1436bad syscall: add LSF support for linux
R=rsc
CC=golang-dev
https://golang.org/cl/4626041
2011-06-20 14:51:34 -04:00
Anthony Martin
028f74f827 5g, 6g, 8g: fix comments in method call generation
R=golang-dev
CC=golang-dev
https://golang.org/cl/4652042
2011-06-20 14:49:29 -04:00
Anthony Martin
12b2269860 5g, 5l: fix more set but not used warnings
These are present when building with gcc 4.6.

R=golang-dev, dave
CC=golang-dev, lvd
https://golang.org/cl/4636047
2011-06-20 14:18:04 -04:00
Brad Fitzpatrick
da7b96f714 http: fix req.Cookie(name) with cookies in one header
Fixes #1974

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4654042
2011-06-20 10:33:07 -07:00
Pascal S. de Kloe
67ec47d1c0 mime: fix RFC references
R=golang-dev, bradfitz
CC=brad fitzpatrick <bradfitz, golang-dev
https://golang.org/cl/4634063
2011-06-20 07:41:18 -07:00
Anthony Martin
f7d754fcce build: exclude packages that fail on Plan 9 (for now)
All but two packages depend on net:
        debug/proc
        os/signal

With this change, we can produce
a working build with GOOS=plan9.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4639053
2011-06-20 22:23:43 +10:00
Andrew Gerrand
f22e5cfc6d goinstall: update doc.go
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4645048
2011-06-20 16:39:16 +10:00
Andrew Gerrand
f3a7dad654 goinstall: s/vlogf/printf/
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4628050
2011-06-20 14:44:14 +10:00
Andrew Gerrand
e068b85bea goinstall: wait for all commands to finish instead of timeout
goinstall: make ".git" repo suffix optional

R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/4643048
2011-06-20 14:12:23 +10:00
Anthony Martin
20943baed3 exec: add support for Plan 9
R=paulzhol, mirtchovski, fshahriar, alex.brainman, r
CC=golang-dev
https://golang.org/cl/4386041
2011-06-20 13:34:10 +10:00
Julian Phillips
c319fb07bc goinstall: Add support for arbitary code repositories
Extend goinstall to support downloading from any hg/git/svn/bzr hosting
site, not just the standard ones.  The type of hosting is automatically
checked by trying all the tools, so the import statement looks like:

  import "example.com/mything"

Which will work for Mercurial (http), Subversion (http, svn), Git (http,
git) and Bazaar (http, bzr) hosting.

All the existing package imports will work through this new mechanism,
but the existing hard-coded host support is left in place to ensure
there is no change in behaviour.

R=golang-dev, bradfitz, fvbommel, go.peter.90, n13m3y3r, adg, duperray.olivier
CC=golang-dev
https://golang.org/cl/4650043
2011-06-20 13:00:43 +10:00
Robert Hencke
a5b5e2b79e godefs: rudimentary tests
currently only defined for darwin

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4528123
2011-06-20 11:54:07 +10:00
Rob Pike
783c46b197 8a: delete dreg l.s
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4631053
2011-06-20 11:53:41 +10:00
Anthony Martin
d119e3bc0f time: add support for Plan 9
R=paulzhol, mirtchovski, r, r, rsc
CC=golang-dev
https://golang.org/cl/4362041
2011-06-19 16:36:33 +10:00
Rob Pike
f22f40532e Make.ccmd: another build fix.
It's sad to think there are environments where compiling against a library
isn't enough information for the the linker to decide that you need that
library.
TBR=jdpoirier

R=jdpoirier
CC=golang-dev
https://golang.org/cl/4646047
2011-06-19 15:30:54 +10:00
Rob Pike
3890ce0ed5 Make.ccmd: fix build - libraries in wrong order.
TBR=jdpoirier

R=jdpoirier
CC=golang-dev
https://golang.org/cl/4648045
2011-06-19 14:56:25 +10:00
Dave Cheney
cbb2d8e20e cc: nit: silence comment warnings
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/4648043
2011-06-19 13:58:08 +10:00
Joe Poirier
26b6a97c15 Make.ccmd: link with mach lib,
remove explicit linking in make files

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4629051
2011-06-19 13:57:22 +10:00
Andrew Gerrand
c967ba0210 goinstall: always rebuild a package after its dependencies are built
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4627047
2011-06-19 09:36:45 +10:00
Scott Lawrence
3c06518405 http: fix documentation typo
(Variable is referred to alternately as 'r' and 'req')

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4648042
2011-06-18 21:53:18 +10:00
Russ Cox
61f4ec132b syscall: fix build for Sizeof change
R=ken2
CC=golang-dev
https://golang.org/cl/4635051
2011-06-17 17:07:21 -04:00
Russ Cox
cf9f380499 gc: unsafe.Alignof, unsafe.Offsetof, unsafe.Sizeof now return uintptr
R=ken2
CC=golang-dev
https://golang.org/cl/4640045
2011-06-17 16:12:14 -04:00
Russ Cox
b96ff8458c 5g, 8g: fix build
R=ken2
CC=golang-dev
https://golang.org/cl/4627045
2011-06-17 16:05:00 -04:00
Russ Cox
7f4c5ea7d8 gc: implement goto restriction
Remove now-unnecessary zeroing of stack frames.

R=ken2
CC=golang-dev
https://golang.org/cl/4641044
2011-06-17 15:25:05 -04:00
Russ Cox
e852202f37 gc: descriptive panic for nil pointer -> value method call
R=ken2
CC=golang-dev
https://golang.org/cl/4646042
2011-06-17 15:23:27 -04:00
Russ Cox
21e75da486 respect goto restrictions
R=gri
CC=golang-dev
https://golang.org/cl/4625044
2011-06-17 06:07:13 -04:00
Alex Brainman
8155ff5452 go/build: use back quotes for regular expression
R=adg
CC=golang-dev
https://golang.org/cl/4643045
2011-06-17 16:41:59 +10:00
Alex Brainman
eaa082f691 8l: minor fix discovered by lucio
R=lucio.dere, vcc.163, bradfitz
CC=golang-dev
https://golang.org/cl/4645044
2011-06-17 15:55:54 +10:00
Andrew Gerrand
4340b57d88 goinstall, go/build: support building cgo packages
Fixes #1962.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4636044
2011-06-17 11:15:54 +10:00
Nigel Tao
278952c393 regexp: add a package prefix to error strings.
R=r, r
CC=golang-dev
https://golang.org/cl/4630041
2011-06-17 10:50:38 +10:00
Alex Brainman
c562fbc44e cgo: make file path work for windows
R=golang-dev, mattn.jp, adg
CC=golang-dev
https://golang.org/cl/4634043
2011-06-17 10:17:33 +10:00
Brad Fitzpatrick
380e5a3709 http: document http client/transport thread safety
Fixes #1961

R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/4633045
2011-06-16 15:02:47 -07:00
Russ Cox
fc77e82617 unicode: add case folding tables
R=r, r
CC=golang-dev
https://golang.org/cl/4571074
2011-06-16 17:56:25 -04:00
Brad Fitzpatrick
6e9b1a78ff http: make Headers be source of truth
Previously Request and Response had redundant fields for
Referer, UserAgent, and cookies which caused confusion and
bugs.  It also didn't allow us to expand the package over
time, since the way to access fields would be in the Headers
one day and promoted to a field the next day.  That would be
hard to gofix, especially with code ranging over Headers.

After a discussion on the mail package's design with a similar
problem, we've designed to make the Headers be the source of
truth and add accessors instead.

Request:
change: Referer -> Referer()
change: UserAgent -> UserAgent()
change: Cookie -> Cookies()
new: Cookie(name) *Cookie
new: AddCookie(*Cookie)

Response:
change: Cookie -> Cookies()

Cookie:
new: String() string

R=rsc
CC=golang-dev
https://golang.org/cl/4620049
2011-06-16 13:02:28 -07:00
Volker Dobler
7f3e109d2f xml: allow attributes without value in non-strict mode.
Attributes without value are commen in html and the xml
parser will accept them in non-strict mode and use the
attribute name as value. Thus parsing <p nowrap> as
<p norwar="nowrap">.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4601053
2011-06-16 12:56:49 -04:00
Brad Fitzpatrick
98f95b8048 mime/multipart: convert Reader from interface to struct
It was always a weird interface but I didn't know what I
was doing at the time.  rsc questioned me about it then
but didn't press on it during review.  Then adg bugged me
about it too recently.

So clean it up. It parallels the Writer struct too.

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/4602063
2011-06-16 08:55:53 -07:00
Russ Cox
95963e6294 runtime/cgo: fix for OS X 10.7
Correct a few error messages (libcgo -> runtime/cgo)
and delete old nacl_386.c file too.

Fixes #1657.

R=iant
CC=golang-dev
https://golang.org/cl/4603057
2011-06-16 11:10:31 -04:00
Rob Pike
2b08e952bb sort: change the name of Float64Array to Float64Slice.
I missed this before because I used the wrong regexp. What a moron.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4639041
2011-06-16 17:48:02 +10:00
Russ Cox
5a5a7b5163 6g, 8g: fix goto fix
R=ken2
CC=golang-dev
https://golang.org/cl/4632041
2011-06-16 01:25:49 -04:00
Robert Griesemer
333167ff35 go/printer, gofmt: print "select {}" on one line
No impact on existing sources under src, misc.

Fixes #1959.

R=r, rsc, r
CC=golang-dev
https://golang.org/cl/4589056
2011-06-15 21:47:29 -07:00
Russ Cox
5d9dbe19a7 gc: work around goto bug
R=ken2
CC=golang-dev
https://golang.org/cl/4629042
2011-06-16 00:18:43 -04:00
Russ Cox
f011bd378f build: use awk instead of giant egrep regexp
Avoids buggy version of egrep on some Macs.

R=r, dsymonds
CC=golang-dev
https://golang.org/cl/4603056
2011-06-16 00:04:24 -04:00
Dave Cheney
832e87500e go/build: support building cgo packages on non intel platforms
See https://golang.org/cl/4572045/

R=adg, rsc
CC=golang-dev
https://golang.org/cl/4627041
2011-06-16 13:35:27 +10:00
Nigel Tao
9555ea7a5b image/draw: add an Op argument to Draw.
R=r
CC=golang-dev
https://golang.org/cl/4622041
2011-06-16 11:45:16 +10:00
Yasuhiro Matsumoto
7fd51f2fb4 syscall: use strict in perl scripts
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4609047
2011-06-15 17:41:07 -07:00
Russ Cox
0193139bec undo CL 4557047 / 8818ac606e92
I don't think we've discussed this API enough.

««« original CL description
bike/shed: new package.

It comes up often enough that it's time to provide
the utility of a standard package.

R=r, mirtchovski, adg, rsc, n13m3y3r, ality, go.peter.90, lstoakes, iant, jan.mercl, bsiegert, robert.hencke, rogpeppe, befelemepeseveze, kevlar
CC=golang-dev
https://golang.org/cl/4557047
»»»

R=dsymonds, bradfitz, gri
CC=golang-dev
https://golang.org/cl/4576065
2011-06-15 19:47:52 -04:00
Robert Griesemer
fb9ea79916 godoc: replace direct OS file system accesses in favor
of accesses via a FileSystem interface.

Preparation for appengine version which gets its files
via a snapshot or zip file and uses a corresponding
FileSystem implementation.

R=rsc, r
CC=golang-dev
https://golang.org/cl/4572065
2011-06-15 14:06:35 -07:00
Rob Pike
d6653fed98 http: use runtime/debug.Stack() to dump stack trace on panic.
Test output now looks like this:

2011/06/15 21:10:41 http: panic serving 127.0.0.1:59729: intentional death for testing
$GOROOT/src/pkg/http/server.go:495 (0x3f9f8)
        _func_004: buf.Write(debug.Stack())
$GOROOT/src/pkg/runtime/proc.c:1041 (0x12367)
        panic: reflect·call(d->fn, d->args, d->siz);
$GOROOT/src/pkg/http/serve_test.go:775 (0x5831b)
        _func_029: panic("intentional death for testing")
$GOROOT/src/pkg/http/server.go:575 (0x26366)
        HandlerFunc.ServeHTTP: f(w, r)
$GOROOT/src/pkg/http/server.go:541 (0x261a9)
        *conn.serve: c.handler.ServeHTTP(w, w.req)
$GOROOT/src/pkg/runtime/proc.c:178 (0x10a83)
        goexit: runtime·goexit(void)

with $GOROOT expanded, of course.

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4607051
2011-06-16 00:12:50 +10:00
Andrew Gerrand
39208939c6 go/build: better, self-contained tests
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4576063
2011-06-15 21:35:34 +10:00
Scott Lawrence
bee3b0358c gofix: Fix inconsistent indentation in help output
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4572066
2011-06-15 21:07:21 +10:00
Dave Cheney
c357ca663f go/build: remove crud in cgotest/_obj
R=adg
CC=golang-dev
https://golang.org/cl/4584060
2011-06-15 16:39:17 +10:00
Andrew Gerrand
7c248ae077 go/build: fix build and clean ups
R=rsc
CC=golang-dev
https://golang.org/cl/4620045
2011-06-15 14:56:12 +10:00
Andrew Gerrand
4a8de67058 go/build: record all cgo intermediate files (fix build)
R=rsc
CC=golang-dev
https://golang.org/cl/4613045
2011-06-15 14:29:26 +10:00
Andrew Gerrand
db5a4ffc2a goinstall: use go/make package to scan and build packages
R=rsc, n13m3y3r, kevlar
CC=golang-dev
https://golang.org/cl/4515180
2011-06-15 13:28:35 +10:00
Yasuhiro Matsumoto
414da2e4a3 syscall: mksyscall_windows.pl should output unix newline.
R=golang-dev, bradfitz, alex.brainman
CC=golang-dev
https://golang.org/cl/4601058
2011-06-15 11:50:21 +10:00
David Symonds
812b2b6405 mail: cosmetic fixes.
R=rsc, gri
CC=golang-dev
https://golang.org/cl/4602062
2011-06-15 09:10:59 +10:00
Russ Cox
1a4681ed74 exp/regexp/syntax: more escapes, character classes
Still TODO: parsing optimizations

make_perl_groups.pl is copied with minimal modifications
(just to generate Go syntax instead of C++) from RE2.
Google Inc is "The RE2 Author" of that file and is one of
the Go Authors, so copyright changed to the Go Authors instead.

R=sam.thorogood, r, fvbommel, robert.hencke
CC=golang-dev
https://golang.org/cl/4612041
2011-06-14 14:30:10 -04:00
Lucio De Re
340251e43d build: fix header files for Plan 9
The "elf.h" header changes involve only comments, the released
Plan 9 C preprocessing function does not cope with multiline
comments following the #define keyword.  All multiline comments
have been moved to the line above the associated definition.
Sigh!  Fixing the Plan 9 compiler is not an option.

<time.h> does not exist in the Plan 9 Native library.  I have
moved it from src/cmd/ld/pe.h to include/u.h. RSC correctly points
out that this copy of <u.h> is not the one used to compile the
Go release on Plan 9 platforms.

R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/4574042
2011-06-14 14:14:11 -04:00
Gustavo Niemeyer
a84e9d01f0 ld: make .rodata section read-only
Fixes the respective warning from elflint.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4607048
2011-06-14 15:13:54 -03:00
Gustavo Niemeyer
a5c1fa7f02 debug/elf: rename test .o files to .obj
.o files are commonly found in default ignore lists by
source management tools, including dpkg-source, bzr, etc.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4568078
2011-06-14 15:06:39 -03:00
Mikio Hara
c4dfc55be9 net: export all fields in Interface
Fixes #1942.

R=fullung, rsc
CC=golang-dev
https://golang.org/cl/4602044
2011-06-14 13:32:52 -04:00
Jeff Hodges
0ce57a73c5 syscall: add ptrace on darwin
The ptrace syscall remains gutted on darwin, but usable.  This
also makes the syscall addition process reproducible on darwin
instead of relying on a file path in rsc's home directory.
I've also removed an override of $PATH in env.bash that made
tooling harder.

R=rsc, dave, r
CC=golang-dev
https://golang.org/cl/4517147
2011-06-14 12:56:46 -04:00
Maxim Ushakov
5f77bf8b20 xml: handle non-string attribute fields
R=kevlar, rsc
CC=golang-dev
https://golang.org/cl/4528114
2011-06-14 11:51:03 -04:00
Alex Brainman
c195cc8d82 exec: make LookPath work even when PATHEXT env variable is not set on Windows
R=golang-dev, mattn.jp
CC=golang-dev
https://golang.org/cl/4559062
2011-06-14 11:46:05 -04:00
William Chan
5af8e53a14 http/spdy: improve error handling.
Create a new spdy.Error type that includes the enumerated error type and
the associated stream id (0 if not associated with a specific stream).
This will let users handle errors differently (RST_STREAM vs GOAWAY).

R=bradfitz, rsc, rogpeppe
CC=golang-dev
https://golang.org/cl/4532131
2011-06-14 11:31:18 -04:00
Yuval Pavel Zholkover
400d825ea0 syscall: fix Plan 9 build.
Move mmapper from syscall.go to syscall_unix.go.
Remove Sendfile from syscall_plan9.go.

R=rsc, alex.brainman
CC=golang-dev
https://golang.org/cl/4368060
2011-06-14 11:29:51 -04:00
Mikio Hara
b100a29bc4 syscall: update BPF support for BSD variants
R=dave, rsc
CC=golang-dev
https://golang.org/cl/4589044
2011-06-14 11:28:36 -04:00
Yuval Pavel Zholkover
18112437d9 os: Plan 9, fix OpenFile & Chmod. Update tests.
Add Process.Kill.

R=rsc
CC=golang-dev
https://golang.org/cl/4571049
2011-06-14 11:20:34 -04:00
Wei Guangjing
9e2ffc315f ld: fix link Windows PE __declspec(dllimport) symbol
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4568077
2011-06-14 11:05:59 -04:00
Luuk van Dijk
2ad42a8249 gc: frame compaction for arm.
Required moving some parts of gc/pgen.c to ?g/ggen.c

on linux tests pass for all 3 architectures, and
frames are actually compacted (diagnostic code for
that has been removed from the CL).

R=rsc
CC=golang-dev
https://golang.org/cl/4571071
2011-06-14 17:03:37 +02:00
Russ Cox
4d0f2e9195 syscall, os, exec: introduce *syscall.SysProcAttr field in os.ProcAttr and exec.Cmd
R=r, bradfitz, alex.brainman, borman, vincent.vanackere
CC=golang-dev
https://golang.org/cl/4607046
2011-06-14 10:49:34 -04:00
David Symonds
371aa14e06 mail: decode RFC 2047 "B" encoding.
R=rsc, r
CC=golang-dev
https://golang.org/cl/4584056
2011-06-14 17:32:47 +10:00
Rob Pike
34e0725dec os: be explicit in the package comment that this package is for portable features only.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4602058
2011-06-14 11:49:33 +10:00
Russ Cox
8d8ac637ee build: stop early if commands are missing
If we fail due to a missing command (always bison)
during the build, it is running many things in parallel
and the error message gets lost in the noise.
Also diagnose bison++.

$ ./make.bash
Your system's bison is bison++, a buggy copy of the original bison.
Go needs the original bison instead.
See http://golang.org/doc/install.html#ctools
$ sudo apt-get remove bison++
... ridiculous amount of output ...
$ ./make.bash
Cannot find 'bison' on search path.
See http://golang.org/doc/install.html#ctools
$ sudo apt-get install bison
... ridiculous amount of output ...
$ ./make.bash
... works

Fixes #1938.
Fixes #1946.

R=bradfitz
CC=golang-dev
https://golang.org/cl/4528137
2011-06-13 15:28:54 -04:00
Russ Cox
9968090ddd cgo: handle new Apple LLVM-based gcc from Xcode 4.2
That gcc does not include enumerator names and values
in its DWARF debug output.  Create a data block from which
we can read the values instead.

Fixes #1881.

R=iant
CC=golang-dev
https://golang.org/cl/4607045
2011-06-13 14:43:54 -04:00
Adam Langley
8834bb0bfa crypto/openpgp: flesh out Encrypt by adding support for signing.
R=bradfitz
CC=golang-dev
https://golang.org/cl/4572059
2011-06-13 13:04:59 -04:00
Luuk van Dijk
d164b6081d ld: dwarf emit filenames in debug_line header instead of as extended opcodes.
Makes it possible for older tools like objdump to find the filenames,
fixes  objdump -d -l --start-address=0x400c00 --stop-address=0x400c36 6.out
fixes #1950

R=rsc
CC=golang-dev
https://golang.org/cl/4609043
2011-06-13 16:56:43 +02:00
Russ Cox
b96c3477f8 exp/regexp/syntax: syntax data structures, parser
Parser is a work in progress but can populate most of the
interesting parts of the data structure, so a good checkpoint.
All the complicated Perl syntax is missing, as are various
important optimizations made during parsing to the
syntax tree.

The plan is that exp/regexp's API will mimic regexp,
and exp/regexp/syntax provides the parser directly
for programs that need it (and for implementing exp/regexp).

Once finished, exp/regexp will replace regexp.

R=r, sam.thorogood, kevlar, edsrzf
CC=golang-dev
https://golang.org/cl/4538123
2011-06-13 09:20:23 -04:00
Stephen Ma
b4bb970e18 gc: handle go print() and go println()
Fixes #1952.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4611041
2011-06-13 22:50:51 +10:00
Rob Pike
7bc8e90e36 exp/template: lexical scanner for new template package.
An unusual design using slice and a goroutine makes for a
compact scanner with very little allocation.

R=rsc, r
CC=golang-dev, kevlar
https://golang.org/cl/4610041
2011-06-13 16:08:35 +10:00
Alex Brainman
9ded954a3b net: rearrange source files so we could run more tests on windows
R=rsc
CC=golang-dev
https://golang.org/cl/4603043
2011-06-13 10:22:31 +10:00
Alex Brainman
27cbf06d50 mime/multipart: allow for temp files to be removed after tests are finished on Windows
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4605044
2011-06-11 16:23:44 +10:00
Yasuhiro Matsumoto
1374097381 net: Sendfile for win32.
implement using TransmitFile().

R=bsiegert, bradfitz, alex.brainman, rsc, go.peter.90
CC=golang-dev
https://golang.org/cl/4536076
2011-06-11 13:24:48 +10:00
Robert Griesemer
968afa0e8c go/scanner: partially revert CL4538096 now that we have %#U for runes
R=r, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4572049
2011-06-10 17:19:01 -07:00
Robert Griesemer
c8ee1b8ebc io/ioutil: fix typo in comment
R=r, r
CC=golang-dev
https://golang.org/cl/4592052
2011-06-10 17:07:22 -07:00
Rob Pike
d152fe74e1 fmt: debugging formats for characters: %+q %#U
%+q uses strconv.Quote[Rune]ToASCII, guaranteeing ASCII-only output.
%#U a quoted character if the rune is printable: 'x'=U+0078; otherwise
it's as before: U+000A.

R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/4589047
2011-06-11 00:03:02 +00:00
Rob Pike
4b1170d2b1 sort: change IntArray etc. to IntSlice for better name hygiene.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4602054
2011-06-11 09:25:18 +10:00
Adam Langley
531c01d990 crypto/openpgp: build fix (unreviewed)
R=agl
CC=golang-dev
https://golang.org/cl/4572057
2011-06-10 13:32:20 -04:00