linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kernel headers & userland
@ 2001-08-06  7:56 Abraham vd Merwe
  2001-08-06 10:56 ` Eric W. Biederman
  2001-08-06 12:41 ` Alan Cox
  0 siblings, 2 replies; 5+ messages in thread
From: Abraham vd Merwe @ 2001-08-06  7:56 UTC (permalink / raw)
  To: Linux Kernel Development, Felix von Leitner

[-- Attachment #1: Type: text/plain, Size: 2048 bytes --]

Hi!

Apparently Linus told Felix von Leitner (the author of dietlibc - a small,
no nonsense glibc replacement C library) a while ago _not_ to include any
linux kernel headers in userland (i.e. the C library headers in this case).

This imho is obviously wrong since there are definitely a need for including
kernel headers on a linux platform.

Just the basic stuff for instance:

keyboard: sys/kd.h - needs linux/kd.h
sound: sys/soundcard.h - need linux/soundcard.h
sysctl: sys/sysctl.h - need linux/sysctl.h
vt: sys/vt.h - need linux/vt.h

and so on. Then there's the whole sys/types.h issue which needs
linux/types.h, etc.

Even if you go through the trouble of making a generic sys/types.h and
carefully avoid kernel headers by not defining things like sys/soundcard.h
at all (boy, is this going to break things), you are going to run into lots
of trouble when applications include kernel headers on their own and your
headers (duplicate type definitions - you can hack this that linux kernel
headers override this, but it's a nightmare to manage).

Now, you may argue that userland apps should not include linux kernel
headers either, but sometimes it does. Just look at all userland apps that
needs to interface with kernel subsystems such as v4l, mtd, oss, etc.

Then there's all the ioctl() definitions (e.g. ioctl()'s for ext2, keyboard
leds, etc.)

In short, there is simply too many things that will break if you don't
include linux kernel headers in the C library headers (just look at glibc
for instance).

-- 

Regards
 Abraham

Iron Law of Distribution:
	Them that has, gets.

__________________________________________________________
 Abraham vd Merwe - 2d3D, Inc.

 Device Driver Development, Outsourcing, Embedded Systems

  Cell: +27 82 565 4451         Snailmail:
   Tel: +27 21 761 7549            Block C, Antree Park
   Fax: +27 21 761 7648            Doncaster Road
 Email: abraham@2d3d.co.za         Kenilworth, 7700
  Http: http://www.2d3d.com        South Africa


[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-08-06 15:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-06  7:56 kernel headers & userland Abraham vd Merwe
2001-08-06 10:56 ` Eric W. Biederman
2001-08-06 11:09   ` Abraham vd Merwe
2001-08-06 15:20     ` Eric W. Biederman
2001-08-06 12:41 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).