httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@ibm.net>
Subject Re: [PATCH] Compiler warning + 64-bit AIX cleanup in dexter mpm
Date Wed, 21 Jun 2000 18:11:50 GMT
> From: "Victor J. Orlikowski" <vjo@raleigh.ibm.com>
> Date: Wed, 21 Jun 2000 13:52:31 -0400
> 
> Thanks go out to Jeff Twawick for catching me on some dumb things before I
> submitted this patch.

Hey... I'm not responsible for the bug in the second part of the patch
:)  I didn't "approve" the lack of spaces around the '=' either.

> 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.

Seriously...  I'm not sure that other platforms allow it, but AIX
allows a file offset to be specified in the fd field instead of a file
descriptor.  On a 64-bit machine, the fd field is a long, and good
things are not going to happen if we pass the address of a 64-bit
quantity for ap_os_sock_t * into ap_put_os_sock() or ap_get_os_sock().

This could be APR-ized instead, but then it would slow down :(

> 
> 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;
>      }
> 
> 
> 


-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message