Skip to content
Browse files

A more hackish (but more backported) fix for the intptr vs uintptr fi…

…x from trunk.

svn:r1374
  • Loading branch information...
1 parent 8155ed0 commit 9e652610da7cea767b56a5f7086906033ec59bf3 Nick Mathewson committed Jul 23, 2009
Showing with 2 additions and 10 deletions.
  1. +0 −2 configure.in
  2. +2 −8 test/bench.c
View
2 configure.in
@@ -310,10 +310,8 @@ AC_CHECK_TYPES([uint64_t, uint32_t, uint16_t, uint8_t], , ,
#include <sys/types.h>
#endif])
AC_CHECK_SIZEOF(long long)
-AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(void *)
AC_CHECK_TYPES([struct in6_addr], , ,
[#ifdef WIN32
#include <winsock2.h>
View
10 test/bench.c
@@ -63,16 +63,10 @@ static int *pipes;
static int num_pipes, num_active, num_writes;
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
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;
count += read(fd, &ch, sizeof(ch));
@@ -89,7 +83,7 @@ static struct timeval *
run_once(void)
{
int *cp, space;
- EV_INTPTR_T i;
+ long i;
static struct timeval ts, te;
for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {

0 comments on commit 9e65261

Please sign in to comment.
Something went wrong with that request. Please try again.