]> granicus.if.org Git - strace/commitdiff
tests: drop non-USE_ASM_STAT case support
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 13 Jan 2017 20:07:09 +0000 (20:07 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 13 Jan 2017 20:07:09 +0000 (20:07 +0000)
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
tests/fstatat.c
tests/fstatx.c
tests/lstatx.c
tests/xstatx.c

index 8fc35a8cbf312f490edc7546d7f30b0b814dbfc9..793d74ef87245e240fadfbe2b13be13d3883458f 100644 (file)
@@ -304,8 +304,6 @@ AC_CHECK_MEMBERS([struct stat.st_mtime_nsec, struct stat64.st_mtime_nsec],,,
 [#include <sys/types.h>
 #include <asm/stat.h>])
 
-AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec])
-
 AC_CHECK_TYPES(m4_normalize([
        struct pt_all_user_regs,
        struct ia64_fpreg,
index 3981b4ecbc7b9e2645e13f2c30b3b6da6103ed47..66138c25eb0b740f2f88f678847cd22a24c1bb0a 100644 (file)
@@ -38,8 +38,6 @@
                printf(", AT_SYMLINK_NOFOLLOW) = %s\n", sprintrc(rc)); \
        } while (0)
 
-# define USE_ASM_STAT
-
 # include "xstatx.c"
 
 #else
index 174f29fb4e9a20f99ef1767675c5567b11b6af34..f88d9a9c39b474173c0140515da917b3f18b63d8 100644 (file)
@@ -37,6 +37,4 @@
                printf(") = %s\n", sprintrc(rc)); \
        } while (0)
 
-#define USE_ASM_STAT
-
 #include "xstatx.c"
index a3ff843637306b1245678ae6438db1bd1ebdb497..cdd1124b68009bceff8e3d7400a61cd500c332e6 100644 (file)
@@ -36,6 +36,4 @@
                printf(") = %s\n", sprintrc(rc)); \
        } while (0)
 
-#define USE_ASM_STAT
-
 #include "xstatx.c"
index 53381066dc4d65e971ed495809959f6b1cfba2af..0d5fca87b8b761029a67339321552510049999fd 100644 (file)
@@ -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 <fcntl.h>
 # include <sys/stat.h>
-# 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