25 Sep
2006
25 Sep
'06
1:25 a.m.
"Neal Norwitz" <nnorwitz@gmail.com> wrote in message news:ee2a432c0609222151k2bf1a211u44d9e44dcc6bbf5d@mail.gmail.com...
I ignored these as I'm not certain all the platforms we run on accept free(NULL).
That sounds like exactly what the autotools are designed for. You simply use free(), and have autoconf check for support of free(NULL). If free(NULL) is broken then a macro is defined: "#define free(p) (p==NULL)||free(p)" Or something like that. Note that this does not clutter up the main program any. In fact it simplifies it. It also potentially speeds up platforms with a working free, without any negative speed implications for other platforms. The only downside is a slight, presumably negligible, increase in build time.