From 2bb83d9813bf013b63a6b7818893dd375bd84118 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sat, 11 May 2013 18:56:20 +0300 Subject: check for MS C compiler before using pragmas --- include/enet/win32.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/enet/win32.h b/include/enet/win32.h index 0e1cf0c..b7b6816 100644 --- a/include/enet/win32.h +++ b/include/enet/win32.h @@ -5,12 +5,14 @@ #ifndef __ENET_WIN32_H__ #define __ENET_WIN32_H__ +#ifdef _MSC_VER #ifdef ENET_BUILDING_LIB #pragma warning (disable: 4996) // 'strncpy' was declared deprecated #pragma warning (disable: 4267) // size_t to int conversion #pragma warning (disable: 4244) // 64bit to 32bit int #pragma warning (disable: 4018) // signed/unsigned mismatch #endif +#endif #include #include @@ -36,8 +38,8 @@ typedef struct #define ENET_CALLBACK __cdecl -#if defined ENET_DLL -#if defined ENET_BUILDING_LIB +#ifdef ENET_DLL +#ifdef ENET_BUILDING_LIB #define ENET_API __declspec( dllexport ) #else #define ENET_API __declspec( dllimport ) -- cgit v1.2.3