diff --git a/SStream.c b/SStream.c index fd72308d0..d1c071778 100644 --- a/SStream.c +++ b/SStream.c @@ -2,13 +2,13 @@ /* By Nguyen Anh Quynh , 2013-2014 */ #include -#include #include #include #include #include "SStream.h" #include "cs_priv.h" +#include "inttypes.h" #include "utils.h" #ifdef _MSC_VER diff --git a/arch/AArch64/AArch64InstPrinter.c b/arch/AArch64/AArch64InstPrinter.c index e7881e9a1..d7def5db9 100644 --- a/arch/AArch64/AArch64InstPrinter.c +++ b/arch/AArch64/AArch64InstPrinter.c @@ -16,7 +16,7 @@ #ifdef CAPSTONE_HAS_ARM64 -#include +#include "../../inttypes.h" #include #include diff --git a/arch/ARM/ARMDisassembler.c b/arch/ARM/ARMDisassembler.c index bc9fe3080..3f087ff39 100644 --- a/arch/ARM/ARMDisassembler.c +++ b/arch/ARM/ARMDisassembler.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include "../../inttypes.h" #include "ARMAddressingModes.h" #include "ARMBaseInfo.h" diff --git a/arch/ARM/ARMInstPrinter.c b/arch/ARM/ARMInstPrinter.c index 8d2a1fe7f..8c987b499 100644 --- a/arch/ARM/ARMInstPrinter.c +++ b/arch/ARM/ARMInstPrinter.c @@ -19,7 +19,7 @@ #include // DEBUG #include #include -#include +#include "../../inttypes.h" #include "ARMInstPrinter.h" #include "ARMAddressingModes.h" diff --git a/arch/Mips/MipsDisassembler.c b/arch/Mips/MipsDisassembler.c index c1caa7cc0..1f2f837c3 100644 --- a/arch/Mips/MipsDisassembler.c +++ b/arch/Mips/MipsDisassembler.c @@ -19,7 +19,7 @@ #include #include -#include +#include "../../inttypes.h" #include "../../utils.h" diff --git a/arch/Mips/MipsInstPrinter.c b/arch/Mips/MipsInstPrinter.c index 07178fe31..849b1a1d9 100644 --- a/arch/Mips/MipsInstPrinter.c +++ b/arch/Mips/MipsInstPrinter.c @@ -16,7 +16,7 @@ #ifdef CAPSTONE_HAS_MIPS -#include +#include "../../inttypes.h" #include #include // debug #include diff --git a/arch/PowerPC/PPCGenAsmWriter.inc b/arch/PowerPC/PPCGenAsmWriter.inc index e2e699fa0..7bc7caad5 100644 --- a/arch/PowerPC/PPCGenAsmWriter.inc +++ b/arch/PowerPC/PPCGenAsmWriter.inc @@ -10,7 +10,7 @@ /* By Nguyen Anh Quynh , 2013-2014 */ #include // debug -#include +#include "../../inttypes.h" /// printInstruction - This method is automatically generated by tablegen /// from the instruction set description. diff --git a/arch/Sparc/SparcGenAsmWriter.inc b/arch/Sparc/SparcGenAsmWriter.inc index 2969705b5..5b20009e4 100644 --- a/arch/Sparc/SparcGenAsmWriter.inc +++ b/arch/Sparc/SparcGenAsmWriter.inc @@ -10,7 +10,7 @@ /* By Nguyen Anh Quynh , 2013-2014 */ #include // debug -#include +#include "../../inttypes.h" /// printInstruction - This method is automatically generated by tablegen diff --git a/arch/SystemZ/SystemZGenAsmWriter.inc b/arch/SystemZ/SystemZGenAsmWriter.inc index 8b8962b36..d7e744bd3 100644 --- a/arch/SystemZ/SystemZGenAsmWriter.inc +++ b/arch/SystemZ/SystemZGenAsmWriter.inc @@ -10,7 +10,7 @@ /* By Nguyen Anh Quynh , 2013-2014 */ #include // debug -#include +#include "../../inttypes.h" /// printInstruction - This method is automatically generated by tablegen diff --git a/arch/SystemZ/SystemZInstPrinter.c b/arch/SystemZ/SystemZInstPrinter.c index 61648eed2..b155b96c5 100644 --- a/arch/SystemZ/SystemZInstPrinter.c +++ b/arch/SystemZ/SystemZInstPrinter.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include "../../inttypes.h" #include "SystemZInstPrinter.h" #include "../../MCInst.h" diff --git a/arch/X86/X86ATTInstPrinter.c b/arch/X86/X86ATTInstPrinter.c index 537ddccfd..0242ed28b 100644 --- a/arch/X86/X86ATTInstPrinter.c +++ b/arch/X86/X86ATTInstPrinter.c @@ -19,7 +19,7 @@ #if defined(CAPSTONE_HAS_X86) && !defined(CAPSTONE_DIET) && !defined(CAPSTONE_X86_ATT_DISABLE) #include -#include +#include "../../inttypes.h" #include #include #include diff --git a/arch/X86/X86Disassembler.c b/arch/X86/X86Disassembler.c index 12c469c86..c2cb82f90 100644 --- a/arch/X86/X86Disassembler.c +++ b/arch/X86/X86Disassembler.c @@ -19,7 +19,7 @@ #ifdef CAPSTONE_HAS_X86 -#include // debug +#include "../../inttypes.h" // debug #include #include "../../cs_priv.h" diff --git a/arch/X86/X86IntelInstPrinter.c b/arch/X86/X86IntelInstPrinter.c index 7dfd66690..16e869a14 100644 --- a/arch/X86/X86IntelInstPrinter.c +++ b/arch/X86/X86IntelInstPrinter.c @@ -18,7 +18,7 @@ #ifdef CAPSTONE_HAS_X86 #include -#include +#include "../../inttypes.h" #include #include #include diff --git a/arch/XCore/XCoreGenAsmWriter.inc b/arch/XCore/XCoreGenAsmWriter.inc index 71611382e..14c93bc95 100644 --- a/arch/XCore/XCoreGenAsmWriter.inc +++ b/arch/XCore/XCoreGenAsmWriter.inc @@ -10,7 +10,7 @@ /* By Nguyen Anh Quynh , 2013-2014 */ #include // debug -#include +#include "../../inttypes.h" /// printInstruction - This method is automatically generated by tablegen diff --git a/arch/XCore/XCoreInstPrinter.c b/arch/XCore/XCoreInstPrinter.c index db1f90d22..2c93abfba 100644 --- a/arch/XCore/XCoreInstPrinter.c +++ b/arch/XCore/XCoreInstPrinter.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include "../../inttypes.h" #include "XCoreInstPrinter.h" #include "../../MCInst.h" diff --git a/inttypes.h b/inttypes.h new file mode 100644 index 000000000..be36f11cb --- /dev/null +++ b/inttypes.h @@ -0,0 +1,5 @@ +#if defined(_MSC_VER) && _MSC_VER < 1700 +#include "msvc/headers/inttypes.h" +#else +#include +#endif diff --git a/suite/arm/test_arm_regression.c b/suite/arm/test_arm_regression.c index 45d906e19..562c70f4a 100644 --- a/suite/arm/test_arm_regression.c +++ b/suite/arm/test_arm_regression.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include "../../inttypes.h" #include diff --git a/tests/test.c b/tests/test.c index 1502e9312..61b07780f 100644 --- a/tests/test.c +++ b/tests/test.c @@ -3,7 +3,7 @@ #include #include -#include +#include "../inttypes.h" #include diff --git a/tests/test_arm.c b/tests/test_arm.c index 3f1f00632..0492b93e2 100644 --- a/tests/test_arm.c +++ b/tests/test_arm.c @@ -3,7 +3,7 @@ #include #include -#include +#include "../inttypes.h" #include diff --git a/tests/test_arm64.c b/tests/test_arm64.c index f344dcfcf..231f447ee 100644 --- a/tests/test_arm64.c +++ b/tests/test_arm64.c @@ -3,7 +3,7 @@ #include #include -#include +#include "../inttypes.h" #include diff --git a/tests/test_detail.c b/tests/test_detail.c index 22f04c7a8..bd5241a48 100644 --- a/tests/test_detail.c +++ b/tests/test_detail.c @@ -3,7 +3,7 @@ #include #include -#include +#include "../inttypes.h" #include diff --git a/tests/test_mips.c b/tests/test_mips.c index c28a228d2..0ba86ca41 100644 --- a/tests/test_mips.c +++ b/tests/test_mips.c @@ -3,7 +3,7 @@ #include #include -#include +#include "../inttypes.h" #include diff --git a/tests/test_ppc.c b/tests/test_ppc.c index 07c645650..10071e605 100644 --- a/tests/test_ppc.c +++ b/tests/test_ppc.c @@ -2,7 +2,7 @@ /* By Nguyen Anh Quynh , 2013> */ #include -#include +#include "../inttypes.h" #include diff --git a/tests/test_skipdata.c b/tests/test_skipdata.c index 961081504..07a305b4b 100644 --- a/tests/test_skipdata.c +++ b/tests/test_skipdata.c @@ -3,7 +3,7 @@ #include #include -#include +#include "../inttypes.h" #include diff --git a/tests/test_sparc.c b/tests/test_sparc.c index 29cc57adb..d7399a9e4 100644 --- a/tests/test_sparc.c +++ b/tests/test_sparc.c @@ -2,7 +2,7 @@ /* By Nguyen Anh Quynh , 2013-2014 */ #include -#include +#include "../inttypes.h" #include diff --git a/tests/test_systemz.c b/tests/test_systemz.c index a8446795b..36a0a96a5 100644 --- a/tests/test_systemz.c +++ b/tests/test_systemz.c @@ -2,7 +2,7 @@ /* By Nguyen Anh Quynh , 2013-2014 */ #include -#include +#include "../inttypes.h" #include diff --git a/tests/test_x86.c b/tests/test_x86.c index 99c7e231a..4d31074c8 100644 --- a/tests/test_x86.c +++ b/tests/test_x86.c @@ -3,7 +3,7 @@ #include #include -#include +#include "../inttypes.h" #include diff --git a/tests/test_xcore.c b/tests/test_xcore.c index 39a575ef7..652ef5ab1 100644 --- a/tests/test_xcore.c +++ b/tests/test_xcore.c @@ -2,7 +2,7 @@ /* By Nguyen Anh Quynh , 2013-2014 */ #include -#include +#include "../inttypes.h" #include