lkml.org 
[lkml]   [2003]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: kernel header separation
    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--
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:48    [W:0.032 / U:0.584 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site