httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: compilation warning
Date Wed, 24 Apr 1996 15:40:07 GMT
Rob Hartill wrote:
> 
> 
> The following is needed to keep my HPUX compiler happy.
> It'll probably cause other compilers to barf, so it needs a more
> general solution.

Yech. SCO doesn't like it...

        cc -c -O2 -w3 -v -DSCO5 http_main.c
"http_main.c", line 1132: warning: argument is incompatible with prototype: arg
#2

I've been thinking about this problem wrt the sprintf problem in mod_status ...
its a drag having to fill the code with casts (and worse) to fix broken
compilers. I'd rather have something like os_select() instead, which is
#define'd to the appropriate thing on a per-system basis.

os_sprintf is a little harder, since it needs code to fix it when it is
broken.

There are a few other things which could be tidied in this way, for example,
the setjmp/sigsetjmp stuff in http_main.c.

Cheers,

Ben.

> 
> 
> *** http_main.c.orig    Wed Apr 24 09:31:30 1996
> --- http_main.c Wed Apr 24 09:34:21 1996
> ***************
> *** 1129,1135 ****
>   
>             for (;;) {
>                 memcpy(&fds, &listenfds, sizeof(fd_set));
> !               csd = select(listenmaxfd+1, &fds, NULL, NULL, NULL);
>                 if (csd == -1 && errno != EINTR)
>                     log_unixerr("select",NULL,"select error", server_conf);
>                 if (csd <= 0) continue;
> --- 1129,1135 ----
>   
>             for (;;) {
>                 memcpy(&fds, &listenfds, sizeof(fd_set));
> !               csd = select(listenmaxfd+1, (int *) &fds, NULL, NULL, NULL);
>                 if (csd == -1 && errno != EINTR)
>                     log_unixerr("select",NULL,"select error", server_conf);
>                 if (csd <= 0) continue;
> 

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email: ben@algroup.co.uk
A.L. Digital Ltd,           URL: http://www.algroup.co.uk
London, England.

Mime
View raw message