forked from capstone-engine/capstone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
62 additions
and
273 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,65 @@ | ||
/* Capstone Disassembly Engine */ | ||
/* By Axel Souchet, 2014 */ | ||
|
||
#ifndef CS_MYINTTYPES_H | ||
#define CS_MYINTTYPES_H | ||
|
||
#if defined(CAPSTONE_HAS_OSXKERNEL) || (defined(_MSC_VER) && _MSC_VER <= 1700) | ||
// this system does not have inttypes.h | ||
|
||
#if defined(_MSC_VER) && _MSC_VER <= 1700 | ||
#include "msvc/headers/inttypes.h" | ||
#elif defined(CAPSTONE_HAS_OSXKERNEL) | ||
/* this is a trimmed copy of system inttypes.h that doesn't exist | ||
in OSX kernel framework headers */ | ||
#include "osxkernel_inttypes.h" | ||
#else | ||
typedef signed char int8_t; | ||
typedef signed short int16_t; | ||
typedef signed int int32_t; | ||
typedef unsigned char uint8_t; | ||
typedef unsigned short uint16_t; | ||
typedef unsigned int uint32_t; | ||
typedef signed long long int64_t; | ||
typedef unsigned long long uint64_t; | ||
#endif | ||
|
||
#define __PRI_8_LENGTH_MODIFIER__ "hh" | ||
#define __PRI_64_LENGTH_MODIFIER__ "ll" | ||
|
||
#define PRId8 __PRI_8_LENGTH_MODIFIER__ "d" | ||
#define PRIi8 __PRI_8_LENGTH_MODIFIER__ "i" | ||
#define PRIo8 __PRI_8_LENGTH_MODIFIER__ "o" | ||
#define PRIu8 __PRI_8_LENGTH_MODIFIER__ "u" | ||
#define PRIx8 __PRI_8_LENGTH_MODIFIER__ "x" | ||
#define PRIX8 __PRI_8_LENGTH_MODIFIER__ "X" | ||
|
||
#define PRId16 "hd" | ||
#define PRIi16 "hi" | ||
#define PRIo16 "ho" | ||
#define PRIu16 "hu" | ||
#define PRIx16 "hx" | ||
#define PRIX16 "hX" | ||
|
||
#if defined(_MSC_VER) && _MSC_VER <= 1700 | ||
#define PRId32 "ld" | ||
#define PRIi32 "li" | ||
#define PRIo32 "lo" | ||
#define PRIu32 "lu" | ||
#define PRIx32 "lx" | ||
#define PRIX32 "lX" | ||
#else // OSX | ||
#define PRId32 "d" | ||
#define PRIi32 "i" | ||
#define PRIo32 "o" | ||
#define PRIu32 "u" | ||
#define PRIx32 "x" | ||
#define PRIX32 "X" | ||
#endif | ||
|
||
#define PRId64 __PRI_64_LENGTH_MODIFIER__ "d" | ||
#define PRIi64 __PRI_64_LENGTH_MODIFIER__ "i" | ||
#define PRIo64 __PRI_64_LENGTH_MODIFIER__ "o" | ||
#define PRIu64 __PRI_64_LENGTH_MODIFIER__ "u" | ||
#define PRIx64 __PRI_64_LENGTH_MODIFIER__ "x" | ||
#define PRIX64 __PRI_64_LENGTH_MODIFIER__ "X" | ||
|
||
#else // this system has inttypes.h by default | ||
#include <inttypes.h> | ||
#endif | ||
|
||
#endif |
This file was deleted.
Oops, something went wrong.