Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jun 2005 12:52:42 +0200 (CEST)
From:      Michael Reifenberger <mike@Reifenberger.com>
To:        Stefan Farfeleder <stefan@fafoe.narf.at>
Cc:        standards@freebsd.org
Subject:   Re: libstand functions not ansi-c compiliant
Message-ID:  <20050608124306.X30581@fw.reifenberger.com>
In-Reply-To: <20050608103045.GC16848@wombat.fafoe.narf.at>
References:  <20050608094851.D29843@fw.reifenberger.com> <20050608103045.GC16848@wombat.fafoe.narf.at>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 8 Jun 2005, Stefan Farfeleder wrote:
...
>
> libstand isn't intended to be a standards-compliant C library.  I'm
> afraid I don't see the advantages of your proposed changes.
>

IMHO this would violate POLA.
If the functions are called like standard, they should complay to the standard.

The advantage would be (thats how I got to this issue at all) that
you don't get compiling errors when including <stdio.h> too.
(I had to do this to get the definition of FILE for the work
on upgrading sys/boot/ficl to ficl4)

>> -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().
>

It seems that putchar is not implemented in libstand.
Do you know where?

Bye/2
---
Michael Reifenberger, Business Development Manager SAP-Basis, Plaut Consulting
Comp: Michael.Reifenberger@plaut.de | Priv: Michael@Reifenberger.com
       http://www.plaut.de           |       http://www.Reifenberger.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050608124306.X30581>