Skip to content

Commit

Permalink
Workaround missing <inttypes.h> on MSVC 2010
Browse files Browse the repository at this point in the history
  • Loading branch information
yegord committed Sep 21, 2014
1 parent 3231146 commit ced9d24
Show file tree
Hide file tree
Showing 28 changed files with 32 additions and 27 deletions.
2 changes: 1 addition & 1 deletion SStream.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */

#include <stdint.h>
#include <inttypes.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>

#include "SStream.h"
#include "cs_priv.h"
#include "inttypes.h"
#include "utils.h"

#ifdef _MSC_VER
Expand Down
2 changes: 1 addition & 1 deletion arch/AArch64/AArch64InstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#ifdef CAPSTONE_HAS_ARM64

#include <inttypes.h>
#include "../../inttypes.h"
#include <stdio.h>
#include <stdlib.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/ARM/ARMDisassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
#include "../../inttypes.h"

#include "ARMAddressingModes.h"
#include "ARMBaseInfo.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/ARM/ARMInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <stdio.h> // DEBUG
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "../../inttypes.h"

#include "ARMInstPrinter.h"
#include "ARMAddressingModes.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/Mips/MipsDisassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <stdio.h>
#include <string.h>

#include <inttypes.h>
#include "../../inttypes.h"

#include "../../utils.h"

Expand Down
2 changes: 1 addition & 1 deletion arch/Mips/MipsInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#ifdef CAPSTONE_HAS_MIPS

#include <inttypes.h>
#include "../../inttypes.h"
#include <stdlib.h>
#include <stdio.h> // debug
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/PowerPC/PPCGenAsmWriter.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */

#include <stdio.h> // debug
#include <inttypes.h>
#include "../../inttypes.h"

/// printInstruction - This method is automatically generated by tablegen
/// from the instruction set description.
Expand Down
2 changes: 1 addition & 1 deletion arch/Sparc/SparcGenAsmWriter.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */

#include <stdio.h> // debug
#include <inttypes.h>
#include "../../inttypes.h"


/// printInstruction - This method is automatically generated by tablegen
Expand Down
2 changes: 1 addition & 1 deletion arch/SystemZ/SystemZGenAsmWriter.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */

#include <stdio.h> // debug
#include <inttypes.h>
#include "../../inttypes.h"


/// printInstruction - This method is automatically generated by tablegen
Expand Down
2 changes: 1 addition & 1 deletion arch/SystemZ/SystemZInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "../../inttypes.h"

#include "SystemZInstPrinter.h"
#include "../../MCInst.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/X86/X86ATTInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#if defined(CAPSTONE_HAS_X86) && !defined(CAPSTONE_DIET) && !defined(CAPSTONE_X86_ATT_DISABLE)

#include <ctype.h>
#include <inttypes.h>
#include "../../inttypes.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/X86/X86Disassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#ifdef CAPSTONE_HAS_X86

#include <inttypes.h> // debug
#include "../../inttypes.h" // debug
#include <string.h>

#include "../../cs_priv.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/X86/X86IntelInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifdef CAPSTONE_HAS_X86

#include <ctype.h>
#include <inttypes.h>
#include "../../inttypes.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/XCore/XCoreGenAsmWriter.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */

#include <stdio.h> // debug
#include <inttypes.h>
#include "../../inttypes.h"


/// printInstruction - This method is automatically generated by tablegen
Expand Down
2 changes: 1 addition & 1 deletion arch/XCore/XCoreInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "../../inttypes.h"

#include "XCoreInstPrinter.h"
#include "../../MCInst.h"
Expand Down
5 changes: 5 additions & 0 deletions inttypes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#if defined(_MSC_VER) && _MSC_VER < 1700
#include "msvc/headers/inttypes.h"
#else
#include <inttypes.h>
#endif
2 changes: 1 addition & 1 deletion suite/arm/test_arm_regression.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "../../inttypes.h"

#include <capstone/capstone.h>

Expand Down
2 changes: 1 addition & 1 deletion tests/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include "../inttypes.h"

#include <capstone.h>

Expand Down
2 changes: 1 addition & 1 deletion tests/test_arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include "../inttypes.h"

#include <capstone.h>

Expand Down
2 changes: 1 addition & 1 deletion tests/test_arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include "../inttypes.h"

#include <capstone.h>

Expand Down
2 changes: 1 addition & 1 deletion tests/test_detail.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include "../inttypes.h"

#include <capstone.h>

Expand Down
2 changes: 1 addition & 1 deletion tests/test_mips.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include "../inttypes.h"

#include <capstone.h>

Expand Down
2 changes: 1 addition & 1 deletion tests/test_ppc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013> */

#include <stdio.h>
#include <inttypes.h>
#include "../inttypes.h"

#include <capstone.h>

Expand Down
2 changes: 1 addition & 1 deletion tests/test_skipdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include "../inttypes.h"

#include <capstone.h>

Expand Down
2 changes: 1 addition & 1 deletion tests/test_sparc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */

#include <stdio.h>
#include <inttypes.h>
#include "../inttypes.h"

#include <capstone.h>

Expand Down
2 changes: 1 addition & 1 deletion tests/test_systemz.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */

#include <stdio.h>
#include <inttypes.h>
#include "../inttypes.h"

#include <capstone.h>

Expand Down
2 changes: 1 addition & 1 deletion tests/test_x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include "../inttypes.h"

#include <capstone.h>

Expand Down
2 changes: 1 addition & 1 deletion tests/test_xcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */

#include <stdio.h>
#include <inttypes.h>
#include "../inttypes.h"

#include <capstone.h>

Expand Down

0 comments on commit ced9d24

Please sign in to comment.