diff options
author | Andy Wingo <wingo@pobox.com> | 2011-06-16 23:43:44 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-06-16 23:43:44 +0200 |
commit | a67f2fce5456caf8e63dacb110b8e15600bb1c9f (patch) | |
tree | 37621f85a908cc29cce79ac69044254b9fe4a512 /lib/same-inode.h | |
parent | 7505c6e024369f2ef381512cbc4a790cc6503428 (diff) | |
download | guile-a67f2fce5456caf8e63dacb110b8e15600bb1c9f.tar.gz |
add `rename' gnulib module
This should fix `rename' on mingw32.
Diffstat (limited to 'lib/same-inode.h')
-rw-r--r-- | lib/same-inode.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/same-inode.h b/lib/same-inode.h new file mode 100644 index 000000000..e89cb539a --- /dev/null +++ b/lib/same-inode.h @@ -0,0 +1,25 @@ +/* Determine whether two stat buffers refer to the same file. + + Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef SAME_INODE_H +# define SAME_INODE_H 1 + +# 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) + +#endif |