Fix Win32 build problemstags/json-c-0.13-20171207
| @@ -1,26 +1,42 @@ | |||||
| /* | |||||
| * $Id: config.h.win32,v 1.2 2006/01/26 02:16:28 mclark Exp $ | |||||
| * | |||||
| * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. | |||||
| * Michael Clark <michael@metaparadigm.com> | |||||
| * | |||||
| * This library is free software; you can redistribute it and/or modify | |||||
| * it under the terms of the MIT license. See COPYING for details. | |||||
| * | |||||
| */ | |||||
| /* config.h.win32 Generated by configure. */ | |||||
| #define PACKAGE_STRING "JSON C Library 0.2" | |||||
| #define PACKAGE_BUGREPORT "json-c@googlegroups.com" | |||||
| #define PACKAGE_NAME "JSON C Library" | |||||
| #define PACKAGE_TARNAME "json-c" | |||||
| #define PACKAGE_VERSION "0.2" | |||||
| /* config.h.in. Generated from configure.ac by autoheader. */ | /* config.h.in. Generated from configure.ac by autoheader. */ | ||||
| /* Enable RDRANR Hardware RNG Hash Seed */ | |||||
| #undef ENABLE_RDRAND | |||||
| /* Define if .gnu.warning accepts long strings. */ | |||||
| #undef HAS_GNU_WARNING_LONG | |||||
| /* Define to 1 if you have the declaration of `INFINITY', and to 0 if you | |||||
| don't. */ | |||||
| #define HAVE_DECL_INFINITY 1 | |||||
| /* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. | |||||
| */ | |||||
| #define HAVE_DECL_ISINF 1 | |||||
| /* Define to 1 if you have the declaration of `isnan', and to 0 if you don't. | |||||
| */ | |||||
| #define HAVE_DECL_ISNAN 1 | |||||
| /* Define to 1 if you have the declaration of `nan', and to 0 if you don't. */ | |||||
| #define HAVE_DECL_NAN 1 | |||||
| /* Define to 1 if you have the declaration of `_finite', and to 0 if you | |||||
| don't. */ | |||||
| #define HAVE_DECL__FINITE 0 | |||||
| /* Define to 1 if you have the declaration of `_isnan', and to 0 if you don't. | |||||
| */ | |||||
| #define HAVE_DECL__ISNAN 0 | |||||
| /* Define to 1 if you have the <dlfcn.h> header file. */ | |||||
| #undef HAVE_DLFCN_H | |||||
| /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ | /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ | ||||
| /* #undef HAVE_DOPRNT */ | |||||
| #undef HAVE_DOPRNT | |||||
| /* Define to 1 if you have the <endian.h> header file. */ | |||||
| #define HAVE_ENDIAN_H 1 | |||||
| /* Define to 1 if you have the <fcntl.h> header file. */ | /* Define to 1 if you have the <fcntl.h> header file. */ | ||||
| #define HAVE_FCNTL_H 1 | #define HAVE_FCNTL_H 1 | ||||
| @@ -31,6 +47,9 @@ | |||||
| /* Define to 1 if you have the <limits.h> header file. */ | /* Define to 1 if you have the <limits.h> header file. */ | ||||
| #define HAVE_LIMITS_H 1 | #define HAVE_LIMITS_H 1 | ||||
| /* Define to 1 if you have the <locale.h> header file. */ | |||||
| #define HAVE_LOCALE_H 1 | |||||
| /* Define to 1 if your system has a GNU libc compatible `malloc' function, and | /* Define to 1 if your system has a GNU libc compatible `malloc' function, and | ||||
| to 0 otherwise. */ | to 0 otherwise. */ | ||||
| #define HAVE_MALLOC 1 | #define HAVE_MALLOC 1 | ||||
| @@ -43,19 +62,28 @@ | |||||
| /* Define to 1 if your system has a GNU libc compatible `realloc' function, | /* Define to 1 if your system has a GNU libc compatible `realloc' function, | ||||
| and to 0 otherwise. */ | and to 0 otherwise. */ | ||||
| #define HAVE_REALLOC 1 | |||||
| #define HAVE_REALLOC 1 | |||||
| /* Define to 1 if you have the `setlocale' function. */ | |||||
| #define HAVE_SETLOCALE 1 | |||||
| /* Define to 1 if you have the `snprintf' function. */ | |||||
| #undef HAVE_SNPRINTF | |||||
| /* Define to 1 if you have the <stdarg.h> header file. */ | |||||
| #define HAVE_STDARG_H 1 | |||||
| /* Define to 1 if you have the <stdint.h> header file. */ | /* Define to 1 if you have the <stdint.h> header file. */ | ||||
| #define HAVE_STDINT_H 1 | #define HAVE_STDINT_H 1 | ||||
| /* Define to 1 if you have the <stdlib.h> header file. */ | /* Define to 1 if you have the <stdlib.h> header file. */ | ||||
| #define HAVE_STDLIB_H 1 | #define HAVE_STDLIB_H 1 | ||||
| /* Define to 1 if you have the `strdup' function. */ | |||||
| #undef HAVE_STRNDUP | |||||
| /* Define to 1 if you have the `strcasecmp' function. */ | |||||
| #define HAVE_STRCASECMP 1 | |||||
| /* Define to 1 if you have the <stdarg.h> header file. */ | |||||
| #define HAVE_STDARG_H 1 | |||||
| /* Define to 1 if you have the `strdup' function. */ | |||||
| #define HAVE_STRDUP 1 | |||||
| /* Define to 1 if you have the `strerror' function. */ | /* Define to 1 if you have the `strerror' function. */ | ||||
| #define HAVE_STRERROR 1 | #define HAVE_STRERROR 1 | ||||
| @@ -66,9 +94,15 @@ | |||||
| /* Define to 1 if you have the <string.h> header file. */ | /* Define to 1 if you have the <string.h> header file. */ | ||||
| #define HAVE_STRING_H 1 | #define HAVE_STRING_H 1 | ||||
| /* Define to 1 if you have the `strncasecmp' function. */ | |||||
| #define HAVE_STRNCASECMP 1 | |||||
| /* Define to 1 if you have the <syslog.h> header file. */ | /* Define to 1 if you have the <syslog.h> header file. */ | ||||
| #undef HAVE_SYSLOG_H | #undef HAVE_SYSLOG_H | ||||
| /* Define to 1 if you have the <sys/cdefs.h> header file. */ | |||||
| #undef HAVE_SYS_CDEFS_H | |||||
| /* Define to 1 if you have the <sys/param.h> header file. */ | /* Define to 1 if you have the <sys/param.h> header file. */ | ||||
| #undef HAVE_SYS_PARAM_H | #undef HAVE_SYS_PARAM_H | ||||
| @@ -81,14 +115,60 @@ | |||||
| /* Define to 1 if you have the <unistd.h> header file. */ | /* Define to 1 if you have the <unistd.h> header file. */ | ||||
| #undef HAVE_UNISTD_H | #undef HAVE_UNISTD_H | ||||
| /* Define to 1 if you have the `vasprintf' function. */ | |||||
| #undef HAVE_VASPRINTF | |||||
| /* Define to 1 if you have the `vprintf' function. */ | /* Define to 1 if you have the `vprintf' function. */ | ||||
| #undef HAVE_VPRINTF | #undef HAVE_VPRINTF | ||||
| /* Define to 1 if you have the `vsnprintf' function. */ | |||||
| #undef HAVE_VSNPRINTF | |||||
| /* Define to 1 if you have the `vsyslog' function. */ | /* Define to 1 if you have the `vsyslog' function. */ | ||||
| #undef HAVE_VSYSLOG | #undef HAVE_VSYSLOG | ||||
| /* Define to 1 if you have the `strncasecmp' function. */ | |||||
| #undef HAVE_STRNCASECMP | |||||
| /* Public define for json_inttypes.h */ | |||||
| #define JSON_C_HAVE_INTTYPES_H 1 | |||||
| /* Define to the sub-directory in which libtool stores uninstalled libraries. | |||||
| */ | |||||
| #undef LT_OBJDIR | |||||
| /* Name of package */ | |||||
| #define PACKAGE "json-c" | |||||
| /* Define to the address where bug reports for this package should be sent. */ | |||||
| #define PACKAGE_BUGREPORT "json-c@googlegroups.com" | |||||
| /* Define to the full name of this package. */ | |||||
| #define PACKAGE_NAME "JSON C Library" | |||||
| /* Define to the full name and version of this package. */ | |||||
| #define PACKAGE_STRING "JSON C Library 0.12.99" | |||||
| /* Define to the one symbol short name of this package. */ | |||||
| #define PACKAGE_TARNAME "json-c" | |||||
| /* Define to the home page for this package. */ | |||||
| #define PACKAGE_URL "https://github.com/json-c/json-c" | |||||
| /* Define to the version of this package. */ | |||||
| #define PACKAGE_VERSION "0.12.99" | |||||
| /* Define to 1 if you have the ANSI C header files. */ | /* Define to 1 if you have the ANSI C header files. */ | ||||
| #define STDC_HEADERS 1 | |||||
| #define STDC_HEADERS 1 | |||||
| /* Version number of package */ | |||||
| #define VERSION "0.12.99" | |||||
| /* Define to empty if `const' does not conform to ANSI C. */ | |||||
| /* #undef const */ | |||||
| /* Define to rpl_malloc if the replacement function should be used. */ | |||||
| /* #undef malloc */ | |||||
| /* Define to rpl_realloc if the replacement function should be used. */ | |||||
| /* #undef realloc */ | |||||
| /* Define to `unsigned int' if <sys/types.h> does not define. */ | |||||
| /* #undef size_t */ | |||||
| @@ -38,7 +38,8 @@ | |||||
| Name="VCPostBuildEventTool"/> | Name="VCPostBuildEventTool"/> | ||||
| <Tool | <Tool | ||||
| Name="VCPreBuildEventTool" | Name="VCPreBuildEventTool" | ||||
| CommandLine="copy config.h.win32 config.h"/> | |||||
| CommandLine="copy config.h.win32 config.h | |||||
| copy json_config.h.win32 json_config.h"/> | |||||
| <Tool | <Tool | ||||
| Name="VCPreLinkEventTool"/> | Name="VCPreLinkEventTool"/> | ||||
| <Tool | <Tool | ||||
| @@ -76,7 +77,9 @@ | |||||
| <Tool | <Tool | ||||
| Name="VCPostBuildEventTool"/> | Name="VCPostBuildEventTool"/> | ||||
| <Tool | <Tool | ||||
| Name="VCPreBuildEventTool"/> | |||||
| Name="VCPreBuildEventTool" | |||||
| CommandLine="copy config.h.win32 config.h | |||||
| copy json_config.h.win32 json_config.h"/> | |||||
| <Tool | <Tool | ||||
| Name="VCPreLinkEventTool"/> | Name="VCPreLinkEventTool"/> | ||||
| <Tool | <Tool | ||||
| @@ -167,6 +170,9 @@ | |||||
| <File | <File | ||||
| RelativePath=".\config.h.win32"> | RelativePath=".\config.h.win32"> | ||||
| </File> | </File> | ||||
| <File | |||||
| RelativePath=".\json_config.h.win32"> | |||||
| </File> | |||||
| <File | <File | ||||
| RelativePath=".\README-WIN32.html"> | RelativePath=".\README-WIN32.html"> | ||||
| </File> | </File> | ||||
| @@ -0,0 +1,116 @@ | |||||
| <?xml version="1.0" encoding="utf-8"?> | |||||
| <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||||
| <ItemGroup Label="ProjectConfigurations"> | |||||
| <ProjectConfiguration Include="Debug|Win32"> | |||||
| <Configuration>Debug</Configuration> | |||||
| <Platform>Win32</Platform> | |||||
| </ProjectConfiguration> | |||||
| <ProjectConfiguration Include="Release|Win32"> | |||||
| <Configuration>Release</Configuration> | |||||
| <Platform>Win32</Platform> | |||||
| </ProjectConfiguration> | |||||
| </ItemGroup> | |||||
| <PropertyGroup Label="Globals"> | |||||
| <ProjectGuid>{04D8CDBE-FB3E-4362-87E6-07DC3C0083B2}</ProjectGuid> | |||||
| <Keyword>Win32Proj</Keyword> | |||||
| </PropertyGroup> | |||||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | |||||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | |||||
| <ConfigurationType>StaticLibrary</ConfigurationType> | |||||
| <PlatformToolset>v120</PlatformToolset> | |||||
| <CharacterSet>MultiByte</CharacterSet> | |||||
| </PropertyGroup> | |||||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | |||||
| <ConfigurationType>StaticLibrary</ConfigurationType> | |||||
| <PlatformToolset>v120</PlatformToolset> | |||||
| <CharacterSet>MultiByte</CharacterSet> | |||||
| </PropertyGroup> | |||||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | |||||
| <ImportGroup Label="ExtensionSettings"> | |||||
| </ImportGroup> | |||||
| <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | |||||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |||||
| </ImportGroup> | |||||
| <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> | |||||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |||||
| </ImportGroup> | |||||
| <PropertyGroup Label="UserMacros" /> | |||||
| <PropertyGroup> | |||||
| <_ProjectFileVersion>12.0.30324.0</_ProjectFileVersion> | |||||
| </PropertyGroup> | |||||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | |||||
| <OutDir>Debug\</OutDir> | |||||
| <IntDir>Debug\</IntDir> | |||||
| </PropertyGroup> | |||||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | |||||
| <OutDir>Release\</OutDir> | |||||
| <IntDir>Release\</IntDir> | |||||
| </PropertyGroup> | |||||
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | |||||
| <ClCompile> | |||||
| <Optimization>Disabled</Optimization> | |||||
| <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||||
| <MinimalRebuild>true</MinimalRebuild> | |||||
| <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | |||||
| <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | |||||
| <PrecompiledHeader /> | |||||
| <WarningLevel>Level3</WarningLevel> | |||||
| <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | |||||
| </ClCompile> | |||||
| <Lib> | |||||
| <OutputFile>$(OutDir)json-c.lib</OutputFile> | |||||
| </Lib> | |||||
| <PreBuildEvent> | |||||
| <Command>copy config.h.win32 config.h | |||||
| copy json_config.h.win32 json_config.h | |||||
| </Command> | |||||
| </PreBuildEvent> | |||||
| </ItemDefinitionGroup> | |||||
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | |||||
| <ClCompile> | |||||
| <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||||
| <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | |||||
| <PrecompiledHeader /> | |||||
| <WarningLevel>Level3</WarningLevel> | |||||
| <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | |||||
| </ClCompile> | |||||
| <Lib> | |||||
| <OutputFile>$(OutDir)json-c.lib</OutputFile> | |||||
| </Lib> | |||||
| <PreBuildEvent> | |||||
| <Command>copy config.h.win32 config.h | |||||
| copy json_config.h.win32 json_config.h | |||||
| </Command> | |||||
| </PreBuildEvent> | |||||
| </ItemDefinitionGroup> | |||||
| <ItemGroup> | |||||
| <ClCompile Include="arraylist.c" /> | |||||
| <ClCompile Include="debug.c" /> | |||||
| <ClCompile Include="json_object.c" /> | |||||
| <ClCompile Include="json_tokener.c" /> | |||||
| <ClCompile Include="json_util.c" /> | |||||
| <ClCompile Include="linkhash.c" /> | |||||
| <ClCompile Include="printbuf.c" /> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <ClInclude Include="arraylist.h" /> | |||||
| <ClInclude Include="bits.h" /> | |||||
| <ClInclude Include="debug.h" /> | |||||
| <ClInclude Include="json_object.h" /> | |||||
| <ClInclude Include="json_object_private.h" /> | |||||
| <ClInclude Include="json_tokener.h" /> | |||||
| <ClInclude Include="json_util.h" /> | |||||
| <ClInclude Include="linkhash.h" /> | |||||
| <ClInclude Include="printbuf.h" /> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <None Include="config.h.win32" /> | |||||
| <None Include="Doxyfile" /> | |||||
| <None Include="json_config.h.win32" /> | |||||
| <None Include="README-WIN32.html" /> | |||||
| <None Include="README.html" /> | |||||
| </ItemGroup> | |||||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | |||||
| <ImportGroup Label="ExtensionTargets"> | |||||
| </ImportGroup> | |||||
| </Project> | |||||
| @@ -0,0 +1,81 @@ | |||||
| <?xml version="1.0" encoding="utf-8"?> | |||||
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||||
| <ItemGroup> | |||||
| <Filter Include="Source Files"> | |||||
| <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> | |||||
| <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> | |||||
| </Filter> | |||||
| <Filter Include="Header Files"> | |||||
| <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> | |||||
| <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> | |||||
| </Filter> | |||||
| <Filter Include="Resource Files"> | |||||
| <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> | |||||
| <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions> | |||||
| </Filter> | |||||
| <Filter Include="Documentation"> | |||||
| <UniqueIdentifier>{d3849076-874e-490e-858c-0871d04d1ecb}</UniqueIdentifier> | |||||
| </Filter> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <ClCompile Include="arraylist.c"> | |||||
| <Filter>Source Files</Filter> | |||||
| </ClCompile> | |||||
| <ClCompile Include="debug.c"> | |||||
| <Filter>Source Files</Filter> | |||||
| </ClCompile> | |||||
| <ClCompile Include="json_object.c"> | |||||
| <Filter>Source Files</Filter> | |||||
| </ClCompile> | |||||
| <ClCompile Include="json_tokener.c"> | |||||
| <Filter>Source Files</Filter> | |||||
| </ClCompile> | |||||
| <ClCompile Include="json_util.c"> | |||||
| <Filter>Source Files</Filter> | |||||
| </ClCompile> | |||||
| <ClCompile Include="linkhash.c"> | |||||
| <Filter>Source Files</Filter> | |||||
| </ClCompile> | |||||
| <ClCompile Include="printbuf.c"> | |||||
| <Filter>Source Files</Filter> | |||||
| </ClCompile> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <ClInclude Include="arraylist.h"> | |||||
| <Filter>Header Files</Filter> | |||||
| </ClInclude> | |||||
| <ClInclude Include="bits.h"> | |||||
| <Filter>Header Files</Filter> | |||||
| </ClInclude> | |||||
| <ClInclude Include="debug.h"> | |||||
| <Filter>Header Files</Filter> | |||||
| </ClInclude> | |||||
| <ClInclude Include="json_object.h"> | |||||
| <Filter>Header Files</Filter> | |||||
| </ClInclude> | |||||
| <ClInclude Include="json_object_private.h"> | |||||
| <Filter>Header Files</Filter> | |||||
| </ClInclude> | |||||
| <ClInclude Include="json_tokener.h"> | |||||
| <Filter>Header Files</Filter> | |||||
| </ClInclude> | |||||
| <ClInclude Include="json_util.h"> | |||||
| <Filter>Header Files</Filter> | |||||
| </ClInclude> | |||||
| <ClInclude Include="linkhash.h"> | |||||
| <Filter>Header Files</Filter> | |||||
| </ClInclude> | |||||
| <ClInclude Include="printbuf.h"> | |||||
| <Filter>Header Files</Filter> | |||||
| </ClInclude> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <None Include="Doxyfile"> | |||||
| <Filter>Documentation</Filter> | |||||
| </None> | |||||
| <None Include="config.h.win32" /> | |||||
| <None Include="README-WIN32.html" /> | |||||
| <None Include="README.html" /> | |||||
| <None Include="json_config.h.win32" /> | |||||
| </ItemGroup> | |||||
| </Project> | |||||
| @@ -0,0 +1,3 @@ | |||||
| /* Define to 1 if you have the <inttypes.h> header file. */ | |||||
| #define JSON_C_HAVE_INTTYPES_H 1 | |||||
| @@ -21,6 +21,11 @@ | |||||
| # include <endian.h> /* attempt to define endianness */ | # include <endian.h> /* attempt to define endianness */ | ||||
| #endif | #endif | ||||
| #ifdef _MSC_VER | |||||
| # define WIN32_LEAN_AND_MEAN | |||||
| # include <windows.h> /* Get InterlockedCompareExchange */ | |||||
| #endif | |||||
| #include "random_seed.h" | #include "random_seed.h" | ||||
| #include "linkhash.h" | #include "linkhash.h" | ||||