Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 85442 invoked by uid 500); 21 Jun 2000 23:40:45 -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 85370 invoked from network); 21 Jun 2000 23:40:40 -0000 X-Authentication-Warning: koj.rkbloom.net: rbb owned process doing -bs Date: Wed, 21 Jun 2000 16:40:15 -0700 (PDT) From: rbb@covalent.net X-Sender: rbb@koj.rkbloom.net To: new-httpd@apache.org, "Victor J. Orlikowski" Subject: Re: [PATCH] Compiler warning + 64-bit AIX cleanup in dexter mpm In-Reply-To: <001701bfdba9$7f3ca4e0$a0e21b09@raleigh.ibm.com> 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 Couldn't this entire patch be avoided by just defining ap_os_sock_t to be a long on 64-bit AIX? Or, are you saying that file descriptors have different sizes in difference cases on 64-bit AIX. I hate to change this code just because AIX has a broken implementation. Single Unix defines pollfd.fd to be an int. It makes little sense to me for it to be a long, but I guess AIX developers just like to make life difficult. :-( Having looked at the AIX API, it looks like they are overloading the poll API to allow the first argument to be a pointer to either a pollfd, a pollmsg, or a pollist. Ugggh. I would like to understand if AIX is making all of their fd's longs, or just the ones in the pollfd structure. I have been unable to find this on the web anywhere. I have one suggestion that I would also like to try to remove this problem. I would be interested in seeing if we have the same problem if we use select instead of poll. If not, we can make dexter use ap_poll instead of poll, and then make APR decide to use select on 64-bit AIX. I get the feeling that this problem is going to bite us over and over again if we use the proposed patch. Ryan On Wed, 21 Jun 2000, Victor J. Orlikowski wrote: > Thanks go out to Jeff Twawick for catching me on some dumb things before I > submitted this patch. > This cleans up a couple warnings in dexter, and cleans up a problem on > 64-bit AIX, since pollfd.fd on AIX is defined as a long when AIX is 64 bit. > > Index: src/modules/mpm/dexter/dexter.c > =================================================================== > RCS file: /cvs/apache/apache-2.0/src/modules/mpm/dexter/dexter.c,v > retrieving revision 1.98 > diff -u -r1.98 dexter.c > --- dexter.c 2000/06/21 13:15:27 1.98 > +++ dexter.c 2000/06/21 17:48:16 > @@ -669,9 +669,10 @@ > } > /* XXX: Should we check for POLLERR? */ > if (listenfds[curr_pollfd].revents & POLLIN) { > + ap_os_sock_t sock=listenfds[curr_pollfd].fd; > last_pollfd = curr_pollfd; > sd = NULL; > - ap_put_os_sock(&sd, &listenfds[curr_pollfd].fd, > ptrans); > + ap_put_os_sock(&sd, &sock, ptrans); > goto got_fd; > } > } while (curr_pollfd != last_pollfd); > @@ -787,7 +788,8 @@ > listenfds[0].events = POLLIN; > listenfds[0].revents = 0; > for (lr = ap_listeners, i = 1; i <= num_listenfds; lr = lr->next, ++i) > { > - ap_get_os_sock(&listenfds[i].fd, lr->sd); > + ap_os_sock_t sock=listenfds[i].fd; > + ap_get_os_sock(&sock, lr->sd); > listenfds[i].events = POLLIN; /* should we add POLLPRI ?*/ > listenfds[i].revents = 0; > } > > _______________________________________________________________________________ Ryan Bloom rbb@apache.org 406 29th St. San Francisco, CA 94131 -------------------------------------------------------------------------------