1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

Use 64 bit time_t stat internally

For the legacy ABI with supports 32-bit time_t it calls the 64-bit
time directly, since the LFS symbols calls the 64-bit time_t ones
internally.

Checked on i686-linux-gnu and x86_64-linux-gnu.

Reviewed-by: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
Adhemerval Zanella
2021-03-02 17:06:02 -03:00
parent a318262bc0
commit 52a5fe70a2
35 changed files with 106 additions and 109 deletions

View File

@@ -44,7 +44,7 @@ libc_hidden_def (__file_is_unchanged)
void
__file_change_detection_for_stat (struct file_change_detection *file,
const struct stat64 *st)
const struct __stat64_t64 *st)
{
if (S_ISDIR (st->st_mode))
/* Treat as empty file. */
@@ -66,8 +66,8 @@ bool
__file_change_detection_for_path (struct file_change_detection *file,
const char *path)
{
struct stat64 st;
if (__stat64 (path, &st) != 0)
struct __stat64_t64 st;
if (__stat64_time64 (path, &st) != 0)
switch (errno)
{
case EACCES:
@@ -104,8 +104,8 @@ __file_change_detection_for_fp (struct file_change_detection *file,
}
else
{
struct stat64 st;
if (__fstat64 (__fileno (fp), &st) != 0)
struct __stat64_t64 st;
if (__fstat64_time64 (__fileno (fp), &st) != 0)
/* If we already have a file descriptor, all errors are fatal. */
return false;
else