summaryrefslogtreecommitdiff
path: root/perf
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2007-04-28 07:46:56 -0700
committerCarl Worth <cworth@cworth.org>2007-04-28 07:46:56 -0700
commit7e6ab5461c2eb75c948bcb4725613ebe826c697a (patch)
tree18e6fe33aaca33f529be3864b6275da78453ddc9 /perf
parent422798db1d73c1a8ecc5877133b0325023f38e61 (diff)
Add missing prototypes for getline and strndup
This is needed to prevent breaking the build for non-GNU systems.
Diffstat (limited to 'perf')
-rw-r--r--perf/cairo-perf-diff-files.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/perf/cairo-perf-diff-files.c b/perf/cairo-perf-diff-files.c
index 108940de3..2fd6229d2 100644
--- a/perf/cairo-perf-diff-files.c
+++ b/perf/cairo-perf-diff-files.c
@@ -94,6 +94,14 @@ typedef struct _cairo_perf_diff_files_args {
cairo_perf_report_options_t options;
} cairo_perf_diff_files_args_t;
+#ifndef __USE_GNU
+static ssize_t
+getline (char **lineptr, size_t *n, FILE *stream);
+
+static char *
+strndup (const char *s, size_t n);
+#endif
+
/* Ad-hoc parsing, macros with a strong dependence on the calling
* context, and plenty of other ugliness is here. But at least it's
* not perl... */
@@ -248,7 +256,7 @@ test_report_parse (test_report_t *report, char *line, char *configuration)
*/
#ifndef __USE_GNU
#define POORMANS_GETLINE_BUFFER_SIZE (65536)
-ssize_t
+static ssize_t
getline (char **lineptr, size_t *n, FILE *stream)
{
if (!*lineptr)
@@ -272,7 +280,7 @@ getline (char **lineptr, size_t *n, FILE *stream)
}
#undef POORMANS_GETLINE_BUFFER_SIZE
-char *
+static char *
strndup (const char *s, size_t n)
{
size_t len;