mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
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.
This commit is contained in:
parent
19a2e3b4d6
commit
47071f8b14
1 changed files with 5 additions and 10 deletions
|
|
@ -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 \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue