ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.333 by root, Tue Mar 9 08:58:22 2010 UTC vs.
Revision 1.334 by root, Tue Mar 9 09:00:59 2010 UTC

568} 568}
569 569
570static void * 570static void *
571ev_realloc_emul (void *ptr, long size) 571ev_realloc_emul (void *ptr, long size)
572{ 572{
573#if __GLIBC__
574 return realloc (ptr, size);
575#else
573 /* some systems, notably openbsd and darwin, fail to properly 576 /* some systems, notably openbsd and darwin, fail to properly
574 * implement realloc (x, 0) (as required by both ansi c-98 and 577 * implement realloc (x, 0) (as required by both ansi c-98 and
575 * the single unix specification, so work around them here. 578 * the single unix specification, so work around them here.
576 */ 579 */
577 580
578 if (size) 581 if (size)
579 return realloc (ptr, size); 582 return realloc (ptr, size);
580 583
581 free (ptr); 584 free (ptr);
582 return 0; 585 return 0;
586#endif
583} 587}
584 588
585static void *(*alloc)(void *ptr, long size) = ev_realloc_emul; 589static void *(*alloc)(void *ptr, long size) = ev_realloc_emul;
586 590
587void 591void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines