forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit58651d8
committed
Fix compatibility thinko for fstat() on standard streams in win32stat.c
GetFinalPathNameByHandleA() cannot be used in compilation environmentswhere _WIN32_WINNT < 0x0600, meaning at least Windows XP used by somebuildfarm members under MinGW that Postgres still needs to support.This was reported as a compilation warning by the buildfarm, but this isactually worse than the report as the code would have not worked.Instead, this switches to GetFileInformationByHandle() that is able tofail for standard streams and succeed for redirected ones, which is whatwe are looking for herein the code emulating fstat(). We also know thatit is able to work in all the environments still supported, thanks tothe existing logic of win32stat.c.Issue introduced by10260c7, so backpatch down to 14.Reported-by: Justin Pryzby, via buildfarm member jacanaAuthor: Michael PaquierReviewed-by: Juan José Santamaría FlechaDiscussion:https://postgr.es/m/20211129050122.GK17618@telsasoft.comBackpatch-through: 141 parent4f8d9d1 commit58651d8
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
289 | 289 |
| |
290 | 290 |
| |
291 | 291 |
| |
292 |
| - | |
| 292 | + | |
293 | 293 |
| |
294 | 294 |
| |
295 | 295 |
| |
| |||
306 | 306 |
| |
307 | 307 |
| |
308 | 308 |
| |
309 |
| - | |
| 309 | + | |
310 | 310 |
| |
311 | 311 |
| |
312 | 312 |
| |
|
0 commit comments
Comments
(0)