imacarthur wrote:
> On 30 Dec 2009, at 19:24, Greg Ercolano wrote:
>> Solution on win32 is to change _snprintf() to _snprintf_s()
>> with the _TRUNCATE macro as the third argument. But there's no
>> clear way to use a macro shortcut to do this (since this is a
>> varargs function), so a cross platform solution is tricky at best.
>
> Just tested this on Vista with mingw, and it fails exactly as Greg's
> VS example fails (because mingw mainly just wraps the native system
> libs in general.)
>
> However, the workaround of using _snprintf_s(...) doesn't look like
> it will fly either, since neither _snprintf_s nor the _TRUNCATE macro
> are defined in mingw...
Oh great.
So I guess mingw is using the BSD style definition,
ie. the non-gnu approach.
I'm guessing mingw's manpage for snprintf()
probably mentions this problem (as it's apparently well known
in the C library circles) and might mention a better alternative..?
(This is how I found the _snprintf_s() Microsoft function)
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev