* modules/copy-file (Depends-on): Add utime-h.
* lib/copy-file.c: Assume that <utime.h> exists.
* m4/copy-file.m4 (gl_COPY_FILE): Don't test for <utime.h>.
* modules/utimens (Depends-on): Add utime-h.
* lib/utimens.c: Assume that <utime.h> exists.
+2017-04-29 Bruno Haible <bruno@clisp.org>
+
+ Make use of module 'utime-h'.
+ * modules/copy-file (Depends-on): Add utime-h.
+ * lib/copy-file.c: Assume that <utime.h> exists.
+ * m4/copy-file.m4 (gl_COPY_FILE): Don't test for <utime.h>.
+
+ * modules/utimens (Depends-on): Add utime-h.
+ * lib/utimens.c: Assume that <utime.h> exists.
+
2017-04-29 Bruno Haible <bruno@clisp.org>
utime-h: New module.
#include <unistd.h>
#if HAVE_UTIME || HAVE_UTIMES
-# if HAVE_UTIME_H
-# include <utime.h>
-# else
-# include <sys/utime.h>
-# endif
+# include <utime.h>
#endif
#include "error.h"
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
+#include <utime.h>
#include "stat-time.h"
#include "timespec.h"
-#if HAVE_UTIME_H
-# include <utime.h>
-#endif
-
/* Some systems (even some that do have <utime.h>) don't declare this
structure anywhere. */
#ifndef HAVE_STRUCT_UTIMBUF
-# copy-file.m4 serial 3
+# copy-file.m4 serial 4
dnl Copyright (C) 2003, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_DEFUN([gl_COPY_FILE],
[
- AC_CHECK_HEADERS_ONCE([unistd.h utime.h])
+ AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CHECK_FUNCS([chown utime utimes])
])
safe-read
stdlib
unistd
+utime-h
xalloc
configure.ac:
sys_stat
sys_time
time
+utime-h
configure.ac:
gl_UTIMENS