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

support: Use macros for *stat wrappers

Macros will automatically use the correct types, without
having to fiddle with internal glibc macros.  It's also
impossible to get the types wrong due to aliasing because
support_check_stat_fd and support_check_stat_path do not
depend on the struct stat* types.

The changes reveal some inconsistencies in tests.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
Florian Weimer
2024-08-16 16:05:20 +02:00
parent bf29274841
commit e7c14e542d
16 changed files with 34 additions and 168 deletions

View File

@@ -169,7 +169,7 @@ do_test (void)
{
struct stat64 st;
xstat (_PATH_BSHELL, &st);
xstat64 (_PATH_BSHELL, &st);
mode_t mode = st.st_mode;
xchmod (_PATH_BSHELL, mode & ~(S_IXUSR | S_IXGRP | S_IXOTH));