This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Win32: add lstat(), fetch st_dev and st_ino and fetch st_nlink for fstat
authorTony Cook <tony@develop-help.com>
Tue, 6 Oct 2020 06:07:00 +0000 (17:07 +1100)
committerTony Cook <tony@develop-help.com>
Tue, 1 Dec 2020 04:29:33 +0000 (15:29 +1100)
commit92b3a3ebc05e3ce0e84a1ccff46487ca2200b471
treefbeb49a61e3dca1e48e9382b4e316b430628623a
parentc1ec4bdd803f587dd2ae76548bca0ae59d0fe84b
Win32: add lstat(), fetch st_dev and st_ino and fetch st_nlink for fstat

We need lstat() for various modules to work well with symlinks,
and the same modules often want to check for matches on the device
and inode number.

The values we're using for st_ino match those that the Python and Rust
libraries use, and Go uses the same volume and file index values for
testing if two stat objects refer to the same file.

They aren't entirely unique, given ReFS uses 128-bit file ids, but
the API used to check for this (GetFileInformationByHandleEx() for
FileIdInfo) is only available on server operating systems, so I can't
directly test it anyway.
12 files changed:
MANIFEST
dosish.h
t/op/stat.t
t/win32/stat.t [new file with mode: 0644]
win32/config.gc
win32/config.vc
win32/config_H.gc
win32/config_H.vc
win32/perlhost.h
win32/win32.c
win32/win32.h
win32/win32iop.h