On Mar 9, 2008, at 7:59 PM, Wayne Davison wrote:
> On Sun, Mar 09, 2008 at 07:26:31PM -0400, Jeff Johnson wrote:
>> There are some subtleties however with xstrdup. [... mtrace related
>> issues ...]
> Right, that's why I preserved the HAVE_MCHECK_H version using its own
> malloc() call (it's unchanged from your version) and just made the
> HAVE_MCHECK_H version add failure checking. All the other
> functions are
> the same for both (with exit-on-failure handling).
I'd love to use xmalloc everywhere. Alas, there's still lots of dain
portability issues, the patches to "fix" portability are usually
and limited in scope. See e.g. __secure_getenv and the setresgid/
"stuff", to name just two. The va_copy() hackery entered popt through
same Newer! Better! Bestest! window, where popt is now undertaking
iconv conversions and bind_textdomain_codeset() retrofits that
_REALLY_ need to be solved in applications, not in popt.
Using xmalloc just opens up a can-of-worms while lusers fuss about
non-gcc compiler extension portability.
Again, I'd *love* to use xmalloc and xstrdup, I use daily, worksforme.
But at some point, popt should just process options, no fuss, no
muss, no problems.
73 de Jeff
Received on Mon Mar 10 01:27:36 2008