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

Comparing libev/ev.c (file contents):
Revision 1.446 by root, Mon Jun 11 12:50:50 2012 UTC vs.
Revision 1.447 by root, Tue Jun 19 12:29:43 2012 UTC

1191} 1191}
1192 1192
1193static void * 1193static void *
1194ev_realloc_emul (void *ptr, long size) EV_THROW 1194ev_realloc_emul (void *ptr, long size) EV_THROW
1195{ 1195{
1196#if __GLIBC__
1197 return realloc (ptr, size);
1198#else
1199 /* some systems, notably openbsd and darwin, fail to properly 1196 /* some systems, notably openbsd and darwin, fail to properly
1200 * implement realloc (x, 0) (as required by both ansi c-89 and 1197 * implement realloc (x, 0) (as required by both ansi c-89 and
1201 * the single unix specification, so work around them here. 1198 * the single unix specification, so work around them here.
1199 * recently, also (at least) fedora and debian started breaking it,
1200 * despite documenting it otherwise.
1202 */ 1201 */
1203 1202
1204 if (size) 1203 if (size)
1205 return realloc (ptr, size); 1204 return realloc (ptr, size);
1206 1205
1207 free (ptr); 1206 free (ptr);
1208 return 0; 1207 return 0;
1209#endif
1210} 1208}
1211 1209
1212static void *(*alloc)(void *ptr, long size) EV_THROW = ev_realloc_emul; 1210static void *(*alloc)(void *ptr, long size) EV_THROW = ev_realloc_emul;
1213 1211
1214void ecb_cold 1212void ecb_cold

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines