From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Amit Kapila <amit.kapila16@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pgsql: Enable Unix-domain sockets support on Windows
Date: Sat, 27 Jun 2020 11:36:10 +0200
Message-ID: <88ae9594-6177-fa3c-0061-5bf8f8044b21@2ndquadrant.com> (raw)
In-Reply-To: <CAA4eK1KARhb46yDoSuDW6kM0U6efKqRwyMrnr1SMes=_+1jcWA@mail.gmail.com>
References: <E1jIC71-0000lT-0O@gemulon.postgresql.org>
<CAA4eK1KARhb46yDoSuDW6kM0U6efKqRwyMrnr1SMes=_+1jcWA@mail.gmail.com>
On 2020-06-26 14:21, Amit Kapila wrote:
> On Sat, Mar 28, 2020 at 7:37 PM Peter Eisentraut <peter@eisentraut.org> wrote:
>>
>> Enable Unix-domain sockets support on Windows
>>
>
> +
> +/*
> + * Windows headers don't define this structure, but you can define it yourself
> + * to use the functionality.
> + */
> +struct sockaddr_un
> +{
> + unsigned short sun_family;
> + char sun_path[108];
> +};
>
> I was going through this feature and reading about Windows support for
> it. I came across a few links which suggest that this structure is
> defined in <afunix.h>. Is there a reason for not using this via
> afunix.h?
>
> [1] - https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/
> [2] - https://gist.github.com/NZSmartie/079d8f894ee94f3035306cb23d49addc
If we did it that way we'd have to write some kind of configuration-time
check for the MSVC build, since not all Windows versions have that
header. Also, not all versions of MinGW have that header (possibly
none). So the current implementation is probably the most practical
compromise.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, amit.kapila16@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Enable Unix-domain sockets support on Windows
In-Reply-To: <88ae9594-6177-fa3c-0061-5bf8f8044b21@2ndquadrant.com>
References: <E1jIC71-0000lT-0O@gemulon.postgresql.org> <CAA4eK1KARhb46yDoSuDW6kM0U6efKqRwyMrnr1SMes=_+1jcWA@mail.gmail.com> <88ae9594-6177-fa3c-0061-5bf8f8044b21@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox