From e51eeaef39a97779980c0bc55bf379988f331d35 Mon Sep 17 00:00:00 2001 From: tandasat Date: Sat, 23 Apr 2016 15:58:31 -0700 Subject: [PATCH] skip stdint.h for windows driver configuration --- LEB128.h | 2 ++ MCInst.h | 3 ++- MCInstrDesc.h | 2 ++ MCRegisterInfo.h | 2 ++ MathExtras.h | 2 ++ SStream.c | 4 +++- arch/AArch64/AArch64BaseInfo.h | 2 ++ arch/AArch64/AArch64Disassembler.h | 2 ++ arch/PowerPC/PPCDisassembler.h | 2 ++ arch/Sparc/SparcDisassembler.h | 2 ++ arch/SystemZ/SystemZDisassembler.h | 2 ++ arch/X86/X86Disassembler.h | 2 ++ arch/X86/X86DisassemblerDecoder.h | 4 ++-- arch/X86/X86DisassemblerDecoderCommon.h | 2 ++ arch/XCore/XCoreDisassembler.h | 2 ++ 15 files changed, 31 insertions(+), 4 deletions(-) diff --git a/LEB128.h b/LEB128.h index 2cb489f3..6a452740 100644 --- a/LEB128.h +++ b/LEB128.h @@ -18,7 +18,9 @@ #ifndef CS_LLVM_SUPPORT_LEB128_H #define CS_LLVM_SUPPORT_LEB128_H +#if !defined(_MSC_VER) || !defined(_KERNEL_MODE) #include +#endif /// Utility function to decode a ULEB128 value. static inline uint64_t decodeULEB128(const uint8_t *p, unsigned *n) diff --git a/MCInst.h b/MCInst.h index 77efff0d..b98f37f4 100644 --- a/MCInst.h +++ b/MCInst.h @@ -19,8 +19,9 @@ #ifndef CS_MCINST_H #define CS_MCINST_H +#if !defined(_MSC_VER) || !defined(_KERNEL_MODE) #include - +#endif #include "include/capstone.h" typedef struct MCInst MCInst; diff --git a/MCInstrDesc.h b/MCInstrDesc.h index 4c1cc157..d2c3c512 100644 --- a/MCInstrDesc.h +++ b/MCInstrDesc.h @@ -18,7 +18,9 @@ #ifndef CS_LLVM_MC_MCINSTRDESC_H #define CS_LLVM_MC_MCINSTRDESC_H +#if !defined(_MSC_VER) || !defined(_KERNEL_MODE) #include +#endif #include "include/platform.h" //===----------------------------------------------------------------------===// diff --git a/MCRegisterInfo.h b/MCRegisterInfo.h index 58c2f2d9..528f1643 100644 --- a/MCRegisterInfo.h +++ b/MCRegisterInfo.h @@ -19,7 +19,9 @@ #ifndef CS_LLVM_MC_MCREGISTERINFO_H #define CS_LLVM_MC_MCREGISTERINFO_H +#if !defined(_MSC_VER) || !defined(_KERNEL_MODE) #include +#endif #include "include/platform.h" /// An unsigned integer type large enough to represent all physical registers, diff --git a/MathExtras.h b/MathExtras.h index 33bce7be..db98a2f7 100644 --- a/MathExtras.h +++ b/MathExtras.h @@ -17,7 +17,9 @@ #ifndef CS_LLVM_SUPPORT_MATHEXTRAS_H #define CS_LLVM_SUPPORT_MATHEXTRAS_H +#if !defined(_MSC_VER) || !defined(_KERNEL_MODE) #include +#endif #ifdef _MSC_VER # include diff --git a/SStream.c b/SStream.c index 8341a5a6..3f648ccb 100644 --- a/SStream.c +++ b/SStream.c @@ -1,7 +1,9 @@ /* Capstone Disassembly Engine */ /* By Nguyen Anh Quynh , 2013-2014 */ +#if !defined(_MSC_VER) || !defined(_KERNEL_MODE) #include +#endif #include #if defined(CAPSTONE_HAS_OSXKERNEL) #include @@ -10,9 +12,9 @@ #endif #include +#include "myinttypes.h" #include "SStream.h" #include "cs_priv.h" -#include "myinttypes.h" #include "utils.h" #ifdef _MSC_VER diff --git a/arch/AArch64/AArch64BaseInfo.h b/arch/AArch64/AArch64BaseInfo.h index 1dba3b4e..82221f9a 100644 --- a/arch/AArch64/AArch64BaseInfo.h +++ b/arch/AArch64/AArch64BaseInfo.h @@ -21,7 +21,9 @@ #define CS_LLVM_AARCH64_BASEINFO_H #include +#if !defined(_MSC_VER) || !defined(_KERNEL_MODE) #include +#endif #include #ifndef __cplusplus diff --git a/arch/AArch64/AArch64Disassembler.h b/arch/AArch64/AArch64Disassembler.h index 0f84c858..9879d7c2 100644 --- a/arch/AArch64/AArch64Disassembler.h +++ b/arch/AArch64/AArch64Disassembler.h @@ -4,7 +4,9 @@ #ifndef CS_AARCH64_DISASSEMBLER_H #define CS_AARCH64_DISASSEMBLER_H +#if !defined(_MSC_VER) || !defined(_KERNEL_MODE) #include +#endif #include "../../include/capstone.h" #include "../../MCRegisterInfo.h" diff --git a/arch/PowerPC/PPCDisassembler.h b/arch/PowerPC/PPCDisassembler.h index c26d970b..a1b012ea 100644 --- a/arch/PowerPC/PPCDisassembler.h +++ b/arch/PowerPC/PPCDisassembler.h @@ -4,7 +4,9 @@ #ifndef CS_PPCDISASSEMBLER_H #define CS_PPCDISASSEMBLER_H +#if !defined(_MSC_VER) || !defined(_KERNEL_MODE) #include +#endif #include "../../include/capstone.h" #include "../../MCRegisterInfo.h" diff --git a/arch/Sparc/SparcDisassembler.h b/arch/Sparc/SparcDisassembler.h index bafa2307..aea8d814 100644 --- a/arch/Sparc/SparcDisassembler.h +++ b/arch/Sparc/SparcDisassembler.h @@ -4,7 +4,9 @@ #ifndef CS_SPARCDISASSEMBLER_H #define CS_SPARCDISASSEMBLER_H +#if !defined(_MSC_VER) || !defined(_KERNEL_MODE) #include +#endif #include "../../include/capstone.h" #include "../../MCRegisterInfo.h" diff --git a/arch/SystemZ/SystemZDisassembler.h b/arch/SystemZ/SystemZDisassembler.h index e77a7385..97068321 100644 --- a/arch/SystemZ/SystemZDisassembler.h +++ b/arch/SystemZ/SystemZDisassembler.h @@ -4,7 +4,9 @@ #ifndef CS_SYSZDISASSEMBLER_H #define CS_SYSZDISASSEMBLER_H +#if !defined(_MSC_VER) || !defined(_KERNEL_MODE) #include +#endif #include "../../include/capstone.h" #include "../../MCRegisterInfo.h" diff --git a/arch/X86/X86Disassembler.h b/arch/X86/X86Disassembler.h index 2c21ede0..eb2dbe59 100644 --- a/arch/X86/X86Disassembler.h +++ b/arch/X86/X86Disassembler.h @@ -77,7 +77,9 @@ #ifndef CS_X86_DISASSEMBLER_H #define CS_X86_DISASSEMBLER_H +#if !defined(_MSC_VER) || !defined(_KERNEL_MODE) #include +#endif #include "../../include/capstone.h" diff --git a/arch/X86/X86DisassemblerDecoder.h b/arch/X86/X86DisassemblerDecoder.h index d3c54245..a022be5b 100644 --- a/arch/X86/X86DisassemblerDecoder.h +++ b/arch/X86/X86DisassemblerDecoder.h @@ -24,12 +24,12 @@ #else #include #endif +#if !defined(_MSC_VER) || !defined(_KERNEL_MODE) #include +#endif #include "X86DisassemblerDecoderCommon.h" -#include - /* * Accessor functions for various fields of an Intel instruction */ diff --git a/arch/X86/X86DisassemblerDecoderCommon.h b/arch/X86/X86DisassemblerDecoderCommon.h index 5eab31b8..62effdc5 100644 --- a/arch/X86/X86DisassemblerDecoderCommon.h +++ b/arch/X86/X86DisassemblerDecoderCommon.h @@ -25,7 +25,9 @@ #ifndef CS_X86_DISASSEMBLERDECODERCOMMON_H #define CS_X86_DISASSEMBLERDECODERCOMMON_H +#if !defined(_MSC_VER) || !defined(_KERNEL_MODE) #include +#endif #define INSTRUCTIONS_SYM x86DisassemblerInstrSpecifiers #define CONTEXTS_SYM x86DisassemblerContexts diff --git a/arch/XCore/XCoreDisassembler.h b/arch/XCore/XCoreDisassembler.h index 07cb9ffe..1f23715f 100644 --- a/arch/XCore/XCoreDisassembler.h +++ b/arch/XCore/XCoreDisassembler.h @@ -4,7 +4,9 @@ #ifndef CS_XCOREDISASSEMBLER_H #define CS_XCOREDISASSEMBLER_H +#if !defined(_MSC_VER) || !defined(_KERNEL_MODE) #include +#endif #include "../../include/capstone.h" #include "../../MCRegisterInfo.h"