Portability to Woe32.
authorBruno Haible <bruno@clisp.org>
Sun, 30 Mar 2003 16:20:41 +0000 (16:20 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 30 Mar 2003 16:20:41 +0000 (16:20 +0000)
lib/ChangeLog
lib/copy-file.c
m4/ChangeLog
m4/copy-file.m4

index 57dc361..0cee503 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-30  Bruno Haible  <bruno@clisp.org>
+
+       * copy-file.c (copy_file_preserving): Don't set owner if the function
+       chown() doesn't exist.
+
 2003-03-28  Bruno Haible  <bruno@clisp.org>
 
        * copy-file.h: New file, from GNU gettext.
index a03047b..7de2ca6 100644 (file)
@@ -108,8 +108,10 @@ copy_file_preserving (const char *src_filename, const char *dest_filename)
   }
 #endif
 
+#if HAVE_CHOWN
   /* Preserve the owner and group.  */
   chown (dest_filename, statbuf.st_uid, statbuf.st_gid);
+#endif
 
   /* Preserve the access permissions.  */
   chmod (dest_filename, mode);
index 2ad1e19..9e90295 100644 (file)
@@ -1,3 +1,7 @@
+2003-03-30  Bruno Haible  <bruno@clisp.org>
+
+       * copy-file.m4 (gl_COPY_FILE): Add check for chown().
+
 2003-03-28  Bruno Haible  <bruno@clisp.org>
 
        * copy-file.m4: New file.
index 8bc1536..97e648a 100644 (file)
@@ -1,4 +1,4 @@
-# copy-file.m4 serial 1
+# copy-file.m4 serial 2
 dnl Copyright (C) 2003 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
@@ -9,5 +9,5 @@ dnl the same distribution terms as the rest of that program.
 AC_DEFUN([gl_COPY_FILE],
 [
   AC_CHECK_HEADERS_ONCE(unistd.h utime.h)
-  AC_CHECK_FUNCS(utime utimes)
+  AC_CHECK_FUNCS(chown utime utimes)
 ])