summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@home.(none)>2006-03-15 11:49:37 -0500
committerBehdad Esfahbod <behdad@home.(none)>2006-03-15 11:49:37 -0500
commit5cbf914770cc01060fae1abe8cdda9b915352845 (patch)
tree266a00feb5bd839314418e4d9d6f1daf040b473d
parente78c945b6149a5b209be775d8b240467fbb4cc02 (diff)
downloadcairo-5cbf914770cc01060fae1abe8cdda9b915352845.tar.gz
Misc compilation fixes (C++-style comments, M_PI decls, etc.)
(cherry picked from d0cc56b9a24fa59febc15ac5de073da0e785e1cc commit) (cherry picked from a6a054abe45287eb950c294e20366594313138f5 commit) (cherry picked from f6b4fabaf59227d6cafcdd7e27cf0d8e26b4eeb8 commit)
-rw-r--r--pixman/src/fbcompose.c10
-rw-r--r--pixman/src/pixregion.c6
-rw-r--r--src/cairoint.h4
3 files changed, 17 insertions, 3 deletions
diff --git a/pixman/src/fbcompose.c b/pixman/src/fbcompose.c
index 4598ab28a..c8329814c 100644
--- a/pixman/src/fbcompose.c
+++ b/pixman/src/fbcompose.c
@@ -33,6 +33,16 @@
#include "pixregionint.h"
+#ifdef _MSC_VER
+#define _USE_MATH_DEFINES
+#endif
+
+#include <math.h>
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
/* #define PIXMAN_CONVOLUTION */
/* #define PIXMAN_GRADIENTS */
/* #define PIXMAN_INDEXED_FORMATS */
diff --git a/pixman/src/pixregion.c b/pixman/src/pixregion.c
index 9c122f534..e5660969e 100644
--- a/pixman/src/pixregion.c
+++ b/pixman/src/pixregion.c
@@ -60,7 +60,7 @@ SOFTWARE.
#endif
#undef assert
-#ifdef DEBUG
+#ifdef DEBUG_PIXREGION
#define assert(expr) {if (!(expr)) \
FatalError("Assertion failed file %s, line %d: expr\n", \
__FILE__, __LINE__); }
@@ -208,7 +208,7 @@ if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \
}
-#ifdef DEBUG
+#ifdef DEBUG_PIXREGION
int
pixman_region16_print(rgn)
pixman_region16_t * rgn;
@@ -302,7 +302,7 @@ pixman_region16_valid(reg)
}
}
-#endif /* DEBUG */
+#endif /* DEBUG_PIXREGION */
/* Create a new empty region */
diff --git a/src/cairoint.h b/src/cairoint.h
index 80132deef..4ea156366 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -171,6 +171,10 @@
#define TRUE 1
#endif
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
#define ASSERT_NOT_REACHED \
do { \
static const int NOT_REACHED = 0; \