Commit 536d47bd authored by Tom Lane's avatar Tom Lane

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 7627b91c to see if the
buildfarm agrees.

Discussion: https://postgr.es/m/21444.1492798101@sss.pgh.pa.us
parent dcb39c37
...@@ -74,10 +74,6 @@ static int ldapServiceLookup(const char *purl, PQconninfoOption *options, ...@@ -74,10 +74,6 @@ static int ldapServiceLookup(const char *purl, PQconninfoOption *options,
#include "common/ip.h" #include "common/ip.h"
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
#ifndef FD_CLOEXEC
#define FD_CLOEXEC 1
#endif
#ifndef WIN32 #ifndef WIN32
#define PGPASSFILE ".pgpass" #define PGPASSFILE ".pgpass"
...@@ -1987,7 +1983,6 @@ keep_going: /* We will come back to here until there is ...@@ -1987,7 +1983,6 @@ keep_going: /* We will come back to here until there is
continue; continue;
} }
#ifdef F_SETFD
if (fcntl(conn->sock, F_SETFD, FD_CLOEXEC) == -1) if (fcntl(conn->sock, F_SETFD, FD_CLOEXEC) == -1)
{ {
appendPQExpBuffer(&conn->errorMessage, appendPQExpBuffer(&conn->errorMessage,
...@@ -1997,7 +1992,6 @@ keep_going: /* We will come back to here until there is ...@@ -1997,7 +1992,6 @@ keep_going: /* We will come back to here until there is
conn->addr_cur = addr_cur->ai_next; conn->addr_cur = addr_cur->ai_next;
continue; continue;
} }
#endif /* F_SETFD */
if (!IS_AF_UNIX(addr_cur->ai_family)) if (!IS_AF_UNIX(addr_cur->ai_family))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment