lkml.org 
[lkml]   [1998]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.223 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site