GNU bug report logs - #6789
propose renaming gnulib memxfrm to amemxfrm (naming collision with coreutils)

Previous Next

Package: coreutils;

Reported by: Paul Eggert <eggert <at> CS.UCLA.EDU>

Date: Tue, 3 Aug 2010 19:47:01 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #59 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Haible <bruno <at> clisp.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: bug-coreutils <at> gnu.org, bug-gnulib <at> gnu.org
Subject: Re: propose renaming gnulib memxfrm to amemxfrm (naming collision
	with coreutils)
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




This bug report was last modified 14 years and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.