Received: by taz.hyperreal.com (8.8.3/V2.0) id DAA29073; Sun, 12 Jan 1997 03:10:23 -0800 (PST) Received: from colin.Muc.DE by taz.hyperreal.com (8.8.3/V2.0) with SMTP id DAA29065; Sun, 12 Jan 1997 03:10:16 -0800 (PST) Received: from en by colin.muc.de with UUCP id <86042-2>; Sun, 12 Jan 1997 12:10:05 +0100 Received: by en1.engelschall.com (Sendmail 8.8.2) for new-httpd@hyperreal.com id MAA24101; Sun, 12 Jan 1997 12:05:51 +0100 (MET) Message-Id: <199701121105.MAA24101@en1.engelschall.com> Subject: Re: PLEASE try compiling snprintf.c (was: Re: snprintf.c uploaded) To: new-httpd@hyperreal.com (Apache Developer ML) Date: Sun, 12 Jan 1997 12:05:50 +0100 From: rse@engelschall.com (Ralf S. Engelschall) Organization: Engelschall, Germany. X-W3-Page: http://www.engelschall.com/ X-Mailer: ELM [version 2.4ME+ PL30 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com In article 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 (which has the FreeBSD prototype) then it compiles without problems. Here is the diff: *** snprintf.c Sat Jan 11 16:19:01 1997 --- snprintf.c.n Sun Jan 12 12:03:17 1997 *************** *** 1,4 **** ! #include #include #include #include --- 1,8 ---- ! ! #ifndef NULL ! #define NULL (void *)0 ! #endif ! #include #include #include *************** *** 730,736 **** if ( ccp ) *ccp = cc ; } - int snprintf( buf, len, format, va_alist ) char *buf ; --- 734,739 ---- Ralf S. Engelschall rse@engelschall.com http://www.engelschall.com/