On Sunday, July 25, 2010 14:00:08 Chet Ramey wrote:
> On 7/25/10 10:33 AM, Alfred M. Szmidt wrote:
> >    > This is a known bug, the reason if I recall is that readline
> >    > exports xmalloc and xrealloc is to allow programs to hook their
> >    > own version into readline.  So the readline maintainer has
> >    > declined any fixes for this.
> >    
> >    This is a severe bug. It makes readline useless for any project
> >    that uses gnulib.
> 
> Maybe.  There are workarounds, as I detailed in a message to bug-readline
> in June.
> 
> Another problem is that gnulib has significantly expanded the scope of
> the xmalloc/xrealloc/xfree interface.  The source file that defines
> those also defines half a dozen other functions: x2realloc, xzalloc, etc.
> It also calls those functions internally, requiring the source file to be
> linked in whether or not the application calls any of them directly.  I
> don't consider this good interface design.  Readline defines only
> xmalloc/xrealloc/xfree.  That's an acceptably small footprint, though I
> could also see adding xcalloc.

why do you need to use those function names ?  using a name spaced function 
like rl_malloc or _rl_malloc would keep the same functionality without 
clashing with other people.  "xmalloc" is a pretty common name for people to 
use in their own projects and i dont think people even realize that readline 
is doing this.  i know i wasnt aware of it and have used readline along with 
xmalloc in my application before.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to