I've never come across this with GPL code, but I've been a bit uncomfortable about reading Numerical Recipes too closely because their code is restrictively licensed.
I've never come across this with GPL code, but I've been a bit uncomfortable about reading Numerical Recipes too closely because their code is restrictively licensed.
(Small snippets are obviously not covered by copyright.)
Is this correct at all? Like if Microsoft accidentally included some gpl code in Windows, could they theoretically be required to open source it? Or would just have to stop distributing?
This interpretation is very surprising to me. Could you point out what language in the GPL you're interpreting in this way?
What makes you believe otherwise?
I thought because you were responding to my post saying using GPL code in a class, that you were claiming professors couldn't use GPL code in classes (they can). But you weren't saying that--I misread.
If it is a normal textbook with non-GPL code in it (which includes code taken from an MIT/BSD licenced source), then that's copyrighted, and using that code for anything else, commercial or not, would be copyright infringement.
If the code is taken from a GPL source, though, then at least the code in that book would have to be licenced under GPL as well, in which case you would be free to use it for commercial software, as long as it is licenced under GPL. The GPL does not forbid use in commercial software, it only forbids use in non-GPL software.
I don't think this is right. The copyright of the BSD/MIT licensed code remains with the original authors who should be attributed in the textbook (as per the license). Since these authors have permissively licensed their code you're free to use it in your own project (as long as you also include the original attribution). Copying other parts of the text book may be a copyright violation, however.