summaryrefslogtreecommitdiffstats
path: root/librdfa/strtok_r.h
diff options
context:
space:
mode:
Diffstat (limited to 'librdfa/strtok_r.h')
-rw-r--r--librdfa/strtok_r.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/librdfa/strtok_r.h b/librdfa/strtok_r.h
new file mode 100644
index 0000000..6fd31ee
--- /dev/null
+++ b/librdfa/strtok_r.h
@@ -0,0 +1,15 @@
+/* This file is in the public domain */
+
+#ifndef HAVE_STRTOK_R
+# define NEED_RDFA_STRTOK_R
+#endif
+
+#if defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1400
+# define strtok_r(s,d,p) strtok_s(s,d,p)
+# undef NEED_RDFA_STRTOK_R
+#endif
+
+#ifdef NEED_RDFA_STRTOK_R
+char *rdfa_strtok_r(char *str, const char *delim, char **saveptr);
+# define strtok_r(s,d,p) rdfa_strtok_r(s,d,p)
+#endif