Fallback to strtod on DragonFly. Limit it until the 2.0 release for now.

This commit is contained in:
joerg 2007-06-12 14:48:33 +00:00
parent ca55f33ab3
commit 8cb9901684
2 changed files with 21 additions and 1 deletions

View file

@ -1,6 +1,7 @@
$NetBSD: distinfo,v 1.1.1.1 2007/05/21 20:46:43 reed Exp $
$NetBSD: distinfo,v 1.2 2007/06/12 14:48:33 joerg Exp $
SHA1 (sparse-0.3.tar.gz) = 1d868b29234176abd5f3f5463aad1f11d5268dc2
RMD160 (sparse-0.3.tar.gz) = 36bb7e5611f56c5b222f33a0853e8315af406704
Size (sparse-0.3.tar.gz) = 177462 bytes
SHA1 (patch-aa) = 234aa80cdd04835b9a8b2bfe4e41b0c7a1f07ff2
SHA1 (patch-ab) = 4240f8ff570592da6d838815edcb6a7976f23a07

View file

@ -0,0 +1,19 @@
$NetBSD: patch-ab,v 1.1 2007/06/12 14:48:33 joerg Exp $
--- compat/strtold.c.orig 2007-06-12 14:35:09.000000000 +0000
+++ compat/strtold.c
@@ -1,6 +1,14 @@
+#if defined(__DragonFly__)
+#include <sys/param.h>
+#endif
+
#include <stdlib.h>
long double string_to_ld(const char *nptr, char **endptr)
{
+#if defined(__DragonFly__) && __DragonFly_version < 200000
+ return strtod(nptr, endptr);
+#else
return strtold(nptr, endptr);
+#endif
}