summaryrefslogtreecommitdiff
path: root/strdup_compat.h
diff options
context:
space:
mode:
authorAlexandru Ardelean <ardeleanalex@gmail.com>2016-11-16 17:00:45 +0200
committerAlexandru Ardelean <ardeleanalex@gmail.com>2016-11-22 16:37:29 +0200
commit8cb86a583afcb858d14b68216e3232f4e8f3962a (patch)
tree7d11a767740d415a1c0bc25ef8d9a125dd1fc27e /strdup_compat.h
parentc0da680f13a089a124c1c841f55288045a814243 (diff)
downloadjson-c-8cb86a583afcb858d14b68216e3232f4e8f3962a.tar.gz
strdup_compat.h: re-spin this compat header ; use math_compat.h as template
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Diffstat (limited to 'strdup_compat.h')
-rw-r--r--strdup_compat.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/strdup_compat.h b/strdup_compat.h
new file mode 100644
index 0000000..51af81e
--- /dev/null
+++ b/strdup_compat.h
@@ -0,0 +1,11 @@
+#ifndef __strdup_compat_h
+#define __strdup_compat_h
+
+#if !defined(HAVE_STRDUP) && defined(_MSC_VER)
+ /* MSC has the version as _strdup */
+# define strdup _strdup
+#elif !defined(HAVE_STRDUP)
+# error You do not have strdup on your system.
+#endif /* HAVE_STRDUP */
+
+#endif