Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
441538eb
Commit
441538eb
authored
Feb 20, 2012
by
Fazlul Shahriar
Committed by
Rob Pike
Feb 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os,time: fix Plan 9 build
R=golang-dev, bradfitz CC=golang-dev
https://golang.org/cl/5689043
parent
7a4d7444
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
17 deletions
+17
-17
src/pkg/os/file.go
src/pkg/os/file.go
+13
-0
src/pkg/os/file_posix.go
src/pkg/os/file_posix.go
+0
-13
src/pkg/time/sys_plan9.go
src/pkg/time/sys_plan9.go
+2
-1
src/pkg/time/zoneinfo_plan9.go
src/pkg/time/zoneinfo_plan9.go
+2
-3
No files found.
src/pkg/os/file.go
View file @
441538eb
...
@@ -72,6 +72,19 @@ const (
...
@@ -72,6 +72,19 @@ const (
SEEK_END
int
=
2
// seek relative to the end
SEEK_END
int
=
2
// seek relative to the end
)
)
// LinkError records an error during a link or symlink or rename
// system call and the paths that caused it.
type
LinkError
struct
{
Op
string
Old
string
New
string
Err
error
}
func
(
e
*
LinkError
)
Error
()
string
{
return
e
.
Op
+
" "
+
e
.
Old
+
" "
+
e
.
New
+
": "
+
e
.
Err
.
Error
()
}
// Read reads up to len(b) bytes from the File.
// Read reads up to len(b) bytes from the File.
// It returns the number of bytes read and an error, if any.
// It returns the number of bytes read and an error, if any.
// EOF is signaled by a zero count with err set to io.EOF.
// EOF is signaled by a zero count with err set to io.EOF.
...
...
src/pkg/os/file_posix.go
View file @
441538eb
...
@@ -24,19 +24,6 @@ func epipecheck(file *File, e error) {
...
@@ -24,19 +24,6 @@ func epipecheck(file *File, e error) {
}
}
}
}
// LinkError records an error during a link or symlink or rename
// system call and the paths that caused it.
type
LinkError
struct
{
Op
string
Old
string
New
string
Err
error
}
func
(
e
*
LinkError
)
Error
()
string
{
return
e
.
Op
+
" "
+
e
.
Old
+
" "
+
e
.
New
+
": "
+
e
.
Err
.
Error
()
}
// Link creates newname as a hard link to the oldname file.
// Link creates newname as a hard link to the oldname file.
// If there is an error, it will be of type *LinkError.
// If there is an error, it will be of type *LinkError.
func
Link
(
oldname
,
newname
string
)
error
{
func
Link
(
oldname
,
newname
string
)
error
{
...
...
src/pkg/time/sys_plan9.go
View file @
441538eb
...
@@ -43,7 +43,7 @@ func readFile(name string) ([]byte, error) {
...
@@ -43,7 +43,7 @@ func readFile(name string) ([]byte, error) {
}
}
func
open
(
name
string
)
(
uintptr
,
error
)
{
func
open
(
name
string
)
(
uintptr
,
error
)
{
fd
,
err
:=
syscall
.
Open
(
name
,
syscall
.
O_RDONLY
,
0
)
fd
,
err
:=
syscall
.
Open
(
name
,
syscall
.
O_RDONLY
)
if
err
!=
nil
{
if
err
!=
nil
{
return
0
,
err
return
0
,
err
}
}
...
@@ -72,4 +72,5 @@ func preadn(fd uintptr, buf []byte, off int) error {
...
@@ -72,4 +72,5 @@ func preadn(fd uintptr, buf []byte, off int) error {
}
}
buf
=
buf
[
m
:
]
buf
=
buf
[
m
:
]
}
}
return
nil
}
}
src/pkg/time/zoneinfo_plan9.go
View file @
441538eb
...
@@ -8,11 +8,10 @@ package time
...
@@ -8,11 +8,10 @@ package time
import
(
import
(
"errors"
"errors"
"runtime"
"syscall"
"syscall"
)
)
var
badData
=
errors
.
New
(
"malformed time zone information"
)
func
isSpace
(
r
rune
)
bool
{
func
isSpace
(
r
rune
)
bool
{
return
r
==
' '
||
r
==
'\t'
||
r
==
'\n'
return
r
==
' '
||
r
==
'\t'
||
r
==
'\n'
}
}
...
@@ -149,7 +148,7 @@ func initLocal() {
...
@@ -149,7 +148,7 @@ func initLocal() {
}
}
func
loadLocation
(
name
string
)
(
*
Location
,
error
)
{
func
loadLocation
(
name
string
)
(
*
Location
,
error
)
{
if
z
,
err
:=
loadZoneFile
(
runtime
.
GOROOT
()
+
"/lib/time/zoneinfo/"
+
name
);
err
==
nil
{
if
z
,
err
:=
loadZoneFile
(
runtime
.
GOROOT
()
+
"/lib/time/zoneinfo.zip"
,
name
);
err
==
nil
{
z
.
name
=
name
z
.
name
=
name
return
z
,
nil
return
z
,
nil
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment