Provide lstat() for Windows.
authorThomas Munro <tmunro@postgresql.org>
Sat, 6 Aug 2022 00:00:57 +0000 (12:00 +1200)
committerAndrew Dunstan <andrew@dunslane.net>
Thu, 7 Nov 2024 23:06:27 +0000 (09:36 +1030)
commit895f23d9e174897a9c1a71a2c6cdb439fe5a3101
tree7c7400fc06e8888267a2924262e2dc9555f6e801
parent02a4ec478df8a4724b84d76f84e49248da204f95
Provide lstat() for Windows.

Junction points will be reported with S_ISLNK(x.st_mode), simulating
POSIX lstat().  stat() will follow pseudo-symlinks, like in POSIX (but
only one level before giving up, unlike in POSIX).

This completes a TODO left by commit bed90759fcb.

Tested-by: Andrew Dunstan <andrew@dunslane.net> (earlier version)
Discussion: https://postgr.es/m/CA%2BhUKGLfOOeyZpm5ByVcAt7x5Pn-%3DxGRNCvgiUPVVzjFLtnY0w%40mail.gmail.com
(cherry picked from commit c5cb8f3b770c043509b61528664bcd805e1777e6)

Author: Thomas Munro <tmunro@postgresql.org>
Author: Alexandra Wang <alexandra.wang.oss@gmail.com>
src/include/port/win32_port.h
src/port/win32stat.c