Mercurial > hg > octave-shane > gnulib-hg
diff lib/same-inode.h @ 12069:1a57a12a6e7f
same-inode: revert prior change; it is not yet ready
This reverts commit b5eb8386645bf1bcfafa63c729ff9a86454def87.
* NEWS: Undo mention of this change.
* lib/same-inode.h (same-inode.h): Undo tri-state change.
* lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Update caller.
* lib/cycle-check.c (cycle_check): Likewise.
* lib/same.c (same_name): Likewise.
* lib/at-func2.c (at_func2): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Thu, 24 Sep 2009 05:51:28 -0600 |
parents | fbde8fb7f644 |
children | b5e42ef33b49 |
line wrap: on
line diff
--- a/lib/same-inode.h +++ b/lib/same-inode.h @@ -1,6 +1,6 @@ /* Determine whether two stat buffers refer to the same file. - Copyright (C) 2006, 2009 Free Software Foundation, Inc. + Copyright (C) 2006 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 @@ -18,18 +18,8 @@ #ifndef SAME_INODE_H # define SAME_INODE_H 1 -/* Perform a tri-state query on whether STAT_BUF_1 and STAT_BUF_2 - represent the same file. Return 1 for equal, 0 for distinct, and - -1 for indeterminate (the latter is generally possible only on - mingw). Algorithms that use this macro must be prepared to handle - the indeterminate case without wrong results. For example, if an - optimization is possible if two files are the same but unsafe if - distinct, use SAME_INODE()==1; whereas for an optimization that is - possible only for distinct files, use !SAME_INODE(). */ - # define SAME_INODE(Stat_buf_1, Stat_buf_2) \ - (((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \ - && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev) \ - ? 1 - 2 * !(Stat_buf_1).st_ino : 0) + ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \ + && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev) #endif