compat/strdup.h: move common compat check for strdup() to own file

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
Alexandru Ardelean
2016-10-26 10:37:50 +03:00
parent d4899bd4d5
commit aaba8c1080
8 changed files with 26 additions and 16 deletions

View File

@@ -29,13 +29,7 @@
#include "json_object_private.h"
#include "json_util.h"
#include "math_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 */
#include "compat/strdup.h"
#if !defined(HAVE_SNPRINTF) && defined(_MSC_VER)
/* MSC has the version as _snprintf */