From: Davide Libenzi <davidel@xmailserver.org>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: about include/linux/macros.h ...
Date: Thu, 05 Jul 2001 15:35:03 -0700 (PDT) [thread overview]
Message-ID: <XFMail.20010705153503.davidel@xmailserver.org> (raw)
In-Reply-To: <20010705151725.A6021@kroah.com>
On 05-Jul-2001 Greg KH wrote:
> On Wed, Jul 04, 2001 at 04:33:51PM -0700, Davide Libenzi wrote:
>>
>> What about the creation of such file containing useful macros like min(),
>> max(), abs(), etc.. that otherwise everyone is forced to define like :
>
> See include/linux/netfilter.h, around line 164 for the reason why there
> isn't a kernel wide min() or max() macro.
Ok, let's continue like this :
./fs/ufs/util.h:#define min(x,y) ((x)<(y)?(x):(y))
./fs/ntfs/macros.h:#define min(a,b) ((a) <= (b) ? (a) : (b))
./include/linux/mtd/cfi.h:#define min(x,y) ( (x)<(y)?(x):(y) )
./include/linux/wanpipe.h:#define min(a,b) (((a)<(b))?(a):(b))
./include/linux/cyclomx.h:#define min(a,b) (((a)<(b))?(a):(b))
./include/linux/lvm.h:#define min(a,b) (((a)<(b))?(a):(b))
./net/khttpd/prototypes.h:#define min(a,b) ( (a) < (b) ? (a) : (b) )
./drivers/net/wan/comx.h:#define min(a,b) ((a) > (b) ? (b) : (a))
./drivers/net/hamradio/soundmodem/sm.h:#define min(a, b) (((a) < (b)) ? (a):(b))
./drivers/char/agp/agp.h:#define min(a,b) (((a)<(b))?(a):(b))
./drivers/scsi/eata_generic.h:#define min(a,b) ((a<b)?(a):(b))
./drivers/sound/emu10k1/hwaccess.h:#define min(x,y) ((x) < (y)) ? (x) : (y)
./drivers/sound/dmasound/dmasound.h:#define min(x, y) ((x) < (y) ? (x) : (y))
./drivers/video/cyberfb.h:#define min(a,b) ((a) < (b) ? (a) : (b))
./drivers/acorn/scsi/acornscsi.h:#define min(x,y) ((x) < (y) ? (x) : (y))
./drivers/usb/usb-ohci.h:#define min(a,b) (((a)<(b))?(a):(b))
./drivers/usb/usb-uhci.h:#define min(a,b) (((a)<(b))?(a):(b))
./drivers/telephony/ixj.h:#define min(a,b) (((a)<(b))?(a):(b))
./arch/cris/drivers/usb-host.h:#define min(a,b) (((a)<(b))?(a):(b))
./fs/ufs/util.h:#define max(x,y) ((x)>(y)?(x):(y))
./fs/ntfs/macros.h:#define max(a,b) ((a) >= (b) ? (a) : (b))
./include/linux/wanpipe.h:#define max(a,b) (((a)>(b))?(a):(b))
./include/linux/cyclomx.h:#define max(a,b) (((a)>(b))?(a):(b))
./include/linux/lvm.h:#define max(a,b) (((a)>(b))?(a):(b))
./net/khttpd/prototypes.h:#define max(a,b) ( (a) > (b) ? (a) : (b) )
./drivers/net/wan/comx.h:#define max(a,b) ((a) > (b) ? (a) : (b))
./drivers/net/hamradio/soundmodem/sm.h:#define max(a, b) (((a) > (b)) ? (a):(b))
./drivers/video/cyberfb.h:#define max(a,b) ((a) > (b) ? (a) : (b))
./drivers/acorn/scsi/acornscsi.h:#define max(x,y) ((x) < (y) ? (y) : (x))
./drivers/telephony/ixj.h:#define max(a,b) (((a)>(b))?(a):(b))
- Davide
next prev parent reply other threads:[~2001-07-05 22:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-04 23:33 about include/linux/macros.h Davide Libenzi
2001-07-05 22:17 ` Greg KH
2001-07-05 22:35 ` Davide Libenzi [this message]
2001-07-05 23:00 ` Greg KH
2001-07-06 9:39 ` GOTO Masanori
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=XFMail.20010705153503.davidel@xmailserver.org \
--to=davidel@xmailserver.org \
--cc=greg@kroah.com \
--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