[OSM-dev] Gosmore patch to rebuild pak
Christian Müller
cmue81 at gmx.de
Thu Oct 1 20:34:42 BST 2009
Hi,
gosmore fails to rebuild a pak file since the introduction of FWRITE
macro definition. Reason:
fwrite(buf, elemsize, numelems, pak) returns the number of elems written.
fwrite (idx, fsize, 1, pak) will fail, if there is an empty file, in
this case fsize is 0. fwrite is told to write 1 element of zero size.
FWRITE macro will then exit(1) since fwrite returned that 0 elems were
written - this does not match the intent to write 1 element.
Greetings,
cmuelle8
ps: on my system I also need to disable the setlocale() statement in
gosmore.cpp, else a pak rebuild will only produce garbage. since this
intends to solve problems parsing nmea only, i suggest to _not_
setlocale() when in rebuild mode..
pps: there is many more stuff, e.g. in the nmea parsing, I'd like to
submit myself ;-)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libgosm.rev17900.patch
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20091001/da65178b/attachment.ksh>
More information about the dev
mailing list