aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorLee Salzman <[email protected]>2013-05-11 18:56:20 +0300
committerLee Salzman <[email protected]>2013-05-11 18:56:20 +0300
commit2bb83d9813bf013b63a6b7818893dd375bd84118 (patch)
tree0226a8007c23481c7637727c33debb3bdd5fa229 /include
parent7dc0189ffb049d96dbb7115d020c1cd2f6d89ff9 (diff)
downloadenet-2bb83d9813bf013b63a6b7818893dd375bd84118.tar.gz
enet-2bb83d9813bf013b63a6b7818893dd375bd84118.zip
check for MS C compiler before using pragmas
Diffstat (limited to 'include')
-rw-r--r--include/enet/win32.h6
1 files changed, 4 insertions, 2 deletions
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 <stdlib.h>
#include <winsock2.h>
@@ -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 )