[cairo-commit] 2 commits - src/cairo-cache-private.h src/cairo-clip-private.h src/cairo-fixed-private.h src/cairo-ft-private.h src/cairo-gstate-private.h src/cairo-hash-private.h src/cairoint.h src/cairo-malloc-private.h src/cairo-mutex-private.h src/cairo-mutex-type-private.h src/cairo-os2-private.h src/cairo-output-stream-private.h src/cairo-paginated-surface-private.h src/cairo-path-fixed-private.h src/cairo-pdf-surface-private.h src/cairo-private.h src/cairo-ps-surface-private.h src/cairo-quartz-private.h src/cairo-region-private.h src/cairo-scaled-font-private.h src/cairo-surface-private.h src/cairo-svg-surface-private.h src/cairo-type1-private.h src/cairo-types-private.h src/cairo-wideint-private.h src/cairo-xlib-surface-private.h src/Makefile.am

Behdad Esfahbod behdad at kemper.freedesktop.org
Wed Aug 22 00:04:14 PDT 2007


 src/Makefile.am                       |   23 ++++++++++++++++++-----
 src/cairo-cache-private.h             |    1 +
 src/cairo-clip-private.h              |    1 +
 src/cairo-fixed-private.h             |    1 +
 src/cairo-ft-private.h                |    1 +
 src/cairo-gstate-private.h            |    1 +
 src/cairo-hash-private.h              |    1 +
 src/cairo-malloc-private.h            |    1 +
 src/cairo-mutex-private.h             |    4 +---
 src/cairo-mutex-type-private.h        |    4 +---
 src/cairo-os2-private.h               |    3 ++-
 src/cairo-output-stream-private.h     |    1 +
 src/cairo-paginated-surface-private.h |    2 +-
 src/cairo-path-fixed-private.h        |    2 ++
 src/cairo-pdf-surface-private.h       |    2 ++
 src/cairo-private.h                   |    1 +
 src/cairo-ps-surface-private.h        |    2 ++
 src/cairo-quartz-private.h            |    2 +-
 src/cairo-region-private.h            |    2 ++
 src/cairo-scaled-font-private.h       |    2 +-
 src/cairo-surface-private.h           |    2 +-
 src/cairo-svg-surface-private.h       |    2 ++
 src/cairo-type1-private.h             |    2 ++
 src/cairo-types-private.h             |    2 ++
 src/cairo-wideint-private.h           |    2 ++
 src/cairo-xlib-surface-private.h      |    2 ++
 src/cairoint.h                        |   12 ++++++------
 27 files changed, 59 insertions(+), 22 deletions(-)

New commits:
diff-tree 735757a17a7c72f8598c8958b600daad941a0431 (from bfdc3b6642a36a7728f82ae87de83244d86ba29e)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Aug 22 02:58:37 2007 -0400

    [Makefile.am] Add target sparse to run sparse static source code analyzer
    
    There are still some bits not quite working.

diff --git a/src/Makefile.am b/src/Makefile.am
index a5a1406..082ce93 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -164,7 +164,7 @@ nodist_cairoinclude_HEADERS =		\
 
 lib_LTLIBRARIES = libcairo.la
 
-libcairo_la_SOURCES =				\
+libcairo_la_base_sources =			\
 	cairo.c					\
 	cairo.h					\
 	cairo-private.h				\
@@ -174,7 +174,6 @@ libcairo_la_SOURCES =				\
 	cairo-base85-stream.c			\
 	cairo-bentley-ottmann.c			\
 	cairo-cache.c				\
-	cairo-cache-private.h			\
 	cairo-clip.c				\
 	cairo-clip-private.h			\
 	cairo-color.c				\
@@ -193,7 +192,6 @@ libcairo_la_SOURCES =				\
 	cairo-lzw.c				\
 	cairo-matrix.c				\
 	cairo-mutex.c				\
-	cairo-mutex-list-private.h		\
 	cairo-mutex-private.h			\
 	cairo-mutex-type-private.h		\
 	cairo-operator.c			\
@@ -220,7 +218,6 @@ libcairo_la_SOURCES =				\
 	cairo-surface-fallback-private.h	\
 	cairo-surface-private.h			\
 	cairo-traps.c				\
-	cairo-types-private.h			\
 	cairo-pattern.c				\
 	cairo-unicode.c				\
 	cairo-output-stream.c			\
