From: Bruno Haible Date: Mon, 27 Dec 2010 17:51:03 +0000 (+0100) Subject: select tests: Use existing modules. X-Git-Tag: v0.1~3444 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=c40a9f2f5a7513839f33eac98a362e3f4fd58f5b;p=gnulib.git 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 index 7aef83f68..cd12d7002 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 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. * m4/mbrtowc.m4 (gl_MBRTOWC_NULL_ARG1): New macro. (gl_MBRTOWC_NULL_ARG2): Renamed from gl_MBRTOWC_NULL_ARG. diff --git a/modules/select-tests b/modules/select-tests index 566e4d959..52e34523d 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 b9b3f844b..bc5c1a936 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