[cairo-commit] src/cairo-compiler-private.h

Jeff Muizelaar jrmuizel at kemper.freedesktop.org
Mon Oct 17 07:51:31 PDT 2011


 src/cairo-compiler-private.h |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 26c9994393f590c43714ba8d799093b84dd94dc6
Author: Ehsan Akhgari <ehsan at mozilla.com>
Date:   Mon Oct 17 10:48:50 2011 -0400

    Avoid defining inline when compling C++ on MSVC.
    
    Cairo fails to build with VC11 because it tries to #define inline,
    which is a keyword in C++. VC11's xkeycheck.h catches this with an #error.
    https://bugzilla.mozilla.org/show_bug.cgi?id=694797

diff --git a/src/cairo-compiler-private.h b/src/cairo-compiler-private.h
index dfe114b..f3e971e 100644
--- a/src/cairo-compiler-private.h
+++ b/src/cairo-compiler-private.h
@@ -208,9 +208,11 @@
 #endif
 
 #ifdef _MSC_VER
+#ifndef __cplusplus
 #undef inline
 #define inline __inline
 #endif
+#endif
 
 #if defined(_MSC_VER) && defined(_M_IX86)
 /* When compiling with /Gy and /OPT:ICF identical functions will be folded in together.


More information about the cairo-commit mailing list