Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 78514 invoked by uid 500); 29 Apr 2000 17:32:49 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 78503 invoked from network); 29 Apr 2000 17:32:47 -0000 Date: Sat, 29 Apr 2000 11:32:46 -0600 (MDT) From: Marc Slemko To: TLOSAP Subject: ap_select on BSDI 4.x Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N In mpmt_pthread, ap_select gets expanded to something like: select((int )( 0 ), ((fd_set *) )( 0 ), ((fd_set *) )( 0 ), ((fd_set *) )( 0 ), ((const struct timeval *) )( &tv )) ; Which is pretty bogus, ie. "((fd_set *))". Unfortunately, the autoconf mess is... well... pretty scary. For whatever reason, SELECT_NEEDS_CAST is being set, and I'm not sure why. And somehow autoconf is picking out a type that is (fd_set *), so then adding extra ()s makes it choke. But it doesn't do that for other things, like the first argument. Hmm. That looks bogus: ------------------------------------------------------------ configure:2009: checking types of arguments for select() configure:2042: gcc -c -g -O2 -D_REENTRANT conftest.c 1>&5 configure:2036: conflicting types for `select' /usr/include/sys/select.h:125: previous declaration of `select' configure: failed program was: #line 2023 "configure" #include "confdefs.h" #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_TIME_H #include #endif #ifdef HAVE_SYS_SELECT_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include #endif extern select (int,fd_set *,fd_set *,fd_set *,struct timeval *); int main() { ; return 0; } ------------------------------------------------------------ ...but BSD/OS uses: int select __P((int, fd_set *, fd_set *, fd_set *, const struct timeval *)); note the const. That's silly. So there are two questions here. What to do to make configure work right and not define SELECT_NEEDS_CAST, and why the extra ()s are included. The second may just be a side-effect that doesn't matter, or it could indicate a different problem. It looks like we have our own local random checks in configure.in for arguments to select() that aren't working. Obviously, we could just add a -o ... const sturct timeval * there, but there may be other systems that do something else slightly differently. Can't configure handle doing things by itself? Hmm. Looking further, for whatever reason configure does: #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234) So it puts ()s around ac_cv_func_select_arg234 but not 1!?! What's up with that? (BTW, annoying to need GNU make. At the very least, should check for it... and nicely give up)