Skip to content

Commit

Permalink
Define DBL_EPSILON if it doesn't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wayne Davison committed Jan 18, 2003
1 parent 2abbf24 commit 75fb17b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions popt/popt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 75fb17b

Please sign in to comment.