I have some source code for which I am the copyright holder. I want to release it under the GPL, but when it was closed source, I copied a bunch of a stuff from Wikipedia for a couple of classes and used it strictly for comments. This was just a matter of convenience, I have classes that allow you to manipulate HTTP headers and didn't feel like writing out explanations for each header when it was right there in front of me.

An example:

/// <summary>
/// CGI header field specifying the status of the HTTP response. Normal HTTP
/// responses use a separate "Status-Line" instead, defined by RFC 7230.
/// Example: Status: 200 OK
/// </summary>
const std::string& Status(void);

All of the lines proceeded by a /// are the comments. When the source code is compiled, these comments are not included in the final produced product, so I never considered it an issue as closed source software. However, I'd now be publishing all of this, comments intact.

The comments originate from this wikipedia page, where the footer includes a link to this license, which is the Creative Commons Attribution-ShareAlike 3.0 Unported License.

I've tried to search manually for anything about dual-licensing or licensing the comments separately from the code itself, but my searches have yielded nothing. Is it possible to fulfill the creative commons license by licensing the comments, aka "documentation", separately from the source code implementation?

  • Could you just distribute the code in GPLv3 and the comments under CC license?
    – Viktor
    Commented Dec 25, 2015 at 16:15
  • 1
    @Viktor I'm not sure, I considered it but thought it might get messy. The project is already a copyright/license minefield because of the sheer size of it, my own code licenses plus all the libraries and such used. I'd rather not add complexity. The recently posted answer is very interesting, I'll have to research it more. As long as you can take adaptations under any later version as claimed, then going to CC-BY-SA 4.0 and jumping everything straight to GPL3 would be possible.
    – user3570
    Commented Dec 25, 2015 at 16:34
  • Those comments are so simple why don't you just reword them? Commented Dec 26, 2015 at 7:14

2 Answers 2


Your work incorporating the Wikipedia material appears to be an "Adaptation" as defined in CC-BY-SA 3.0 Unported 1.a:

"Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.

Now see 4.b:

You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License.

4.b(ii) clearly gives you the right to relicense the work as CC-BY-SA 4.0 which in turn, I believe, allows you to relicense the work as GPLv3.

4.b(iv), at least on my interpretation, allows you to relicense the work directly as GPLv3.

Either way, you appear to have a valid route to license the resulting combined work as GPLv3.

See also @unor's answer on FOS.SE, which reaches a similar conclusion.

  • 1
    Interesting, thanks for posting this! Merry Christmas.
    – user3570
    Commented Dec 25, 2015 at 16:09
  • 1
    Thank you, @sampablokuper - this makes a lot of sense and finally means it might actually be possible to use code posted here in a GPL project!
    – Tim Malone
    Commented Apr 11, 2016 at 0:12


sampablokuper's answer is the correct answer. Instead of deleting this answer, I've modified it and left it to retain some complimentary information about CC-BY-SA 4.0 to GPL coversion, as described in the aforementioned answer.

The CC-BY-SA 4.0 specifies that the work can be combined into a GPL 3 work and then the combined work can remain exclusively under the GPL. This doesn't work the other way around (one way compatibility). Further, if you actually use this, you cannot specify in your license that it is GPL 3 "or any later version", because in this mixed mode the CC-BY-SA 4.0 exclusively lists GPL 3 as being compatible, not "any later version".

Therefore, if you do combine CC-BY-SA 4.0 material into a GPL v3 work, you are encouraged to specify that Creative Commons is the proxy by which one can determine if the software can be taken under "any later version" of the GPL, as described in section 14 of the GNU GPL v3 license.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.