Nguyen Anh Quynh | 171eb75 | 2014-05-15 21:01:08 +0800 | [diff] [blame] | 1 | /* 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 |
| 14 | typedef 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 |