Add a compatibility shim for working with libevent on MSVC
authorChristopher Dykes <cdykes@fb.com>
Wed, 11 May 2016 16:51:11 +0000 (09:51 -0700)
committerFacebook Github Bot 0 <facebook-github-bot-0-bot@fb.com>
Wed, 11 May 2016 17:05:37 +0000 (10:05 -0700)
commitd618bf95f1b70d3cb24953399ac2552b065e14be
tree1090c775521acd2ba5fbf991a5b7f604310594e7
parent75ed80359179e09213b54c9b9ae89310a51ebdf4
Add a compatibility shim for working with libevent on MSVC

Summary:
MSVC builds of libevent expect `evutil_socket_t` to be `HANDLE` values, but Folly, HHVM, and Thrift all use them as file descriptors.
This adds a `folly_event_set` function that always expects a file descriptor rather than a socket. This also changes the places in Folly that use it.

Reviewed By: mzlee, yfeldblum

Differential Revision: D2874655

fbshipit-source-id: 66cfd86fd69a9fbac30d150445e4814cd5ca799e
folly/Makefile.am
folly/io/async/AsyncSignalHandler.cpp
folly/io/async/AsyncSignalHandler.h
folly/io/async/AsyncTimeout.cpp
folly/io/async/AsyncTimeout.h
folly/io/async/EventHandler.cpp
folly/io/async/EventHandler.h
folly/portability/Event.h [new file with mode: 0644]