diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2010-12-29 18:06:04 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2010-12-29 18:06:04 +0000 |
commit | 5533143958b16ed87026cdf533fc4d544b2d712f (patch) | |
tree | 3921d20a69b2dcb4802951acbb037c5448868979 /src/svgtiny_internal.h | |
parent | 9730f6727c1ceac012441f5ffb4bce3ab0759526 (diff) | |
download | libsvgtiny-5533143958b16ed87026cdf533fc4d544b2d712f.tar.gz libsvgtiny-5533143958b16ed87026cdf533fc4d544b2d712f.tar.bz2 |
Use built-in strndup if the platform we're targetting doesn't have one
svn path=/trunk/libsvgtiny/; revision=11140
Diffstat (limited to 'src/svgtiny_internal.h')
-rw-r--r-- | src/svgtiny_internal.h | 6 |
1 files changed, 6 insertions, 0 deletions
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); |