mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Koeller <thomas@koeller.dyndns.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Include header required for INT_MAX
Date: Sun, 11 Nov 2007 01:52:54 +0100	[thread overview]
Message-ID: <200711110152.55440.thomas@koeller.dyndns.org> (raw)
In-Reply-To: <20071110155613.GB22418@infradead.org>

On Samstag, 10. November 2007, Christoph Hellwig wrote:
> On Sat, Nov 10, 2007 at 03:55:15PM +0100, Thomas Koeller wrote:
> > cdrom.h uses INT_MAX, so it must include kernel.h or
> > limits.h (userspace) for a definition.
>
> Nack, we shoiuld never include userspace headers in kernel headers,
> an even more never add !__KERNEL__ ifdefs.  Just make sure your
> programs include limit.h before including linux/cdrom.h.

I think header files should be complete, and should not use undefined
macros, picking up every random definition that may be in effect when
the header is included, don't you agree? Why not use some other
constant instead of INT_MAX? What improvement does commit
132e4b0a049c39337c535501561b8301c7f2b202 provide? It certainly
breaks existing userspace code.

tk

-- 
Thomas Koeller
thomas at koeller dot dyndns dot org

  reply	other threads:[~2007-11-11  0:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-10 14:55 Thomas Koeller
2007-11-10 15:56 ` Christoph Hellwig
2007-11-11  0:52   ` Thomas Koeller [this message]
2007-11-10 16:48 ` Alexander E. Patrakov
2007-11-11 22:52 Jan Engelhardt
2007-11-12 10:21 ` Peter Zijlstra
2007-11-12 10:46 ` Andreas Schwab
2007-11-12 10:51   ` Robert P. J. Day
2007-11-12 12:06     ` Andreas Schwab
2007-11-12 12:57       ` Vegard Nossum
2007-11-12 13:37         ` Jan Engelhardt
2007-11-12 20:50 ` Mike Frysinger

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=200711110152.55440.thomas@koeller.dyndns.org \
    --to=thomas@koeller.dyndns.org \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®