A more hackish (but more backported) fix for the intptr vs uintptr fix from trunk.

svn:r1374
This commit is contained in:
Nick Mathewson 2009-07-23 00:24:28 +00:00
parent 8155ed0cba
commit 9e652610da
2 changed files with 2 additions and 10 deletions

View File

@ -310,10 +310,8 @@ AC_CHECK_TYPES([uint64_t, uint32_t, uint16_t, uint8_t], , ,
#include <sys/types.h> #include <sys/types.h>
#endif]) #endif])
AC_CHECK_SIZEOF(long long) AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(void *)
AC_CHECK_TYPES([struct in6_addr], , , AC_CHECK_TYPES([struct in6_addr], , ,
[#ifdef WIN32 [#ifdef WIN32
#include <winsock2.h> #include <winsock2.h>

View File

@ -63,16 +63,10 @@ static int *pipes;
static int num_pipes, num_active, num_writes; static int num_pipes, num_active, num_writes;
static struct event *events; static struct event *events;
#if SIZEOF_VOID_P == 4
#define EV_INTPTR_T ev_int32_t
#elif SIZEOF_VOID_P == 8
#define EV_INTPTR_T ev_int64_t
#endif
static void static void
read_cb(int fd, short which, void *arg) read_cb(int fd, short which, void *arg)
{ {
EV_INTPTR_T idx = (ev_uint64_t) arg, widx = idx + 1; long idx = (long) arg, widx = idx + 1;
u_char ch; u_char ch;
count += read(fd, &ch, sizeof(ch)); count += read(fd, &ch, sizeof(ch));
@ -89,7 +83,7 @@ static struct timeval *
run_once(void) run_once(void)
{ {
int *cp, space; int *cp, space;
EV_INTPTR_T i; long i;
static struct timeval ts, te; static struct timeval ts, te;
for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) { for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {