corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kelly <>
Subject Re: xstrdup and gnu licence
Date Sun, 08 Mar 2015 13:15:06 GMT
> On 8 Mar 2015, at 7:25 pm, Gabriela Gibson <> wrote:
> Hi,
> This:
> and this:
> are two of the many copies of the same thing on the web out there.
> So, I (idly) wonder about the following technicalities:
> a) is the GNU licence a problem?  That is, could someone claim that
> Corinthia is now GNU?
> b) What actually is copyrighted here -- the entire file, the name, or just
> this particular shape of xstrdup?
> c) do I need to 'invent' a new way of making xstrdup?

No. Just do what you did with xmalloc. If you wrote it yourself, it’s not copying.

This case is especially trivial. Just call strdup, check the result as you did in xmalloc,
and abort if it’s NULL, returning the result if otherwise.

My approach to this kind of thing is that if I’m going to implement something, then I don’t
look at alternative implementations (esp. GNU-licensed code when writing for a non-GNU project).
That way I’m not “tainting” myself  and can genuinely claim not to know how others have
implemented it. I would recommend you take a similar approach.

Dr Peter M. Kelly

PGP key: <>
(fingerprint 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message