What is the license for the code examples listed in the manual?
I want to use the rather simple example of subtracting a struct timeval in my project. You can find it here: www.gnu.org/software/libc/manual/html_node/Elapsed-Time.html
What license does apply? The manual itself is under the GNU Free Documentation License. What's the deal with the code examples? The closest in the GNU FDL is the following paragraph at the end:
"If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software."
A clarification would be very much appreciated.
This came up a few years ago, but I don't think we ever did anything about it.
The whole manual is under the GFDL and thus so are the code samples inside it.
The sizable examples are maintained as plain C source files in the source tree. So we could easily release those separately under the GPL.
The timeval_subtract function you asked about was not in such a file, but I've just moved it into one.
We can look into making a separate package of these source files, where they would be under the GPL.
Note, however, that the functionality you are looking for is also implemented by the timersub macro in <sys/time.h> (where it is under the LGPL as usual).
The examples are now individually licensed under the GPL (v2 or later).
You can get them directly from source control using git or a web browser.
I don't think we'll make a separate package of them unless there's real demand.
*** Bug 3178 has been marked as a duplicate of this bug. ***
That was quick, I'm impressed. :) At least for me there's no need for a separate package, the source files on their own under the GPL are perfectly fine.
Did not know about the timersub macro though. Thanks for the hint!
Accidentally had the bug status as UNCONFIRMED under the comment box. Fixed again.
Hi glibc developers,
Can you please also release this piece of example code <https://www.gnu.org/software/libc/manual/html_mono/libc.html#Wordexp-Example> under GPLv2+? I am fixing some code and the example does exactly what I need.