Merge pull request #1987 from pocoproject/fix/json-strerror

Fix/json strerror
This commit is contained in:
Günter Obiltschnig 2017-11-09 14:10:24 +01:00 committed by GitHub
commit 75a153dbc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 57 additions and 46 deletions

View File

@ -9,7 +9,7 @@ vc.project.configurations = debug_shared, release_shared, debug_static_mt, relea
vc.project.prototype = ${vc.project.name}_vs90.vcproj
vc.project.compiler.include = ..\\Foundation\\include
vc.project.compiler.defines =
vc.project.compiler.defines.shared = ${vc.project.name}_EXPORTS;_CRT_SECURE_NO_WARNINGS
vc.project.compiler.defines.shared = ${vc.project.name}_EXPORTS
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
vc.solution.create = true

View File

@ -34,7 +34,7 @@
ExecutionBucket="7"
Optimization="0"
AdditionalIncludeDirectories=".\include;..\Foundation\include"
PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;WINCE;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(ProjectName)_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS"
PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;WINCE;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(ProjectName)_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;JSON_EXPORTS"
StringPooling="true"
MinimalRebuild="false"
RuntimeLibrary="3"
@ -114,7 +114,7 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories=".\include;..\Foundation\include"
PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;WINCE;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(ProjectName)_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS"
PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;WINCE;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(ProjectName)_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;JSON_EXPORTS"
StringPooling="true"
MinimalRebuild="false"
RuntimeLibrary="2"

View File

@ -2,10 +2,10 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{337fac4a-f3d4-4ae9-9f14-9667a075cda5}</UniqueIdentifier>
<UniqueIdentifier>{7ca2e91f-4851-40fb-b147-aaf03976123b}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{4d205a9a-351d-49e3-8a54-afed5df67f23}</UniqueIdentifier>
<UniqueIdentifier>{d58c03fb-ed20-4c25-b937-5b60f5fe9e45}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -105,7 +105,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -142,7 +142,7 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>

View File

@ -2,10 +2,10 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{041b8d3a-67ce-4ef5-aaa1-ad1d20794ec4}</UniqueIdentifier>
<UniqueIdentifier>{9e86c99a-9097-4948-b98b-075743aa8a0c}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{9d4e9bc2-f859-4f92-a54c-2d19fed810cf}</UniqueIdentifier>
<UniqueIdentifier>{31646366-de65-4105-89b4-75b878b6529f}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -123,7 +123,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -156,7 +156,7 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>

View File

@ -2,10 +2,10 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{69634a2a-5bfa-411b-b554-6f4916cc19a4}</UniqueIdentifier>
<UniqueIdentifier>{1a2ecba3-07fd-4f04-a2c2-92e51ca5aff0}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{61eb6c4b-fed2-45cb-9178-753e60fd8592}</UniqueIdentifier>
<UniqueIdentifier>{36496190-eb12-4b93-8edf-05456e47185e}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -123,7 +123,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -156,7 +156,7 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>

View File

@ -2,10 +2,10 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{d2310028-1107-43a3-aa53-b59049980845}</UniqueIdentifier>
<UniqueIdentifier>{999f1d5e-0ee9-4b07-bc25-fda02a2aaf0e}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{bab99a54-e8b9-4225-83ec-9ea797b00123}</UniqueIdentifier>
<UniqueIdentifier>{2abee5d5-0e55-4fab-8d7c-eba4e91ae893}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -85,7 +85,7 @@
</ImportGroup>
<PropertyGroup Label="UserMacros"/>
<PropertyGroup>
<_ProjectFileVersion>15.0.26228.10</_ProjectFileVersion>
<_ProjectFileVersion>15.0.26919.1</_ProjectFileVersion>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">PocoJSONd</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">PocoJSONmdd</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">PocoJSONmtd</TargetName>
@ -123,7 +123,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -156,7 +156,7 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>

View File

@ -2,10 +2,10 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{eaf5d420-116e-47d8-815f-b6a9ed4f5040}</UniqueIdentifier>
<UniqueIdentifier>{8b425bb7-fb55-4ffb-9dd2-6ccc238f9a33}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{d2119fd7-5f38-4f12-bbc6-e6c28c25cbfa}</UniqueIdentifier>
<UniqueIdentifier>{08805c4e-6465-4f4a-9e55-35e72b0262eb}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -32,7 +32,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".\include;..\Foundation\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS"
StringPooling="true"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@ -106,7 +106,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="true"
AdditionalIncludeDirectories=".\include;..\Foundation\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS"
StringPooling="true"
RuntimeLibrary="2"
BufferSecurityCheck="false"

