1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

posix: Add glob64 with 64-bit time_t support

The glob might pass a different stat struct for gl_stat and gl_lstat
when GLOB_ALTDIRFUNC is used.  This requires add a new 64-bit time
version that also uses 64-bit time stat functions.

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

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
Adhemerval Zanella
2021-03-02 20:17:07 -03:00
parent 47f24c21ee
commit 84f7ce8447
35 changed files with 307 additions and 40 deletions

View File

@ -28,13 +28,12 @@ libc_hidden_proto (__old_glob64);
#define convert_dirent __old_convert_dirent
#define glob_in_dir __old_glob_in_dir
#undef stat
#define stat stat64
#undef __stat
#define __stat(file, buf) __stat64 (file, buf)
/* Avoid calling gl_lstat with GLOB_ALTDIRFUNC. */
#define GLOB_NO_LSTAT
#define struct_stat struct stat64
#define struct_stat64 struct stat64
#define GLOB_LSTAT gl_stat
#define GLOB_STAT64 __stat64
#define GLOB_LSTAT64 __stat64
#define GLOB_ATTRIBUTE attribute_compat_text_section