/* Define to `int' if <sys/types.h> does not define. */
#define _EVENT_ssize_t intptr_t
+#define ssize_t SSIZE_T
+
#endif
}
}
if (win32op->writeset_out->fd_count) {
+ SOCKET s;
i = rand() % win32op->writeset_out->fd_count;
for (j=0; j<win32op->writeset_out->fd_count; ++j) {
if (++i >= win32op->writeset_out->fd_count)
i = 0;
- SOCKET s = win32op->writeset_out->fd_array[i];
+ s = win32op->writeset_out->fd_array[i];
evmap_io_active(base, s, EV_WRITE);
}
}
#include "iocp-internal.h"
#include "mm-internal.h"
+#include <winsock2.h>
#include <windows.h>
#include <assert.h>
#include <stdio.h>
#include "evthread-internal.h"
#ifdef WIN32
#include <ctype.h>
+#include <winsock2.h>
#include <windows.h>
#include <iphlpapi.h>
#include <io.h>
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
+#include <winsock2.h>
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
typedef unsigned char u_char;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <winsock2.h>
#include <windows.h>
#include <process.h>
#include <stdio.h>
#endif
#ifdef WIN32
+#include <winsock2.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#include <sys/types.h>
#ifdef _EVENT_HAVE_SYS_TIME_H
#include <sys/time.h>
-#else
+#elif !defined(WIN32)
#include <sys/_time.h>
#endif
#include <sys/queue.h>
#include <event2/util.h>
#ifdef WIN32
+#include <winsock2.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#endif
#ifdef WIN32
+#include <winsock2.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#include <sys/types.h>
#ifdef _EVENT_HAVE_SYS_TIME_H
#include <sys/time.h>
-#else
+#elif !defined(WIN32)
#include <sys/_time.h>
#endif
#include <stdio.h>
#include <unistd.h>
#include <sys/time.h>
#else
+#include <winsock2.h>
#include <windows.h>
#endif
#include <fcntl.h>
#include <unistd.h>
#include <sys/time.h>
#else
+#include <winsock2.h>
#include <windows.h>
#endif
#include <signal.h>
#include "event2/event.h"
#include "event2/event_compat.h"
+#include <event2/util.h>
#include "evdns.h"
#include "log-internal.h"
#include "regress.h"
ans.s_addr = htonl(0xc0a80b0bUL); /* 192.168.11.11 */
if (req->questions[i]->type == EVDNS_TYPE_A &&
req->questions[i]->dns_question_class == EVDNS_CLASS_INET &&
- !strcasecmp(req->questions[i]->name, "zz.example.com")) {
+ !evutil_strcasecmp(req->questions[i]->name, "zz.example.com")) {
r = evdns_server_request_add_a_reply(req,
req->questions[i]->name,
1, &ans.s_addr, 12345);
dns_ok = 0;
} else if (req->questions[i]->type == EVDNS_TYPE_AAAA &&
req->questions[i]->dns_question_class == EVDNS_CLASS_INET &&
- !strcasecmp(req->questions[i]->name, "zz.example.com")) {
+ !evutil_strcasecmp(req->questions[i]->name, "zz.example.com")) {
char addr6[17] = "abcdefghijklmnop";
r = evdns_server_request_add_aaaa_reply(req,
req->questions[i]->name,
dns_ok = 0;
} else if (req->questions[i]->type == EVDNS_TYPE_PTR &&
req->questions[i]->dns_question_class == EVDNS_CLASS_INET &&
- !strcasecmp(req->questions[i]->name, TEST_ARPA)) {
+ !evutil_strcasecmp(req->questions[i]->name, TEST_ARPA)) {
r = evdns_server_request_add_ptr_reply(req, NULL,
req->questions[i]->name,
"ZZ.EXAMPLE.COM", 54321);
dns_ok = 0;
} else if (req->questions[i]->type == EVDNS_TYPE_A &&
req->questions[i]->dns_question_class == EVDNS_CLASS_INET &&
- !strcasecmp(req->questions[i]->name, "drop.example.com")) {
+ !evutil_strcasecmp(req->questions[i]->name, "drop.example.com")) {
if (evdns_server_request_drop(req)<0)
dns_ok = 0;
return;
#endif
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/time.h>
#ifdef _EVENT_HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#ifndef WIN32
+#include <sys/time.h>
#include <unistd.h>
+#endif
#include <errno.h>
#include <event2/event.h>
http_multi_line_header_test(void)
{
struct bufferevent *bev= NULL;
- int fd = -1;
+ evutil_socket_t fd = -1;
const char *http_start_request;
short port = -1;
if (bev)
bufferevent_free(bev);
if (fd >= 0)
- close(fd);
+ EVUTIL_CLOSESOCKET(fd);
if (http)
evhttp_free(http);
}
#ifdef WIN32
#include <winsock2.h>
#include <windows.h>
+#define __func__ __FUNCTION__
#endif
#ifdef HAVE_CONFIG_H
#include <assert.h>
#ifdef WIN32
+#include <winsock2.h>
#include <windows.h>
#else
#include <sys/types.h>
#include <unistd.h>
#endif
+#include <event2/util.h>
+
#include "tinytest.h"
#include "tinytest_macros.h"
if (opt_verbosity>0)
printf("[forking] ");
- snprintf(buffer, sizeof(buffer), "%s --RUNNING-FORKED %s %s%s",
+ evutil_snprintf(buffer, sizeof(buffer), "%s --RUNNING-FORKED %s %s%s",
commandname, verbosity_flag, group->prefix, testcase->name);
memset(&si, 0, sizeof(si));
length = strstr(arg,"..")-arg;
for (i=0; groups[i].prefix; ++i) {
for (j=0; groups[i].cases[j].name; ++j) {
- snprintf(fullname, sizeof(fullname), "%s%s",
+ evutil_snprintf(fullname, sizeof(fullname), "%s%s",
groups[i].prefix, groups[i].cases[j].name);
if (!flag) /* Hack! */
printf(" %s\n", fullname);