From 779f285efd6244c6f4c20e5843634b9e9afe02a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Tue, 29 Aug 2000 14:34:02 +0200 Subject: [PATCH] Now looks at HAVE_STRTOD before using the fallback code. Should fix precision problems on HPUX. Rev: src/port.c:1.30 --- src/port.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/port.c b/src/port.c index 85c1b440c7..5505319961 100644 --- a/src/port.c +++ b/src/port.c @@ -18,7 +18,7 @@ #include <float.h> #include <string.h> -RCSID("$Id: port.c,v 1.29 2000/08/24 13:57:32 grubba Exp $"); +RCSID("$Id: port.c,v 1.30 2000/08/29 12:34:02 grubba Exp $"); #ifdef sun time_t time PROT((time_t *)); @@ -385,6 +385,9 @@ PMOD_EXPORT char *STRTOK(char *s1,char *s2) character after the last one used in the number is put in *ENDPTR. */ PMOD_EXPORT double STRTOD(char * nptr, char **endptr) { +#ifdef HAVE_STRTOD + return strtod(nptr, endptr); +#else /* !HAVE_STRTOD */ register unsigned char *s; short int sign; @@ -524,6 +527,7 @@ PMOD_EXPORT double STRTOD(char * nptr, char **endptr) if (endptr != NULL) *endptr = (char *) nptr; return 0.0; +#endif /* HAVE_STRTOD */ } #ifndef HAVE_VSPRINTF -- GitLab