Tweaked some whitespace to match the latest version from autoconf.
[rsync/rsync.git] / popt / popt.c
index 962f973..9e00769 100644 (file)
@@ -904,10 +904,13 @@ int poptGetNextOpt(poptContext con)
                    if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_DOUBLE) {
                        *((double *) opt->arg) = aDouble;
                    } else {
-#define _ABS(a)        ((((a) - 0.0) < DBL_EPSILON) ? -(a) : (a))
-                       if ((_ABS(aDouble) - FLT_MAX) > DBL_EPSILON)
+#ifndef DBL_EPSILON
+#define DBL_EPSILON 2.2204460492503131e-16
+#endif
+#define MY_ABS(a) ((((a) - 0.0) < DBL_EPSILON) ? -(a) : (a))
+                       if ((MY_ABS(aDouble) - FLT_MAX) > DBL_EPSILON)
                            return POPT_ERROR_OVERFLOW;
-                       if ((FLT_MIN - _ABS(aDouble)) > DBL_EPSILON)
+                       if ((FLT_MIN - MY_ABS(aDouble)) > DBL_EPSILON)
                            return POPT_ERROR_OVERFLOW;
                        *((float *) opt->arg) = aDouble;
                    }
@@ -1052,9 +1055,9 @@ poptContext poptFreeContext(poptContext con)
 }
 
 int poptAddAlias(poptContext con, struct poptAlias alias,
-               /*@unused@*/ int flags)
+               /*@unused@*/ UNUSED(int flags))
 {
-    poptItem item = alloca(sizeof(*item));
+    poptItem item = (poptItem) alloca(sizeof(*item));
     memset(item, 0, sizeof(*item));
     item->option.longName = alias.longName;
     item->option.shortName = alias.shortName;
@@ -1125,7 +1128,7 @@ const char * poptBadOption(poptContext con, int flags)
     /*@=nullderef@*/
 }
 
-const char *const poptStrerror(const int error)
+const char * poptStrerror(const int error)
 {
     switch (error) {
       case POPT_ERROR_NOARG: