What's the best way to provide C functions that are common but not on z/OS? #208
-
There are a few functions that I've tripped over in porting that are really just 'code' and don't require any fancy underlying OS support. The latest one I've hit (not for the first time) is the Many of the ports pull in gnulib (at the source level) which lets us get the function cleanly, and for those ports there is no issue. Some ports just expect the function to be there. The latest is htopport which expects getoptlong. There are a few ways to tackle this:
What do people think? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
What about looking to the BSD community for these sort of functions? Their license is much more friendly to this sort of thing. https://cgit.freebsd.org/src/tree/lib/libc/stdlib/getopt_long.c |
Beta Was this translation helpful? Give feedback.
-
The zoslib library has been doing this. I say we continue to expand the coverage in zoslib as needed. Any code added to zoslib should be licence free or at worst be Apache. If we add GPL code to zoslib then we run into a problem of IBM products using zoslib. We need to be careful with the licence of any code added to the lib. |
Beta Was this translation helpful? Give feedback.
-
I'm slightly biased, but I agree with the license concerns with gnulib. That may very well be why some projects do not use gnulib, due to it's less permissive license. Libbsd is interesting, and the license is more open. Actually we used libbsd in the z/OS Swift port a few years back with success. @ccw-1 was behind that. |
Beta Was this translation helpful? Give feedback.
-
We have a dependency on zoslib for our tools now so closing this |
Beta Was this translation helpful? Give feedback.
The zoslib library has been doing this. I say we continue to expand the coverage in zoslib as needed. Any code added to zoslib should be licence free or at worst be Apache. If we add GPL code to zoslib then we run into a problem of IBM products using zoslib. We need to be careful with the licence of any code added to the lib.