On Sun, Apr 10, 2011 at 10:40 PM, Konstantin Pavlov <[email protected]> wrote: > --- > configure | 2 ++ > libavutil/libm.h | 8 ++++++++ > 2 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/configure b/configure > index af48ae8..0b55509 100755 > --- a/configure > +++ b/configure > @@ -1065,6 +1065,7 @@ HAVE_LIST=" > inet_aton > inline_asm > isatty > + isnan > kbhit > ldbrx > libdc1394_1 > @@ -2850,6 +2851,7 @@ disabled vaapi || check_lib va/va.h vaInitialize -lva > > check_mathfunc exp2 > check_mathfunc exp2f > +check_mathfunc isnan > check_mathfunc llrint > check_mathfunc llrintf > check_mathfunc log2 > diff --git a/libavutil/libm.h b/libavutil/libm.h > index 704bcf9..fc2ef71 100644 > --- a/libavutil/libm.h > +++ b/libavutil/libm.h > @@ -38,6 +38,14 @@ > #define exp2f(x) ((float)exp2(x)) > #endif /* HAVE_EXP2F */ > > +#if !HAVE_ISNAN > +#undef isnan > +#define isnan(x) \ > + (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) > : \ > + sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ > +__builtin_isnanf ((float)(x)))
why not (x) != (x)? seems more portable. > +#endif /* HAVE_ISNAN */ > + > #if !HAVE_LLRINT > #undef llrint > #define llrint(x) ((long long)rint(x)) > -- > 1.7.4.4 > --Alex _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
