diff options
author | Thomas Munro <tmunro@postgresql.org> | 2022-07-28 14:13:37 +1200 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2022-07-28 14:27:06 +1200 |
commit | 5ad478c9d95657948fd818ac7e97a28eea3c3433 (patch) | |
tree | 9c8c004dd6a1bbfb5c0add86c40e711acd67579c /src/backend/utils/adt/arrayfuncs.c | |
parent | 961cab0a5a90d449a64a71912b324d7e7548619b (diff) | |
download | postgresql-5ad478c9d95657948fd818ac7e97a28eea3c3433.tar.gz postgresql-5ad478c9d95657948fd818ac7e97a28eea3c3433.zip |
Fix get_dirent_type() for symlinks on MinGW/MSYS.
On Windows with MSVC, get_dirent_type() was recently made to return
DT_LNK for junction points by commit 9d3444dc, which fixed some
defective dirent.c code.
On Windows with Cygwin, get_dirent_type() already worked for symlinks,
as it does on POSIX systems, because Cygwin has its own fake symlinks
that behave like POSIX (on closer inspection, Cygwin's dirent has the
BSD d_type extension but it's probably always DT_UNKNOWN, so we fall
back to lstat(), which understands Cygwin symlinks with S_ISLNK()).
On Windows with MinGW/MSYS, we need extra code, because the MinGW
runtime has its own readdir() without d_type, and the lstat()-based
fallback has no knowledge of our convention for treating junctions as
symlinks.
Back-patch to 14, where get_dirent_type() landed.
Reported-by: Andrew Dunstan <andrew@dunslane.net>
Discussion: https://postgr.es/m/b9ddf605-6b36-f90d-7c30-7b3e95c46276%40dunslane.net
Diffstat (limited to 'src/backend/utils/adt/arrayfuncs.c')
0 files changed, 0 insertions, 0 deletions