Merge pull request #508 from microsoft/maxgolov/c89_vs2010_fix
Retrocomputing: Visual Studio 2010 / C89 support fix
This commit is contained in:
Коммит
620d77dc84
|
@ -38,7 +38,7 @@
|
|||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
|
@ -51,11 +51,14 @@
|
|||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>HAVE_DYNAMIC_C_LIB;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\lib\include\public</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ForceFileOutput>Enabled</ForceFileOutput>
|
||||
<TreatLinkerWarningAsErrors>false</TreatLinkerWarningAsErrors>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>$(MSBuildProjectDirectory)\deploy-dll.cmd $(Configuration) $(Platform) $(OutDir)</Command>
|
||||
|
@ -71,18 +74,21 @@
|
|||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>HAVE_DYNAMIC_C_LIB;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeaderFile>
|
||||
</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\lib\include\public</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>ClientTelemetry.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ForceFileOutput>Enabled</ForceFileOutput>
|
||||
<TreatLinkerWarningAsErrors>false</TreatLinkerWarningAsErrors>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>$(MSBuildProjectDirectory)\deploy-dll.cmd $(Configuration) $(Platform) $(OutDir)</Command>
|
||||
|
@ -103,11 +109,6 @@
|
|||
<ItemGroup>
|
||||
<None Include="deploy-dll.cmd" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Solutions\win32-lib\win32-lib.vcxproj">
|
||||
<Project>{1dc6b38a-b390-34ce-907f-4958807a3d42}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
|
|
@ -49,8 +49,8 @@ void test_c_api()
|
|||
// It is possible to delay-load the loading of default ClientTelemetry.dll ,
|
||||
// then load an alternate implementation with a matching set of exported syms.
|
||||
// That way the calls are essentially redirected to user-supplied telemetry
|
||||
printf("Testing custom implementation library...\n");
|
||||
evt_load((evt_handle_t)LoadLibrary(L"ClientTelemetry2.dll"));
|
||||
printf("Loading ClientTelemetry implementation library...\n");
|
||||
evt_load((evt_handle_t)LoadLibrary(L"ClientTelemetry.dll"));
|
||||
#endif
|
||||
|
||||
printf("Testing C API...\n");
|
||||
|
|
|
@ -304,7 +304,7 @@ extern "C" {
|
|||
#define PII_TIME(key, val, kind) { key, TYPE_TIME, _TIME2({ NULL }, val), kind }
|
||||
*/
|
||||
#else
|
||||
#pragma message "C89 compiler does not support passing DOUBLE and TIME values via C API"
|
||||
#pragma message ("C89 compiler does not support passing DOUBLE and TIME values via C API")
|
||||
#endif
|
||||
|
||||
#define _STR(key, val) { key, TYPE_STRING, { (uint64_t)((char *)val) } }
|
||||
|
@ -341,7 +341,11 @@ extern "C" {
|
|||
|
||||
typedef evt_status_t(EVTSDK_LIBABI_CDECL *evt_app_call_t)(evt_context_t *);
|
||||
|
||||
EVTSDK_LIBABI evt_status_t EVTSDK_LIBABI_CDECL evt_api_call_default(evt_context_t *ctx);
|
||||
#ifdef HAVE_DYNAMIC_C_LIB
|
||||
#define evt_api_call_default NULL
|
||||
#else
|
||||
EVTSDK_LIBABI evt_status_t EVTSDK_LIBABI_CDECL evt_api_call_default(evt_context_t* ctx);
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* User of the library may delay-load the invocation of __impl_evt_api_call to assign their own implementation */
|
||||
|
|
Загрузка…
Ссылка в новой задаче