mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-20 04:51:58 -04:00
Define DBL_EPSILON if it doesn't exist.
This commit is contained in:
1 parent
2abbf2498f
commit
75fb17b891
1 file changed
+3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user