diff options
author | Bruno Haible <bruno@clisp.org> | 2011-07-23 03:24:19 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-07-23 03:24:19 +0200 |
commit | a515e805ed703ceafa32c3ecfd0d37d962d752de (patch) | |
tree | 31c98152e379772689fd75c4e732142589db84bc /tests | |
parent | 7c185762352d51e025e086a787bb2671a350d6ad (diff) | |
download | gnulib-a515e805ed703ceafa32c3ecfd0d37d962d752de.tar.gz |
sys_select tests: Check the signature of FD_*.
* tests/test-select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): Move
signature tests from here...
* tests/test-sys_select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): ... to
here.
* modules/sys_select-tests (Files): Add tests/signature.h.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-select.c | 15 | ||||
-rw-r--r-- | tests/test-sys_select.c | 17 |
2 files changed, 17 insertions, 15 deletions
diff --git a/tests/test-select.c b/tests/test-select.c index 9e927f81d6..47d775919e 100644 --- a/tests/test-select.c +++ b/tests/test-select.c @@ -31,21 +31,6 @@ SIGNATURE_CHECK (select, int, (int, fd_set *, fd_set *, fd_set *, struct timeval *)); #endif -/* The following may be macros without underlying functions, so only - check signature if they are not macros. */ -#ifndef FD_CLR -SIGNATURE_CHECK (FD_CLR, void, (int, fd_set *)); -#endif -#ifndef FD_ISSET -SIGNATURE_CHECK (FD_ISSET, void, (int, fd_set *)); -#endif -#ifndef FD_SET -SIGNATURE_CHECK (FD_SET, int, (int, fd_set *)); -#endif -#ifndef FD_ZERO -SIGNATURE_CHECK (FD_ZERO, void, (fd_set *)); -#endif - #include <stdio.h> #include <string.h> #include <netinet/in.h> diff --git a/tests/test-sys_select.c b/tests/test-sys_select.c index 619a570727..76596dba30 100644 --- a/tests/test-sys_select.c +++ b/tests/test-sys_select.c @@ -20,6 +20,23 @@ #include <sys/select.h> +#include "signature.h" + +/* The following may be macros without underlying functions, so only + check signature if they are not macros. */ +#ifndef FD_CLR +SIGNATURE_CHECK (FD_CLR, void, (int, fd_set *)); +#endif +#ifndef FD_ISSET +SIGNATURE_CHECK (FD_ISSET, void, (int, fd_set *)); +#endif +#ifndef FD_SET +SIGNATURE_CHECK (FD_SET, int, (int, fd_set *)); +#endif +#ifndef FD_ZERO +SIGNATURE_CHECK (FD_ZERO, void, (fd_set *)); +#endif + /* Check that the 'struct timeval' type is defined. */ struct timeval t1; |