Do not check for struct stat.st_{a,c}time_nsec

Assume that the check for struct stat.st_mtime_nsec is enough.
Likewise, do not check for struct stat.st_{a,c}tim.tv_nsec.

* configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_atime_nsec,
struct stat.st_ctime_nsec, struct stat.st_atim.tv_nsec,
and struct stat.st_ctim.tv_nsec.
* file.c (HAVE_STRUCT_STAT_ST_ATIME_NSEC,
HAVE_STRUCT_STAT_ST_CTIME_NSEC): Remove.
* printstat.h (HAVE_STRUCT_STAT_ST_ATIME_NSEC,
HAVE_STRUCT_STAT_ST_CTIME_NSEC): Replace with
HAVE_STRUCT_STAT_ST_MTIME_NSEC.
* tests/xstatx.c: Likewise.
diff --git a/configure.ac b/configure.ac
index bbd4110..59a6ec2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -325,6 +325,12 @@
 [#include <sys/types.h>
 #include <asm/stat.h>])
 
+AC_CHECK_MEMBERS([struct stat.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,
@@ -340,24 +346,11 @@
 [#include <sys/types.h>
 #include <linux/fcntl.h>])
 
-AC_CHECK_MEMBERS(m4_normalize([
-	struct stat.st_atim.tv_nsec,
-	struct stat.st_ctim.tv_nsec,
-	struct stat.st_mtim.tv_nsec
-]))
-
 AC_CHECK_MEMBERS([struct timex.tai],,, [#include <sys/timex.h>])
 
 AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include <sys/utsname.h>])
 
 AC_CHECK_MEMBERS(m4_normalize([
-	struct stat.st_atime_nsec,
-	struct stat.st_ctime_nsec,
-	struct stat.st_mtime_nsec
-]),,, [#include <sys/types.h>
-#include <asm/stat.h>])
-
-AC_CHECK_MEMBERS(m4_normalize([
 	siginfo_t.si_syscall,
 	siginfo_t.si_timerid,
 	siginfo_t.si_overrun
diff --git a/file.c b/file.c
index 40f6406..30c2c23 100644
--- a/file.c
+++ b/file.c
@@ -88,10 +88,6 @@
 #include "printstat.h"
 
 /* all locally defined structures provide these fields */
-#undef HAVE_STRUCT_STAT_ST_ATIME_NSEC
-#define HAVE_STRUCT_STAT_ST_ATIME_NSEC 1
-#undef HAVE_STRUCT_STAT_ST_CTIME_NSEC
-#define HAVE_STRUCT_STAT_ST_CTIME_NSEC 1
 #undef HAVE_STRUCT_STAT_ST_MTIME_NSEC
 #define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1
 
diff --git a/printstat.h b/printstat.h
index 5786b61..f643fd0 100644
--- a/printstat.h
+++ b/printstat.h
@@ -88,7 +88,7 @@
 		tprints(", st_atime=");
 		tprints(sprinttime(cast ? (time_t) (int) statbuf->st_atime:
 					  (time_t) statbuf->st_atime));
-#ifdef HAVE_STRUCT_STAT_ST_ATIME_NSEC
+#ifdef HAVE_STRUCT_STAT_ST_MTIME_NSEC
 		if (statbuf->st_atime_nsec)
 			tprintf(".%09lu", (unsigned long) statbuf->st_atime_nsec);
 #endif
@@ -102,7 +102,7 @@
 		tprints(", st_ctime=");
 		tprints(sprinttime(cast ? (time_t) (int) statbuf->st_ctime:
 					  (time_t) statbuf->st_ctime));
-#ifdef HAVE_STRUCT_STAT_ST_CTIME_NSEC
+#ifdef HAVE_STRUCT_STAT_ST_MTIME_NSEC
 		if (statbuf->st_ctime_nsec)
 			tprintf(".%09lu", (unsigned long) statbuf->st_ctime_nsec);
 #endif
diff --git a/tests/xstatx.c b/tests/xstatx.c
index f23d0cd..76b0ffb 100644
--- a/tests/xstatx.c
+++ b/tests/xstatx.c
@@ -119,32 +119,20 @@
 #  define uid_t __kernel_uid_t
 #  include "asm_stat.h"
 #  if STRUCT_STAT_IS_STAT64
-#   undef HAVE_STRUCT_STAT_ST_ATIME_NSEC
-#   define HAVE_STRUCT_STAT_ST_ATIME_NSEC 1
-#   undef HAVE_STRUCT_STAT_ST_CTIME_NSEC
-#   define HAVE_STRUCT_STAT_ST_CTIME_NSEC 1
 #   undef HAVE_STRUCT_STAT_ST_MTIME_NSEC
 #   define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1
 #  endif /* STRUCT_STAT_IS_STAT64 */
-# else
-#  undef HAVE_STRUCT_STAT_ST_ATIME_NSEC
-#  ifdef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
-#   define HAVE_STRUCT_STAT_ST_ATIME_NSEC 1
-#   undef st_atime_nsec
-#   define st_atime_nsec st_atim.tv_nsec
-#  endif
+# else /* !USE_ASM_STAT */
 #  undef HAVE_STRUCT_STAT_ST_MTIME_NSEC
 #  ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
 #   define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1
-#   undef st_mtime_nsec
-#   define st_mtime_nsec st_mtim.tv_nsec
-#  endif
-#  undef HAVE_STRUCT_STAT_ST_CTIME_NSEC
-#  ifdef HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC
-#   define HAVE_STRUCT_STAT_ST_CTIME_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
-#  endif
+#   undef st_mtime_nsec
+#   define st_mtime_nsec st_mtim.tv_nsec
+#  endif /* HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC */
 # endif
 
 static void
@@ -197,7 +185,7 @@
 
 	printf(", st_atime=");
 	print_time(st->st_atime);
-# ifdef HAVE_STRUCT_STAT_ST_ATIME_NSEC
+# ifdef HAVE_STRUCT_STAT_ST_MTIME_NSEC
 	if (st->st_atime_nsec)
 		printf(".%09lu", (unsigned long) st->st_atime_nsec);
 # endif
@@ -209,7 +197,7 @@
 # endif
 	printf(", st_ctime=");
 	print_time(st->st_ctime);
-# ifdef HAVE_STRUCT_STAT_ST_CTIME_NSEC
+# ifdef HAVE_STRUCT_STAT_ST_MTIME_NSEC
 	if (st->st_ctime_nsec)
 		printf(".%09lu", (unsigned long) st->st_ctime_nsec);
 # endif