[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-mdk] mdk-1.0 and snprintf()

From: Nelson H. F. Beebe
Subject: [bug-mdk] mdk-1.0 and snprintf()
Date: Tue, 9 Apr 2002 06:58:40 -0600 (MDT)

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: address@hidden  -
- Department of Mathematics, 110 LCB        address@hidden  address@hidden -
- 155 S 1400 E RM 233                       address@hidden                    -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe  -

reply via email to

[Prev in Thread] Current Thread [Next in Thread]