You do not know that the test compiles without warnings. The test decides
whether you have snprintf by attempting to link a small program conatining
snprintf. In particular it can succeed even if the declaration is not in the
header files the example #include's. The declarations in some of these test
programs are not even vaguely correct and the resulting binaries would surely
die horribly if the code was executed.
Poking one's nose in libioP.h is a *bad idea* as it a private header and
examining those is a dangeruous. It is almost certaintly not the truth if you
link against a vendor's shared C library (which probably does have snprintf,
unless the vendor is M$). If you are using the glibc headers then snprintf is
delcared in stdio.h. Instead I would suggest using LYX_CHECK_DECL_HDRS.
Apache includes a widely distributed implementaion of snprintf for system
where snprintf does not exist due to vendor brain damage. I think LyX should
also include this code, which is a lot smaller than sigc++, for example. FYI
in glibc 2.x the __IO_vsnprintf function is part of the internals of snprintf,
but including the private header will not provide a proper declaration of
snprintf, besides being the wrong thing on other grounds.
--
Duncan (-:
"software industry, the: unique industry where selling substandard goods is
legal and you can charge extra for fixing the problems."