Content-Length: 255464 | pFad | http://github.com/postgrespro/postgres/commit/c290e79cf07f5784fd68e726177503a6805c28d6

C0 windows: msvc: Define STDIN/OUT/ERR_FILENO. · postgrespro/postgres@c290e79 · GitHub
Skip to content

Commit c290e79

Browse files
committed
windows: msvc: Define STDIN/OUT/ERR_FILENO.
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 76e38b3. Author: Andres Freund <andres@anarazel.de> Reported-By: Sandeep Thakkar <sandeep.thakkar@enterprisedb.com> Message-Id: 20220520164558.ozb7lm6unakqzezi@alap3.anarazel.de (on pgsql-packagers) Backpatch: 15-, where 76e38b3 came in
1 parent 0778eb7 commit c290e79

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/include/port/win32_msvc/unistd.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
/* src/include/port/win32_msvc/unistd.h */
2+
3+
/*
4+
* MSVC does not define these, nor does _fileno(stdin) etc reliably work
5+
* (returns -1 if stdin/out/err are closed).
6+
*/
7+
#define STDIN_FILENO 0
8+
#define STDOUT_FILENO 1
9+
#define STDERR_FILENO 2

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/c290e79cf07f5784fd68e726177503a6805c28d6

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy