[1920] in Athena Bugs
Re: sprintf in the C library
daemon@ATHENA.MIT.EDU (Ken Raeburn)
Thu Mar 16 20:40:48 1989
Date: Thu, 16 Mar 89 20:40:28 EST
From: Ken Raeburn <raeburn@ATHENA.MIT.EDU>
To: jik@ATHENA.MIT.EDU
Cc: bugs@ATHENA.MIT.EDU
In-Reply-To: Jonathan I. Kamens's message of Thu, 16 Mar 89 00:49:29 EST <8903160549.AA02450@PIT-MANAGER.MIT.EDU>
This probably results from having previously used it in another file
without declaring the return type in that file. This causes an
implicit declaration of function-returning-int.
The proper fix would probably be to only use the declarations from the
header files. Using the return value from sprintf is a bad idea at
this time, however. Currently, the return value (actually, the return
*type*) varies between different types of UNIX systems. The BSD
version is changing in the 4.3BSD-tahoe release to conform to the
pANS-C description, and will return an int.
-- Ken