* lib/chown.c (rpl_chown): Return -1 on failure.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 20 May 2005 20:57:40 +0000 (20:57 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 20 May 2005 20:57:40 +0000 (20:57 +0000)
* m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs of -1.

lib/ChangeLog
lib/chown.c
m4/ChangeLog
m4/chown.m4

index c6a02a7d3557f4d54658292d2c80c7592027f707..6c53548f706454c45dc275716b4fd6f9d93ba66d 100644 (file)
@@ -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.
index 22272bd169958a17659f39a38305ac2629143d8a..ae6a504a79d7add8fec8ae1746ba7037f673d58c 100644 (file)
@@ -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;
index ae47ec8218b584e31040a303c3b92987483d64e6..2d5c8d6a4c91d863f3c1708ecd3939d8190e82fe 100644 (file)
@@ -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]):
index 2660633d74f356b05c15ba2071d3588690a33747..ccdfae9926df8ceb8b50f218baa92d1c188227c2 100644 (file)
@@ -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