From ca2bf7c9e9b7f1b82a77d400ca9691806f1cbfc8 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Fri, 13 Jan 2017 20:07:09 +0000 Subject: [PATCH] tests: drop non-USE_ASM_STAT case support With the switch of fstatat family tests to USE_ASM_STAT variant, there are no non-USE_ASM_STAT users left. Remove support of unused non-USE_ASM_STAT case. * configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_mtim.tv_nsec. * tests/fstatat.c (USE_ASM_STAT): Remove. * tests/fstatx.c: Likewise. * tests/lstatx.c: Likewise. * tests/xstatx.c: Assume USE_ASM_STAT. [!USE_ASM_STAT]: Remove. --- configure.ac | 2 -- tests/fstatat.c | 2 -- tests/fstatx.c | 2 -- tests/lstatx.c | 2 -- tests/xstatx.c | 82 +++++++++++++++++++------------------------------ 5 files changed, 32 insertions(+), 58 deletions(-) diff --git a/configure.ac b/configure.ac index 8fc35a8c..793d74ef 100644 --- a/configure.ac +++ b/configure.ac @@ -304,8 +304,6 @@ AC_CHECK_MEMBERS([struct stat.st_mtime_nsec, struct stat64.st_mtime_nsec],,, [#include #include ]) -AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec]) - AC_CHECK_TYPES(m4_normalize([ struct pt_all_user_regs, struct ia64_fpreg, diff --git a/tests/fstatat.c b/tests/fstatat.c index 3981b4ec..66138c25 100644 --- a/tests/fstatat.c +++ b/tests/fstatat.c @@ -38,8 +38,6 @@ printf(", AT_SYMLINK_NOFOLLOW) = %s\n", sprintrc(rc)); \ } while (0) -# define USE_ASM_STAT - # include "xstatx.c" #else diff --git a/tests/fstatx.c b/tests/fstatx.c index 174f29fb..f88d9a9c 100644 --- a/tests/fstatx.c +++ b/tests/fstatx.c @@ -37,6 +37,4 @@ printf(") = %s\n", sprintrc(rc)); \ } while (0) -#define USE_ASM_STAT - #include "xstatx.c" diff --git a/tests/lstatx.c b/tests/lstatx.c index a3ff8436..cdd1124b 100644 --- a/tests/lstatx.c +++ b/tests/lstatx.c @@ -36,6 +36,4 @@ printf(") = %s\n", sprintrc(rc)); \ } while (0) -#define USE_ASM_STAT - #include "xstatx.c" diff --git a/tests/xstatx.c b/tests/xstatx.c index 53381066..0d5fca87 100644 --- a/tests/xstatx.c +++ b/tests/xstatx.c @@ -79,62 +79,44 @@ print_time(const time_t t) typedef off_t libc_off_t; -# ifdef USE_ASM_STAT -# define stat libc_stat -# define stat64 libc_stat64 -# endif +# define stat libc_stat +# define stat64 libc_stat64 # include # include -# ifdef USE_ASM_STAT -# undef stat -# undef stat64 -# endif +# undef stat +# undef stat64 -# ifdef USE_ASM_STAT -# undef st_atime -# undef st_mtime -# undef st_ctime -# include "asm_stat.h" +# undef st_atime +# undef st_mtime +# undef st_ctime +# include "asm_stat.h" -# if STRUCT_STAT_IS_STAT64 -# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC -# if defined MPERS_IS_m32 -# ifdef HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC -# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 -# endif -# elif defined MPERS_IS_mx32 -# ifdef HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC -# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 -# endif -# elif defined HAVE_STRUCT_STAT64_ST_MTIME_NSEC -# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 -# endif /* MPERS_IS_m32 || MPERS_IS_mx32 || HAVE_STRUCT_STAT64_ST_MTIME_NSEC */ -# else /* !STRUCT_STAT_IS_STAT64 */ -# if defined MPERS_IS_m32 -# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC -# ifdef HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC -# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 -# endif -# elif defined MPERS_IS_mx32 -# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC -# ifdef HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC -# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 -# endif -# endif /* MPERS_IS_m32 || MPERS_IS_mx32 */ -# endif /* STRUCT_STAT_IS_STAT64 */ - -# else /* !USE_ASM_STAT */ +# if STRUCT_STAT_IS_STAT64 # undef HAVE_STRUCT_STAT_ST_MTIME_NSEC -# ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC +# if defined MPERS_IS_m32 +# ifdef HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# elif defined MPERS_IS_mx32 +# ifdef HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# elif defined HAVE_STRUCT_STAT64_ST_MTIME_NSEC # define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 -# undef st_atime_nsec -# define st_atime_nsec st_atim.tv_nsec -# undef st_ctime_nsec -# define st_ctime_nsec st_ctim.tv_nsec -# undef st_mtime_nsec -# define st_mtime_nsec st_mtim.tv_nsec -# endif /* HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC */ -# endif +# endif /* MPERS_IS_m32 || MPERS_IS_mx32 || HAVE_STRUCT_STAT64_ST_MTIME_NSEC */ +# else /* !STRUCT_STAT_IS_STAT64 */ +# if defined MPERS_IS_m32 +# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# ifdef HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# elif defined MPERS_IS_mx32 +# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# ifdef HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# endif /* MPERS_IS_m32 || MPERS_IS_mx32 */ +# endif /* STRUCT_STAT_IS_STAT64 */ # ifndef TEST_BOGUS_STRUCT_STAT # define TEST_BOGUS_STRUCT_STAT 1 -- 2.40.0