[cairo-commit] test/pdiff

Behdad Esfahbod behdad at kemper.freedesktop.org
Sun Dec 17 11:25:16 PST 2006

 test/pdiff/pdiff.c |    8 ++++++++
 1 files changed, 8 insertions(+)

New commits:
diff-tree 2ca6a767ee067742205ee76f891e36c8ec36135e (from 0d9b2d041578c183b026b90c3760ce8dc59e2834)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sun Dec 17 14:24:57 2006 -0500

    [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

diff --git a/test/pdiff/pdiff.c b/test/pdiff/pdiff.c
index b117d79..4d50f01 100644
--- a/test/pdiff/pdiff.c
+++ b/test/pdiff/pdiff.c
@@ -25,6 +25,14 @@
 #define M_PI 3.14159265f
+#ifndef __USE_ISOC99
+#define expf	exp
+#define powf	pow
+#define fabsf	fabs
+#define sqrtf	sqrt
+#define log10f	log10
  * Given the adaptation luminance, this function returns the
  * threshold of visibility in cd per m^2

More information about the cairo-commit mailing list