From a5fb2dbd8a9bc17541250a7e6093a5d115d8b745 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 7 Aug 2019 15:44:19 +0200 Subject: [PATCH v2 4/7] 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 ec456725dd..ac4fc8a6fc 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -1058,10 +1058,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 { @@ -1569,7 +1567,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]; @@ -1586,7 +1583,6 @@ connectFailureMessage(PGconn *conn, int errorno) service); } else -#endif /* HAVE_UNIX_SOCKETS */ { char host_addr[NI_MAXHOST]; const char *displayed_host; @@ -2676,8 +2672,6 @@ PQconnectPoll(PGconn *conn) char *startpacket; int packetlen; -#ifdef HAVE_UNIX_SOCKETS - /* * Implement requirepeer check, if requested and it's a * Unix-domain socket. @@ -2736,7 +2730,6 @@ PQconnectPoll(PGconn *conn) } #endif /* WIN32 */ } -#endif /* HAVE_UNIX_SOCKETS */ if (IS_AF_UNIX(conn->raddr.addr.ss_family)) { -- 2.22.0