]> Savannah Git Hosting - gnulib.git/commitdiff
Make use of module 'utime-h'.
authorBruno Haible <bruno@clisp.org>
Sat, 29 Apr 2017 22:03:50 +0000 (00:03 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 30 Apr 2017 08:25:02 +0000 (10:25 +0200)
* 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.

ChangeLog
lib/copy-file.c
lib/utimens.c
m4/copy-file.m4
modules/copy-file
modules/utimens

index fad9adf6cbcdc44714768aa5423989e358c268c0..8110195182df295f96ffaac2fc1aab39282bfd1a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+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.
index f906dfa4fc294cb90293bca712dd3cf8d781feaf..b3f02a759cdf9dcfc23136ed263ddcdde3aabd01 100644 (file)
 #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"
index 3643668c3a549327a9cfe41ccbe6836939fdeb66..5c6e4046f739560aff3c9cfdd9dde90ff4f1b9f3 100644 (file)
 #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
index 892e32b278ca507c2eeb3f08ded286e2c07ab8ed..4b5db8a9eee847c996599b830f135bee3d2fe34d 100644 (file)
@@ -1,4 +1,4 @@
-# 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,
@@ -6,6 +6,6 @@ dnl with or without modifications, as long as this notice is preserved.
 
 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])
 ])
index d59f216e27a54f459cce7caecc2949245a169945..7238f55f6e9b0d23c2faf8469f11587a28013412 100644 (file)
@@ -19,6 +19,7 @@ quote
 safe-read
 stdlib
 unistd
+utime-h
 xalloc
 
 configure.ac:
index f92503420451a9d929d4e4a54a9cf40522080843..b43872eb8f0d1e38b01ee5467a78a9aad7b0881e 100644 (file)
@@ -20,6 +20,7 @@ stdbool
 sys_stat
 sys_time
 time
+utime-h
 
 configure.ac:
 gl_UTIMENS