libstand functions not ansi-c compiliant
Stefan Farfeleder
stefan at fafoe.narf.at
Wed Jun 8 10:31:00 GMT 2005
On Wed, Jun 08, 2005 at 09:53:15AM +0200, Michael Reifenberger wrote:
> Hi,
> as it seems are a few functions as defined/implemented in libstand
> not ansi-c compiant: putchar, vprintf, vsprintf.
> They are defined to return void instead of int.
libstand isn't intended to be a standards-compliant C library. I'm
afraid I don't see the advantages of your proposed changes.
> -void
> +int
> vprintf(const char *fmt, va_list ap)
> {
> + int retval;
>
> kvprintf(fmt, putchar, NULL, 10, ap);
retval = kvprintf(fmt, putchar, NULL, 10, ap);
> + return(retval);
> }
> @@ -369,7 +369,7 @@
> */
> extern int getchar(void);
> extern int ischar(void);
> -extern void putchar(int);
> +extern int putchar(int);
You can't just change the return type in the header without changing all
definitions of putchar().
Stefan
More information about the freebsd-standards
mailing list