pcp
[Top] [All Lists]

Re: [pcp] Protecting AF_UNIX Code

To: Nathan Scott <nathans@xxxxxxxxxx>
Subject: Re: [pcp] Protecting AF_UNIX Code
From: Dave Brolley <brolley@xxxxxxxxxx>
Date: Tue, 11 Jun 2013 11:07:15 -0400
Cc: PCP <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <219290143.22611866.1370905690066.JavaMail.root@xxxxxxxxxx>
References: <51B6332A.90404@xxxxxxxxxx> <219290143.22611866.1370905690066.JavaMail.root@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6
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. So the header #include should be protected by HAVE_SYS_UN_H and the use of socket(AF_UNIX, ...) should be protected by HAVE_AF_UNIX. "Someone" (i.e. me) was a bit lazy on the latter and went with a pre-existing platform check macro (IS_MINGW) rather than adding a new configure macro. We should fix it by adding HAVE_AF_UNIX and make use of that in the body of the code IMO. Also the error message in that library code you mentioned should not refer to Windows explicitly, rather it should say ..., "__pmdaOpenUnix: Not supported on this platform"). cheers. -- Nathan
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.

Dave

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