From: Sylvain C. <sco...@gm...> - 2004-10-25 11:08:50
|
free on NetBSD isn't broken, It just produce a warning on stderr when a junk pointer is free (often NULL pointer), but I can't reproduce this warning and encounture it, so I think is fixed. (I don't use NetBSD at home, but use at school) On Mon, 25 Oct 2004 11:20:15 +0100, Barry Scott <bar...@on...> wrote: > My opinion: >=20 > Fix this in the NetBSD port if NetBSD's free is broken. > Do nothing in the xine code base, xine is corretly using > ISO C free. >=20 > Barry >=20 >=20 >=20 >=20 > > -----Original Message----- > > From: Franti=C5=A1ek Dvo=C3=B8=C3=A1k [mailto:va...@us...urceforge.= net] > > Sent: 22 October 2004 19:44 > > To: Michael Roitzsch > > Cc: xin...@li...; Barry Scott; Sylvain Colinet > > Subject: Re: free(NULL) [was: [xine-devel] rc7 and 1.0] > > > > > > Hi Barry, > > Hi Michael, > > > > V =C3=9At, 19. 10. 2004 v 16:16, Michael Roitzsch p=C3=AD=C5=A1e: > > > Hi Barry, > > > > > > > So this means you will not change xine to work around the NetBSD bu= g? > > > > > > If such a workaround is required, one could simply replace all > > occurrences of > > > free() with _x_free(), using a macro (ideally defining it in > > the compiler > > > command line itself, so that no header needs to be included). > > > > > > _x_free() could then call the original free(): > > > > > > void _x_free(void *p) > > > { > > > #undef free > > > if (p) free(p); > > > } > > > > > > > What about this?: > > > > #ifdef DEBUG > > void _x_free(void *p) { > > #undef free > > _x_assert(p !=3D NULL); > > free(p); > > } > > #endif > > > > :-) > > > > for fixing all free(NULL). > > > > Cheers, > > Frantisek > > > > > > > > >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out mo= re > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > xine-devel mailing list > xin...@li... > https://lists.sourceforge.net/lists/listinfo/xine-devel > |