mirror of
https://github.com/lsalzman/enet
synced 2024-11-21 06:25:59 -07:00
check for MS C compiler before using pragmas
This commit is contained in:
parent
7dc0189ffb
commit
2bb83d9813
1 changed files with 4 additions and 2 deletions
|
@ -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 )
|
||||
|
|
Loading…
Reference in a new issue