From 793bac547a136024a987bf30d26020fc6699ba6b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 30 Mar 2003 16:20:41 +0000 Subject: [PATCH] Portability to Woe32. --- lib/ChangeLog | 5 +++++ lib/copy-file.c | 2 ++ m4/ChangeLog | 4 ++++ m4/copy-file.m4 | 4 ++-- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 57dc361bf..0cee503f6 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2003-03-30 Bruno Haible + + * copy-file.c (copy_file_preserving): Don't set owner if the function + chown() doesn't exist. + 2003-03-28 Bruno Haible * copy-file.h: New file, from GNU gettext. diff --git a/lib/copy-file.c b/lib/copy-file.c index a03047b58..7de2ca63d 100644 --- a/lib/copy-file.c +++ b/lib/copy-file.c @@ -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); diff --git a/m4/ChangeLog b/m4/ChangeLog index 2ad1e1969..9e9029542 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,7 @@ +2003-03-30 Bruno Haible + + * copy-file.m4 (gl_COPY_FILE): Add check for chown(). + 2003-03-28 Bruno Haible * copy-file.m4: New file. diff --git a/m4/copy-file.m4 b/m4/copy-file.m4 index 8bc15360d..97e648a9d 100644 --- a/m4/copy-file.m4 +++ b/m4/copy-file.m4 @@ -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) ]) -- 2.11.0