httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@organic.com>
Subject Re: cvs commit: apache/src http_protocol.c
Date Thu, 31 Oct 1996 17:35:49 GMT
On Thu, 31 Oct 1996, Ben Laurie wrote:
> >         if (r->finfo.st_mode != 0)
> >   !         sprintf(weak_etag, "W/\"%lx-%Lx-%lx\"", r->finfo.st_ino,
> >     		r->finfo.st_size, mtime);
> >         else
> >             sprintf(weak_etag, "W/\"%lx\"", mtime);
> 
> Whoah! That one's not portable. From SCO 5 man sprintf:
> 
>           L       For a, A, e, E, f, F, g, and G, the argument has type long
>                   double.
> 
> L isn't even permitted for x!

It's weird to me, too; st_size is a long, yet this patch squelched the error I
was seeing on BSDI:

  http_protocol.c: In function `set_last_modified':
  http_protocol.c:346: warning: long unsigned int format, different type arg (arg 4)

Is GCC on bsdi just plain wrong on this?  

I now see that this patch *introduces* the same error message on solaris and
irix it squelches on bsdi.  I only have access to those three platforms; if
someone else knows how to fix this across platforms and compilers then please
let us know.  In the meantime I'll reverse the patch.

	Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  www.apache.org  hyperreal.com  http://www.organic.com/JOBS


Mime
View raw message