httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: PLEASE try compiling snprintf.c (was: Re: snprintf.c uploaded)
Date Sun, 12 Jan 1997 14:24:38 GMT
Ralf S. Engelschall wrote:
> 
> 
> In article <Pine.BSF.3.95.970112012155.17488t-100000@alive.ampr.ab.ca> you wrote:
> 
> > Ok, everyone please grab a copy, rename snprintf and vsnprintf in the file
> > to something else, then try compiling (with -Wall and -ansi if your
> > compiler supports them) on all platforms you can.  eg. 
> >   gcc -ansi -Wall -c snprintf.c
> 
> > ...and report any errors or warnings.  Please also send a list of
> > platforms it compiled on without problems.
> 
> Hmmmm... under my FreeBSD box I got:
> 
> rse@en1:/u/rse
> :> uname -a
> FreeBSD en1 2.1.5-RELEASE FreeBSD 2.1.5-RELEASE #0: Sat Nov 23 10:19:51 MET
> 1996     rse@en1:/usr/src/sys/compile/EN1  i386
> rse@en1:/u/rse
> :> gcc -ansi -Wall -c snprintf.c
> snprintf.c: In function `snprintf':
> snprintf.c:739: argument `format' doesn't match prototype
> /usr/include/stdio.h:295: prototype declaration
> snprintf.c:739: number of arguments doesn't match prototype
> /usr/include/stdio.h:295: prototype declaration
> snprintf.c: In function `vsnprintf':
> snprintf.c:756: argument `format' doesn't match prototype
> /usr/include/stdio.h:296: prototype declaration
> snprintf.c:756: argument `ap' doesn't match prototype
> /usr/include/stdio.h:296: prototype declaration
> rse@en1:/u/rse
> :>
> 
> When I replace the #include <stdio.h> (which has the FreeBSD prototype) then
> it compiles without problems. Here is the diff:
> 

Yeah.... As you can see, the snprintf/vsnprintf() stuff uses slightly
different prototypes as does the usual version. Renaming them to
something like ap_snprintf/ap_vsnprintf() will avoid that. I am
actually planning on ANSIfying the entire core...
-- 
====================================================================
      Jim Jagielski            |       jaguNET Access Services
     jim@jaguNET.com           |       http://www.jaguNET.com/
                  "Not the Craw... the CRAW!"

Mime
View raw message