Skip to content
Permalink
Browse files

More build fixes

  • Loading branch information...
alabuzhev committed Jul 2, 2017
1 parent d6f2259 commit 837e6c0be9a13fd0996f362888d5e6df559e1d58
@@ -21,6 +21,14 @@
<UniqueIdentifier>{9b8726bd-d9c1-416c-8039-5e686cf23409}</UniqueIdentifier>
<Extensions>hlf</Extensions>
</Filter>
<Filter Include="Lua Files">
<UniqueIdentifier>{83777BB8-EFFB-4DAE-B725-B2489A60BE52}</UniqueIdentifier>
<Extensions>lua</Extensions>
</Filter>
<Filter Include="Configuration Files">
<UniqueIdentifier>{D2B7A990-2418-447E-B615-BCEC9A202D5C}</UniqueIdentifier>
<Extensions>farconfig;ini</Extensions>
</Filter>
</ItemGroup>

<ItemGroup>
@@ -39,6 +47,15 @@
<CustomBuild Include="*.hlf">
<Filter>Help Files</Filter>
</CustomBuild>
<CustomBuild Include="*.lua">
<Filter>Lua Files</Filter>
</CustomBuild>
<CustomBuild Include="*.farconfig">
<Filter>Configuration Files</Filter>
</CustomBuild>
<CustomBuild Include="*.ini">
<Filter>Configuration Files</Filter>
</CustomBuild>
<None Include="*.def">
<Filter>Source Files</Filter>
</None>
@@ -51,7 +51,7 @@
</PrecompiledHeader>
<ExceptionHandling>
</ExceptionHandling>
<AdditionalOptions Condition="'$(VisualStudioVersion)' &gt;= '14.0'">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions>/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;advapi32.lib;shell32.lib;ole32.lib;uuid.lib;mpr.lib;netapi32.lib;version.lib;oleaut32.lib;wbemuuid.lib;Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -102,7 +102,7 @@

<ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
<ClCompile>
<EnableEnhancedInstructionSet Condition="'$(VisualStudioVersion)' &gt; '10.0'">NoExtensions</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
</ClCompile>
<Link>
</Link>
@@ -152,6 +152,16 @@
<Command>copy %(Identity) $(OutDir) &gt; nul</Command>
<Outputs>$(OutDir)%(Identity);%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="*.lua">
<Message>%(Identity)</Message>
<Command>copy %(Identity) $(OutDir) &gt; nul</Command>
<Outputs>$(OutDir)%(Identity);%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="*.ini">
<Message>%(Identity)</Message>
<Command>copy %(Identity) $(OutDir) &gt; nul</Command>
<Outputs>$(OutDir)%(Identity);%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
@@ -122,9 +122,9 @@ extern "C" BOOL WINAPI GetModuleHandleExWWrapper(DWORD Flags, LPCWSTR ModuleName
if (!(Flags & GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT))
{
wchar_t Buffer[MAX_PATH];
if (!GetModuleFileName(ModuleValue, Buffer, ARRAYSIZE(Buffer)))
if (!GetModuleFileNameW(ModuleValue, Buffer, ARRAYSIZE(Buffer)))
return FALSE;
LoadLibrary(Buffer);
LoadLibraryW(Buffer);
}

*Module = ModuleValue;
@@ -133,7 +133,7 @@ extern "C" BOOL WINAPI GetModuleHandleExWWrapper(DWORD Flags, LPCWSTR ModuleName

// GET_MODULE_HANDLE_EX_FLAG_PIN not implemented

if (const auto ModuleValue = (Flags & GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT? GetModuleHandle : LoadLibrary)(ModuleName))
if (const auto ModuleValue = (Flags & GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT? GetModuleHandleW : LoadLibraryW)(ModuleName))
{
*Module = ModuleValue;
return TRUE;
@@ -284,7 +284,7 @@ namespace slist

auto& Top = top(ListHead);

ListHead->Depth += Count;
ListHead->Depth += static_cast<WORD>(Count);
ListEnd->Next = Top;
return std::exchange(Top, List);
}
@@ -43,7 +43,7 @@ LIB_OBJS = \
$(OBJLIB)\xxStack.obj $(OBJLIB)\xxSym.obj $(OBJLIB)\xxExcptU.obj \
$(OBJLIB)\lzh.obj $(OBJLIB)\lzhf.obj $(OBJLIB)\lzhs.obj \
$(OBJLIB)\hdb_mem.obj $(OBJLIB)\hdb_rd.obj $(OBJLIB)\hdb_wr.obj \
$(OBJLIB)\hdbase.obj $(OBJLIB)\fio.obj $(OBJDIR)\vc_crt_fix.obj $(OBJDIR)\vc_crt_fix_impl.obj
$(OBJLIB)\hdbase.obj $(OBJLIB)\fio.obj

USERCPP=/I.\xxlib /D__NOVCL__=1 /D_CONSOLE=1 /D__DLL__=1
!ifdef DEBUG
@@ -5,10 +5,6 @@ NAME = FExcept
DOCS = SetFarExceptionHandler.farconfig demangle$(DIRBIT).dll
LINK_OBJS = $(OBJDIR)\FExcept.obj

!if "$(BUILD_PLATFORM)" == "X86"
LINK_OBJS = $(LINK_OBJS) $(OBJDIR)\vc_crt_fix.obj $(OBJDIR)\vc_crt_fix_impl.obj
!endif

COMMON = ..\..\plugins\common

All: dirs
@@ -24,9 +20,3 @@ excdump:
@cd execdump
$(MAKE) /f makefile_vc $(_MKDO_)COPYTO=..\$(WORKDIR) $(_MDEFS)
@cd ..

$(OUTDIR)\vc_crt_fix.obj: $(COMMON)\vc_crt_fix.asm
$(AS) $(ASFLAGS) $(COMMON)\vc_crt_fix.asm

$(OUTDIR)\vc_crt_fix_impl.obj: $(COMMON)\vc_crt_fix_impl.cpp
$(CPP) $(CPPFLAGS) $(COMMON)\vc_crt_fix_impl.cpp
@@ -111,9 +111,9 @@ extern "C" BOOL WINAPI GetModuleHandleExWWrapper(DWORD Flags, LPCWSTR ModuleName
if (!(Flags & GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT))
{
wchar_t Buffer[MAX_PATH];
if (!GetModuleFileName(ModuleValue, Buffer, ARRAYSIZE(Buffer)))
if (!GetModuleFileNameW(ModuleValue, Buffer, ARRAYSIZE(Buffer)))
return FALSE;
LoadLibrary(Buffer);
LoadLibraryW(Buffer);
}

*Module = ModuleValue;
@@ -122,7 +122,7 @@ extern "C" BOOL WINAPI GetModuleHandleExWWrapper(DWORD Flags, LPCWSTR ModuleName

// GET_MODULE_HANDLE_EX_FLAG_PIN not implemented

if (const auto ModuleValue = (Flags & GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT? GetModuleHandle : LoadLibrary)(ModuleName))
if (const auto ModuleValue = (Flags & GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT? GetModuleHandleW : LoadLibraryW)(ModuleName))
{
*Module = ModuleValue;
return TRUE;
@@ -273,7 +273,7 @@ namespace slist

auto& Top = top(ListHead);

ListHead->Depth += Count;
ListHead->Depth += static_cast<WORD>(Count);
ListEnd->Next = Top;
return std::exchange(Top, List);
}

0 comments on commit 837e6c0

Please sign in to comment.
You can’t perform that action at this time.