On 28 April 2012 23:38, Even Rouault <[email protected]> wrote: >> >> Long story short, for printf: >> %f -> double >> %Lf -> for long double. >> >> for scanf:: >> %f -> float >> %lf -> double >> %Lf -> for long double. >> >> Or, I'm misunderstanding the C99 document. >> If I'm correct, then all C99 compilers should printf using %Lf >> but not %lf, thus json-c is incorrect and I have the basis to suggest >> the json-c maintainers to fix it. >> >> Even, would you agree? > > yes, in json-c, long double isn't used, so "%f" should be sufficient. With > mingw, using "%lf" is dangerous since apparently it triggers a bad interaction > between a Microsoft extension and possibly a bad implementation in mingw. I'm > not yet sure to have understood what really happens though.
OK, the proposed fix has been accepted into the json-c and will be released in json-c 1.0 https://github.com/json-c/json-c/commit/0cc1db6459035fd071371281daff030e5a0e9b8e Best regards, -- Mateusz Loskot, http://mateusz.loskot.net _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
