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

@@ -31,7 +31,6 @@
#include "json_object.h"
#include "json_tokener.h"
#include "json_util.h"
#include "compat/strdup.h"
#ifdef HAVE_LOCALE_H
#include <locale.h>
@@ -42,6 +41,13 @@
#define jt_hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x) & 7) + 9)
#if !HAVE_STRDUP && defined(_MSC_VER)
/* MSC has the version as _strdup */
# define strdup _strdup
#elif !HAVE_STRDUP
# error You do not have strdup on your system.
#endif /* HAVE_STRDUP */
#if !HAVE_STRNCASECMP && defined(_MSC_VER)
/* MSC has the version as _strnicmp */
# define strncasecmp _strnicmp