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

2795 Commits

Author SHA1 Message Date
Adam Langley
1cdfe9fa28 unsafe: documentation typo.
Fixes #236.

R=r
CC=golang-dev
https://golang.org/cl/155072
2009-11-16 15:39:04 -08:00
Robert Griesemer
e86afaf456 Don't emit line tags when source code is printed as part of
package documentation using templates. The line tag interferes
with the anchor tag introduces by the template.

This fixes an an issue where some headers lost their ability
to link to the respective source code.

R=rsc
https://golang.org/cl/154166
2009-11-16 14:26:29 -08:00
David Symonds
affcfe5a75 Add some primitive type aliases to exp/iterable and define Iter on them.
R=rsc
https://golang.org/cl/155065
2009-11-16 13:39:59 -08:00
David G. Andersen
37f71e8ad6 An asked-for-in #go-nuts extension to quickly create a repeated
copy of a string or a byte array.
        strings.Repeat("-", 50)
	bytes.Repeat(b, 99)

R=rsc
https://golang.org/cl/155063
2009-11-16 12:40:01 -08:00
Kai Backman
c3cf8d663a s/AJMP/AB/ to fix build breakage.
R=rsc
https://golang.org/cl/155069
2009-11-16 11:58:28 -08:00
Russ Cox
ef46a9ddac gc: fix up floating point NaN comparisons
Fixes #167.

R=ken2
https://golang.org/cl/155062
2009-11-15 17:24:14 -08:00
Adam Langley
391e082ca9 crypto/md5: fix comment typo.
Fixes #210.

R=rsc
CC=golang-dev
https://golang.org/cl/155057
2009-11-15 14:00:46 -08:00
Russ Cox
39f64bed52 godefs: avoid gcc 4'isms in command line.
Fixes #97.

R=r
https://golang.org/cl/155054
2009-11-15 12:57:39 -08:00
Russ Cox
cc3524fb06 makefiles: use correct gcc order in case --as-needed is in use.
Suggested by eostapets.
Fixes #141.

R=r
https://golang.org/cl/155049
2009-11-15 12:57:28 -08:00
Russ Cox
0238fd836f cgo: arrange for English error messages
Fixes #21.

R=r
https://golang.org/cl/155048
2009-11-15 12:57:21 -08:00
Russ Cox
091191336a runtime: avoid crash in Caller
Fixes #176.

R=r
https://golang.org/cl/154146
2009-11-15 12:57:15 -08:00
Russ Cox
a338231526 gc: five bug fixes, one better error.
* check for struct literal assignment to private fields.
* record, fix crash involving parallel map assignment.
* avoid infinite recursion in exportassignok.
* make floating point bounds check precise.
* avoid crash on invalid receiver.

* add context to error about implicit assignment.

Fixes #86.
Fixes #88.
Fixes #158.
Fixes #174.
Fixes #201.
Fixes #204.

R=ken2
https://golang.org/cl/154144
2009-11-15 12:57:09 -08:00
Russ Cox
a967f57d19 http.URLEscape: escape all bytes required by RFC 2396
Fixes #125.

R=r
https://golang.org/cl/154143
2009-11-15 12:56:50 -08:00
Russ Cox
2a6bb2c63e gotest: show the test file pattern in "no test files" error
Fixes #190.

R=r
https://golang.org/cl/154142
2009-11-15 12:56:39 -08:00
Rob Pike
27779dd6cb fix bug in bytes.Map and add test cases for Map in both strings and bytes packages.
thanks to ulrik.sverdrup for the test case.

Fixes #191.

R=rsc
CC=golang-dev
https://golang.org/cl/155056
2009-11-15 12:07:27 -08:00
Russ Cox
b18bee948e cc: drop redundant strcpy
Fixes #192.

R=ken2
https://golang.org/cl/155047
2009-11-15 00:00:05 -08:00
Russ Cox
139a053733 cc: eliminate two fixed-size buffers
Fixes bug 168.
Alternative to https://golang.org/cl/152143.

R=ken2
https://golang.org/cl/155042
2009-11-14 23:25:55 -08:00
Kai Backman
529216fa83 complain if GOARCH != arm. fix build break caused by gomake
introduction.

R=rsc
https://golang.org/cl/152109
2009-11-14 23:08:22 -08:00
Adam Langley
ad05d29103 crypto/rsa: handle the case of non-coprime blinds.
We are dealing with the multiplicative group ℤ/pqℤ. Multiples of
either p or q are not members of the group since they cannot have an
inverse. (Such numbers are 0 in the subgroup ℤ/pℤ.)

With p and q of typical size (> 512 bits), the probability of a random
blind [1..pq-1] being a multiple of p or q is negligible. However, in
the unit tests, much smaller sizes are used and the event could occur.

This change checks the result of the ext GCD and deals with this case.

It also increases the size of p and q in the unit test as a large
number of the keys selected were p, q = 227,169.

R=rsc
CC=golang-dev
https://golang.org/cl/154141
2009-11-14 20:38:00 -08:00
Devon H. O'Dell
553be8427e Build changes to support work on the BSDs.
This does still contain some FreeBSD-specific bits, but
it's a pain to do partial diffs.

R=rsc
https://golang.org/cl/152138
2009-11-14 15:29:09 -08:00
Môshe van der Sterre
a54684f8da encoding/binary: implemented the Write function
The ByteOrder.Put* methods are already available, this change uses
them to implement the Write function.

R=golang-dev, agl1, rsc, r
https://golang.org/cl/152141
2009-11-14 14:42:22 -08:00
Russ Cox
4b13d1b9b5 gc: do not try to constant-evaluate (interface{})("bar")
Fixes #183.

R=ken
https://golang.org/cl/154139
2009-11-14 14:14:27 -08:00
Rob Pike
0263103a05 move evaluation of null-matching instructions one iteration earlier.
performance hit of about 20% but more intuitive results for submatches.
we need a good regexp package at some point.

Fixes #110.

R=rsc
CC=golang-dev
https://golang.org/cl/152131
2009-11-14 12:23:24 -08:00
Abhinav Gupta
bad9738be6 xml: Fixed CDATA parsing.
Fixes #128.

R=r, rsc
https://golang.org/cl/154126
2009-11-14 11:46:09 -08:00
Russ Cox
933d1850ce typos
Fixes #171.
Fixes #172.

R=agl1
https://golang.org/cl/154136
2009-11-14 10:28:53 -08:00
David Titarenco
aebae2577a Created new Conn.Flush() public method so the fd pipeline can be drained arbitrarily by the user.
Commented both flush methods so people know what they are looking at.

This is a necessary fix for streaming and long polling HTTP services.
Fixes #93.

R=r, rsc, david.titarenco
https://golang.org/cl/154099
2009-11-13 18:06:47 -08:00
Nigel Tao
75829b3c51 Remove unnecessary int(h) casts in image.go.
R=rsc
https://golang.org/cl/154125
2009-11-13 17:40:20 -08:00
Adam Langley
a070722340 json: minor comment fix.
I screwed up and didn't write one of the code review changes to disk
before submitting.

TBR=rsc

R=rsc
https://golang.org/cl/154122
2009-11-13 14:59:04 -08:00
Rob Pike
f9919ba323 Explain why
-flag true
does not work although
	-flag=true
does.

Fixes #139.

R=iant
CC=golang-dev
https://golang.org/cl/154118
2009-11-13 13:15:18 -08:00
Adam Langley
bccc337084 json: allow one to unmarshal a top-level JSON array.
Fixies issue 114.

