summaryrefslogtreecommitdiff
path: root/win32/perlhost.h
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2020-10-06 17:07:00 +1100
committerTony Cook <tony@develop-help.com>2020-12-01 15:29:33 +1100
commit92b3a3ebc05e3ce0e84a1ccff46487ca2200b471 (patch)
treefbeb49a61e3dca1e48e9382b4e316b430628623a /win32/perlhost.h
parentc1ec4bdd803f587dd2ae76548bca0ae59d0fe84b (diff)
downloadperl-92b3a3ebc05e3ce0e84a1ccff46487ca2200b471.tar.gz
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.
Diffstat (limited to 'win32/perlhost.h')
-rw-r--r--win32/perlhost.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h
index f5ffca04e4..d00240f26f 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -995,7 +995,7 @@ PerlLIOLseek(struct IPerlLIO* piPerl, int handle, Off_t offset, int origin)
int
PerlLIOLstat(struct IPerlLIO* piPerl, const char *path, Stat_t *buffer)
{
- return win32_stat(path, buffer);
+ return win32_lstat(path, buffer);
}
char*