> > On Mon, 24 Jul 2000, Ury Segal wrote:
> > > char * sprintf( s, format, va_list);
>
> Oh. Yet another ANSI incompatibility from Sun Microsystems? You
> should probably forgive these guys. They were born before ANSI C
> and before POSIX. Modern BSD systems return int, as expected.
This behavior exists in SunOS 4.x (and presumably earlier versions).
Sprintf() returned `int' as far as the Seventh Edition release of UNIX
from Bell Labs. This is noted in the documentation of SunOS 4.x,
and indeed its <stdio.h> contains the following comment
/* @(#)stdio.h 1.16 89/12/29 SMI; from UCB 1.4 06/30/83 */
The committee to standardize the C language was commissioned by ANSI on
1983. The work wasn't published until 1990. So what did you expect
them to do, exactly? They chose one behavior and everyone followed.
(Looking at CVS histories of BSD systems, they appear to have had
`int' returning sprintf() at the early 1990s.)
Historical artifacts not withstanding, there are many
inter-operability problems that are caused because the standard bodies
are too slow or confused (e.g. snprintf()) and so implementors just
go ahead and do their own thing.
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]