forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfc4e5af
committed
Fix get_dirent_type() for symlinks on MinGW/MSYS.
On Windows with MSVC, get_dirent_type() was recently made to returnDT_LNK for junction points by commit9d3444d, which fixed somedefective 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 symlinksthat behave like POSIX (on closer inspection, Cygwin's dirent has theBSD d_type extension but it's probably always DT_UNKNOWN, so we fallback to lstat(), which understands Cygwin symlinks with S_ISLNK()).On Windows with MinGW/MSYS, we need extra code, because the MinGWruntime has its own readdir() without d_type, and the lstat()-basedfallback has no knowledge of our convention for treating junctions assymlinks.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.net1 parent1d01d19 commitfc4e5af
1 file changed
+16
-0
lines changedLines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
465 | 465 |
| |
466 | 466 |
| |
467 | 467 |
| |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
468 | 484 |
| |
469 | 485 |
|
0 commit comments
Comments
(0)