From: Ryan Bloom Date: Thu, 22 Jun 2000 22:49:50 +0000 (+0000) Subject: Remove select checks from Apache config. These checks were used to define X-Git-Tag: APACHE_2_0_ALPHA_5~262 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6878409552352002135731455494c302fd010ac9;p=apache Remove select checks from Apache config. These checks were used to define ap_select in ap_config.h. The only file that used ap_select() was prefork.c. I have modified prefork.c to use select instead of ap_select. In the future, this should be modified to use ap_poll like the rest of the Unix MPMs. There are other MPMs that are continuing to use select, but this too should change in time. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85663 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/configure.in b/configure.in index 31f1cbf479..96287af49b 100644 --- a/configure.in +++ b/configure.in @@ -106,17 +106,6 @@ APACHE_INADDR_NONE APACHE_EBCDIC -AC_FUNC_SELECT_ARGTYPES - -dnl Check if we'll actually need to cast select args all the time -if test "$ac_cv_func_select_arg1" != "int" \ - -o "$ac_cv_func_select_arg234" != "fd_set *" \ - -o "$ac_cv_func_select_arg5" != "struct timeval *" ; then - - AC_DEFINE(SELECT_NEEDS_CAST,, - [Define if arguments to select() aren't what we expect]) -fi - AC_ARG_WITH(optim,[ --with-optim="FLAGS" compiler optimisation flags], [OPTIM="$withval"]) diff --git a/include/ap_config.h b/include/ap_config.h index 8899cd1fbc..8943acf569 100644 --- a/include/ap_config.h +++ b/include/ap_config.h @@ -103,16 +103,6 @@ /* ap_ versions of ctype macros to make sure they deal with 8-bit chars */ #include "ap_ctype.h" -/* XXX - This probably doesn't handle OS/2 */ -#ifdef SELECT_NEEDS_CAST -#define ap_select(_a, _b, _c, _d, _e) \ - select((SELECT_TYPE_ARG1)(_a), (SELECT_TYPE_ARG234)(_b), \ - (SELECT_TYPE_ARG234)(_c), (SELECT_TYPE_ARG234)(_d), \ - (SELECT_TYPE_ARG5)(_e)) -#else -#define ap_select(_a, _b, _c, _d, _e) select(_a, _b, _c, _d, _e) -#endif - #ifdef SIGWAIT_TAKES_ONE_ARG #define ap_sigwait(a,b) ((*(b)=sigwait((a)))<0?-1:0) #else diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index ea761dbdf9..d27be5b0e1 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -834,7 +834,7 @@ static void child_main(int child_num_arg) if (ap_listeners->next) { /* more than one socket */ memcpy(&main_fds, &listenfds, sizeof(fd_set)); - srv = ap_select(listenmaxfd + 1, &main_fds, NULL, NULL, NULL); + srv = select(listenmaxfd + 1, &main_fds, NULL, NULL, NULL); if (srv < 0 && errno != EINTR) { /* Single Unix documents select as returning errnos