Eric Blake wrote:
>    struct msghdr msg;
> -# if HAVE_UNIXSOCKET_SCM_RIGHTS_BSD44_WAY
> +# ifdef CMSG_FIRSTHDR
>    struct cmsghdr *cmsg;

So that we don't forget which code applies to which platforms, let me add
some comments:


2011-04-30  Bruno Haible  <br...@clisp.org>

        passfd: Add comments.
        * lib/passfd.c: Add comments about platforms.

--- lib/passfd.c.orig   Sat Apr 30 14:04:08 2011
+++ lib/passfd.c        Sat Apr 30 14:03:10 2011
@@ -30,6 +30,12 @@
 
 #include "cloexec.h"
 
+/* The code that uses CMSG_FIRSTHDR is enabled on
+   Linux, MacOS X, FreeBSD, OpenBSD, NetBSD, AIX, OSF/1, Cygwin.
+   The code that uses HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS is enabled on
+   HP-UX, IRIX, Solaris.  */
+
+/* MSG_CMSG_CLOEXEC is defined only on Linux, as of 2011.  */
 #ifndef MSG_CMSG_CLOEXEC
 # define MSG_CMSG_CLOEXEC 0
 #endif

-- 
In memoriam Casey Jones <http://en.wikipedia.org/wiki/Casey_Jones>

Reply via email to