X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=inline;f=tests%2Ftest-select.c;h=884e823394a3986af991d3062f0966cf6795cbe5;hb=c47e73f47733362996652ecbb683347920a183b6;hp=ec822501494036cbb4aa8712b81b3a7c6c8131f7;hpb=7525ec925e94b992c31824d266fee528cebc1d16;p=gnulib.git diff --git a/tests/test-select.c b/tests/test-select.c index ec8225014..884e82339 100644 --- a/tests/test-select.c +++ b/tests/test-select.c @@ -1,5 +1,5 @@ /* Test of select() substitute. - Copyright (C) 2008-2009 Free Software Foundation, Inc. + Copyright (C) 2008-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,24 @@ #include +#include "signature.h" +SIGNATURE_CHECK (select, int, (int, fd_set *, fd_set *, fd_set *, + struct timeval *)); +/* 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 @@ -51,7 +69,7 @@ enum { SEL_IN = 1, SEL_OUT = 2, SEL_EXC = 4 }; #define SO_REUSEPORT SO_REUSEADDR #endif -#define TEST_PORT 12345 +#define TEST_PORT 12345 /* Minimal testing infrastructure. */ @@ -84,7 +102,7 @@ test (void (*fn) (void), const char *msg) /* Funny socket code. */ static int -open_server_socket () +open_server_socket (void) { int s, x; struct sockaddr_in ia; @@ -355,7 +373,7 @@ test_pipe (void) /* Do them all. */ int -main () +main (void) { int result;