> There are two versions of sprintf() available in SunOS 4 - 8. The
> standard one (ANSI C) in libc returns an int, the number of characters
> written (excluding '\0'). The BSD version returns a char* which
> points to the target. If you have a -lbsd on your link line then you
> get the BSD version. There are no compiler errors, just run time
> errors if you rely on the return from sprintf() being the number of
> characters. The workaround is to put an extra -lc on the link line
> before the -lbsd if your code needs both standard sprintf() and some
> other BSD function.
>
> Ultrix is documented as having the same behaviour as Solaris. I don't
> know about NeXTSTEP/OPENSTEP/GNUStep.
Of course, if sprintf() returns an error, you have pretty big problems.
:-)
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026