Mercurial > hg > octave-lyh > gnulib-hg
changeset 5871:8b95519c71b9
* lib/chown.c (rpl_chown): Return -1 on failure.
* m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs of -1.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Fri, 20 May 2005 20:57:40 +0000 |
parents | 0e974fb1c99e |
children | fab6701e5cb2 |
files | lib/ChangeLog lib/chown.c m4/ChangeLog m4/chown.m4 |
diffstat | 4 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2005-05-20 Eric Blake <ebb9@byu.net> (tiny change) + + * chown.c (rpl_chown): Return -1 on failure. + 2005-05-18 Paul Eggert <eggert@cs.ucla.edu> * canonicalize.c: Include canonicalize.h first, to test interface.
--- a/lib/chown.c +++ b/lib/chown.c @@ -1,6 +1,6 @@ /* provide consistent interface to chown for systems that don't interpret an ID of -1 as meaning `don't change the corresponding ID'. - Copyright (C) 1997, 2004 Free Software Foundation, Inc. + Copyright (C) 1997, 2004, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -53,7 +53,7 @@ /* Stat file to get id(s) that should remain unchanged. */ if (stat (file, &file_stats)) - return 1; + return -1; if (gid == (gid_t) -1) gid = file_stats.st_gid;
--- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,8 @@ +2005-05-20 Eric Blake <ebb9@byu.net> (tiny change) + + * chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs + of -1. + 2005-05-18 Paul Eggert <eggert@cs.ucla.edu> * canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
--- a/m4/chown.m4 +++ b/m4/chown.m4 @@ -1,4 +1,4 @@ -#serial 12 +#serial 13 # Determine whether we need the chown wrapper. dnl Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free @@ -20,7 +20,7 @@ AC_REQUIRE([AC_FUNC_CHOWN]) AC_REQUIRE([gl_FUNC_CHOWN_FOLLOWS_SYMLINK]) - if test $ac_cv_func_chown_works = yes; then + if test $ac_cv_func_chown_works = no; then AC_DEFINE(CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE, 1, [Define if chown is not POSIX compliant regarding IDs of -1.]) fi