summaryrefslogtreecommitdiff
path: root/perf/cairo-perf-trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'perf/cairo-perf-trace.c')
-rw-r--r--perf/cairo-perf-trace.c52
1 files changed, 1 insertions, 51 deletions
diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c
index 25a98f34..3319917f 100644
--- a/perf/cairo-perf-trace.c
+++ b/perf/cairo-perf-trace.c
@@ -32,6 +32,7 @@
#include "../cairo-version.h" /* for the real version */
+#include "cairo-missing.h"
#include "cairo-perf.h"
#include "cairo-stats.h"
@@ -373,57 +374,6 @@ usage (const char *argv0)
argv0, argv0);
}
-#ifndef __USE_GNU
-#define POORMANS_GETLINE_BUFFER_SIZE (65536)
-static ssize_t
-getline (char **lineptr,
- size_t *n,
- FILE *stream)
-{
- if (!*lineptr)
- {
- *n = POORMANS_GETLINE_BUFFER_SIZE;
- *lineptr = (char *) malloc (*n);
- }
-
- if (!fgets (*lineptr, *n, stream))
- return -1;
-
- if (!feof (stream) && !strchr (*lineptr, '\n'))
- {
- fprintf (stderr, "The poor man's implementation of getline in "
- __FILE__ " needs a bigger buffer. Perhaps it's "
- "time for a complete implementation of getline.\n");
- exit (0);
- }
-
- return strlen (*lineptr);
-}
-#undef POORMANS_GETLINE_BUFFER_SIZE
-
-static char *
-strndup (const char *s,
- size_t n)
-{
- size_t len;
- char *sdup;
-
- if (!s)
- return NULL;
-
- len = strlen (s);
- len = (n < len ? n : len);
- sdup = (char *) malloc (len + 1);
- if (sdup)
- {
- memcpy (sdup, s, len);
- sdup[len] = '\0';
- }
-
- return sdup;
-}
-#endif /* ifndef __USE_GNU */
-
static cairo_bool_t
read_excludes (cairo_perf_t *perf,
const char *filename)