same-inode.h don't depend on _GL_WINDOWS_STAT_INODES
Alan Modra
amodra@gmail.com
Mon Feb 23 11:26:47 GMT 2026
On Mon, Feb 23, 2026 at 08:40:24PM +1030, Alan Modra wrote:
> BTW, I think our include/same-inode.h is broken since it uses a gnulib
> macro _GL_WINDOWS_STAT_INODES.
It looks like assuming _GL_WINDOWS_STAT_INODES is 1 (which gnulib sets
via configure from WINDOWS_STAT_INODES) is likely our best option.
diff --git a/include/same-inode.h b/include/same-inode.h
index a1d94c4cbf5..9d9049843d1 100644
--- a/include/same-inode.h
+++ b/include/same-inode.h
@@ -28,16 +28,11 @@
&& (a).st_dev == (b).st_dev)
# elif defined _WIN32 && ! defined __CYGWIN__
/* Native Windows. */
-# if _GL_WINDOWS_STAT_INODES
- /* stat() and fstat() set st_dev and st_ino to 0 if information about
- the inode is not available. */
-# define SAME_INODE(a, b) \
- (!((a).st_ino == 0 && (a).st_dev == 0) \
- && (a).st_ino == (b).st_ino && (a).st_dev == (b).st_dev)
-# else
- /* stat() and fstat() set st_ino to 0 always. */
-# define SAME_INODE(a, b) 0
-# endif
+ /* stat() and fstat() set st_dev and st_ino to 0 if information about
+ the inode is not available. */
+# define SAME_INODE(a, b) \
+ (!((a).st_ino == 0 && (a).st_dev == 0) \
+ && (a).st_ino == (b).st_ino && (a).st_dev == (b).st_dev)
# else
# define SAME_INODE(a, b) \
((a).st_ino == (b).st_ino \
--
Alan Modra
More information about the Binutils
mailing list