[cairo-commit] 2 commits - src/cairo-compiler-private.h src/cairo-wideint-type-private.h

Jeff Muizelaar jrmuizel at kemper.freedesktop.org
Thu Mar 3 14:28:21 PST 2011


 src/cairo-compiler-private.h     |   14 ++++++++++++++
 src/cairo-wideint-type-private.h |    3 +++
 2 files changed, 17 insertions(+)

New commits:
commit de2c5bfa19ce6b3fda50bca3445aabc040947bc9
Author: Jeff Muizelaar <jmuizelaar at mozilla.com>
Date:   Thu Mar 3 16:34:43 2011 -0500

    Add an implementation of fmax for use with MSVC

diff --git a/src/cairo-compiler-private.h b/src/cairo-compiler-private.h
index e25ee1f..4349b87 100644
--- a/src/cairo-compiler-private.h
+++ b/src/cairo-compiler-private.h
@@ -227,6 +227,20 @@ ffs (int x)
     return 0;
 }
 
+#define _USE_MATH_DEFINES
+
+#include <float.h>
+
+static inline double
+fmax (double a, double b)
+{
+    if (_isnan(a))
+        return b;
+    if (_isnan(b))
+        return a;
+    return a > b ? a : b;
+}
+
 #endif
 
 #if defined(_MSC_VER) && defined(_M_IX86)
commit aca492eb3f4a0d472e6fdb2e4dac9d52edefbff9
Author: Jeff Muizelaar <jmuizelaar at mozilla.com>
Date:   Thu Mar 3 16:31:03 2011 -0500

    Add UINT32_MAX define.
    
    This is needed for building with MSCV

diff --git a/src/cairo-wideint-type-private.h b/src/cairo-wideint-type-private.h
index 4c910ed..84a3cba 100644
--- a/src/cairo-wideint-type-private.h
+++ b/src/cairo-wideint-type-private.h
@@ -80,6 +80,9 @@
 #ifndef INT32_MAX
 # define INT32_MAX	(2147483647)
 #endif
+#ifndef UINT32_MAX
+# define UINT32_MAX     (4294967295U)
+#endif
 
 #if HAVE_BYTESWAP_H
 # include <byteswap.h>


More information about the cairo-commit mailing list