summaryrefslogtreecommitdiff
path: root/src/pkg/os
AgeCommit message (Collapse)AuthorFilesLines
2009-11-08assorted cleanupRuss Cox1-1/+1
R=r, iant CC=go-dev http://go/go-review/1025024
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer6-75/+25
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-04gofmt-ify osRobert Griesemer1-1/+1
R=r http://go/go-review/1017034
2009-11-02package net cleanupRuss Cox1-0/+1
added ReadFrom/WriteTo for packet protocols like UDP. simplified the net.Conn interface. added new net.PacketConn interface for packet protocols. implemented proper UDP listener. cleaned up LocalAddr/RemoteAddr methods - cache in netFD. threw away various unused methods. an interface change: introduced net.Addr as a network address interface, to avoid conversion of UDP host:port to string and back for every ReadFrom/WriteTo sequence. another interface change: since signature of Listener.Accept was changing anyway, dropped the middle return value, because it is available as c.RemoteAddr(). (the Accept signature predates the existence of that method.) Dial and Listen still accept strings, but the proto-specific versions DialTCP, ListenUDP, etc. take net.Addr instead. because the generic Dial didn't change and because no one calls Accept directly (only indirectly via the http server), very little code will be affected by these interface changes. design comments welcome. R=p CC=go-dev, r http://go/go-review/1018017
2009-11-01reverse the arguments to io.Copy so the destination is on theRob Pike1-2/+2
left, like an assignment, like strcpy, etc. R=rsc CC=go-dev http://go/go-review/1016011
2009-11-01syscall cleanup.Russ Cox1-1/+1
* rename PORT.sh -> mkall.sh (hopefully more obvious), change behavior: run commands by default. * pull more constants out of #defines automatically, instead of editing large lists by hand. * add Recvfrom, Sendto add os.O_EXCL. R=r http://go/go-review/1017009
2009-11-01os cleanup.Russ Cox14-392/+14
dir_* and stat_* are just os specific, not os+arch-specific. R=r http://go/go-review/1018010
2009-10-29Change Stat to Lstat in Readdir so we don't recur when someone symlinks "."Rob Pike1-1/+1
R=rsc CC=go-dev http://go/go-review/1018003
2009-10-27files that are okay from the last gofmt roundRuss Cox2-4/+4
R=gri http://go/go-review/1015011
2009-10-15Work-around for factory function heuristic failure:Robert Griesemer1-0/+8
only associate a couple of functions as factories for os.Error. Replaces CL 35628 (abandoned). R=rsc DELTA=35 (26 added, 0 deleted, 9 changed) OCL=35754 CL=35768
2009-10-08more lgtm files from gofmtRuss Cox4-9/+9
R=gri OCL=35485 CL=35488
2009-10-06apply gofmt to malloc math once osRuss Cox23-286/+283
R=gri DELTA=566 (4 added, 14 deleted, 548 changed) OCL=35410 CL=35419
2009-09-22nacl syscall package.Russ Cox5-6/+136
similar tweaks to make debug/proc, net, os build. R=r DELTA=861 (855 added, 4 deleted, 2 changed) OCL=34877 CL=34890
2009-09-17use buf.String() instead of string(buf.Bytes())Rob Pike1-2/+2
use strings.Buffer instead of bytes.Buffer in some places R=rsc DELTA=40 (0 added, 3 deleted, 37 changed) OCL=34770 CL=34775
2009-09-17unused importsRuss Cox1-4/+1
R=r OCL=34731 CL=34731
2009-09-16rename bytes.Buffer.Data() to bytes.Buffer.Bytes()Rob Pike1-2/+2
R=rsc DELTA=152 (6 added, 0 deleted, 146 changed) OCL=34695 CL=34701
2009-09-15more "declared and not used".Russ Cox6-21/+21
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
2009-09-14fix "declared and not used" errors in non-test code.Russ Cox1-1/+0
R=r DELTA=112 (6 added, 57 deleted, 49 changed) OCL=34610 CL=34610
2009-08-2864 bit lsh, sub, and/or/eor. some placeholder files in syscall and os.Kai Backman2-0/+125
R=rsc APPROVED=rsc DELTA=204 (139 added, 0 deleted, 65 changed) OCL=34009 CL=34025
2009-08-27os.File.ReadAt/WriteAtRuss Cox2-3/+84
R=r DELTA=84 (81 added, 0 deleted, 3 changed) OCL=34006 CL=34006
2009-08-12convert low-level (used by testing) packages toRuss Cox20-131/+31
whole-package compilation. new Makefiles, tests now in separate package bytes flag fmt io math once os reflect strconv sync time utf8 delete import "xxx" in package xxx. inside package xxx, xxx is not declared anymore so s/xxx.//g delete file and package level forward declarations. note the new internal_test.go and sync and strconv to provide public access to internals during testing. the installed version of the package omits that file and thus does not open the internals to all clients. R=r OCL=33065 CL=33097
2009-08-10remove unnecessary pkg. referencesRuss Cox9-24/+24
R=r DELTA=95 (0 added, 0 deleted, 95 changed) OCL=33012 CL=33012
2009-08-05Make os.RemoveAll return no error if path does not exist.Austin Clements1-4/+8
This fixes a problem introduced by CL 32684 into gobuild, which used to use 'rm -rf' to remove the _obj directory. R=rsc APPROVED=rsc DELTA=8 (4 added, 0 deleted, 4 changed) OCL=32794 CL=32796
2009-07-15/usr/local/bin might not exist so use /usr/bin in the chdir test.Rob Pike1-1/+1
R=rsc DELTA=1 (0 added, 0 deleted, 1 changed) OCL=31708 CL=31713
2009-07-15Pretty printer for os.WaitmsgAustin Clements1-0/+49
R=rsc APPROVED=rsc DELTA=49 (49 added, 0 deleted, 0 changed) OCL=31568 CL=31671
2009-07-13Avoid clash between os.WRUSAGE and Linux's WALL flag.Austin Clements1-1/+5
R=rsc APPROVED=rsc DELTA=5 (4 added, 0 deleted, 1 changed) OCL=31564 CL=31567
2009-07-01clean up some BUG/TODO in go codeRuss Cox1-3/+1
R=r DELTA=23 (1 added, 12 deleted, 10 changed) OCL=30957 CL=30980
2009-06-29io.StringBytes -> strings.BytesRuss Cox1-5/+6
io.ByteBuffer -> bytes.Buffer left io.ByteBuffer stub around for now, for protocol compiler. R=r OCL=30861 CL=30872
2009-06-29make use of forward method declarationRuss Cox5-11/+5
R=r DELTA=11 (0 added, 6 deleted, 5 changed) OCL=30862 CL=30870
2009-06-29add os.HostnameRuss Cox4-3/+95
R=r DELTA=188 (182 added, 3 deleted, 3 changed) OCL=30856 CL=30860
2009-06-26Getenv: almost no one wants the error, so make it return a string that may ↵Rob Pike2-3/+10
be empty. Getenverror is the new name for the old routine that returns an error too. R=rsc DELTA=35 (7 added, 7 deleted, 21 changed) OCL=30818 CL=30821
2009-06-25Change os.Error convention:Russ Cox12-84/+196
echo back context of call in error if likely to be useful. For example, if os.Open("/etc/passwd", os.O_RDONLY) fails with syscall.EPERM, it returns as the os.Error &PathError{ Op: "open", Path: "/etc/passwd" Error: os.EPERM } which formats as open /etc/passwd: permission denied Not converted: datafmt go/... google/... regexp tabwriter template R=r DELTA=1153 (561 added, 156 deleted, 436 changed) OCL=30738 CL=30781
2009-06-25dregRuss Cox1-20/+0
R=r DELTA=19 (0 added, 19 deleted, 0 changed) OCL=30739 CL=30751
2009-06-24style police: parens in if, for, switch, rangeRuss Cox2-2/+2
R=r DELTA=32 (0 added, 3 deleted, 29 changed) OCL=30718 CL=30725
2009-06-22introduce os.EOF and io.ErrUnexpectedEOF.Russ Cox2-6/+21
remove io.ErrEOF. rename io.FullRead to io.ReadFull, to match ReadAtLeast and ReadAll. remove io.FullReader, because it is now unused. R=r DELTA=295 (88 added, 105 deleted, 102 changed) OCL=30544 CL=30588
2009-06-16386 system call fixes:Russ Cox1-6/+8
* use 64-bit file system calls (Linux, Darwin) * use 32-bit [sic] uid/gid calls (Linux) * fix sockets on Linux Darwin/386 works again. Linux/386 is better but must never have worked; there are still bugs surrounding the creation of new threads in the runtime package. R=austin DELTA=1332 (673 added, 614 deleted, 45 changed) OCL=30327 CL=30380
2009-06-09mv src/lib to src/pkgRob Pike21-0/+2307
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102