Alexander Shaduri wrote:
> The attached patch fixes compilation under mingw cross-compiler
> (gcc 3.4.5).
> The bug was triggered by not defining HAVE_WORKING_SNPRINTF.
>
Patch applied, thanks!
> It seems that the test case that defines it is fails under cross-compilation
> environment, but it doesn't seem like a big problem.
>
>
Yes. The HAVE_WORKING_SNPRINTF test runs a compiled program and is
therefore not compatible with cross compilation. I will try to fix this.
The 'safe_snprintf' was necessary for mingw in the past and for very old
Linuxes with libc.so.5. Meantime, the mingw runtime provides an own
'snprintf()' and does no longer use '_snprintf()' from msvcrt.dll. So
nowadays 'safe_snprintf' is only needed when smartmontools is build with
the MS compiler.
Cheers,
Christian
|