pcp
[Top] [All Lists]

Re: [pcp] Protecting AF_UNIX Code

To: Dave Brolley <brolley@xxxxxxxxxx>
Subject: Re: [pcp] Protecting AF_UNIX Code
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Tue, 11 Jun 2013 19:46:20 -0400 (EDT)
Cc: PCP <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <51B73D23.5000109@xxxxxxxxxx>
References: <51B6332A.90404@xxxxxxxxxx> <219290143.22611866.1370905690066.JavaMail.root@xxxxxxxxxx> <51B73D23.5000109@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: HsN8GsA7FXPkhJl1Fh0h36gvaOstrQ==
Thread-topic: Protecting AF_UNIX Code
Hi Dave,

----- Original Message -----
> On 06/10/2013 07:08 PM, Nathan Scott wrote:
> > Strictly speaking the macro being used to protect conditional code
> > compilation should match up with the thing it is protecting.   ...
> 
> I want to argue that the presence of the header implies the presence of
> the macro, but I don't know if that's actually true.

As discussed on IRC, MinGW headers define AF_UNIX for some inexplicable
reason which complicates things yet further.  I've pushed in a change to
add HAVE_STRUCT_SOCKADDR_UN which appears to be an unambiguous, portable
test we can use.

Also, as mentioned on IRC, even on the Unix variants AF_UNIX is defined
in sys/socket.h and not sys/un.h ... heh, what a twisty maze.

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>