0003-psql-Remove-one-use-of-HAVE_UNIX_SOCKETS.patch
text/plain
Filename: 0003-psql-Remove-one-use-of-HAVE_UNIX_SOCKETS.patch
Type: text/plain
Part: 2
Patch
Format: format-patch
Series: patch 0003
Subject: psql: Remove one use of HAVE_UNIX_SOCKETS
| File | + | − |
|---|---|---|
| src/bin/psql/prompt.c | 0 | 7 |
From 6ab2c7c3adffe4a9e86068e8d05bd1f332a44368 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Wed, 7 Aug 2019 15:44:19 +0200
Subject: [PATCH 3/5] psql: Remove one use of HAVE_UNIX_SOCKETS
This use was not protecting any unportable code, it was just omitting
the code because it wouldn't be used. Remove the use to reduce code
complexity a bit.
---
src/bin/psql/prompt.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/bin/psql/prompt.c b/src/bin/psql/prompt.c
index 59afbc793a..0d6c1a5364 100644
--- a/src/bin/psql/prompt.c
+++ b/src/bin/psql/prompt.c
@@ -12,11 +12,6 @@
#include <win32.h>
#endif
-#ifdef HAVE_UNIX_SOCKETS
-#include <unistd.h>
-#include <netdb.h>
-#endif
-
#include "common.h"
#include "input.h"
#include "prompt.h"
@@ -138,7 +133,6 @@ get_prompt(promptStatus_t status, ConditionalStack cstack)
if (*p == 'm')
buf[strcspn(buf, ".")] = '\0';
}
-#ifdef HAVE_UNIX_SOCKETS
/* UNIX socket */
else
{
@@ -149,7 +143,6 @@ get_prompt(promptStatus_t status, ConditionalStack cstack)
else
snprintf(buf, sizeof(buf), "[local:%s]", host);
}
-#endif
}
break;
/* DB server port number */
--
2.22.0