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

This reverts commit aaba8c1080.

This commit breaks builddir != srcdir build, but, more importantly, it
also adds a dependency on a header, "config.h", which is not installed
and it's supposed to be private — since it's generated at configuration
time and it's not meant to be used by projects compiling against a
library.
This commit is contained in:
Emmanuele Bassi
2016-11-07 20:51:11 +00:00
parent e8ce1db471
commit 7601f20d70
8 changed files with 16 additions and 26 deletions

View File

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