[pdiff] Don't use float math functions if not using gcc with C99

The float version of many math functions were introduced in C99, and were
causing compile failure on systems like OS X.  We now define them to their
double variant if __USE_ISOC99 is not defined.  We may want to expand it later
to cover non-gcc compilers too, but since this is pdiff only, it's not really
important.
This commit is contained in:
Behdad Esfahbod 2006-12-17 14:24:57 -05:00
parent 0d9b2d0415
commit 2ca6a767ee

View file

@ -25,6 +25,14 @@
#define M_PI 3.14159265f
#endif
#ifndef __USE_ISOC99
#define expf exp
#define powf pow
#define fabsf fabs
#define sqrtf sqrt
#define log10f log10
#endif
/*
* Given the adaptation luminance, this function returns the
* threshold of visibility in cd per m^2