blob: 1a0f07a7ba51da529a9c3bd88e9fdf925cde570b [file] [log] [blame]
Nguyen Anh Quynh171eb752014-05-15 21:01:08 +08001/* Capstone Disassembly Engine */
2/* By Axel Souchet & Nguyen Anh Quynh, 2014 */
3
4// handle C99 issue (for pre-2013 VisualStudio)
5#ifndef CAPSTONE_PLATFORM_H
6#define CAPSTONE_PLATFORM_H
7
8#if !defined(__MINGW32__) && !defined(__MINGW64__) && (defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64))
9// MSVC
10
11// stdbool.h
12#if (_MSC_VER < 1800)
13#ifndef __cplusplus
14typedef unsigned char bool;
15#define false 0
16#define true 1
17#endif
18
19#else
20// VisualStudio 2013+ -> C99 is supported
21#include <stdbool.h>
22#endif
23
24#else // not MSVC -> C99 is supported
25#include <stdbool.h>
26#endif
27
28#endif