Why is sprintf ifdef-ed out of <stdio.h>?

Chris Torek chris at mimsy.umd.edu
Fri Jul 28 19:46:39 AEST 1989


bob at omni.com (Bob Weissman) asks why there is an `#ifdef vax' around the
`char *sprintf()' declaration in stdio.h.

The reason is that sprintf() is supposed to return an int value, namely
the number of characters printed, but it was `too painful' to fix this for
4.2 and 4.3 BSD, so it was left *wrong* in the BSD VAX systems and made
correct in SunOS.

Why the `#ifdef vax' ... `#endif' lines were never removed from the Sun
stdio.h I cannot answer.  Note that sprintf() has been fixed in
4.3BSD-tahoe.

In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.sys.sun mailing list