@ -409,7 +409,7 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber,
for ( addr = addrs ; addr ; addr = addr - > ai_next )
{
if ( ! IS_AF_UNIX ( family ) & & IS_AF_UNIX ( addr - > ai_family ) )
if ( family ! = AF_UNIX & & addr - > ai_family = = AF_UNIX )
{
/*
* Only set up a unix domain socket when they really asked for it .
@ -494,7 +494,7 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber,
* unpredictable behavior . With no flags at all , win32 behaves as Unix
* with SO_REUSEADDR .
*/
if ( ! IS_AF_UNIX ( addr - > ai_family ) )
if ( addr - > ai_family ! = AF_UNIX )
{
if ( ( setsockopt ( fd , SOL_SOCKET , SO_REUSEADDR ,
( char * ) & one , sizeof ( one ) ) ) = = - 1 )
@ -546,7 +546,7 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber,
errmsg ( " could not bind %s address \" %s \" : %m " ,
familyDesc , addrDesc ) ,
saved_errno = = EADDRINUSE ?
( IS_AF_UNIX ( addr - > ai_family ) ?
( addr - > ai_family = = AF_UNIX ?
errhint ( " Is another postmaster already running on port %d? " ,
( int ) portNumber ) :
errhint ( " Is another postmaster already running on port %d? "
@ -764,7 +764,7 @@ StreamConnection(pgsocket server_fd, Port *port)
}
/* select NODELAY and KEEPALIVE options if it's a TCP connection */
if ( ! IS_AF_UNIX ( port - > laddr . addr . ss_family ) )
if ( port - > laddr . addr . ss_family ! = AF_UNIX )
{
int on ;
# ifdef WIN32
@ -1639,7 +1639,7 @@ int
pq_getkeepalivesidle ( Port * port )
{
# if defined(PG_TCP_KEEPALIVE_IDLE) || defined(SIO_KEEPALIVE_VALS)
if ( port = = NULL | | IS_AF_UNIX ( port - > laddr . addr . ss_family ) )
if ( port = = NULL | | port - > laddr . addr . ss_family = = AF_UNIX )
return 0 ;
if ( port - > keepalives_idle ! = 0 )
@ -1673,7 +1673,7 @@ pq_getkeepalivesidle(Port *port)
int
pq_setkeepalivesidle ( int idle , Port * port )
{
if ( port = = NULL | | IS_AF_UNIX ( port - > laddr . addr . ss_family ) )
if ( port = = NULL | | port - > laddr . addr . ss_family = = AF_UNIX )
return STATUS_OK ;
/* check SIO_KEEPALIVE_VALS here, not just WIN32, as some toolchains lack it */
@ -1724,7 +1724,7 @@ int
pq_getkeepalivesinterval ( Port * port )
{
# if defined(TCP_KEEPINTVL) || defined(SIO_KEEPALIVE_VALS)
if ( port = = NULL | | IS_AF_UNIX ( port - > laddr . addr . ss_family ) )
if ( port = = NULL | | port - > laddr . addr . ss_family = = AF_UNIX )
return 0 ;
if ( port - > keepalives_interval ! = 0 )
@ -1758,7 +1758,7 @@ pq_getkeepalivesinterval(Port *port)
int
pq_setkeepalivesinterval ( int interval , Port * port )
{
if ( port = = NULL | | IS_AF_UNIX ( port - > laddr . addr . ss_family ) )
if ( port = = NULL | | port - > laddr . addr . ss_family = = AF_UNIX )
return STATUS_OK ;
# if defined(TCP_KEEPINTVL) || defined(SIO_KEEPALIVE_VALS)
@ -1808,7 +1808,7 @@ int
pq_getkeepalivescount ( Port * port )
{
# ifdef TCP_KEEPCNT
if ( port = = NULL | | IS_AF_UNIX ( port - > laddr . addr . ss_family ) )
if ( port = = NULL | | port - > laddr . addr . ss_family = = AF_UNIX )
return 0 ;
if ( port - > keepalives_count ! = 0 )
@ -1837,7 +1837,7 @@ pq_getkeepalivescount(Port *port)
int
pq_setkeepalivescount ( int count , Port * port )
{
if ( port = = NULL | | IS_AF_UNIX ( port - > laddr . addr . ss_family ) )
if ( port = = NULL | | port - > laddr . addr . ss_family = = AF_UNIX )
return STATUS_OK ;
# ifdef TCP_KEEPCNT
@ -1883,7 +1883,7 @@ int
pq_gettcpusertimeout ( Port * port )
{
# ifdef TCP_USER_TIMEOUT
if ( port = = NULL | | IS_AF_UNIX ( port - > laddr . addr . ss_family ) )
if ( port = = NULL | | port - > laddr . addr . ss_family = = AF_UNIX )
return 0 ;
if ( port - > tcp_user_timeout ! = 0 )
@ -1912,7 +1912,7 @@ pq_gettcpusertimeout(Port *port)
int
pq_settcpusertimeout ( int timeout , Port * port )
{
if ( port = = NULL | | IS_AF_UNIX ( port - > laddr . addr . ss_family ) )
if ( port = = NULL | | port - > laddr . addr . ss_family = = AF_UNIX )
return STATUS_OK ;
# ifdef TCP_USER_TIMEOUT