aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/pg_dump/parallel.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/bin/pg_dump/parallel.c b/src/bin/pg_dump/parallel.c
index 4b38ed6c5a9..a967e113782 100644
--- a/src/bin/pg_dump/parallel.c
+++ b/src/bin/pg_dump/parallel.c
@@ -130,7 +130,7 @@ typedef struct
/* Windows implementation of pipe access */
static int pgpipe(int handles[2]);
-static int piperead(int s, char *buf, int len);
+#define piperead(a,b,c) recv(a,b,c,0)
#define pipewrite(a,b,c) send(a,b,c,0)
#else /* !WIN32 */
@@ -1817,25 +1817,4 @@ pgpipe(int handles[2])
return 0;
}
-/*
- * Windows implementation of reading from a pipe.
- */
-static int
-piperead(int s, char *buf, int len)
-{
- int ret = recv(s, buf, len, 0);
-
- if (ret < 0)
- {
- switch (TranslateSocketError())
- {
- case ALL_CONNECTION_FAILURE_ERRNOS:
- /* Treat connection loss as EOF on the pipe */
- ret = 0;
- break;
- }
- }
- return ret;
-}
-
#endif /* WIN32 */