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

Comparing libev/ev.c (file contents):
Revision 1.332 by root, Tue Mar 9 08:58:17 2010 UTC vs.
Revision 1.335 by root, Tue Mar 9 09:02:03 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-89 and
575 * the single unix specification, so work around them here. 578 * the single unix specification, so work around them here.
576 */ 579 */
580
577 if (size) 581 if (size)
578 return realloc (ptr, size); 582 return realloc (ptr, size);
579 583
580 free (ptr); 584 free (ptr);
581 return 0; 585 return 0;
586#endif
582} 587}
583 588
584static void *(*alloc)(void *ptr, long size) = ev_realloc_emul; 589static void *(*alloc)(void *ptr, long size) = ev_realloc_emul;
585 590
586void 591void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines