Subject: Re: propose renaming gnulib memxfrm to amemxfrm (naming collision with coreutils)

From: Bruno Haible <[email-masked]>
Date: Wed, 11 Aug 2010 02:38:11 +0200

Hi Paul,

> All I'm saying is that the gnulib variant shouldn't
> use a name starting with "mem", because the mem* names have similar
> properties and the gnulib variant departs dramatically from these
> properties.
> 
> The "strdup"/"strndup" functions are cases in point.  Their names were
> controversial, and they had quite some trouble getting into POSIX, precisely
> because their names began with "str" but (unlike the other str* functions)
> they allocated memory.

But now they are in POSIX. So, precedent is existing.

On the other hand, it has now appeared that strxfrm would be easier to use
efficiently if it had a wrapper that incorporated the "allocate 3 * len
bytes before calling strxfrm" heuristic. If we add such a wrapper to gnulib,
it could be called 'astrxfrm'

  extern char * astrxfrm (const char *s, char *resultbuf, size_t *lengthp);

and then I would agree to renaming memxfrm -> amemxfrm, for consistency.

Bruno