# include <winsock2.h>
# include <ws2tcpip.h>
typedef SOCKET memcached_socket_t;
+# if !defined POLLIN
+# define POLLIN (POLLRDNORM|POLLRDBAND)
+# endif
+# if !defined POLLOUT
+# define POLLOUT (POLLWRNORM)
+# endif
#else
typedef int memcached_socket_t;
#endif // _WIN32
#include "libgen.hpp"
#if defined P9Y_NEED_BASENAME
# if defined _WIN32
+# include <cstring>
char *basename(const char *filename) {
static char base[_MAX_PATH * 2], ext[_MAX_PATH], *ptr;
(void) _splitpath_s(filename, NULL, 0, NULL, 0, base, _MAX_PATH, ext, _MAX_PATH);