gnewsense-users
[Top][All Lists]
Advanced

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

Re: [gNewSense-users] Copyright question about net/irda/irqueue.c


From: Sam Geeraerts
Subject: Re: [gNewSense-users] Copyright question about net/irda/irqueue.c
Date: Wed, 23 Apr 2008 22:13:11 +0200
User-agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080110)

Bake Timmons wrote:
What do you think of this excerpt of a license comment for
net/irda/irqueue.c ?
 *     This copyright does however _not_ include the ELF hash() function
 *     which I currently don't know which licence or copyright it
 *     has. Please inform me if you know.

The function hash(), which I have included below, does not amount to
much, but I do *not* think it is trivial enough to escape needing a
copyright.  What do you think?

/*
 * Function hash (name)
 *
 *    This function hash the input string 'name' using the ELF hash
 *    function for strings.
 */
static __u32 hash( const char* name)
{
        __u32 h = 0;
        __u32 g;

        while(*name) {
                h = (h<<4) + *name++;
                if ((g = (h & 0xf0000000)))
                        h ^=g>>24;
                h &=~g;
        }
        return h;
}


I have found a thread about it on the debian-legal mailing list [1], which suggests using the algorithm implementation from glibc. I guess that didn't happen, because I downloaded glibc from GNU and found that the code in sysdeps/generic/dl-hash.h is similar, but not the same. That file has a comment:

"This is the hashing function specified by the ELF ABI."

So the algorithm is probably well known and kind of standardized. I also found some other similar implementations on [2] and [3], one of which is licensed as GPL. I don't know if the above hash function can be considered as a trivial implementation, but it certainly is trivial to adjust [3] so that it becomes this function and it predates irqueue.c.

It's probably best to contact the FSF about what is trivial and what isn't. If we have to remove it, there's plenty of alternatives to choose from.

[1] http://lists.debian.org/debian-legal/2002/11/msg00248.html
[2] http://www.scalabium.com/faq/dct0136.htm
[3] http://www.brics.dk/~btools/ELI/libelf-0.6.4/lib/hash.c




reply via email to

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