0004-libpq-Remove-unnecessary-uses-of-HAVE_UNIX_SOCKETS.patch
text/plain
Filename: 0004-libpq-Remove-unnecessary-uses-of-HAVE_UNIX_SOCKETS.patch
Type: text/plain
Part: 3
Patch
Format: format-patch
Series: patch 0004
Subject: libpq: Remove unnecessary uses of HAVE_UNIX_SOCKETS
| File | + | − |
|---|---|---|
| src/interfaces/libpq/fe-connect.c | 0 | 7 |
From 202758ed27915d0d4e1d430e24578d13f6a2412a Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Wed, 7 Aug 2019 15:44:19 +0200
Subject: [PATCH 4/5] libpq: Remove unnecessary uses of HAVE_UNIX_SOCKETS
These are not protecting any unportable code and they were not used
consistently anyway (other code uses IS_AF_UNIX without
HAVE_UNIX_SOCKETS).
---
src/interfaces/libpq/fe-connect.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index b4fa7a259f..a2c1c3002b 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -1057,10 +1057,8 @@ connectOptions2(PGconn *conn)
else if (ch->host != NULL && ch->host[0] != '\0')
{
ch->type = CHT_HOST_NAME;
-#ifdef HAVE_UNIX_SOCKETS
if (is_absolute_path(ch->host))
ch->type = CHT_UNIX_SOCKET;
-#endif
}
else
{
@@ -1568,7 +1566,6 @@ connectFailureMessage(PGconn *conn, int errorno)
{
char sebuf[PG_STRERROR_R_BUFLEN];
-#ifdef HAVE_UNIX_SOCKETS
if (IS_AF_UNIX(conn->raddr.addr.ss_family))
{
char service[NI_MAXHOST];
@@ -1585,7 +1582,6 @@ connectFailureMessage(PGconn *conn, int errorno)
service);
}
else
-#endif /* HAVE_UNIX_SOCKETS */
{
char host_addr[NI_MAXHOST];
const char *displayed_host;
@@ -2675,8 +2671,6 @@ PQconnectPoll(PGconn *conn)
char *startpacket;
int packetlen;
-#ifdef HAVE_UNIX_SOCKETS
-
/*
* Implement requirepeer check, if requested and it's a
* Unix-domain socket.
@@ -2735,7 +2729,6 @@ PQconnectPoll(PGconn *conn)
}
#endif /* WIN32 */
}
-#endif /* HAVE_UNIX_SOCKETS */
if (IS_AF_UNIX(conn->raddr.addr.ss_family))
{
--
2.22.0