Messages in this thread | | | Date | Tue, 23 Jun 1998 08:02:54 -0400 | From | Raul Miller <> | Subject | Re: Header files and interfaces |
| |
Martin Mares <mj@atrey.karlin.mff.cuni.cz> wrote: > As the time passes, the kernel evolves and new ioctls appear. > But it's still a good idea to compile programs for older kernels > (e.g., for stable ones) without having to override which > ioctls/sockopts/whatever are supported by the target system. So it > would be better to separate the kernel includes from glibc includes > and release them as a separate package and just choose the right one > when compiling stuff.
There's two ways of dealing with ioctls which are present on only newer kernels:
(a) at runtime, deal with the error that occurs when you try to run a missing ioctl,
(b) at compile time (or design time) leave out support for such ioctls.
Most of the time (a) is a superior approach (if the ioctl had any value at all), however (b) has a rather elegant simplicity.
Probably the best approach to (b), though, is documentation which includes for each ioctl a bit of its history (when it first appeared, historically similar mechanisms).
Also, remember that even if you're not doing any development, and are compiling programs only for your personal machine, you may eventually upgrade your kernel.
-- Raul
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |