Hi,

Does a code snippet have any legal definition or meaning? I ask because when working on compliance with a company they're told that code snippets implicitly contain the license they were under originally. This makes sense of course, you cannot copy something from a GPL'd file and then claim it is your copyright, that seems unfair. But what if separately one has written the exact same function. Given that in many cases there are only a few specific ways to do things, this might  not be that far-fetched. 

Here's my strawman:

In this GNU file http://git.savannah.gnu.org/cgit/hurd/glibc.git/tree/io/access.c there is code that tests the properties of a given file for access. This is a small C source code file of about 40 lines, nearly half of which is a license header. What if one saw these lines;

 {
  if (file == NULL || (type & ~(R_OK|W_OK|X_OK|F_OK)) != 0)
    {
      __set_errno (EINVAL);
      return -1;
    }

  __set_errno (ENOSYS);
  return -1;
}

in a proprietary file somewhere. It is half of the code from the access.c file, but arguably likely the only way to do this particular task. Yes, you can rearrange the the R_OK (read okay) and W_OK (write okay) etc, but this is merely cosmetic, the functionality remains the same. 

To me, this mere snippet lacks the originality test of copyright, but cutting and pasting it is considered presumably to be a copyright violation and requires use under the GPL since the original code is under the GPL.

Is this how one treats "snippets"? Are they recognized as a type of enforceable copyrighted unit? 

Many thanks,

Jeremiah

--
Jeremiah C. Foster
GENIVI COMMUNITY MANAGER

Pelagicore AB
Ekelundsgatan 4, 6tr, SE-411 18
Gothenburg, Sweden
M: +46 (0)73 093 0506