All of lore.kernel.org
 help / color / mirror / Atom feed
From: Erik Andersen <andersen@codepoet.org>
To: Matthew Wilcox <willy@debian.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: kernel header separation
Date: Tue, 2 Sep 2003 19:49:09 -0600	[thread overview]
Message-ID: <20030903014908.GB1601@codepoet.org> (raw)
In-Reply-To: <20030902191614.GR13467@parcelfarce.linux.theplanet.co.uk>

On Tue Sep 02, 2003 at 08:16:14PM +0100, Matthew Wilcox wrote:
> 
> In a continuing series of "Things we should have done 5 years ago,
> do they really need to be done before the release of 2.6.0", here's a
> prototype of splitting the kernel headers into stuff we want userspace
> to see and stuff we don't.
> 
> The basic principle is to put user headers in usr/include/linux and
> usr/include/asm-$(ARCH).  Kernel headers may then include them as
> <user/foo.h> and <user-asm/foo.h>
> 
> This patch implents the 4 lines of Makefile magic necessary and converts
> cdrom.h to use this split.  Note that we can convert headers as slowly as
> we care to with this scheme.

Wohoo!!  Great stuff.  I hope this effort continues....

> RCS file: usr/include/linux/cdrom.h
> diff -N usr/include/linux/cdrom.h
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ usr/include/linux/cdrom.h	2 Sep 2003 19:07:48 -0000
> @@ -0,0 +1,719 @@
> +/*
> + * -- <linux/cdrom.h>
> + * General header file for linux CD-ROM drivers 
> + * Copyright (C) 1992         David Giller, rafetmad@oxy.edu
> + *               1994, 1995   Eberhard Moenkeberg, emoenke@gwdg.de
> + *               1996         David van Leeuwen, david@tm.tno.nl
> + *               1997, 1998   Erik Andersen, andersee@debian.org
> + *               1998-2000    Jens Axboe, axboe@suse.de
> + */
> + 
> +#ifndef	_LUSER_CDROM_H
> +#define	_LUSER_CDROM_H
> +
> +#include <linux/types.h>

Header files intended for use by users should probably drop
linux/types.h just include <stdint.h>,,,  Then convert the 
types over to ISO C99 types.

s/__u8/uint8_t/g
s/__u16/uint16_t/g
s/__u32/uint32_t/g
s/__u64/uint64_t/g

s/__s8/int8_t/g
s/__s16/int16_t/g
s/__s32/int32_t/g
s/__s64/int64_t/g

What do you think?

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--

  reply	other threads:[~2003-09-03  1:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-02 19:16 kernel header separation Matthew Wilcox
2003-09-03  1:49 ` Erik Andersen [this message]
2003-09-05 14:36   ` David Woodhouse
2003-09-05 21:10     ` Erik Andersen
2003-09-05 14:41   ` Matthew Wilcox
2003-09-05 21:16     ` Erik Andersen
2003-09-05 23:22       ` Matthew Wilcox
2003-09-08 13:38         ` David Woodhouse
2003-09-08 14:12           ` Alan Cox
2003-09-08 14:25             ` Jeff Garzik
2003-09-08 14:31               ` Alan Cox
2003-09-08 14:32               ` Jeff Garzik
2003-09-08 14:42                 ` Matthew Wilcox
2003-09-08 15:22                   ` Andreas Schwab
2003-09-08 14:37               ` Andreas Schwab
2003-09-08 20:23       ` David Garfield
2003-09-08 20:34         ` Andries Brouwer
2003-09-08 21:05           ` David Garfield
2003-09-08 20:43         ` Erik Andersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030903014908.GB1601@codepoet.org \
    --to=andersen@codepoet.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.