@@ -251,6 +248,19 @@ libcairo_la_SOURCES =				\
 	$(libcairo_directfb_sources)		\
 	cairoint.h
 
+# source files that cannot be passed to compiler directly.
+# mostly when they depend recursively on cairoint.h.  that is,
+# cairoint.h includes them in the middle.
+libcairo_la_special_sources =			\
+	cairo-cache-private.h			\
+	cairo-fixed-private.h			\
+	cairo-mutex-list-private.h		\
+	cairo-types-private.h
+
+libcairo_la_SOURCES =				\
+	$(libcairo_la_base_sources)		\
+	$(libcairo_la_special_sources)
+
 libcairo_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined $(export_symbols)
 
 libcairo_la_CFLAGS = -I$(srcdir) $(CAIRO_CFLAGS)
@@ -301,5 +311,8 @@ TESTS_ENVIRONMENT = srcdir="$(srcdir)"
 TESTS = check-def.sh check-plt.sh check-headers.sh check-cairoint.sh
 EXTRA_DIST += $(TESTS)
 
+sparse:
+	sparse -I$(top_builddir) $(libcairo_la_CFLAGS) -DHAVE_CONFIG_H $(libcairo_la_base_sources)
+
 splint:
-	splint -badflag -I$(top_builddir) $(libcairo_la_CFLAGS) -DHAVE_CONFIG_H $(libcairo_la_SOURCES)
+	splint -badflag -I$(top_builddir) $(libcairo_la_CFLAGS) -DHAVE_CONFIG_H $(libcairo_la_base_sources)
diff --git a/src/cairo-cache-private.h b/src/cairo-cache-private.h
index 7ab14e2..3359983 100644
--- a/src/cairo-cache-private.h
+++ b/src/cairo-cache-private.h
@@ -39,6 +39,7 @@
 #ifndef CAIRO_CACHE_PRIVATE_H
 #define CAIRO_CACHE_PRIVATE_H
 
+#include "cairoint.h"
 #include "cairo-types-private.h"
 
 /**
diff --git a/src/cairo-clip-private.h b/src/cairo-clip-private.h
index 61559ce..55ccb08 100644
--- a/src/cairo-clip-private.h
+++ b/src/cairo-clip-private.h
@@ -36,6 +36,7 @@
 #ifndef CAIRO_CLIP_PRIVATE_H
 #define CAIRO_CLIP_PRIVATE_H
 
+#include "cairoint.h"
 #include "cairo-path-fixed-private.h"
 
 extern const cairo_private cairo_rectangle_list_t _cairo_rectangles_nil;
diff --git a/src/cairo-fixed-private.h b/src/cairo-fixed-private.h
index 35b3748..bcc7d0c 100644
--- a/src/cairo-fixed-private.h
+++ b/src/cairo-fixed-private.h
@@ -37,6 +37,7 @@
 #ifndef CAIRO_FIXED_PRIVATE_H
 #define CAIRO_FIXED_PRIVATE_H
 
+#include "cairoint.h"
 #include "cairo-wideint-private.h"
 
 /*
diff --git a/src/cairo-ft-private.h b/src/cairo-ft-private.h
index 3e28f5e..55f86ee 100644
--- a/src/cairo-ft-private.h
+++ b/src/cairo-ft-private.h
@@ -37,6 +37,7 @@
 #ifndef CAIRO_FT_PRIVATE_H
 #define CAIRO_FT_PRIVATE_H
 
+#include "cairoint.h"
 #include <cairo-ft.h>
 #include <cairoint.h>
 
diff --git a/src/cairo-gstate-private.h b/src/cairo-gstate-private.h
index 2590048..276ce9f 100644
--- a/src/cairo-gstate-private.h
+++ b/src/cairo-gstate-private.h
@@ -36,6 +36,7 @@
 #ifndef CAIRO_GSTATE_PRIVATE_H
 #define CAIRO_GSTATE_PRIVATE_H
 
+#include "cairoint.h"
 #include "cairo-clip-private.h"
 
 struct _cairo_gstate {
diff --git a/src/cairo-hash-private.h b/src/cairo-hash-private.h
index 8ed3ba8..b0c1e00 100644
--- a/src/cairo-hash-private.h
+++ b/src/cairo-hash-private.h
@@ -39,6 +39,7 @@
 #ifndef CAIRO_HASH_PRIVATE_H
 #define CAIRO_HASH_PRIVATE_H
 
+#include "cairoint.h"
 #include "cairo-types-private.h"
 
 /* XXX: I'd like this file to be self-contained in terms of
diff --git a/src/cairo-malloc-private.h b/src/cairo-malloc-private.h
index f503b39..bd47957 100644
--- a/src/cairo-malloc-private.h
+++ b/src/cairo-malloc-private.h
@@ -37,6 +37,7 @@
 #ifndef CAIRO_MALLOC_PRIVATE_H
 #define CAIRO_MALLOC_PRIVATE_H
 
+#include "cairoint.h"
 #include "cairo-wideint-private.h"
 
 /**
diff --git a/src/cairo-mutex-private.h b/src/cairo-mutex-private.h
index 88e88bb..7f61b14 100644
--- a/src/cairo-mutex-private.h
+++ b/src/cairo-mutex-private.h
@@ -41,9 +41,7 @@
 #ifndef CAIRO_MUTEX_PRIVATE_H
 #define CAIRO_MUTEX_PRIVATE_H
 
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "cairoint.h"
 
 #include <cairo-features.h>
 
diff --git a/src/cairo-mutex-type-private.h b/src/cairo-mutex-type-private.h
index 59d581a..1d82de8 100644
--- a/src/cairo-mutex-type-private.h
+++ b/src/cairo-mutex-type-private.h
@@ -41,9 +41,7 @@
 #ifndef CAIRO_MUTEX_TYPE_PRIVATE_H
 #define CAIRO_MUTEX_TYPE_PRIVATE_H
 
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "cairoint.h"
 
 #include <cairo-features.h>
 
diff --git a/src/cairo-os2-private.h b/src/cairo-os2-private.h
index 9ed0c7c..5d67e09 100644
--- a/src/cairo-os2-private.h
+++ b/src/cairo-os2-private.h
@@ -38,6 +38,8 @@
 #ifndef CAIRO_OS2_PRIVATE_H
 #define CAIRO_OS2_PRIVATE_H
 
+#include "cairoint.h"
+
 #define INCL_DOS
 #define INCL_DOSSEMAPHORES
 #define INCL_DOSERRORS
@@ -50,7 +52,6 @@
 #endif
 
 #include <cairo-os2.h>
-#include <cairoint.h>
 
 typedef struct _cairo_os2_surface
 {
diff --git a/src/cairo-output-stream-private.h b/src/cairo-output-stream-private.h
index 0600431..1812856 100644
--- a/src/cairo-output-stream-private.h
+++ b/src/cairo-output-stream-private.h
@@ -37,6 +37,7 @@
 #ifndef CAIRO_OUTPUT_STREAM_PRIVATE_H
 #define CAIRO_OUTPUT_STREAM_PRIVATE_H
 
+#include "cairoint.h"
 #include "cairo-types-private.h"
 
 typedef cairo_status_t (*cairo_output_stream_write_func_t) (cairo_output_stream_t *output_stream,
diff --git a/src/cairo-paginated-surface-private.h b/src/cairo-paginated-surface-private.h
index b406cac..a9cea07 100644
--- a/src/cairo-paginated-surface-private.h
+++ b/src/cairo-paginated-surface-private.h
@@ -36,7 +36,7 @@
 #ifndef CAIRO_PAGINATED_SURFACE_H
 #define CAIRO_PAGINATED_SURFACE_H
 
-#include "cairo.h"
+#include "cairoint.h"
 
 #include "cairo-surface-private.h"
 
diff --git a/src/cairo-path-fixed-private.h b/src/cairo-path-fixed-private.h
index 65401f3..eedab58 100644
--- a/src/cairo-path-fixed-private.h
+++ b/src/cairo-path-fixed-private.h
@@ -36,6 +36,8 @@
 #ifndef CAIRO_PATH_FIXED_PRIVATE_H
 #define CAIRO_PATH_FIXED_PRIVATE_H
 
+#include "cairoint.h"
+
 typedef enum cairo_path_op {
     CAIRO_PATH_OP_MOVE_TO = 0,
     CAIRO_PATH_OP_LINE_TO = 1,
diff --git a/src/cairo-pdf-surface-private.h b/src/cairo-pdf-surface-private.h
index 1af2ad0..7b00ad9 100644
--- a/src/cairo-pdf-surface-private.h
+++ b/src/cairo-pdf-surface-private.h
@@ -39,6 +39,8 @@
 #ifndef CAIRO_PDF_SURFACE_PRIVATE_H
 #define CAIRO_PDF_SURFACE_PRIVATE_H
 
+#include "cairoint.h"
+
 #include "cairo-pdf.h"
 
 #include "cairo-surface-private.h"
diff --git a/src/cairo-private.h b/src/cairo-private.h
index 14cc79a..bca380e 100644
--- a/src/cairo-private.h
+++ b/src/cairo-private.h
@@ -36,6 +36,7 @@
 #ifndef CAIRO_PRIVATE_H
 #define CAIRO_PRIVATE_H
 
+#include "cairoint.h"
 #include "cairo-gstate-private.h"
 #include "cairo-path-fixed-private.h"
 
diff --git a/src/cairo-ps-surface-private.h b/src/cairo-ps-surface-private.h
index 2499b99..b6e2432 100644
--- a/src/cairo-ps-surface-private.h
+++ b/src/cairo-ps-surface-private.h
@@ -40,6 +40,8 @@
 #ifndef CAIRO_PS_SURFACE_PRIVATE_H
 #define CAIRO_PS_SURFACE_PRIVATE_H
 
+#include "cairoint.h"
+
 #include "cairo-ps.h"
 
 #include "cairo-surface-private.h"
diff --git a/src/cairo-quartz-private.h b/src/cairo-quartz-private.h
index 9f42a8b..5e46e8d 100644
--- a/src/cairo-quartz-private.h
+++ b/src/cairo-quartz-private.h
@@ -38,7 +38,7 @@
 #ifndef CAIRO_QUARTZ_PRIVATE_H
 #define CAIRO_QUARTZ_PRIVATE_H
 
-#include <cairoint.h>
+#include "cairoint.h"
 
 #ifdef CAIRO_HAS_QUARTZ_SURFACE
 #include <cairo-quartz.h>
diff --git a/src/cairo-region-private.h b/src/cairo-region-private.h
index 7f92f9c..20be2fa 100644
--- a/src/cairo-region-private.h
+++ b/src/cairo-region-private.h
@@ -37,6 +37,8 @@
 #ifndef CAIRO_REGION_PRIVATE_H
 #define CAIRO_REGION_PRIVATE_H
 
+#include "cairoint.h"
+
 #include <pixman.h>
 
 /* cairo_region_t is defined in cairoint.h */
diff --git a/src/cairo-scaled-font-private.h b/src/cairo-scaled-font-private.h
index fa71644..bd6245c 100644
--- a/src/cairo-scaled-font-private.h
+++ b/src/cairo-scaled-font-private.h
@@ -38,7 +38,7 @@
 #ifndef CAIRO_SCALED_FONT_PRIVATE_H
 #define CAIRO_SCALED_FONT_PRIVATE_H
 
-#include "cairo.h"
+#include "cairoint.h"
 
 #include "cairo-types-private.h"
 #include "cairo-mutex-type-private.h"
diff --git a/src/cairo-surface-private.h b/src/cairo-surface-private.h
index 6193cf8..85b29f7 100644
--- a/src/cairo-surface-private.h
+++ b/src/cairo-surface-private.h
@@ -38,7 +38,7 @@
 #ifndef CAIRO_SURFACE_PRIVATE_H
 #define CAIRO_SURFACE_PRIVATE_H
 
-#include "cairo.h"
+#include "cairoint.h"
 
 #include "cairo-types-private.h"
 
diff --git a/src/cairo-svg-surface-private.h b/src/cairo-svg-surface-private.h
index e7cd4db..ee5cf49 100644
--- a/src/cairo-svg-surface-private.h
+++ b/src/cairo-svg-surface-private.h
@@ -41,6 +41,8 @@
 #ifndef CAIRO_SVG_SURFACE_PRIVATE_H
 #define CAIRO_SVG_SURFACE_PRIVATE_H
 
+#include "cairoint.h"
+
 #include "cairo-svg.h"
 
 #include "cairo-surface-private.h"
diff --git a/src/cairo-type1-private.h b/src/cairo-type1-private.h
index ae28e05..03b0039 100644
--- a/src/cairo-type1-private.h
+++ b/src/cairo-type1-private.h
@@ -36,6 +36,8 @@
 #ifndef CAIRO_TYPE1_PRIVATE_H
 #define CAIRO_TYPE1_PRIVATE_H
 
