pgsql: windows: msvc: Define STDIN/OUT/ERR_FILENO.

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: windows: msvc: Define STDIN/OUT/ERR_FILENO.
Date: 2023-10-17 21:13:02
Message-ID: E1qsrN7-0013am-OY@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

windows: msvc: Define STDIN/OUT/ERR_FILENO.

This commit (c290e79cf0) was originally back-patched to v15.
Commit 97550c0711 added a new use of STDERR_FILENO, and it was
back-patched all the way to v11, thus breaking MSVC builds for v11
through v14. Since STDERR_FILENO is now needed on older versions,
let's back-patch c290e79cf0 down to v11, too.

Here follows the original commit message describing the change:

Because they are not available we've used _fileno(stdin) in some places, but
that doesn't reliably work, because stdin might be closed. This is the
prerequisite of the subsequent commit, fixing a failure introduced in
76e38b37a5.

Author: Andres Freund <andres(at)anarazel(dot)de>
Reported-By: Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com>
Message-Id: 20220520164558(dot)ozb7lm6unakqzezi(at)alap3(dot)anarazel(dot)de (on pgsql-packagers)
Discussion: https://postgr.es/m/20231017164517.GA613565%40nathanxps13
Backpatch-through: 11

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/555bc89c9060803d9812ad41765971d8b8a67363

Modified Files
--------------
src/include/port/win32_msvc/unistd.h | 8 ++++++++
1 file changed, 8 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2023-10-18 02:26:07 pgsql: Add flush option to pg_logical_emit_message()
Previous Message Tom Lane 2023-10-17 17:56:07 pgsql: Back-patch test cases for timetz_zone/timetz_izone.