mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-12 05:48:51 -04:00
Fix some ints to evutil_socket_t; make tests pass on win64.
This commit is contained in:
parent
19c71e7454
commit
f817bfa4d3
@ -267,7 +267,7 @@ struct event_base {
|
||||
int is_notify_pending;
|
||||
/** A socketpair used by some th_notify functions to wake up the main
|
||||
* thread. */
|
||||
int th_notify_fd[2];
|
||||
evutil_socket_t th_notify_fd[2];
|
||||
/** An event used by some th_notify functions to wake up the main
|
||||
* thread. */
|
||||
struct event th_notify;
|
||||
|
@ -602,7 +602,7 @@ end:
|
||||
}
|
||||
|
||||
struct example_struct {
|
||||
long a;
|
||||
const char *a;
|
||||
const char *b;
|
||||
long c;
|
||||
};
|
||||
@ -612,11 +612,11 @@ test_evutil_upcast(void *arg)
|
||||
{
|
||||
struct example_struct es1;
|
||||
const char **cp;
|
||||
es1.a = 5;
|
||||
es1.a = "World";
|
||||
es1.b = "Hello";
|
||||
es1.c = -99;
|
||||
|
||||
tt_int_op(evutil_offsetof(struct example_struct, b), ==, sizeof(long));
|
||||
tt_int_op(evutil_offsetof(struct example_struct, b), ==, sizeof(char*));
|
||||
|
||||
cp = &es1.b;
|
||||
tt_ptr_op(EVUTIL_UPCAST(cp, struct example_struct, b), ==, &es1);
|
||||
|
@ -62,7 +62,7 @@ main(int argc, char **argv)
|
||||
{
|
||||
struct event ev;
|
||||
const char *test = "test string";
|
||||
int pair[2];
|
||||
evutil_socket_t pair[2];
|
||||
|
||||
#ifdef WIN32
|
||||
WORD wVersionRequested;
|
||||
|
@ -33,7 +33,7 @@
|
||||
#define __func__ _EVENT___func__
|
||||
#endif
|
||||
|
||||
int pair[2];
|
||||
evutil_socket_t pair[2];
|
||||
int test_okay = 1;
|
||||
int called = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user