You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Randy Terbush <ra...@zyzzyva.com> on 1996/04/23 17:43:14 UTC

Re: WWW Form Bug Report: "mod_status.c doesn't compile" on SunOS 4.x

> Rob Hartill wrote:
> > 
> > 
> > thanks. A few people have pointed this out now.
> > 
> > Hopefully it'll be added to a "known bugs" page on the Apache site.
> > 
> > regards,
> > rob
> > 
> > >Submitter: babafou@hsc.fr
> > >Operating system: SunOS 4.x, version: 
> > >Version of Apache Used: 1.1b1
> > >Extra Modules used: 
> > >URL exhibiting problem: 
> > >
> > >Symptoms:
> > >--
> > >gcc -c -O -DSUNOS4 mod_status.c
> > >mod_status.c: In function `show_time':
> > >mod_status.c:119: invalid operands to binary +
> > >mod_status.c:121: invalid operands to binary +
> > >mod_status.c:123: invalid operands to binary +
> > >mod_status.c:125: invalid operands to binary +
> > >make: *** [mod_status.o] Error 1
> > >
> > >because sprintf() is char *sprintf().  I've compiled
> > >Apache 1.1b1 on NetBSD 1.0 (hey, it isn't in your
> > >list above!) and it works fine.
> 
> sprintf() should not be char *. It should be int. At least, that's what my
> man pages say (and always have done). According to my man page, every major
> standard agrees with this!
> 
> Cheers,
> 
> Ben.


Depends on where you live... I seem to remember Dell SVR4 also doing this.

>From SunOS 4.1.3...

PRINTF(3V)             C LIBRARY FUNCTIONS             PRINTF(3V)

NAME
     printf, fprintf, sprintf - formatted output conversion

SYNOPSIS
     #include <stdio.h>

     int printf(format [ , arg... ] )
     char *format;

     int fprintf(stream, format [ , arg... ] )
     FILE *stream;
     char *format;

     char *sprintf(s, format [ , arg... ] )
     char *s, *format;

SYSTEM V SYNOPSIS
     The routines above are available as shown, except:

     int sprintf(s, format [ , arg... ] )
     char *s, *format;

     The following are provided for XPG2 compatibility:

     #define   nl_printf      printf
     #define   nl_fprintf     fprintf
     #define   nl_sprintf     sprintf