mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-12 13:58:58 -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;
|
int is_notify_pending;
|
||||||
/** A socketpair used by some th_notify functions to wake up the main
|
/** A socketpair used by some th_notify functions to wake up the main
|
||||||
* thread. */
|
* 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
|
/** An event used by some th_notify functions to wake up the main
|
||||||
* thread. */
|
* thread. */
|
||||||
struct event th_notify;
|
struct event th_notify;
|
||||||
|
@ -602,7 +602,7 @@ end:
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct example_struct {
|
struct example_struct {
|
||||||
long a;
|
const char *a;
|
||||||
const char *b;
|
const char *b;
|
||||||
long c;
|
long c;
|
||||||
};
|
};
|
||||||
@ -612,11 +612,11 @@ test_evutil_upcast(void *arg)
|
|||||||
{
|
{
|
||||||
struct example_struct es1;
|
struct example_struct es1;
|
||||||
const char **cp;
|
const char **cp;
|
||||||
es1.a = 5;
|
es1.a = "World";
|
||||||
es1.b = "Hello";
|
es1.b = "Hello";
|
||||||
es1.c = -99;
|
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;
|
cp = &es1.b;
|
||||||
tt_ptr_op(EVUTIL_UPCAST(cp, struct example_struct, b), ==, &es1);
|
tt_ptr_op(EVUTIL_UPCAST(cp, struct example_struct, b), ==, &es1);
|
||||||
|
@ -62,7 +62,7 @@ main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
struct event ev;
|
struct event ev;
|
||||||
const char *test = "test string";
|
const char *test = "test string";
|
||||||
int pair[2];
|
evutil_socket_t pair[2];
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
WORD wVersionRequested;
|
WORD wVersionRequested;
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#define __func__ _EVENT___func__
|
#define __func__ _EVENT___func__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int pair[2];
|
evutil_socket_t pair[2];
|
||||||
int test_okay = 1;
|
int test_okay = 1;
|
||||||
int called = 0;
|
int called = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user