# HG changeset patch # User Bruno Haible # Date 1293472263 -3600 # Node ID a184cac42a3542b895b32ad1e3900329ddad6511 # Parent 1a75c9206d288a261ae9e01c54e06277c5f33eac 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 . diff --git a/ChangeLog b/ChangeLog --- 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 --- a/modules/select-tests +++ b/modules/select-tests @@ -11,11 +11,13 @@ stdbool netinet_in arpa_inet +unistd sys_ioctl extensions inet_pton errno perror +pipe-posix socket bind setsockopt @@ -27,7 +29,7 @@ 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 --- a/tests/test-select.c +++ b/tests/test-select.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -56,19 +57,12 @@ # 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