// Current libev version: 4.24 #define _LIBEV // Clang with MSVC backend on Windows defines _MSC_VER! (But also __clang__) #ifndef MSVC_COMPILER # if defined(_MSC_VER) && !defined(__clang__) # define MSVC_COMPILER 1 # endif #endif // libev produces many warnings which isn't really appropriate for us to // address since it is 3rd party code that could be overwritten at any time // with a new version #ifdef MSVC_COMPILER #pragma warning(push) #pragma warning(disable:4013 4068 4100 4101 4127 4133 4189 4244 4245 4456 4457 4706 4996) #else //#define _POSIX_C_SOURCE 1 //#define _POSIX_SOURCE #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcomment" #pragma GCC diagnostic ignored "-Wparentheses" #pragma GCC diagnostic ignored "-Wsign-compare" #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-value" #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wunused-result" #pragma GCC diagnostic ignored "-Wstrict-aliasing" #pragma GCC diagnostic ignored "-Wimplicit-function-declaration" #if !defined(__clang__) #pragma GCC diagnostic ignored "-Wold-style-declaration" #elif defined(__clang__) #pragma GCC diagnostic ignored "-Wextern-initializer" #endif #ifdef __MINGW__ #include struct timespec { time_t tv_sec; long int tv_nsec; }; #endif // __MINGW__ #endif //#define EV_STANDALONE 1 //config.h for ev.c is generated by cmake #include "libev/ev.c" #ifdef MSVC_COMPILER #pragma warning(pop) #else #pragma GCC diagnostic pop #endif //#endif // _LIBEV