Re: pgsql: Remove IS_AF_UNIX macro

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Remove IS_AF_UNIX macro
Date: 2022-02-15 15:41:44
Message-ID: 3047303.1644939704@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Peter Eisentraut <peter(at)eisentraut(dot)org> writes:
> Remove IS_AF_UNIX macro
> The AF_UNIX macro was being used unprotected by HAVE_UNIX_SOCKETS,
> apparently since 2008.

I hadn't looked closely at this patch, but are you referring to
this bit in ip.h?

#ifdef HAVE_UNIX_SOCKETS
#define IS_AF_UNIX(fam) ((fam) == AF_UNIX)
#else
#define IS_AF_UNIX(fam) (0)
#endif

That's by no means "unprotected": we will not try to reference
AF_UNIX unless HAVE_UNIX_SOCKETS is set. I think this change
will fail to break because we set HAVE_UNIX_SOCKETS everywhere,
but I believe it was a mistake. We might as well just nuke
all the HAVE_UNIX_SOCKETS conditional compilation if we let
this stand.

(Now, maybe we should indeed do that. I don't have much
interest in the possibility that we'll worry about such
platforms in future.)

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2022-02-15 15:52:30 Re: pgsql: Remove IS_AF_UNIX macro
Previous Message Joe Conway 2022-02-15 15:39:34 Re: pgsql: Move scanint8() to numutils.c