Otherwise systems that have roundl defined (but broken/missing) will error when the macro interferes with the definition
@@ -568,7 +568,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
AC_MSG_RESULT([yes])
], [
AC_MSG_RESULT([no])
- AC_DEFINE_UNQUOTED([roundl(x)], [(long double)((long long)((x==0)?0.0:((x)+(((x)>0)?0.5:-0.5))))], [Round to nearest integer, away from zero])
+ AC_DEFINE([NEED_ROUNDL], [1], [Defined to 1 if C99 roundl is missing])
])
LIBS="${save_LIBS}"
@@ -190,6 +190,10 @@ static inline int fsync (int fd)
# endif
#endif
+#ifdef NEED_ROUNDL
+#define roundl(x) (long double)((long long)((x==0)?0.0:((x)+(((x)>0)?0.5:-0.5))))
+#endif
+
enum alive {
LIFE_WELL,
LIFE_SICK,