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

198 Commits

Author SHA1 Message Date
Christopher Wedgwood
707e5acd71 updates: append(y,[]byte(z)...) -> append(y,z...)"
(more are possible but omitted for now as they are part of
specific tests where rather than changing what is there we
should probably expand the tests to cover the new case)

R=rsc, dvyukov
CC=golang-dev
https://golang.org/cl/5247058
2011-10-12 13:42:04 -07:00
Russ Cox
2715956f13 build: add build comments to core packages
The go/build package already recognizes
system-specific file names like

        mycode_darwin.go
        mycode_darwin_386.go
        mycode_386.s

However, it is also common to write files that
apply to multiple architectures, so a recent CL added
to go/build the ability to process comments
listing a set of conditions for building.  For example:

        // +build darwin freebsd openbsd/386

says that this file should be compiled only on
OS X, FreeBSD, or 32-bit x86 OpenBSD systems.

These conventions are not yet documented
(hence this long CL description).

This CL adds build comments to the multi-system
files in the core library, a step toward making it
possible to use go/build to build them.

With this change go/build can handle crypto/rand,
exec, net, path/filepath, os/user, and time.

os and syscall need additional adjustments.

R=golang-dev, r, gri, r, gustavo
CC=golang-dev
https://golang.org/cl/5011046
2011-09-15 16:48:57 -04:00
Ian Lance Taylor
096f3a293e os: Fix comment in generated signal_unix.go file.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5013042
2011-09-13 09:38:08 -07:00
Jaroslavas Počepko
571d3f50d3 os: os.RemoveAll has to check for 2 error codes on Windows. ENOENT is not enough.
os.Lstat can return ENOTDIR as well.

R=golang-dev, r, alex.brainman
CC=golang-dev, rsc
https://golang.org/cl/4984051
2011-09-08 17:27:41 +10:00
Alex Brainman
37f390aa20 os: use GetFileAttributesEx to implement Stat on windows
Fixes #2129.

R=rsc
CC=golang-dev
https://golang.org/cl/4934049
2011-09-06 09:59:08 +10:00
Gustavo Niemeyer
1952eb5010 os: fix WNOHANG Waitmsg
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4962042
2011-08-29 10:45:37 -04:00
Joel Sing
a9fe3a0ce3 os: disable Hostname test on OpenBSD
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4901054
2011-08-22 23:24:16 -04:00
Fazlul Shahriar
95aea24990 build: build more packages/commands for Plan 9
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4921041
2011-08-22 11:03:17 +10:00
Russ Cox
c02423902d build: allow builds without cgo
R=bradfitz, dsymonds, fshahriar
CC=golang-dev
https://golang.org/cl/4859043
2011-08-10 21:36:48 -04:00
Joel Sing
604b91a43e os: add support for openbsd
R=rsc
CC=golang-dev
https://golang.org/cl/4798061
2011-08-08 09:56:36 -04:00
Brad Fitzpatrick
bf768294ed os: point readers at the exec package
R=golang-dev, evan, rsc
CC=golang-dev
https://golang.org/cl/4802046
2011-07-20 11:38:18 -07:00
Robert Griesemer
90564a9256 go/printer: changed max. number of newlines from 3 to 2
manual changes in src/pkg/go/printer, src/cmd/gofix/signal_test.go
(cd src/cmd/gofix/testdata; gofmt -w *.in *.out)
(cd src/pkg/go/printer; gotest -update)
gofmt -w misc src

runs all tests

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4715041
2011-07-14 14:39:40 -07:00
Yuval Pavel Zholkover
0bf36ce8fb os: Plan 9: add Process.Signal as a way to send notes.
Move the Signal interface from exec_posix.go to exec.go.
Remove some unsused code from file_plan9.go.

R=fshahriar, rsc
CC=golang-dev
https://golang.org/cl/4683044
2011-07-13 16:29:37 -07:00
Brad Fitzpatrick
d53385fd0c os: don't permit Process.Signal after a successful Wait
R=dsymonds, rsc
CC=golang-dev
https://golang.org/cl/4689043
2011-07-11 15:47:42 -07:00
Rob Pike
07c9a92564 os: fix documentation for FileInfo.Name.
It's the base name, not the full name.
Fixes #2047.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4680041
2011-07-07 16:05:38 +10:00
Alex Brainman
e71fc0c1fe syscall: rearrange windows code so 386 and amd64 can share files
R=golang-dev, r
CC=golang-dev, vcc.163
https://golang.org/cl/4641093
2011-07-07 10:40:45 +10:00
Fazlul Shahriar
bedee318d5 os: fix build for Plan 9
R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/4657074
2011-07-05 16:01:29 +10:00
Wei Guangjing
63b8b948d9 windows: define and use syscall.Handle
Fixes #1487.

R=rsc, alex.brainman, go.peter.90, mikioh.mikioh, mattn.jp
CC=golang-dev
https://golang.org/cl/4600042
2011-07-01 10:18:07 -04:00
David Symonds
ba8e61d833 os: use a different symbol from syscall in mkunixsignals.sh.
Open is more likely to be present than Syscall.

R=rsc
CC=golang-dev
https://golang.org/cl/4645073
2011-06-30 13:35:40 +10:00
Rob Pike
f71153278a os: simplify WriteString
It was working too hard.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4639081
2011-06-28 11:09:21 +10: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
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
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
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
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
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
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
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
Yuval Pavel Zholkover
6c746328f7 os: fix Getenv for Plan 9. Truncate the rightmost char if it is '\0'.
R=mirtchovski, ality, taruti, rsc
CC=golang-dev
https://golang.org/cl/4386046
2011-06-08 09:44:03 -04:00
Evan Shaw
94b974a22d os: add Process.Kill and Process.Signal
R=alex.brainman, r, rsc, krasin, iant, rsc, r
CC=golang-dev
https://golang.org/cl/4437091
2011-06-06 19:53:30 +10:00
Brad Fitzpatrick
2655757900 http: don't fail on accept hitting EMFILE
Fixes #1891

R=rsc
CC=golang-dev
https://golang.org/cl/4550112
2011-06-03 12:23:50 -07:00
Yuval Pavel Zholkover
f74f50e046 Make unix Readdir and windows Readdirnames return partially successful results on error.
Make plan 9 Readdir & Readdirnames return os.EOF at end.
Also fix typos in the unix and windows comments.

R=golang-dev, fshahriar, bradfitz, rsc, r
CC=golang-dev
https://golang.org/cl/4557053
2011-06-01 13:12:37 +10:00
Robert Hencke
3fbd478a8a pkg: spelling tweaks, I-Z
also, a few miscellaneous fixes to files outside pkg

R=golang-dev, dsymonds, mikioh.mikioh, r
CC=golang-dev
https://golang.org/cl/4517116
2011-05-30 18:02:59 +10:00
Yasuhiro Matsumoto
0f4510b370 os: fix os.MkdirAll with backslash path separator.
MkdirAll() need to use isSeparator().
Move primary defines of filepath.Separator/filepath.ListSeparator
 to os.PathSeparator/os.PathListSeparator.
Move filepath.isSeparator() to os.IsPathSeparator().
filepath package refer them from os package.
Fixes #1831.

R=rsc, alex.brainman
CC=golang-dev
https://golang.org/cl/4535100
2011-05-29 13:03:49 +10:00
Alex Brainman
505f0bb3ce os: fix windows version of Readdir(0)
Fixes #1893.

R=golang-dev
CC=bradfitz, golang-dev
https://golang.org/cl/4528106
2011-05-29 11:59:35 +10:00
Brad Fitzpatrick
685a8157e6 os: yet more Readdir tests and fix earlier regression
R=golang-dev, fshahriar
CC=golang-dev
https://golang.org/cl/4548068
2011-05-27 12:58:59 -07:00
Brad Fitzpatrick
0e865ab8e7 os: improve Readdir test coverage, fix Readdir(0) on EOF
Adds tests for Readdir and Readdirnames with different n
values.  No good way to inject faults during full reads,
though.

Also fixes bug report from fshahriar:
Readdir(0) wasn't behaving like Readdir(-1).

R=rsc, fshahriar
CC=golang-dev
https://golang.org/cl/4529092
2011-05-27 12:14:48 -07:00
Alex Brainman
cb96d98b06 os: another attempt to handle OpenFile flag parameter properly on Windows
Fixes #1791.

R=rsc, r, r, iant
CC=golang-dev
https://golang.org/cl/4551046
2011-05-27 17:02:24 +10:00
Alex Brainman
86327cdcf5 os: TestMkdirAll should not fail to delete _test/_TestMkdirAll_ on Windows
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4515142
2011-05-27 09:52:15 +10:00
Ian Lance Taylor
ddcdbd4470 os: Fix test to work on Solaris.
On Solaris /bin is a symlink to /usr/bin, so running "pwd" in
the directory "/bin" prints out "/usr/bin".

R=rsc, r, bradfitz
CC=golang-dev
https://golang.org/cl/4559043
2011-05-24 22:53:37 -07:00
Robert Griesemer
b790ae2efb go/printer, gofmt: fix formatting of expression lists (missing blank)
This appears to have been a long-standing formatting bug.
The test cases has misformatted golden files.

Applied gofmt -w src misc .

Fixes #1839.

R=iant
CC=golang-dev
https://golang.org/cl/4515113
2011-05-19 17:05:35 -07:00
Robert Hencke
3faa490f89 pkg: fix new incorrect prints found by govet
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4539063
2011-05-16 21:15:06 -07:00
Brad Fitzpatrick
3587085fb7 os: fix Windows build from earlier readdir change
It worked originally, until I renamed a variable. :/

dir_windows.go:11: undefined: e
http://godashboard.appspot.com/log/092397f2ac7a1e6e812dc6bebc65b40b02368700a119343d5cee5e2e89e0fde5

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4535072
2011-05-16 10:27:49 -07:00
Brad Fitzpatrick
4da5cd4cd6 os: make Readdir & Readdirnames return os.EOF at end
Fixes #678

R=rsc, r, alex.brainman, bsiegert, jdpoirier
CC=golang-dev
https://golang.org/cl/4536058
2011-05-16 09:26:16 -07:00
Robert Hencke
cc2fc02467 pkg: fix incorrect prints found by govet
Also, clarify some error messages

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4548042
2011-05-14 20:43:18 -07:00
Brad Fitzpatrick
ec1ee024ad os: remove race paranoia from Environ(); it's guarded now
R=rsc
CC=golang-dev
https://golang.org/cl/4426077
2011-05-02 23:08:27 -04:00
Brad Fitzpatrick
623e7de187 os: make Setenv update C environment variables
Fixes #1569

R=rsc, bradfitzwork
CC=golang-dev
https://golang.org/cl/4456045
2011-05-02 12:38:13 -07:00
Alex Brainman
b1deb3be7f os: fix race in ReadAt/WriteAt on Windows
R=bradfitzgo, rsc, peterGo
CC=golang-dev
https://golang.org/cl/4441051
2011-04-26 18:09:46 +10:00
Russ Cox
8698bb6c8c runtime: turn "too many EPIPE" into real SIGPIPE
Tested on Linux and OS X, amd64 and 386.

R=r, iant
CC=golang-dev
https://golang.org/cl/4452046
2011-04-25 16:58:00 -04:00