0

I am busy writing a bare-bones Standard C Library for my hobby OS. I am only including the functions I really need for now but the library is still referenced as 'libc' in my source and I plan to expand it to a fully featured C Library. My OS is going to be released as open-source so I would like to know what kind of copyright notice I should put on the source files for my 'C Library' because the coding is mine but it is still based on the source of other C libraries such as GNU C.

I have seen this copyright notice on a C Library implementation for AVR

00001 /* Copyright (c) 2002, Marek Michalkiewicz
00002 Copyright (c) 2004,2007 Joerg Wunsch
00003 
00004 Portions of documentation Copyright (c) 1990, 1991, 1993, 1994
00005 The Regents of the University of California.
00006 
00007 All rights reserved.
00008 
00009 Redistribution and use in source and binary forms, with or without
00010 modification, are permitted provided that the following conditions are met:
00011 
00012 * Redistributions of source code must retain the above copyright
00013 notice, this list of conditions and the following disclaimer.
00014 
00015 * Redistributions in binary form must reproduce the above copyright
00016 notice, this list of conditions and the following disclaimer in
00017 the documentation and/or other materials provided with the
00018 distribution.
00019 
00020 * Neither the name of the copyright holders nor the names of
00021 contributors may be used to endorse or promote products derived
00022 from this software without specific prior written permission.
00023 
00024 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00025 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00026 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00027 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00028 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00029 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00030 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00031 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00032 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00033 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00034 POSSIBILITY OF SUCH DAMAGE.
00035 
00036 $Id: stdlib_8h_source.html,v 1.1.1.4 2012年01月03日 16:04:22 joerg_wunsch Exp $
00037 */
asked Mar 12, 2014 at 10:02

1 Answer 1

4

If you've based your source on the source of glibc in any way (including looking at the glibc source, roughly figuring out how it works, and then writing your own similar code), your library may already count as a derived work. Since glibc is licensed under the GPL with linking exception, that means your code must be under the GPL as well. The copyright should then say something like, "Based on glibc sources. Additional parts (c) ."

Deriving works indirectly from others is a tricky legal issue, and you may want to consult an expert about it. In some companies, engineers aren't allowed to look at GPL code that is remotely related to what they're doing, for fear that they could be "poisoned" by the code and produce derived works. (I remember one engineer who works on a compiler for some big company who watched a talk I gave about Clang - he told me he had to close his eyes when one of my slides contained a bit of Clang source code. And Clang isn't even GPLed.)

On the other hand, to the best of my knowledge such a loose connection has never been tested in a court, and in the case of a clearly defined programming interfaces as the C standard library, the obviousness defense may well apply in a lot of cases. In other words, if you write a simple strcpy:

char* strcpy(char* dest, const char* src) {
 for (; *src; ++src, ++dest) {
 *dest = *src;
 }
 return dest;
}

then it will be hard to say that you copied that from someone else because that is just the simple, obvious way to implement it. But if the code gets more complex - say, it includes SIMD optimizations, then things get more fuzzy.

answered Mar 12, 2014 at 10:15
1
  • indeed. Most companies I worked at no GPL licensed code was allowed on any company owned computer or storage device. Hard or impossible to enforce that for what people own privately, of course, but combined with employment contracts stating that private work isn't allowed the employer is safe. Commented Mar 12, 2014 at 10:46

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.