R=rsc
CC=golang-dev
https://golang.org/cl/154121
2009-11-13 13:00:45 -08:00
Russ Cox
e7b8f5faca path.TestWalk: disable error case if root
(chmod 0 doesn't cause errors for root)

Fixes #22.

R=gri
https://golang.org/cl/152120
2009-11-13 11:34:33 -08:00
Adam Langley
87bc9b53fd json: fix addressing of slice indexes that are multiples of 8.
Fixes #147.

R=rsc
CC=golang-dev
https://golang.org/cl/152123
2009-11-13 11:29:13 -08:00
Adam Langley
3f7a32405d runtime: warn about SELinux based mmap failures on Linux.
SELinux will cause mmap to fail when we request w+x memory unless the
user has configured their policies. We have a warning in make.bash,
but it's quite likely that the policy will be reset at some point and
then all their binaries start failing.

This patch prints a warning on Linux when mmap fails with EACCES.

R=rsc
CC=golang-dev
https://golang.org/cl/152086
2009-11-13 10:08:51 -08:00
Russ Cox
593ccd1d44 yet another attempt to avoid conflicts with
<stdio.h>, which we weren't even #including

R=r
https://golang.org/cl/154108
2009-11-12 23:38:48 -08:00
Rob Pike
845276ae68 remove dead code from test
R=rsc
CC=golang-dev
https://golang.org/cl/152118
2009-11-12 23:35:45 -08:00
Rob Pike
00093011e6 sudo.bash tries to install acid and db, which don't exist any more
R=rsc
CC=golang-dev
https://golang.org/cl/152117
2009-11-12 23:19:12 -08:00
Robert Griesemer
511772c888 Remove -align flag from gofmt.
(Making it work correctly with -spaces is a bit of work and the output
won't make much sense as it is intended as input to tabwriter.)
Fixes #100.

R=rsc
https://golang.org/cl/154102
2009-11-12 18:26:45 -08:00
Kai Backman
a23746ea65 fix style nit ignored in previous cl
R=rsc
https://golang.org/cl/152110
2009-11-12 16:12:28 -08:00
Kai Backman
6a48aab747 add support for pre arm v6 cas. set GOARM=5 to enable.
R=rsc
https://golang.org/cl/154101
2009-11-12 15:23:23 -08:00
Russ Cox
b0c7d68052 os.TestSeek: use a smaller but still 64-bit seek offset.
Might fix issue 91.

R=r
https://golang.org/cl/152108
2009-11-12 14:55:04 -08:00
Rob Pike
ce0a4bae41 produce helpful error when gotest doesn't find a Makefile
Fixes #117.

R=rsc, agl1
CC=golang-dev
https://golang.org/cl/152107
2009-11-12 14:28:45 -08:00
Adam Langley
454c621d91 exp/draw: correct Makefile.
Thanks to Allister Macleod

Fixes #112.

R=rsc
CC=golang-dev
https://golang.org/cl/152102
2009-11-12 13:55:20 -08:00
Russ Cox
6634e3432d cc, ld: fix more gcc 4.3 -O2 compile bugs
same as https://golang.org/cl/152088
in more files.

Fixes #83.

R=r, r1
https://golang.org/cl/152091
2009-11-12 00:22:45 -08:00
Kai Backman
6dbd142951 add cache flushing call after generating closure.
go/test: passes 88% (306/347)

R=rsc
https://golang.org/cl/152089
2009-11-11 23:23:11 -08:00
Russ Cox
e5636d6e27 avoid seg fault when return type is unknown
Fixes #80.

R=ken
https://golang.org/cl/154079
2009-11-11 22:20:05 -08:00
Russ Cox
8b95720918 gopack: work around gcc bug in hash function
Fixes #48.  (this time for sure!)

R=r, r1
https://golang.org/cl/152088
2009-11-11 22:19:58 -08:00
David Symonds
9e829c42d6 Fix capitalisation of "Git".
R=rsc
https://golang.org/cl/154071
2009-11-11 17:31:28 -08:00
Robert Griesemer
23843fa49e vector: s/Element/interface{}/
Fixes #74.

R=rsc
https://golang.org/cl/154073
2009-11-11 17:25:51 -08:00
Adam Langley
3b092fec36 json: support \u escaping in strings
Fixes #73.

R=rsc
CC=golang-dev
https://golang.org/cl/154072
2009-11-11 17:13:14 -08:00
Russ Cox
ae3341476d cgo: add more information about gcc output parsing failures
R=r
https://golang.org/cl/152084
2009-11-11 16:58:27 -08:00
Russ Cox
c3343ef62c fix BUFSIZ redeclaration warnings
R=r
https://golang.org/cl/152085
2009-11-11 16:33:23 -08:00
Russ Cox
2cda46dc82 fix TestRemoveAll again (tested as root this time).
Fixes #22.

R=r
https://golang.org/cl/154069
2009-11-11 15:48:38 -08:00
Adam Langley
2643f742a5 make.bash: detect and warn about SELinux policy that crashes us.
The default SELinux policy on Fedora 12 (at least) disallows stack
pages to be +x. This causes all binaries written by 6g/6l to segfault
immedately. The 'true' way to fix this issue is to mark binaries with
the correct type. However, that assumes that 6l is going to detect
SELinux, figure out the correct type for the current distribution and
set the type (without libselinux).

For now we'll warn users and point them towards the way to enable
execstack for the whole system.

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

R=rsc
CC=golang-dev
http://codereview.prom.corp.google.com/1026041
2009-11-11 15:02:15 -08:00
Russ Cox
f07a9e43e8 os test: do not use symlink > 255 bytes.
Fixes #62.

R=r
https://golang.org/cl/152080
2009-11-11 14:52:29 -08:00
Russ Cox
ae39a1d8ec cc: correct handling of allocn(0, 1, d)
Fixes #29.

R=r
https://golang.org/cl/152076
2009-11-11 14:52:21 -08:00
Russ Cox
d38630fe3d gotest: add LC_ALL=C
R=r
https://golang.org/cl/154067
2009-11-11 14:52:15 -08:00
Russ Cox
e9ac56fb99 getc/ungetc in assemblers; BUFSIZ everywhere.
Fixes #67.

R=r
https://golang.org/cl/154068
2009-11-11 14:52:08 -08:00
Russ Cox
a174987a7c two gopack nits.
1. allocate an extra byte for use by write.
2. throw away the code trying to translate
   uid and gid to names.  i suspect it of causing
   seg faults in some situations, and it is
   not needed by the compilers.

Fixes #48.  (I hope.)

R=r
https://golang.org/cl/152077
2009-11-11 14:48:33 -08:00
Adam Langley
9188b1f000 Revert make.bash which slipped into the previous revision.
R=rsc
http://codereview.prom.corp.google.com/1024051
2009-11-11 13:30:47 -08:00
Adam Langley
1941855730 Reland a112249da741, this time with missing file. 2009-11-11 13:21:37 -08:00
Russ Cox
8c3d2f015b avoid clash with stdio's getc, ungetc.
Fixes #50.

R=r
https://golang.org/cl/154064
2009-11-11 13:08:35 -08:00
Russ Cox
8515a9f4e2 log test: don't assume a fixed set of letters for $GOROOT
Fixes #27.

R=r
https://golang.org/cl/152075
2009-11-11 13:07:46 -08:00
Russ Cox
ed86d0e70a roll back 3985: build is broken
TBR=agl1
CC=golang-dev
https://golang.org/cl/154065
2009-11-11 12:54:52 -08:00
Adam Langley
af1fa43a81 big:
Turn methods that don't store the result in their receiver into
    functions in order to preserve the convention.
  Re-jig Exp and Div by moving their guts into nat.go.
  Add ProbablyPrime to perform Miller-Rabin primality tests.
crypto/rsa: reenable key generation since we now have ProbablyPrime.

R=gri
CC=go-dev
http://codereview.prom.corp.google.com/1024038
2009-11-11 12:34:46 -08:00
Russ Cox
384932589d work with GNU Make 3.80
Fixes #30.

R=r1, r
https://golang.org/cl/154061
2009-11-11 12:00:50 -08:00
Russ Cox
7932950844 gc: increase maximum path size in getwd from 100 to 1000.
Fixes #31.

To try the fix before the next release:
	hg pull -u

R=r1, r
https://golang.org/cl/154058
2009-11-11 12:00:41 -08:00
Russ Cox
1971e1bd21 os: do not test error case of TestRemoveAll when root
Fixes #22.

R=r1, r
https://golang.org/cl/152073
2009-11-11 12:00:34 -08:00
Russ Cox
364e564e3d use fully qualified names for hash interfaces
Fixes #38.

R=r1, r
https://golang.org/cl/152072
2009-11-11 12:00:15 -08:00
Adam Langley
5281869fac gopack: convert long to time_t before taking a pointer.
Fixes #40.

R=rsc, r1
CC=golang-dev
https://golang.org/cl/154057
2009-11-11 11:19:33 -08:00
Russ Cox
cd0cbd3ed2 lib9: rip out platform specific code that breaks on pclinuxos
R=r
CC=golang-dev
https://golang.org/cl/154049
2009-11-10 23:42:21 -08:00
Russ Cox
fe1e49241c update old comment: things are much better now
R=r
https://golang.org/cl/152057
2009-11-10 19:59:22 -08:00
Russ Cox
9604f7b009 gotest: avoid problems with grepping for ·
Fixes #7.

R=r
CC=golang-dev
https://golang.org/cl/154043
2009-11-10 19:56:32 -08:00
Russ Cox
9ff712ecd1 make.bash: check $PATH indirectly via which quietgcc
R=agl1
CC=golang-dev
https://golang.org/cl/152056
2009-11-10 19:20:34 -08:00
Russ Cox
2d70d60392 sanity check environment variables better.
Fixes #12.

R=agl1
CC=golang-dev
https://golang.org/cl/152055
2009-11-10 19:12:22 -08:00
Russ Cox
92a9ddf0fa net: fix error for connect to /etc/ on some systems
R=agl1
CC=golang-dev
https://golang.org/cl/152051
2009-11-10 18:27:26 -08:00
Russ Cox
d6c388616b test for invalid $GOBIN setting before trying to build
R=r
CC=golang-dev
https://golang.org/cl/153049
2009-11-10 18:00:48 -08:00
Russ Cox
e23f75b3c4 net: disable more ipv6 tests
R=agl, agl1
CC=golang-dev
https://golang.org/cl/153050
2009-11-10 18:00:27 -08:00
Russ Cox
b4a8b353c4 net: disable ipv6 test if we know kernel won't take it.
R=agl, agl1
CC=golang-dev
https://golang.org/cl/153048
2009-11-10 17:47:38 -08:00
Russ Cox
9dba695692 net: disable dns error test
some dns resolvers (opendns, for example)
are willing to make up results for any name.

R=agl, agl1
CC=golang-dev
https://golang.org/cl/152049
2009-11-10 17:39:01 -08:00
Russ Cox
484f46daea net: fix dns bug reported on irc.
if suffixes don't work, check for name directly.
also fixes short names like bit.ly when ndots>1.

tested by tossing domain and search lines from /etc/resolv.conf

Fixes #2.

R=agl, agl1
CC=golang-dev
https://golang.org/cl/152048
2009-11-10 17:09:33 -08:00
Robert Griesemer
9e0d2fa89b better code for a copy loop
R=rsc
https://golang.org/cl/152046
2009-11-10 15:33:59 -08:00
Ken Thompson
c90d392ce3 spell it with an "e"
R=rsc
http://go/go-review/1025037
2009-11-10 15:05:15 -08:00
Robert Griesemer
b27f05f63b minor adjustments to package comments for better synopsis.
R=rsc
CC=r
http://go/go-review/1026038
2009-11-10 10:55:53 -08:00
Russ Cox
b351113b50 make regexp comment not a package comment
R=r
http://go/go-review/1025036
2009-11-10 09:36:48 -08:00
Russ Cox
cb94b60cfb allow user agent to mention Go.
R=r
http://go/go-review/1024046
2009-11-10 09:10:08 -08:00
Russ Cox
da776791c4 drop output from nilptr tests;
too hard to make it the same everywhere.
still checking for non-zero exit status though.

disable core files while running tests

R=r
http://go/go-review/1026037
2009-11-09 23:11:36 -08:00
Robert Griesemer
3d668c1b5d - minor cleanups
- better debugging support
- gofmt -l src misc | wc -l is 0

R=rsc
http://go/go-review/1024042
2009-11-09 22:30:07 -08:00
Robert Griesemer
3bb0032cd6 - replaced gofmt expression formatting algorithm with
rsc's algorithm
- applied gofmt -w misc src
- partial CL (last chunk)

R=rsc, r
http://go/go-review/1024041
2009-11-09 21:23:52 -08:00
Robert Griesemer
baba292998 - replaced gofmt expression formatting algorithm with
rsc's algorithm
	- applied gofmt -w misc src
	- partial CL (remaining files in other CLs)

R=rsc, r
http://go/go-review/1026036
2009-11-09 21:13:17 -08:00
Robert Griesemer
1698934194 - replaced gofmt expression formatting algorithm with
rsc's algorithm
- applied gofmt -w misc src
- partial CL (remaining files in other CLs)

R=rsc, r
http://go/go-review/1024040
2009-11-09 21:09:34 -08:00
Russ Cox
9f42ccb781 error rewording suggested by robert.
update comment.

R=ken
http://go/go-review/1025031
2009-11-09 15:25:18 -08:00
Robert Griesemer
92743615fb TBR:
fix typo that prevented function bodies from being indexed (ouch!)

R=rsc
http://go/go-review/1024035
2009-11-09 14:44:16 -08:00
Robert Griesemer
40621d5c0d remove semis after statements in one-statement statement lists
R=rsc, r
http://go/go-review/1025029
2009-11-09 12:07:39 -08:00
Russ Cox
18ccbc69f8 tweak documentation of commands
so that first sentence is better for cmd page.

live at http://r45:3456/cmd/

R=gri, r
http://go/go-review/1024034
2009-11-09 11:45:15 -08:00
Robert Griesemer
81672e79e4 - rename Context to exprContext to remove it from public interface
(and to match the style of declContext)

R=rsc
http://go/go-review/1024033
2009-11-09 10:37:36 -08:00
Robert Griesemer
53f485813e fix for nodeSize computation, used to determine if
a node fits on one line:
- for purposes of measuring the node size in text,
  don't generate html or use a styler that could
  generate html as it will lead to overly large
  sizes

A consequence of this bug is that source code displayed
with godoc may show functions that fit on one line in
the source on multiple lines.

This change causes no difference to the gofmt formatting
of any files in src or misc.

R=rsc
http://go/go-review/1026034
2009-11-09 09:34:55 -08:00
Robert Griesemer
aae64f8c81 - exit godoc w/o crashing if negative tabwidth is provided
- minor related cleanups

R=rsc
http://go/go-review/1025026
2009-11-08 23:42:00 -08:00
Robert Griesemer
d731dc8e72 Addressing issue brought up by dsymonds:
- When providing alternative spellings to a query, do not
  prefix it with a package qualifier as the suggestion may
  not have any results. Correctly filtering is quite a bit
  of work, and clicking the alternative spelling will always
  also show the qualified hits if they exist (but also others).
  Seems good enough for now.
- Give user feedback when the query syntax was wrong.
- Package names in search results are now links to the respective
  package documentation.
- Experimented with excluding main packages and test files
  from index with inconclusive results. Code is present and
  can be enabled by changing a flag in the source. This needs
  some more work.

R=rsc
CC=r, dsymonds
http://go/go-review/1026033
2009-11-08 23:34:08 -08:00
Russ Cox
71983af4a1 bug212, bug213.
R=ken
http://go/go-review/1026032
2009-11-08 23:22:06 -08:00
Rob Pike
e02f2b51c5 delete a pointless todo in all_test.go.
address one in rpc/client.go

R=rsc
CC=go-dev
http://go/go-review/1026030
2009-11-08 21:57:59 -08:00