From 8d72baf42cefd50ba45ccac59064548635cdee1e Mon Sep 17 00:00:00 2001 From: root Date: Tue, 9 Mar 2010 09:00:59 +0000 Subject: ev_avoid_stdio --- ev.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ev.c') diff --git a/ev.c b/ev.c index 850314d..fd1f81b 100644 --- a/ev.c +++ b/ev.c @@ -570,6 +570,9 @@ ev_syserr (const char *msg) static void * ev_realloc_emul (void *ptr, long size) { +#if __GLIBC__ + return realloc (ptr, size); +#else /* some systems, notably openbsd and darwin, fail to properly * implement realloc (x, 0) (as required by both ansi c-98 and * the single unix specification, so work around them here. @@ -580,6 +583,7 @@ ev_realloc_emul (void *ptr, long size) free (ptr); return 0; +#endif } static void *(*alloc)(void *ptr, long size) = ev_realloc_emul; -- cgit v1.2.3