diff --git a/MathExtras.h b/MathExtras.h index 624ba1f3c7..e0f37a5bae 100644 --- a/MathExtras.h +++ b/MathExtras.h @@ -24,7 +24,7 @@ #endif #ifndef __cplusplus -#if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64) +#ifdef _MSC_VER #define inline /* inline */ #endif #endif diff --git a/arch/X86/X86ATTInstPrinter.c b/arch/X86/X86ATTInstPrinter.c index 2bca241406..179becdc05 100644 --- a/arch/X86/X86ATTInstPrinter.c +++ b/arch/X86/X86ATTInstPrinter.c @@ -18,7 +18,7 @@ // this code is only relevant when DIET mode is disable #if defined(CAPSTONE_HAS_X86) && !defined(CAPSTONE_DIET) && !defined(CAPSTONE_X86_ATT_DISABLE) -#if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64) +#ifdef _MSC_VER #pragma warning(disable:4996) // disable MSVC's warning on strncpy() #pragma warning(disable:28719) // disable MSVC's warning on strncpy() #endif diff --git a/arch/X86/X86Disassembler.c b/arch/X86/X86Disassembler.c index d095a64286..79a756fca5 100644 --- a/arch/X86/X86Disassembler.c +++ b/arch/X86/X86Disassembler.c @@ -78,7 +78,7 @@ #ifdef CAPSTONE_HAS_X86 -#if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64) +#ifdef _MSC_VER #pragma warning(disable:4996) // disable MSVC's warning on strncpy() #pragma warning(disable:28719) // disable MSVC's warning on strncpy() #endif diff --git a/arch/X86/X86InstPrinterCommon.c b/arch/X86/X86InstPrinterCommon.c index 1932840999..d8401c9b23 100644 --- a/arch/X86/X86InstPrinterCommon.c +++ b/arch/X86/X86InstPrinterCommon.c @@ -15,7 +15,7 @@ /* Capstone Disassembly Engine */ /* By Nguyen Anh Quynh , 2013-2019 */ -#if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64) +#ifdef _MSC_VER #pragma warning(disable:4996) // disable MSVC's warning on strncpy() #pragma warning(disable:28719) // disable MSVC's warning on strncpy() #endif diff --git a/arch/X86/X86IntelInstPrinter.c b/arch/X86/X86IntelInstPrinter.c index 8b2cb5909f..7c32eb701b 100644 --- a/arch/X86/X86IntelInstPrinter.c +++ b/arch/X86/X86IntelInstPrinter.c @@ -17,7 +17,7 @@ #ifdef CAPSTONE_HAS_X86 -#if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64) +#ifdef _MSC_VER #pragma warning(disable:4996) // disable MSVC's warning on strncpy() #pragma warning(disable:28719) // disable MSVC's warning on strncpy() #endif diff --git a/arch/XCore/XCoreInstPrinter.c b/arch/XCore/XCoreInstPrinter.c index dc6a80780e..4a02c2bede 100644 --- a/arch/XCore/XCoreInstPrinter.c +++ b/arch/XCore/XCoreInstPrinter.c @@ -16,7 +16,7 @@ #ifdef CAPSTONE_HAS_XCORE -#if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64) +#ifdef _MSC_VER #pragma warning(disable : 4996) // disable MSVC's warning on strcpy() #pragma warning(disable : 28719) // disable MSVC's warning on strcpy() #endif diff --git a/cs.c b/cs.c index 840723f8a2..dca1bc6dd1 100644 --- a/cs.c +++ b/cs.c @@ -1,6 +1,6 @@ /* Capstone Disassembly Engine */ /* By Nguyen Anh Quynh , 2013-2019 */ -#if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64) +#ifdef _MSC_VER #pragma warning(disable:4996) // disable MSVC's warning on strcpy() #pragma warning(disable:28719) // disable MSVC's warning on strcpy() #endif