From: Paul Eggert Date: Fri, 20 May 2005 20:57:40 +0000 (+0000) Subject: * lib/chown.c (rpl_chown): Return -1 on failure. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b00e860d80d31318069eafaa67c920f24deae638;p=pspp * lib/chown.c (rpl_chown): Return -1 on failure. * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs of -1. --- diff --git a/lib/ChangeLog b/lib/ChangeLog index c6a02a7d35..6c53548f70 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2005-05-20 Eric Blake (tiny change) + + * chown.c (rpl_chown): Return -1 on failure. + 2005-05-18 Paul Eggert * canonicalize.c: Include canonicalize.h first, to test interface. diff --git a/lib/chown.c b/lib/chown.c index 22272bd169..ae6a504a79 100644 --- 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 @@ rpl_chown (const char *file, uid_t uid, gid_t gid) /* 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; diff --git a/m4/ChangeLog b/m4/ChangeLog index ae47ec8218..2d5c8d6a4c 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,8 @@ +2005-05-20 Eric Blake (tiny change) + + * chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs + of -1. + 2005-05-18 Paul Eggert * canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]): diff --git a/m4/chown.m4 b/m4/chown.m4 index 2660633d74..ccdfae9926 100644 --- 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_DEFUN([gl_FUNC_CHOWN], 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