@@ -23,27 +23,13 @@ else
CFLAGS="$CFLAGS -O"
fi
-AC_HEADER_DIRENT
-m4_warn([obsolete],
-[Update your code to rely only on HAVE_SYS_TIME_H,
-then remove this warning and the obsolete code below it.
-All current systems provide time.h; it need not be checked for.
-Not all systems provide sys/time.h, but those that do, all allow
-you to include it and time.h simultaneously.])dnl
-AC_CHECK_HEADERS_ONCE([sys/time.h])
-# Obsolete code to be removed.
-if test $ac_cv_header_sys_time_h = yes; then
- AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
- and <time.h>. This macro is obsolete.])
-fi
-# End of obsolete code.
-
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(ctype.h strings.h stdlib.h string.h sys/vfs.h sys/statvfs.h stdint.h)
AC_CHECK_HEADERS(sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.h)
AC_CHECK_HEADERS(sys/mount.h)
+AC_CHECK_HEADERS([sys/time.h])
AC_CHECK_FUNCS(fdatasync)
# Check if we have libattr
@@ -27,7 +27,18 @@
#include <ctype.h>
#include <dirent.h>
#include <sys/stat.h>
-#include <sys/time.h>
+
+#ifdef TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/socket.h>
autoconf complains about the deprecated use of including just sys/time.h. Fix this. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> --- configure.ac | 16 +--------------- dbench.h | 13 ++++++++++++- 2 files changed, 13 insertions(+), 16 deletions(-)