aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-04-21 14:48:29 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-04-21 14:48:29 -0400
commit536d47bd9d5fce8d91929bee3128fa1d08dbcc57 (patch)
tree9b02a04527e66667a701c65241ff5673a8c6ce3a
parentdcb39c37c1d3b90115e1501af8efb7af59c341c3 (diff)
downloadpostgresql-536d47bd9d5fce8d91929bee3128fa1d08dbcc57.tar.gz
postgresql-536d47bd9d5fce8d91929bee3128fa1d08dbcc57.zip
Remove long-obsolete catering for platforms without F_SETFD/FD_CLOEXEC.
SUSv2 mandates that <fcntl.h> provide both F_SETFD and FD_CLOEXEC, so it seems pretty unlikely that any platforms remain without those. Remove the #ifdef-ery installed by commit 7627b91cd to see if the buildfarm agrees. Discussion: https://postgr.es/m/21444.1492798101@sss.pgh.pa.us
-rw-r--r--src/interfaces/libpq/fe-connect.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index bf4c27c6e23..1b7175d9ef9 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -74,10 +74,6 @@ static int ldapServiceLookup(const char *purl, PQconninfoOption *options,
#include "common/ip.h"
#include "mb/pg_wchar.h"
-#ifndef FD_CLOEXEC
-#define FD_CLOEXEC 1
-#endif
-
#ifndef WIN32
#define PGPASSFILE ".pgpass"
@@ -1987,7 +1983,6 @@ keep_going: /* We will come back to here until there is
continue;
}
-#ifdef F_SETFD
if (fcntl(conn->sock, F_SETFD, FD_CLOEXEC) == -1)
{
appendPQExpBuffer(&conn->errorMessage,
@@ -1997,7 +1992,6 @@ keep_going: /* We will come back to here until there is
conn->addr_cur = addr_cur->ai_next;
continue;
}
-#endif /* F_SETFD */
if (!IS_AF_UNIX(addr_cur->ai_family))
{