* modules/select-tests (Depends-on): Add pipe-posix, unistd.
(configure.ac): Don't test for unistd.h.
* tests/test-select.c: Include <unistd.h> always. Use pipe() as
declared in <unistd.h>.
+2010-12-27 Bruno Haible <bruno@clisp.org>
+
+ select tests: Use existing modules.
+ * modules/select-tests (Depends-on): Add pipe-posix, unistd.
+ (configure.ac): Don't test for unistd.h.
+ * tests/test-select.c: Include <unistd.h> always. Use pipe() as
+ declared in <unistd.h>.
+
2010-12-27 Bruno Haible <bruno@clisp.org>
mbrtowc: Work around a Solaris 7 bug.
stdbool
netinet_in
arpa_inet
+unistd
sys_ioctl
extensions
inet_pton
errno
perror
+pipe-posix
socket
bind
setsockopt
gettimeofday
configure.ac:
-AC_CHECK_HEADERS_ONCE([unistd.h sys/wait.h])
+AC_CHECK_HEADERS_ONCE([sys/wait.h])
Makefile.am:
TESTS += test-select test-select-in.sh test-select-out.sh
#include <string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdbool.h>
# define WIN32_NATIVE
#endif
-#ifdef WIN32_NATIVE
-#include <io.h>
-#define pipe(x) _pipe(x, 256, O_BINARY)
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
+# include <sys/wait.h>
#endif
#ifndef SO_REUSEPORT
-#define SO_REUSEPORT SO_REUSEADDR
+# define SO_REUSEPORT SO_REUSEADDR
#endif
#define TEST_PORT 12345