From: Alexander S. <ash...@gm...> - 2009-06-05 16:48:55
Attachments:
sm5_2009-06-05_windows.diff
|
Hello, The attached patch fixes compilation under mingw cross-compiler (gcc 3.4.5). The bug was triggered by not defining HAVE_WORKING_SNPRINTF. It seems that the test case that defines it is fails under cross-compilation environment, but it doesn't seem like a big problem. Thanks, Alexander |
From: Christian F. <Chr...@t-...> - 2009-06-07 14:43:12
|
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 |