View File

@ -105,7 +105,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -142,7 +142,7 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>

View File

@ -2,10 +2,10 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{49545bfe-a20a-45d4-9b2a-cd7e69fe8e12}</UniqueIdentifier>
<UniqueIdentifier>{88007ac3-a8b4-480c-836f-e3f2c1287217}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{270b75c6-5259-41f6-b8e2-2b7edfe8ad4e}</UniqueIdentifier>
<UniqueIdentifier>{aee6ec45-076f-4b2b-8962-ed943ea63bb0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -123,7 +123,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -156,7 +156,7 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>

View File

@ -2,10 +2,10 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{f83a409c-fc8e-45f5-9688-8ead00f2169d}</UniqueIdentifier>
<UniqueIdentifier>{27eb28f7-43fe-43b9-9b04-cd5fe32a1ed6}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{6d4235ea-23a5-47a5-a51e-4f4e41456129}</UniqueIdentifier>
<UniqueIdentifier>{117138ab-6eb7-483e-b2c1-d28f5b01b60d}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -123,7 +123,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -156,7 +156,7 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>

View File

@ -2,10 +2,10 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{d6ab9586-3599-4b69-b7ef-d66c96404669}</UniqueIdentifier>
<UniqueIdentifier>{e2e51999-1855-4980-99bd-6859cc12eeb4}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{e4225b0c-64e7-4ee6-a77a-0c7b9050578a}</UniqueIdentifier>
<UniqueIdentifier>{1f145d26-cb6a-4e88-8838-47713f535ee0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -85,7 +85,7 @@
</ImportGroup>
<PropertyGroup Label="UserMacros"/>
<PropertyGroup>
<_ProjectFileVersion>15.0.26228.10</_ProjectFileVersion>
<_ProjectFileVersion>15.0.26919.1</_ProjectFileVersion>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoJSON64d</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">PocoJSONmdd</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">PocoJSONmtd</TargetName>
@ -123,7 +123,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -156,7 +156,7 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>

View File

@ -2,10 +2,10 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{f260b17e-44d9-4181-9130-0c3117638ea1}</UniqueIdentifier>
<UniqueIdentifier>{2e67adac-6d6d-42fe-bca1-56a21f5c7e36}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{cd9124b6-1e5f-44fa-824a-80ce45895b68}</UniqueIdentifier>
<UniqueIdentifier>{5503d879-b367-4924-8fe0-e77cb4e05a00}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -32,7 +32,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".\include;..\Foundation\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS"
StringPooling="true"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@ -106,7 +106,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="true"
AdditionalIncludeDirectories=".\include;..\Foundation\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS;_CRT_SECURE_NO_WARNINGS"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;JSON_EXPORTS"
StringPooling="true"
RuntimeLibrary="2"
BufferSecurityCheck="false"

View File

@ -8,6 +8,10 @@
#include <errno.h>
#include "pd_json.h"
#if defined(_MSC_VER)
#define strerror_r(err, buf, len) strerror_s(buf, len, err)
#endif
#if defined(_MSC_VER) && (_MSC_VER < 1900)
#define json_error(json, format, ...) \
@ -32,6 +36,13 @@
#endif // POCO_MSVS_VERSION
static void json_error_s(json_stream *json, int err)
{
char errbuf[1024] = {0};
strerror_r(err, errbuf, sizeof(errbuf));
json_error(json, "%s", errbuf);
}
#define STACK_INC 4
static enum json_type
@ -44,7 +55,7 @@ push(json_stream *json, enum json_type type)
stack = (struct json_stack *) json->alloc.realloc(json->stack,
(json->stack_size + STACK_INC) * sizeof(*json->stack));
if (stack == NULL) {
json_error(json, "%s", strerror(errno));
json_error_s(json, errno);
return JSON_ERROR;
}
@ -141,7 +152,7 @@ static int pushchar(json_stream *json, int c)
size_t size = json->data.string_size * 2;
char *buffer = (char*) json->alloc.realloc(json->data.string, size);
if (buffer == NULL) {
json_error(json, "%s", strerror(errno));
json_error_s(json, errno);
return -1;
} else {
json->data.string_size = size;
@ -159,7 +170,7 @@ static int init_string(json_stream *json)
json->data.string_size = 1024;
json->data.string = (char*) json->alloc.malloc(json->data.string_size);
if (json->data.string == NULL) {
json_error(json, "%s", strerror(errno));
json_error_s(json, errno);
return -1;
}
}