From: Bruno Haible Date: Sat, 23 Jul 2011 01:24:19 +0000 (+0200) Subject: sys_select tests: Check the signature of FD_*. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a515e805ed703ceafa32c3ecfd0d37d962d752de;p=pspp 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. --- diff --git a/ChangeLog b/ChangeLog index 3e941fe571..137a9fb7bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-07-22 Bruno Haible + + 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. + 2011-07-22 Paul Eggert largefile: new module, replacing large-inode diff --git a/modules/sys_select-tests b/modules/sys_select-tests index 3d92499e6b..a8127b23fe 100644 --- a/modules/sys_select-tests +++ b/modules/sys_select-tests @@ -1,5 +1,6 @@ Files: tests/test-sys_select.c +tests/signature.h Depends-on: sys_select-c++-tests 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 #include #include 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 +#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;