From 75fb17b891da5568773ee741ca5266edebe268c2 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sat, 18 Jan 2003 19:00:07 +0000 Subject: [PATCH] Define DBL_EPSILON if it doesn't exist. --- popt/popt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/popt/popt.c b/popt/popt.c index c6672b7a..d17c31c6 100644 --- a/popt/popt.c +++ b/popt/popt.c @@ -904,6 +904,9 @@ int poptGetNextOpt(poptContext con) if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_DOUBLE) { *((double *) opt->arg) = aDouble; } else { +#ifndef DBL_EPSILON +#define DBL_EPSILON 2.2204460492503131e-16 +#endif #define _ABS(a) ((((a) - 0.0) < DBL_EPSILON) ? -(a) : (a)) if ((_ABS(aDouble) - FLT_MAX) > DBL_EPSILON) return POPT_ERROR_OVERFLOW; -- 2.34.1