aboutsummaryrefslogtreecommitdiff
path: root/src/backend/libpq/pqcomm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/libpq/pqcomm.c')
-rw-r--r--src/backend/libpq/pqcomm.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index 75392a8bb7c..3ec4328613b 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -149,10 +149,8 @@ static void socket_putmessage_noblock(char msgtype, const char *s, size_t len);
static int internal_putbytes(const char *s, size_t len);
static int internal_flush(void);
-#ifdef HAVE_UNIX_SOCKETS
static int Lock_AF_UNIX(const char *unixSocketDir, const char *unixSocketPath);
static int Setup_AF_UNIX(const char *sock_path);
-#endif /* HAVE_UNIX_SOCKETS */
static const PQcommMethods PqCommSocketMethods = {
socket_comm_reset,
@@ -334,10 +332,7 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber,
struct addrinfo hint;
int listen_index = 0;
int added = 0;
-
-#ifdef HAVE_UNIX_SOCKETS
char unixSocketPath[MAXPGPATH];
-#endif
#if !defined(WIN32) || defined(IPV6_V6ONLY)
int one = 1;
#endif
@@ -348,7 +343,6 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber,
hint.ai_flags = AI_PASSIVE;
hint.ai_socktype = SOCK_STREAM;
-#ifdef HAVE_UNIX_SOCKETS
if (family == AF_UNIX)
{
/*
@@ -369,7 +363,6 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber,
service = unixSocketPath;
}
else
-#endif /* HAVE_UNIX_SOCKETS */
{
snprintf(portNumberStr, sizeof(portNumberStr), "%d", portNumber);
service = portNumberStr;
@@ -427,11 +420,9 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber,
familyDesc = _("IPv6");
break;
#endif
-#ifdef HAVE_UNIX_SOCKETS
case AF_UNIX:
familyDesc = _("Unix");
break;
-#endif
default:
snprintf(familyDescBuf, sizeof(familyDescBuf),
_("unrecognized address family %d"),
@@ -441,11 +432,9 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber,
}
/* set up text form of address for log messages */
-#ifdef HAVE_UNIX_SOCKETS
if (addr->ai_family == AF_UNIX)
addrDesc = unixSocketPath;
else
-#endif
{
pg_getnameinfo_all((const struct sockaddr_storage *) addr->ai_addr,
addr->ai_addrlen,
@@ -540,7 +529,6 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber,
continue;
}
-#ifdef HAVE_UNIX_SOCKETS
if (addr->ai_family == AF_UNIX)
{
if (Setup_AF_UNIX(service) != STATUS_OK)
@@ -549,7 +537,6 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber,
break;
}
}
-#endif
/*
* Select appropriate accept-queue length limit. PG_SOMAXCONN is only
@@ -572,13 +559,11 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber,
continue;
}
-#ifdef HAVE_UNIX_SOCKETS
if (addr->ai_family == AF_UNIX)
ereport(LOG,
(errmsg("listening on Unix socket \"%s\"",
addrDesc)));
else
-#endif
ereport(LOG,
/* translator: first %s is IPv4 or IPv6 */
(errmsg("listening on %s address \"%s\", port %d",
@@ -597,8 +582,6 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber,
}
-#ifdef HAVE_UNIX_SOCKETS
-
/*
* Lock_AF_UNIX -- configure unix socket file path
*/
@@ -699,7 +682,6 @@ Setup_AF_UNIX(const char *sock_path)
}
return STATUS_OK;
}
-#endif /* HAVE_UNIX_SOCKETS */
/*