From 5533143958b16ed87026cdf533fc4d544b2d712f Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 29 Dec 2010 18:06:04 +0000 Subject: Use built-in strndup if the platform we're targetting doesn't have one svn path=/trunk/libsvgtiny/; revision=11140 --- src/svgtiny_internal.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/svgtiny_internal.h') diff --git a/src/svgtiny_internal.h b/src/svgtiny_internal.h index 3ea6e7b..13db00e 100644 --- a/src/svgtiny_internal.h +++ b/src/svgtiny_internal.h @@ -63,6 +63,12 @@ void svgtiny_parse_transform(char *s, float *ma, float *mb, struct svgtiny_shape *svgtiny_add_shape(struct svgtiny_parse_state *state); void svgtiny_transform_path(float *p, unsigned int n, struct svgtiny_parse_state *state); +#if defined(_GNU_SOURCE) +#define HAVE_STRNDUP +#else +#undef HAVE_STRNDUP +char *strndup(const char *s, size_t n); +#endif /* svgtiny_gradient.c */ void svgtiny_find_gradient(const char *id, struct svgtiny_parse_state *state); -- cgit v1.2.3