Fix some ints to evutil_socket_t; make tests pass on win64.

This commit is contained in:
Dimitre Piskyulev 2010-10-27 17:31:52 -04:00 committed by Nick Mathewson
parent 19c71e7454
commit f817bfa4d3
4 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -33,7 +33,7 @@
#define __func__ _EVENT___func__
#endif
int pair[2];
evutil_socket_t pair[2];
int test_okay = 1;
int called = 0;