Hacker News new | past | comments | ask | show | jobs | submit login

Thanks for sharing. I was going to suggest you make the relevant files available as lgpl -- but then I went and looked for getopt.c, and discovered that it's in the util-linux package and is also gplv2 (the version that I had installed, see more below). I'm normally a great fan of copyleft and the full gpl (rather than lgpl/bsd/mit etc) -- but it does strike me as a little strange to have something like this under the gpl -- it "feels" to me like more of a libc-thing (not really talking about your code in particular, as that is part of a different program anyway).

However, the getopt.h-file in the actual gnu libc-package (libc6-dev) is lgpl.

Interestingly, the getopt.c/.h in gnulib (gnu portability library) appear to both be gpl, not lgpl.




My code is just under GPL because I just wrote it as part of another program that's also GPL. That said, I'd be happy to re-license it as LGPL since I'm the only one who's touched that code, but since you'd probably want to drop it in to another program instead of compiling it as a library it wouldn't make much of a difference.

I've seen a few getopt.c implementations that are MIT I believe.

Personally I'm guessing that those getopt implementations are probably all different (Just because it hardly takes any time to write one). AFAIK gnulib is GPL itself, so the getopt inside was just licensed GPL too, same thing for util-linux. libc is LGPL though, so that getopt.c was licensed as LGPL. It is kinda curious though, I'm personally just surprised that there are so many implementations of the same thing.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: