This reverts commit
aaba8c1080533133329086e47f4f45981dfdd1ee.
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.
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
set(JSON_C_HEADERS
- ./compat/strdup.h
./json.h
${CMAKE_CURRENT_BINARY_DIR}/include/config.h
./json_config.h
libjson_cinclude_HEADERS = \
arraylist.h \
bits.h \
- compat/strdup.h \
debug.h \
json.h \
json_c_version.h \
+++ /dev/null
-#ifndef __STRDUP_H_COMPAT__
-#define __STRDUP_H_COMPAT__
-
-#include "../config.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 /* __STRDUP_H_COMPAT__ */
<File
RelativePath=".\bits.h">
</File>
- <File
- RelativePath=".\compat\strdup.h">
- </File>
<File
RelativePath=".\debug.h">
</File>
</ItemGroup>
<ItemGroup>
<ClInclude Include="arraylist.h" />
- <ClInclude Include="compat\strdup.h" />
<ClInclude Include="debug.h" />
<ClInclude Include="json_inttypes.h" />
<ClInclude Include="json_object.h" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
<ClInclude Include="arraylist.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="compat\strdup.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="debug.h">
<Filter>Header Files</Filter>
</ClInclude>
<None Include="README-WIN32.html" />
<None Include="README.html" />
</ItemGroup>
-</Project>
+</Project>
\ No newline at end of file
#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 */
#include "json_object.h"
#include "json_tokener.h"
#include "json_util.h"
-#include "compat/strdup.h"
#ifdef HAVE_LOCALE_H
#include <locale.h>
#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