From 8e8152fabdbc286d50af6cabb52d933ccce7da42 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 28 Nov 2007 17:32:24 +0000 Subject: fucking windows hates iso c, stupid microsoft lock-in strategy --- ev.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ev.c') diff --git a/ev.c b/ev.c index f8b08f5..5383e2c 100644 --- a/ev.c +++ b/ev.c @@ -283,22 +283,22 @@ syserr (const char *msg) } } -static void *(*alloc)(void *ptr, size_t size) = realloc; +static void *(*alloc)(void *ptr, long size); void -ev_set_allocator (void *(*cb)(void *ptr, size_t size)) +ev_set_allocator (void *(*cb)(void *ptr, long size)) { alloc = cb; } inline_speed void * -ev_realloc (void *ptr, size_t size) +ev_realloc (void *ptr, long size) { - ptr = alloc (ptr, size); + ptr = alloc ? alloc (ptr, size) : realloc (ptr, size); if (!ptr && size) { - fprintf (stderr, "libev: cannot allocate %ld bytes, aborting.", (long)size); + fprintf (stderr, "libev: cannot allocate %ld bytes, aborting.", size); abort (); } @@ -326,12 +326,12 @@ typedef struct int events; } ANPENDING; +#if EV_USE_INOTIFY typedef struct { -#if EV_USE_INOTIFY WL head; -#endif } ANFS; +#endif #if EV_MULTIPLICITY -- cgit v1.2.3