Re: Cleaning up historical portability baggage

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cleaning up historical portability baggage
Date: 2022-08-12 07:15:55
Message-ID: 81bb50ca-d0ea-8cb2-7453-a5058a7b49a8@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11.08.22 12:02, Thomas Munro wrote:
> * The concept of a no-Unix-socket build is removed. We should be
> able to do that now, right? Peter E seemed to say approximately that
> in the commit message for 797129e5. Or is there a thought that a new
> operating system might show up that doesn't have 'em and we'd wish
> we'd kept this stuff well marked out?

Most uses of HAVE_UNIX_SOCKETS are not useful independent of that
question. For example, you patch has

@@ -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)
{
/*

But on a platform without support for Unix sockets, family just won't be
AF_UNIX at run time, so there is no need to hide that if branch.

Note that we already require that AF_UNIX is defined on all platforms,
even if the kernel doesn't support Unix sockets.

But maybe it would be better to make that a separate patch from the
sys/un.h configure changes, just so there is more clarity around it.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2022-08-12 07:31:40 Re: Expand palloc/pg_malloc API
Previous Message John Naylor 2022-08-12 07:12:15 Re: Cleaning up historical portability baggage