pixman.h: Only define stdint types when PIXMAN_DONT_DEFINE_STDINT is undefined
authorSøren Sandmann Pedersen <ssp@redhat.com>
Mon, 1 Mar 2010 15:32:39 +0000 (10:32 -0500)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Sun, 14 Mar 2010 16:24:50 +0000 (12:24 -0400)
In SPICE, with Microsoft Visual C++, pixman.h is included after
another file that defines these types, which causes warnings and
errors.

This patch allows such code to just define PIXMAN_DONT_DEFINE_STDINT
to use its own version of those types.

pixman/pixman.h

index 23feb2f..85fcc8c 100644 (file)
@@ -84,6 +84,9 @@ PIXMAN_BEGIN_DECLS
 /*
  * Standard integers
  */
+
+#if !defined (PIXMAN_DONT_DEFINE_STDINT)
+
 #if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun) || defined (__digital__) || defined (__HP_cc)
 #  include <inttypes.h>
 #elif defined (_MSC_VER)
@@ -101,6 +104,8 @@ typedef unsigned __int64 uint64_t;
 #  include <stdint.h>
 #endif
 
+#endif
+
 /*
  * Boolean
  */