Portable dtoa.c
Hi,
I am working to get my "pyephem" package done for all available
(official and unofficial) ports. The major problem here is that it uses
"ascii_strtod() from the file "dtoa.c" by David M. Gray [1] that is
machine dependent. That file is used in quite many packages in one or
the other form; however I could not find out how to set the defines that
it works correctly for all our platforms.
In the moment I have
#if defined(__s390__) || defined(__s390x__)
#define IBM
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define IEEE_8087
#else
#define IEEE_MC68k
#endif
However this currently fails for ppc64. Does anyone know how to get this
working for *all* platforms, or has a fully compatible drop-in
replacement for that function?
Best regards
Ole
[1] https://sources.debian.net/src/pyephem/3.7.6.0-3/extensions/dtoa.c/
[2] https://codesearch.debian.net/perpackage-results/strtod%20path%3A.*dtoa.*/2/page_0
Reply to: