[cairo] Cairo 1.4.6 release-candidate snapshot available

Richard Hult richard at imendio.com
Sat Apr 28 01:25:32 PDT 2007


Carl Worth wrote:
> I've made a second release-candidate snapshot for what I'd like to
> become cairo 1.4.6:
> 
> http://cairographics.org/snapshots/cairo-1.4.5-20070427-a392cc.tar.gz

It doesn't build for me on OS X because of the following:

cairo-perf-diff-files.c: In function 'cairo_perf_report_load':
cairo-perf-diff-files.c:395: error: implicit declaration of function 
'basename'

It appears that basename() is declared in libgen.h on OS X, I'm not sure 
if that header exists on other systems as well?

Another problem is that since we are using 
-Werror-implicit-function-declaration, the build fails due to the custom 
strndup and getline implementations not being declared:

cairo-perf-diff-files.c:181: error: implicit declaration of function 
'strndup'

Tentative patch attached,
Richard
-------------- next part --------------
diff --git a/perf/cairo-perf-diff-files.c b/perf/cairo-perf-diff-files.c
index adbc63b..c6623ef 100644
--- a/perf/cairo-perf-diff-files.c
+++ b/perf/cairo-perf-diff-files.c
@@ -38,6 +38,14 @@
 #include <ctype.h>
 #include <math.h>
 #include <assert.h>
+#ifdef __APPLE__
+#include <libgen.h> /* for basename() */
+#endif
+
+#ifndef __USE_GNU
+ssize_t getline (char **lineptr, size_t *n, FILE *stream);
+char *strndup (const char *s, size_t n);
+#endif
 
 typedef struct _test_report {
     int id;


More information about the cairo mailing list