mdk-1.0 and snprintf()
"Nelson H. F. Beebe" <[email protected]> Tue, 9 Apr 2002 06:58:40 -0600 (MDT)
| Newsgroups | gmane.comp.gnu.mdk.bugs |
|---|---|
| Message-ID | <[email protected]> |
The mdk-1.0 release contains 30 calls to the nonstandard library function, snprintf(), in 11 source files. snprintf() is absent on Compaq/DEC Alpha OSF/1 4.0 and Hewlett-Packard HP-UX 10.01, preventing successful builds of mdk-1.0 on those systems. snprintf(), while available on many systems, was only introduced in C99 (ISO/IEC 9899:1999(E): Programming languages -- C). Full support for that Standard is still unavailable in any of the 50+ C compilers on the 16+ different UNIX platforms that I routinely work on. While use of snprintf() is safer than sprintf(), since it is nonstandard, a fallback should be provided, either in the form of conditionals that revert to sprintf() when necessary, or as a private implementation of snprintf(). ------------------------------------------------------------------------------- - Nelson H. F. Beebe Tel: +1 801 581 5254 - - Center for Scientific Computing FAX: +1 801 585 1640, +1 801 581 4148 - - University of Utah Internet e-mail: [email protected] - - Department of Mathematics, 110 LCB [email protected] [email protected] - - 155 S 1400 E RM 233 [email protected] - - Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe - -------------------------------------------------------------------------------