# Checks for stat-related time functions.
-# Copyright (C) 1998, 1999, 2001, 2003, 2005, 2006 Free Software
+# Copyright (C) 1998, 1999, 2001, 2003, 2005, 2006, 2007 Free Software
# Foundation, Inc.
# This file is free software; the Free Software Foundation
[
AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec],
[AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec],
[AC_TRY_COMPILE(
[
#include <sys/types.h>
- #if TIME_WITH_SYS_TIME
+ #include <sys/stat.h>
+ #if HAVE_SYS_TIME_H
# include <sys/time.h>
- # include <time.h>
- #else
- # if HAVE_SYS_TIME_H
- # include <sys/time.h>
- # else
- # include <time.h>
- # endif
#endif
- #include <sys/stat.h>
+ #include <time.h>
struct timespec ts;
struct stat st;
],