]> gitweb.michael.orlitzky.com - libsvgtiny.git/blobdiff - src/svgtiny_internal.h
Update to new NSBUILD infrastructure
[libsvgtiny.git] / src / svgtiny_internal.h
index f07f4308a181420b42d2c2e50a99c773d7997202..eb90c5b7dae00e0a4d77576c07018f99e927e87c 100644 (file)
 
 #include <stdbool.h>
 
+#ifndef UNUSED
+#define UNUSED(x) ((void) (x))
+#endif
+
 struct svgtiny_gradient_stop {
        float offset;
        svgtiny_colour color;
@@ -59,6 +63,13 @@ 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 *svgtiny_strndup(const char *s, size_t n);
+#define strndup svgtiny_strndup
+#endif
 
 /* svgtiny_gradient.c */
 void svgtiny_find_gradient(const char *id, struct svgtiny_parse_state *state);