From c40a9f2f5a7513839f33eac98a362e3f4fd58f5b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 27 Dec 2010 18:51:03 +0100 Subject: [PATCH] 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 always. Use pipe() as declared in . --- ChangeLog | 8 ++++++++ modules/select-tests | 4 +++- tests/test-select.c | 12 +++--------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7aef83f680..cd12d7002a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-12-27 Bruno Haible + + 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 always. Use pipe() as + declared in . + 2010-12-27 Bruno Haible mbrtowc: Work around a Solaris 7 bug. diff --git a/modules/select-tests b/modules/select-tests index 566e4d9595..52e34523d8 100644 --- a/modules/select-tests +++ b/modules/select-tests @@ -11,11 +11,13 @@ Depends-on: stdbool netinet_in arpa_inet +unistd sys_ioctl extensions inet_pton errno perror +pipe-posix socket bind setsockopt @@ -27,7 +29,7 @@ close 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 diff --git a/tests/test-select.c b/tests/test-select.c index b9b3f844b7..bc5c1a9365 100644 --- a/tests/test-select.c +++ b/tests/test-select.c @@ -42,6 +42,7 @@ SIGNATURE_CHECK (FD_ZERO, void, (fd_set *)); #include #include #include +#include #include #include #include @@ -56,19 +57,12 @@ enum { SEL_IN = 1, SEL_OUT = 2, SEL_EXC = 4 }; # define WIN32_NATIVE #endif -#ifdef WIN32_NATIVE -#include -#define pipe(x) _pipe(x, 256, O_BINARY) -#endif -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_SYS_WAIT_H -#include +# include #endif #ifndef SO_REUSEPORT -#define SO_REUSEPORT SO_REUSEADDR +# define SO_REUSEPORT SO_REUSEADDR #endif #define TEST_PORT 12345 -- 2.30.2