Skip to content

Commit

Permalink
Fix MSVC build (capstone-engine#1080)
Browse files Browse the repository at this point in the history
  • Loading branch information
lzybkr authored and aquynh committed Jan 23, 2018
1 parent 9e6605b commit 1144608
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/X86/X86ATTInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
// this code is only relevant when DIET mode is disable
#if defined(CAPSTONE_HAS_X86) && !defined(CAPSTONE_DIET) && !defined(CAPSTONE_X86_ATT_DISABLE)

#if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64)
#pragma warning(disable:4996) // disable MSVC's warning on strncpy()
#pragma warning(disable:28719) // disable MSVC's warning on strncpy()
#endif

#if !defined(CAPSTONE_HAS_OSXKERNEL)
#include <ctype.h>
#endif
Expand Down
5 changes: 5 additions & 0 deletions arch/X86/X86Disassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

#ifdef CAPSTONE_HAS_X86

#if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64)
#pragma warning(disable:4996) // disable MSVC's warning on strncpy()
#pragma warning(disable:28719) // disable MSVC's warning on strncpy()
#endif

#include <capstone/platform.h>
#include <string.h>

Expand Down
5 changes: 5 additions & 0 deletions arch/X86/X86IntelInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

#ifdef CAPSTONE_HAS_X86

#if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64)
#pragma warning(disable:4996) // disable MSVC's warning on strncpy()
#pragma warning(disable:28719) // disable MSVC's warning on strncpy()
#endif

#if !defined(CAPSTONE_HAS_OSXKERNEL)
#include <ctype.h>
#endif
Expand Down
2 changes: 2 additions & 0 deletions msvc/cstool/cstool.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,13 @@
<ClCompile Include="..\..\cstool\cstool.c" />
<ClCompile Include="..\..\cstool\cstool_arm.c" />
<ClCompile Include="..\..\cstool\cstool_arm64.c" />
<ClCompile Include="..\..\cstool\cstool_m680x.c" />
<ClCompile Include="..\..\cstool\cstool_m68k.c" />
<ClCompile Include="..\..\cstool\cstool_mips.c" />
<ClCompile Include="..\..\cstool\cstool_ppc.c" />
<ClCompile Include="..\..\cstool\cstool_sparc.c" />
<ClCompile Include="..\..\cstool\cstool_systemz.c" />
<ClCompile Include="..\..\cstool\cstool_tms320c64x.c" />
<ClCompile Include="..\..\cstool\cstool_x86.c" />
<ClCompile Include="..\..\cstool\cstool_xcore.c" />
</ItemGroup>
Expand Down

0 comments on commit 1144608

Please sign in to comment.