1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-14 14:01:48 +03:00
Commit Graph

5 Commits

Author SHA1 Message Date
Eric Blake
5a9e46ab46 passfd: fix test regression on Linux
* modules/passfd-tests (configure.ac): Correct socketpair check.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-04-21 14:53:49 -06:00
Eric Blake
06d76f63c6 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>
2011-04-21 14:35:06 -06:00
Eric Blake
f607f2cd9d passfd: fix incorrect sendmsg arguments
The unit test hung on NetBSD, which pointed out a couple of bugs.

* lib/passfd.c (sendfd): Avoid uninitialized msg_flags field, and
incorrect msg_controllen value.
* modules/passfd-tests (Depends-on): Check for alarm.
* tests/test-passfd.c (main) [HAVE_DECL_ALARM]: Avoid hanging test.
Reported by Bastien ROUCARIES.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-03-30 17:48:24 -06:00
Bruno Haible
50f69b558c passfd: Fix link error on Solaris.
* modules/passfd (Description): Correct.
(Depends-on): Add socketlib.
(Link): New section.
* modules/passfd-tests (Makefile.am): Link test-passfd with LIBSOCKET.
2011-03-14 00:04:20 +01:00
Bastien Roucariès
52cbcffe0a passfd module, part 4.
* modules/passfd-tests: New file.
* tests/test-passfd.c: New file.
2011-03-13 19:52:34 +01:00