[cairo-commit] configure.in src/cairoint.h src/cairo-png.c
Behdad Esfahbod
behdad at kemper.freedesktop.org
Sun Dec 17 11:09:19 PST 2006
configure.in | 1 +
src/cairo-png.c | 2 +-
src/cairoint.h | 7 +------
3 files changed, 3 insertions(+), 7 deletions(-)
New commits:
diff-tree 0d9b2d041578c183b026b90c3760ce8dc59e2834 (from 294d1a3c4e1865763ba1c9ac8d55827cd470280b)
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Dec 17 14:09:15 2006 -0500
[configure] Use AC_C_INLINE to correctly define inline
Previously we were defining a symbol INLINE and use that in one place, while
other places were using straight inline. With the AC_C_INLINE macro we can
just leave it to autoconf to correctly choose what inline should be defined
to.
diff --git a/configure.in b/configure.in
index a94fc28..f6d670c 100644
--- a/configure.in
+++ b/configure.in
@@ -54,6 +54,7 @@ AC_PROG_CC
AC_PROG_CPP
AC_PROG_LIBTOOL dnl required version (1.4) DON'T REMOVE!
AC_STDC_HEADERS
+AC_C_INLINE
AC_C_BIGENDIAN
AX_C_FLOAT_WORDS_BIGENDIAN
diff --git a/src/cairo-png.c b/src/cairo-png.c
index 3b33b54..006cae3 100644
--- a/src/cairo-png.c
+++ b/src/cairo-png.c
@@ -289,7 +289,7 @@ cairo_surface_write_to_png_stream (cairo
}
slim_hidden_def (cairo_surface_write_to_png_stream);
-static INLINE int
+static inline int
multiply_alpha (int alpha, int color)
{
int temp = (alpha * color) + 0x80;
diff --git a/src/cairoint.h b/src/cairoint.h
index 9774433..80ddb00 100755
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -67,6 +67,7 @@
#ifdef _MSC_VER
#define snprintf _snprintf
+#undef inline
#define inline __inline
#endif
@@ -133,12 +134,6 @@ CAIRO_BEGIN_DECLS
#define __attribute__(x)
#endif
-#if defined(__GNUC__)
-#define INLINE __inline__
-#else
-#define INLINE
-#endif
-
#if HAVE_PTHREAD_H
# include <pthread.h>
# define CAIRO_MUTEX_DECLARE(name) static pthread_mutex_t name = PTHREAD_MUTEX_INITIALIZER
More information about the cairo-commit
mailing list