+#include "cairoint.h"
+
 /* Magic constants for the type1 eexec encryption */
 #define CAIRO_TYPE1_ENCRYPT_C1		((unsigned short) 52845)
 #define CAIRO_TYPE1_ENCRYPT_C2		((unsigned short) 22719)
diff --git a/src/cairo-types-private.h b/src/cairo-types-private.h
index 37b131e..a99f325 100644
--- a/src/cairo-types-private.h
+++ b/src/cairo-types-private.h
@@ -38,6 +38,8 @@
 #ifndef CAIRO_TYPES_PRIVATE_H
 #define CAIRO_TYPES_PRIVATE_H
 
+#include "cairoint.h"
+
 typedef struct _cairo_array cairo_array_t;
 struct _cairo_array {
     unsigned int size;
diff --git a/src/cairo-wideint-private.h b/src/cairo-wideint-private.h
index 636d8a6..7811063 100644
--- a/src/cairo-wideint-private.h
+++ b/src/cairo-wideint-private.h
@@ -37,6 +37,8 @@
 #ifndef CAIRO_WIDEINT_H
 #define CAIRO_WIDEINT_H
 
+#include "cairoint.h"
+
 #if   HAVE_STDINT_H
 # include <stdint.h>
 #elif HAVE_INTTYPES_H
diff --git a/src/cairo-xlib-surface-private.h b/src/cairo-xlib-surface-private.h
index 3bbf43e..16e5868 100644
--- a/src/cairo-xlib-surface-private.h
+++ b/src/cairo-xlib-surface-private.h
@@ -33,6 +33,8 @@
 #ifndef CAIRO_XLIB_SURFACE_PRIVATE_H
 #define CAIRO_XLIB_SURFACE_PRIVATE_H
 
+#include "cairoint.h"
+
 #include "cairo-xlib.h"
 
 #include "cairo-surface-private.h"
diff --git a/src/cairoint.h b/src/cairoint.h
index 8846465..1f13e76 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -179,11 +179,6 @@ do {					\
 
 #define CAIRO_REF_COUNT_INVALID ((unsigned int) -1)
 
-#include "cairo-mutex-private.h"
-#include "cairo-wideint-private.h"
-#include "cairo-malloc-private.h"
-#include "cairo-fixed-private.h"
-
 #define CAIRO_ALPHA_IS_OPAQUE(alpha) ((alpha) >= ((double)0xff00 / (double)0xffff))
 #define CAIRO_ALPHA_SHORT_IS_OPAQUE(alpha) ((alpha) >= 0xff00)
 #define CAIRO_ALPHA_IS_ZERO(alpha) ((alpha) <= 0.0)
@@ -238,8 +233,8 @@ be32_to_cpu(uint32_t v)
 #endif
 
 #include "cairo-types-private.h"
-#include "cairo-hash-private.h"
 #include "cairo-cache-private.h"
+#include "cairo-fixed-private.h"
 
 typedef struct _cairo_region cairo_region_t;
 
@@ -2456,4 +2451,9 @@ slim_hidden_proto (cairo_surface_write_t
 
 CAIRO_END_DECLS
 
+#include "cairo-mutex-private.h"
+#include "cairo-wideint-private.h"
+#include "cairo-malloc-private.h"
+#include "cairo-hash-private.h"
+
 #endif
diff-tree bfdc3b6642a36a7728f82ae87de83244d86ba29e (from af6a123e95b359234d70f7a766457ff3a427c3cc)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Aug 22 01:16:50 2007 -0400

    [Makefile.am] Move -DHAVE_CONFIG_H to the right place

diff --git a/src/Makefile.am b/src/Makefile.am
index 836da6e..a5a1406 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -302,4 +302,4 @@ TESTS = check-def.sh check-plt.sh check-
 EXTRA_DIST += $(TESTS)
 
 splint:
-	splint -badflag -I$(top_builddir) $(libcairo_la_CFLAGS) $(libcairo_la_SOURCES) -DHAVE_CONFIG_H
+	splint -badflag -I$(top_builddir) $(libcairo_la_CFLAGS) -DHAVE_CONFIG_H $(libcairo_la_SOURCES)


More information about the cairo-commit mailing list