[binutils-gdb] same-inode.h: don't depend on _GL_WINDOWS_STAT_INODES
Alan Modra
amodra@sourceware.org
Thu Feb 26 07:48:02 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=47071f8b14a0a0fdd9d79bef11535190cd089685
commit 47071f8b14a0a0fdd9d79bef11535190cd089685
Author: Alan Modra <amodra@gmail.com>
Date: Thu Feb 26 10:21:37 2026 +1030
same-inode.h: don't depend on _GL_WINDOWS_STAT_INODES
It looks like assuming _GL_WINDOWS_STAT_INODES is 1 is likely our best
option. See gnulib/m4/windows-stat-inodes.m4. Note that this doesn't
really make SAME_INODE usable on windows hosts as a number of the
likely filesystems (FAT, HPFS, or NTFS) don't support st_ino.
* same-inode.h (SAME_INODE <_WIN32>): Remove _GL_WINDOWS_STAT_INODES
test. Assume it is true.
Diff:
---
include/same-inode.h | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
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 \
More information about the Binutils-cvs
mailing list