From: Andries Brouwer <aebr@win.tue.nl>
To: Douglas Gilbert <dougg@torque.net>
Cc: Christoph Hellwig <hch@infradead.org>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] include/scsi/scsi.h replace u8 in 2.5.69
Date: Wed, 14 May 2003 15:54:34 +0200 [thread overview]
Message-ID: <20030514135434.GA29244@win.tue.nl> (raw)
In-Reply-To: <3EC24043.6070109@torque.net>
On Wed, May 14, 2003 at 11:10:27PM +1000, Douglas Gilbert wrote:
> >That's wrong. No userland should include kernwel headers.
> >(and u_char is a non-standard type, too).
>
> Christoph,
> That's naive. In some case glibc's headers and libraries
> (e.g. mknod) are an impediment to development.
>
> If I add one define to ~linux/include/scsi/sg.h just
> how long do you think it takes for it to appear in
> /usr/include/scsi/sg.h?
> It can take over a year in my experience.
Consider: the same binaries are used on a wide range of kernels.
Consider: the same sources are compiled on machines with a
wide range of installed kernel sources.
It is undesirable that recompilation is needed when
a kernel is upgraded (or downgraded).
Thus, the robust setup uses its own copy of the headers,
or perhaps uses something like
#include <header.h>
#ifndef MY_CONSTANT
#define MY_CONSTANT 12345
#endif
to make sure that things compile with old and new *libc, with
old and new kernels.
Next, this robust setup must make sure that things not only
compile but also run, i.e., must be prepared to deal with EINVAL
or ENOSYS etc in case it is run on a kernel that does not yet
know about this new stuff.
Andries
[There is an different case for a private copy of the headers:
the kernel headers change all the time, and sometimes such
changes cause obscure and difficult-to-debug errors in utilities.
I still recall the case, many years ago, of a struct field that
was made unsigned, causing a change in semantics for a comparison.
User space software is easier to debug when the corresponding
binary does not depend in obscure ways on the kernel source
installed when it was compiled.]
prev parent reply other threads:[~2003-05-14 13:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-14 6:39 [PATCH] include/scsi/scsi.h replace u8 in 2.5.69 Douglas Gilbert
2003-05-14 8:02 ` Christoph Hellwig
2003-05-14 13:05 ` Jeff Garzik
2003-05-14 13:10 ` Douglas Gilbert
2003-05-14 13:14 ` Christoph Hellwig
2003-05-14 13:54 ` Andries Brouwer [this message]
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=20030514135434.GA29244@win.tue.nl \
--to=aebr@win.tue.nl \
--cc=dougg@torque.net \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox