mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-20 04:50:41 +02:00
[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:
parent
0d9b2d0415
commit
2ca6a767ee
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue