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
12eee9ed
Commit
12eee9ed
authored
Nov 30, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os: fix windows build
TBR=brainman CC=golang-dev
https://golang.org/cl/5449048
parent
ca6de008
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
src/pkg/os/export_test.go
src/pkg/os/export_test.go
+0
-1
src/pkg/os/stat_windows.go
src/pkg/os/stat_windows.go
+12
-2
No files found.
src/pkg/os/export_test.go
View file @
12eee9ed
...
...
@@ -6,5 +6,4 @@ package os
// Export for testing.
var
TimespecToTime
=
timespecToTime
var
Atime
=
atime
src/pkg/os/stat_windows.go
View file @
12eee9ed
...
...
@@ -77,7 +77,11 @@ func basename(name string) string {
return
name
}
func
toFileInfo
(
name
string
,
fa
,
sizehi
,
sizelo
uint32
,
ctime
,
atime
,
wtime
syscall
.
Filetime
)
FileInfo
{
type
winTimes
struct
{
atime
,
ctime
syscall
.
Filetime
}
func
toFileInfo
(
name
string
,
fa
,
sizehi
,
sizelo
uint32
,
ctime
,
atime
,
mtime
syscall
.
Filetime
)
FileInfo
{
fs
:=
new
(
FileStat
)
fs
.
mode
=
0
if
fa
&
syscall
.
FILE_ATTRIBUTE_DIRECTORY
!=
0
{
...
...
@@ -90,10 +94,16 @@ func toFileInfo(name string, fa, sizehi, sizelo uint32, ctime, atime, wtime sysc
}
fs
.
size
=
int64
(
sizehi
)
<<
32
+
int64
(
sizelo
)
fs
.
name
=
name
fs
.
modTime
=
time
.
Unix
(
0
,
wtime
.
Nanoseconds
())
fs
.
modTime
=
time
.
Unix
(
0
,
mtime
.
Nanoseconds
())
fs
.
Sys
=
&
winTimes
{
atime
,
ctime
}
return
fs
}
func
sameFile
(
fs1
,
fs2
*
FileStat
)
bool
{
return
false
}
// For testing.
func
atime
(
fi
FileInfo
)
time
.
Time
{
return
time
.
Unix
(
0
,
fi
.
(
*
FileStat
)
.
Sys
.
(
*
winTimes
)
.
atime
.
Nanoseconds
())
}
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