lkml.org 
[lkml]   [1998]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: include file conflict
    Date
    Followup to:  <199811101947.UAA15801@wsdw01.win.tue.nl>
    By author: dwguest@win.tue.nl (Guest section DW)
    In newsgroup: linux.dev.kernel
    >
    > Anyone who includes <linux/foo.h> will be punished for that.
    >
    > Unfortunately, glibc itself also includes some Linux header files.
    > Fortunately, the amount of Linux headers involved in glibc includes
    > diminishes quickly.
    >
    > For you, there are several options. An easy one is to have /usr/include/linux
    > point at a kernel tree that has nothing to do with 2.1.125, but is one that
    > works with glibc. After all, glibc cannot know what strange things kernel
    > developers will think of, and kernel developers do not want to know all
    > about glibc's needs. Take an old and trusted tree, a 2.0.* one that existed
    > at the time this glibc was released, and there are good chances that it
    > will work fine (unless of course you are compiling programs that need to
    > use the latest features, and some handwork is required).
    >

    I think there are legitimate uses for the <linux/*.h> style headers,
    even within glibc. For example <linux/auto_fs.h> contains the
    communications protocol which the kernel uses to talk to the autofs
    daemon.

    However, kernel headers should use #ifdef __KERNEL__ for most things
    and only export things that are truly needed in user space.

    -hpa
    --
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD 1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
    I am Bahá'í -- ask me about it or see http://www.bahai.org/
    "To love another person is to see the face of God." -- Les Misérables

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

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