-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 At some point hitherto, Jerry Feldman hath spake thusly: > I write C code according to the C standard. Well, which one? There are many C "standards" these days... We have: XPG3 ANSI C/ISO C89 ISO C99 IEEE 1003.1 (formerly POSIX.1) IEEE 1003.1b-1993 IEEE 1003.1c-1995 About a dozen other C-specific POSIX standard extensions SVID C specifications... BSD C specifications... Sorta makes the old addage about standards ring true, eh? :) I'd be very surprised indeed if none of your code ever included any functions defined by any of the later standards. POSIX.1 has been around almost as long as ISO C89, and most people don't even realize they're using POSIX functions which aren't in the ANSI spec when they do so... As for my macro trick, I have no idea if it is or is not a part of any of these standards, as I've not a copy of any of them handy. As I mentioned, none of the texts I have on C mention it, but none of them really go into any detail on the C preprocessor anyway, so that's hardly a statement one way or the other... Do the standards even cover the behavior of the C preprocessor? I've never seen one of the specification documents; I have no idea. > vfprintf(3) is a standard function available on all standard C > implementations. That may be true, but free implementations of vsnprintf() are easy enough to obtain from either glibc or the free BSDs (depending on what sort of license you need), and relying solely on vfprintf() makes it much more difficult (if not impossible) to do things like log messages with potentially variable numbers of components to syslog(). It's also available on most modern implementations, so it's a good bet it's available on whatever platform Frank is working on. I've stated many times on this list that I'm a fan of portability, but you also have to look at the practicality of the situation, and how much extra time staying strictly portable will add to the task at hand. The ANSI C spec is very old and outdated, having been originally conceived almost 20 years ago (work on it began in 1983, though it was not finally approved until 1989), and with much advancement having come between its aproval and now. And in all likelihood Frank isn't writing code that needs to be executable on every platform from Multics to Solaris 9 and HP-UX 12... - -- Derek Martin ddm@pizzashack.org - --------------------------------------------- I prefer mail encrypted with PGP/GPG! GnuPG Key ID: 0x81CFE75D Retrieve my public key at http://pgp.mit.edu Learn more about it at http://www.gnupg.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9DSCDdjdlQoHP510RAgvkAKCpQAea+Yybha+FSY9y64ZPqe60WQCguUP7 KNBQYVIeEWz3yoEA8yLcG7c= =YJ0E -----END PGP SIGNATURE-----