diff options
author | Eric Blake <eblake@redhat.com> | 2011-04-21 07:16:20 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2011-04-21 14:35:06 -0600 |
commit | 06d76f63c628cb1653f3c27a1f60a46cf44665ba (patch) | |
tree | d1a58524825f832abe9a8ea5326a2aa70f666e13 /m4 | |
parent | 753425d56eedab92c361cae9d6baa701d893fbc9 (diff) | |
download | gnulib-06d76f63c628cb1653f3c27a1f60a46cf44665ba.tar.gz |
passfd: allow compilation on mingw
The passfd module now skips on mingw, rather than failing to compile.
It may be nice to add a sendmsg and recvmsg module in the future,
but for now passfd is the only client that cares.
* modules/sys_socket (Depends-on): Add sys_uio.
* lib/sys_socket.in.h [!@HAVE_SYS_SOCKET_H@]: Use it for struct
iovec and a minimal struct msghdr.
* tests/test-sys_socket.c (main): Enhance test.
* m4/afunix.m4 (gl_SOCKET_AFUNIX): Detect recvmsg/sendmsg.
* lib/passfd.c (include): Drop <sys/uio.h>; <sys/sockets.h> is
guaranteed to provide what we need.
(sendmsg, recvmsg): Declare fallbacks if we lack sendmsg.
* modules/passfd-tests (Depends-on): Add sys_wait.
* tests/test-passfd.c (main): Skip test on mingw, for now.
* doc/posix-headers/sys_socket.texi (sys/socket.h): Document the
partial 'struct msghdr' implementation.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/afunix.m4 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/m4/afunix.m4 b/m4/afunix.m4 index 13f758316d..3f5eb447d6 100644 --- a/m4/afunix.m4 +++ b/m4/afunix.m4 @@ -1,4 +1,4 @@ -# afunix.m4 serial 6 +# afunix.m4 serial 7 dnl Copyright (C) 2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -8,6 +8,7 @@ AC_DEFUN([gl_SOCKET_AFUNIX], [ AC_REQUIRE([gl_HEADER_SYS_SOCKET]) AC_REQUIRE([gl_SOCKET_FAMILY_UNIX]) + AC_CHECK_FUNCS_ONCE([recvmsg sendmsg]) AC_MSG_CHECKING([for UNIX domain sockets SCM_RIGHTS]) AC_CACHE_VAL([gl_cv_socket_unix_scm_rights], |