bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: please keep 'memmem' module simple


From: Bruno Haible
Subject: Re: please keep 'memmem' module simple
Date: Wed, 9 Jan 2008 00:20:13 +0100
User-agent: KMail/1.5.4

Simon Josefsson wrote:
> I reviewed the memmem situation for gnutls, and the recent changes are
> somewhat large.  Memmem now pulls in:
> 
> ! lgl/m4/eealloc.m4
> ! lgl/m4/malloca.m4
> ! lgl/malloca.c
> ! lgl/malloca.h
> ! lgl/malloca.valgrind

These are no longer pulled in, after Eric's rewrite.

> What's worse is that the memmem module actually gets compiled on glibc
> systems, causing the size increase on all users on our primary platform.

Some users may want this, if they don't want their program to loop nearly
endlessly if it happens to be fed unlucky strings. Some users may not want
this.

> Thus, I think it is appropriate to rename the current efficient 'memmem'
> gnulib module to 'memmem-fast' and revert to the glibc implementation in
> the gnulib 'memmem' module.

If glibc does not want Eric's code, then I agree with you about the
two modules. But IMO we don't need to maintain two different memmem
implementations in gnulib. One is enough, because the code is not that
large. A user who does not absolutely need the linear speed can still
afford to link with Eric's code on non-glibc systems.

> who wants to be gnulib maintainer of the fast version

It's Eric, now, of course.

Paul Eggert wrote:
> Was the intent to propagate this into the glibc
> version?  If so, perhaps better names are "memmem" for the fast
> version and and "memmem-simple" for the simple one.

Yes, agreed.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]