Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
4120647a
Commit
4120647a
authored
Dec 06, 2004
by
Juan Lang
Committed by
Alexandre Julliard
Dec 06, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set st_mode bits in _fstati64.
parent
3e108bad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
file.c
dlls/msvcrt/file.c
+13
-1
No files found.
dlls/msvcrt/file.c
View file @
4120647a
...
...
@@ -994,7 +994,19 @@ int MSVCRT__fstati64(int fd, struct MSVCRT__stati64* buf)
msvcrt_set_errno
(
ERROR_INVALID_PARAMETER
);
return
-
1
;
}
FIXME
(
":dwFileAttributes = %ld, mode set to 0
\n
"
,
hfi
.
dwFileAttributes
);
dw
=
GetFileType
(
hand
);
buf
->
st_mode
=
S_IREAD
;
if
(
!
(
hfi
.
dwFileAttributes
&
FILE_ATTRIBUTE_READONLY
))
buf
->
st_mode
|=
S_IWRITE
;
/* interestingly, Windows never seems to set S_IFDIR */
if
(
dw
==
FILE_TYPE_CHAR
)
buf
->
st_mode
|=
S_IFCHR
;
else
if
(
dw
==
FILE_TYPE_PIPE
)
buf
->
st_mode
|=
S_IFIFO
;
else
buf
->
st_mode
|=
S_IFREG
;
TRACE
(
":dwFileAttributes = 0x%lx, mode set to 0x%x
\n
"
,
hfi
.
dwFileAttributes
,
buf
->
st_mode
);
buf
->
st_nlink
=
hfi
.
nNumberOfLinks
;
buf
->
st_size
=
((
__int64
)
hfi
.
nFileSizeHigh
<<
32
)
+
hfi
.
nFileSizeLow
;
RtlTimeToSecondsSince1970
((
LARGE_INTEGER
*
)
&
hfi
.
ftLastAccessTime
,
&
dw
);
...
...
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