#6438 closed defect (fixed)
Mistake in the configuration HAVE_SETLOCALE
Reported by: | alaindelplanque | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | Bas Couwenberg |
Description
gdal configure doesn't set properly HAVE_SETLOCALE.
In configure.in
:
AC_CHECK_FUNC(setlocale)
should be replace by :
AC_CHECK_FUNCS(setlocale)
And in gdal/port/cpl_config.h.in
, missing :
/* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE
This causes a bug in internal libjson
. Without HAVE_SETLOCALE, locale isn't set properly, and geojson coordinates are truncated to int values.
This bug was first reported in qgis: https://hub.qgis.org/issues/14578
Change History (4)
comment:1 by , 8 years ago
Cc: | added |
---|
comment:2 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 8 years ago
comment:4 by , 8 years ago
Thank. I have just built gdal dev (internal libjson) + qgis, it work fine.
Note:
See TracTickets
for help on using tickets.
This issue only affects GDAL < 2 (with internal libjson). In GDAL 2, the internal libjson has been patched so that json_parse_double() uses GDAL CPLStrtod() that ignores the locale, and we want to avoid playing with setlocale() because it is not thread-safe.
However this ticket called 2 commits :