On 08.08.2016 13:39, Kenny McCormack wrote:
> [...]
>
> That all said, consider my "strptime" extension. It consists of 2 files (a
> .c and a .h), but it also requires one more file, gawkapi.h, in order to
> compile. gawkapi.h comes from the main GAWK tarball; it will not generally
> be available (i.e., installed anywhere on the system) under assumption 2)
> above.
>
> I have verified that if I put these 3 files (strptime.c, lintwarn.h and
> the gawkapi.h file from a recent GAWK tarball)) into a fresh clean
> directory and issue the compile command (cut-and-pasted from the comments
> in the .c file), it all works. That is all you need.
>
> But the question becomes: How should I ensure that the user, under
> assumption 2) above, has a copy of gawkapi.h?
Obviously you can't ensure that.
> Should I include it in strptime.zip?
If it's not available in the user's system's include files that's a typical
way to go, yes. (Modulo license issues with that file of course.)
> Will I run afoul of GPL stuff if I do?
Probably. I *think* that's why there's (in other GNU projects) a distinction
of licenses (GPL vs. LGPL); one (the LGPL) would allow to include it, IUUC.
(That might not be relevant, though, if you anyway provide your source open
and for free.)
> Do I include
> instructions for getting it from the net? It seems a little silly to
> download the entire GAWK tarball just to get one file.
Indeed.
> And, finally, and
> most importantly, does it matter which version of gawkapi.h is used?
At least you can't rely on it. That's why with such API stuff there's
typically version information provided to be able to make checks. I see that
in gawkapi.h there's GAWK_API_{MAJOR,MINOR}_VERSION enum constants defined.
> I.e.,
> I assume that each new GAWK release (i.e., each new tarball) will or may
> have a different version of gawkapi.h. Does this matter which tarball the
> user pulls it from?
I haven't ever inspected the details of the gawk API, but part of the API
protocol should reject incompatible versions. If it's not documented the
maintainers may provided that information.
Janis