]> gitweb.michael.orlitzky.com - libsvgtiny.git/blobdiff - src/svgtiny_internal.h
Use built-in strndup if the platform we're targetting doesn't have one
[libsvgtiny.git] / src / svgtiny_internal.h
index 3ea6e7b49d511b7ece2145bb81870156158b492a..13db00e4ffd6841450fb5c1f0b186c27f7cada69 100644 (file)
@@ -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);