Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
ed5e0a6e
Commit
ed5e0a6e
authored
Nov 29, 2012
by
Charles Davis
Committed by
Alexandre Julliard
Nov 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add support for nanosecond precision file times on *BSD.
parent
d008771b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
1 deletion
+47
-1
configure
configure
+27
-0
configure.ac
configure.ac
+1
-1
file.c
dlls/ntdll/file.c
+10
-0
config.h.in
include/config.h.in
+9
-0
No files found.
configure
View file @
ed5e0a6e
...
...
@@ -14132,6 +14132,15 @@ _ACEOF
fi
ac_fn_c_check_member
"
$LINENO
"
"struct stat"
"st_mtimespec"
"ac_cv_member_struct_stat_st_mtimespec"
"
$ac_includes_default
"
if
test
"x
$ac_cv_member_struct_stat_st_mtimespec
"
=
xyes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
_ACEOF
fi
ac_fn_c_check_member
"
$LINENO
"
"struct stat"
"st_ctim"
"ac_cv_member_struct_stat_st_ctim"
"
$ac_includes_default
"
if
test
"x
$ac_cv_member_struct_stat_st_ctim
"
=
xyes
;
then
:
...
...
@@ -14141,6 +14150,15 @@ _ACEOF
fi
ac_fn_c_check_member
"
$LINENO
"
"struct stat"
"st_ctimespec"
"ac_cv_member_struct_stat_st_ctimespec"
"
$ac_includes_default
"
if
test
"x
$ac_cv_member_struct_stat_st_ctimespec
"
=
xyes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_STRUCT_STAT_ST_CTIMESPEC 1
_ACEOF
fi
ac_fn_c_check_member
"
$LINENO
"
"struct stat"
"st_atim"
"ac_cv_member_struct_stat_st_atim"
"
$ac_includes_default
"
if
test
"x
$ac_cv_member_struct_stat_st_atim
"
=
xyes
;
then
:
...
...
@@ -14150,6 +14168,15 @@ _ACEOF
fi
ac_fn_c_check_member
"
$LINENO
"
"struct stat"
"st_atimespec"
"ac_cv_member_struct_stat_st_atimespec"
"
$ac_includes_default
"
if
test
"x
$ac_cv_member_struct_stat_st_atimespec
"
=
xyes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_STRUCT_STAT_ST_ATIMESPEC 1
_ACEOF
fi
ac_fn_c_check_member
"
$LINENO
"
"struct sockaddr_in6"
"sin6_scope_id"
"ac_cv_member_struct_sockaddr_in6_sin6_scope_id"
"#ifdef HAVE_SYS_TYPES_H
...
...
configure.ac
View file @
ed5e0a6e
...
...
@@ -2269,7 +2269,7 @@ AC_CHECK_MEMBERS([struct option.name],,,
#endif])
dnl Check for stat.st_blocks and ns-resolved times
AC_CHECK_MEMBERS([struct stat.st_blocks,struct stat.st_mtim,struct stat.st_
ctim,struct stat.st_atim
])
AC_CHECK_MEMBERS([struct stat.st_blocks,struct stat.st_mtim,struct stat.st_
mtimespec,struct stat.st_ctim,struct stat.st_ctimespec,struct stat.st_atim,struct stat.st_atimespec
])
dnl Check for sin6_scope_id
AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,
...
...
dlls/ntdll/file.c
View file @
ed5e0a6e
...
...
@@ -1594,9 +1594,13 @@ static NTSTATUS set_file_times( int fd, const LARGE_INTEGER *mtime, const LARGE_
tv
[
1
].
tv_sec
=
st
.
st_mtime
;
#ifdef HAVE_STRUCT_STAT_ST_ATIM
tv
[
0
].
tv_usec
=
st
.
st_atim
.
tv_nsec
/
1000
;
#elif defined(HAVE_STRUCT_STAT_ST_ATIMESPEC)
tv
[
0
].
tv_usec
=
st
.
st_atimespec
.
tv_nsec
/
1000
;
#endif
#ifdef HAVE_STRUCT_STAT_ST_MTIM
tv
[
1
].
tv_usec
=
st
.
st_mtim
.
tv_nsec
/
1000
;
#elif defined(HAVE_STRUCT_STAT_ST_MTIMESPEC)
tv
[
1
].
tv_usec
=
st
.
st_mtimespec
.
tv_nsec
/
1000
;
#endif
}
}
...
...
@@ -1631,12 +1635,18 @@ static inline void get_file_times( const struct stat *st, LARGE_INTEGER *mtime,
RtlSecondsSince1970ToTime
(
st
->
st_atime
,
atime
);
#ifdef HAVE_STRUCT_STAT_ST_MTIM
mtime
->
QuadPart
+=
st
->
st_mtim
.
tv_nsec
/
100
;
#elif defined(HAVE_STRUCT_STAT_ST_MTIMESPEC)
mtime
->
QuadPart
+=
st
->
st_mtimespec
.
tv_nsec
/
100
;
#endif
#ifdef HAVE_STRUCT_STAT_ST_CTIM
ctime
->
QuadPart
+=
st
->
st_ctim
.
tv_nsec
/
100
;
#elif defined(HAVE_STRUCT_STAT_ST_CTIMESPEC)
ctime
->
QuadPart
+=
st
->
st_ctimespec
.
tv_nsec
/
100
;
#endif
#ifdef HAVE_STRUCT_STAT_ST_ATIM
atime
->
QuadPart
+=
st
->
st_atim
.
tv_nsec
/
100
;
#elif defined(HAVE_STRUCT_STAT_ST_ATIMESPEC)
atime
->
QuadPart
+=
st
->
st_atimespec
.
tv_nsec
/
100
;
#endif
*
creation
=
*
mtime
;
}
...
...
include/config.h.in
View file @
ed5e0a6e
...
...
@@ -857,15 +857,24 @@
/* Define to 1 if `st_atim' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_ATIM
/* Define to 1 if `st_atimespec' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_ATIMESPEC
/* Define to 1 if `st_blocks' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLOCKS
/* Define to 1 if `st_ctim' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_CTIM
/* Define to 1 if `st_ctimespec' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_CTIMESPEC
/* Define to 1 if `st_mtim' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_MTIM
/* Define to 1 if `st_mtimespec' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_MTIMESPEC
/* Define to 1 if `tcps_connattempt' is a member of `struct tcpstat'. */
#undef HAVE_STRUCT_TCPSTAT_TCPS_CONNATTEMPT
...
...
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