From e76abf47e1c754c49e2ef346909d7f995193c6ba Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Thu, 15 May 2014 15:02:52 +0800 Subject: [PATCH] move prototype of strcasecmp for MSVC into utils.h, and remove platform.h --- include/capstone.h | 2 -- include/platform.h | 19 ------------------- utils.h | 10 ++++++++++ 3 files changed, 10 insertions(+), 21 deletions(-) delete mode 100644 include/platform.h diff --git a/include/capstone.h b/include/capstone.h index 40765607..1c67e42f 100644 --- a/include/capstone.h +++ b/include/capstone.h @@ -14,8 +14,6 @@ extern "C" { #include #include -#include "platform.h" - #ifdef _MSC_VER #pragma warning(disable:4201) #pragma warning(disable:4100) diff --git a/include/platform.h b/include/platform.h deleted file mode 100644 index 23b3bbd0..00000000 --- a/include/platform.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Capstone Disassembly Engine */ -/* By Axel Souchet & Nguyen Anh Quynh, 2014 */ - -// prototypes for MSVC -#ifndef CAPSTONE_PLATFORM_H -#define CAPSTONE_PLATFORM_H - -#if !defined(__MINGW32__) && !defined(__MINGW64__) // this is not MingW -#if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64) - - -// string.h -#define strcasecmp _stricmp - - -#endif // MSVC -#endif // not MingW - -#endif diff --git a/utils.h b/utils.h index d8bf4d69..6c4bd4e7 100644 --- a/utils.h +++ b/utils.h @@ -7,6 +7,16 @@ #include "include/capstone.h" #include "cs_priv.h" +// strcasecmp for MSVC +#if !defined(__MINGW32__) && !defined(__MINGW64__) // this is not MingW +#if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64) + +// string.h +#define strcasecmp _stricmp + +#endif // MSVC +#endif // not MingW + // threshold number, so above this number will be printed in hexa mode #define HEX_THRESHOLD 9