GNU bug report logs -
#25814
Windows same_file macro is not reliable
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On 02/20/2017 10:01 AM, Kees Dekker wrote:
> Hi,
>
> On file systems that do not support inodes (e.g. NTFS,
NTFS supports inodes; Cygwin uses them. Just because Window's native
stat() is broken does not mean NTFS is broken.
> because not everything is POSIX), the same_file() macro (in system.h) is incorrect as st_ino (and probably st_dev) are meaningless.
Rather, instead of ignoring inode, it would be nicer (but indeed a more
complex task) to have gnulib work around window's broken stat() to
provide a version that works instead. It only matters for file systems
that support hard links (like NTFS); on file systems like FAT that lack
hard links, hard-coding that inodes don't work is okay, but on NTFS
where hard-links are supported, treating same_file() as always returning
0 gives wrong results.
At any rate, this is an issue that needs to be resolved in gnulib, as
more than just diffutils is affected by it.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 8 years and 116 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.