[Proj] [libproj4] strtod regression under win32

Patrick Mézard pmezard at gmail.com
Thu Feb 24 12:53:52 EST 2005


The pj_dmstor() function makes use of strtod to separate DMS strings
components. That's okay for most strtod implementations since the DMS
separator cannot occur within components (apart from the dot which is
handle naturally), but win32 version scans for {d | D | e | E} as
exponents introductory letters.

It seems this issue was solved some years ago in PROJ.4, strtod being
replaced by another version from src/strtod.c. I am not sure the code
can be integrated into libproj4 for licensing reasons. Besides,
replacing (d|D) by something not in (d|D|e|E) in the input string
would be enough to correct that as suggested by
(assuming the components can only be made of number, no strange
floating-point values).

Yet, another problem with win32 is the "nell_h" and "stmerc"
projections use atanh which is not defined by my development
environment (MSVC 7.1 Windows 2000). You cannot do anything about it
and it is enough to comment the declarations in pj_list.h to solve
this. Nevertheless, it may be useful you know it.

Patrick Mézard

More information about the Proj mailing list