Boost logo

Boost :

Subject: Re: [boost] [test] Use of snprintf
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2009-11-23 19:14:47

Gennadiy Rozental wrote:
> Mateusz Loskot <mateusz <at>> writes:
>> Hi,
>> I'm testing Boost with Comeau C/C++ frontent which,
>> as far as I found, does not support mixing C++ and C99 modes.
>> So, compiling Boost.Test library fails because ::snprintf
>> can not be found [1].
>> Would it make sense to remove use of snprintf?
> I'd like to continue using snprintf. Can please provide any kind of workaround?


I've prepared a simple workaround for missing snprintf and vsnprintf
functions. Patch attached to the ticket [1]

Due to the fact that these functions are used not only in Boost.Test,
I thought it may be a good idea Boost.Config gives some hints about
their availability, so I also updated boost/config/platform/linux.hpp
with two definitions for Linux && Comeau


I have very little knowledge about internals of Boost.Config,
so I'm not sure if that is proper approach.

By the way, I also submitted new ticket [2] with small patch
that enables POSIX/SVID support for Comeau toolset.

To summary, these two patches fix the related problems,
however I found some further issues which I'm investigating,
and hopefully, patching.


Best regards,

Mateusz Loskot,
Charter Member of OSGeo,

Boost list run by bdawes at, gregod at, cpdaniel at, john at