mirror of https://gitee.com/bigwinds/arangodb
Add triagens force header for windows, as we did before.
This commit is contained in:
parent
3833d9e462
commit
aa6e229a3d
|
@ -20,6 +20,9 @@ endif ()
|
|||
project(libev VERSION 4.22)
|
||||
|
||||
if (MSVC)
|
||||
|
||||
set (FLAGS "${FLAGS} /FI\"${PROJECT_SOURCE_DIR}/ev_triagens_win32.h\"")
|
||||
|
||||
foreach (flag_var
|
||||
CMAKE_C_FLAGS
|
||||
CMAKE_C_FLAGS_DEBUG
|
||||
|
@ -110,6 +113,8 @@ add_library(ev STATIC
|
|||
${LIBEV_DIR}/event.c
|
||||
)
|
||||
|
||||
set_target_properties(ev PROPERTIES COMPILE_FLAGS "${FLAGS}")
|
||||
|
||||
set(LIBEV_VERSION
|
||||
${libev_VERSION}
|
||||
CACHE INTERNAL
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// libev officially recommends to use _open_osfhandle to wrap a SOCKET
|
||||
// handle into a file descriptor. However, one should never use
|
||||
// _open_osfhandle for SOCKET handles. Therefore, we do the following
|
||||
// hack: We simply cast a SOCKET handle to an int before we hand it over
|
||||
// to libev. This means that we have to redefine the following three
|
||||
// macros for our version of libev. We close the handle ourselves outside
|
||||
// of libev. Please note that we only use libev for sockets and not for
|
||||
// file descriptors of regular files!
|
||||
|
||||
#define EV_FD_TO_WIN32_HANDLE(fd) ((SOCKET) fd)
|
||||
#define EV_WIN32_HANDLE_TO_FD(handle) ((int) handle)
|
||||
#define EV_WIN32_CLOSE_FD(fd)
|
Loading…
Reference in New Issue