From: Patrick McHardy <kaber@trash.net>
To: Thomas Jarosch <thomas.jarosch@intra2net.com>
Cc: netfilter-devel@vger.kernel.org, Jan Engelhardt <jengelh@medozas.de>
Subject: Re: [patch] iptables version defines
Date: Mon, 02 Jun 2008 15:50:40 +0200 [thread overview]
Message-ID: <4843FAB0.9080608@trash.net> (raw)
In-Reply-To: <200806021545.23690.thomas.jarosch@intra2net.com>
Thomas Jarosch wrote:
> Hi Patrick,
>
>>>>>> #ifdef _XTABLES_H
>>>>>> init(struct xt_entry_target *t)
>>>>>> #else
>>>>>> init(struct ipt_entry_target *t, unsigned int *nfcache)
>>>>>> #endif
>>> Woah this is ridiculously ugly. (Remember, such constructs were
>>> just eliminated from the kernel in the past years.)
>> I don't care about uglyness as long as it stays in external
>> code. So if someone sends me a patch to add this version
>> define, I'll add it.
>
> External code has to be "ugly" if you want to keep the user experience high.
> I don't feel like breaking ipt_ACCOUNT for older iptables versions without
> any real gain, it should work out of the box with iptables 1.4.0 and 1.4.1.
>
> Attached is a patch to add the new defines. The macro XTABLES_VERSION is already in use, so I named it XTABLES_VERSION_CHECK. I've also tested
> that an empty XTABLES_VERSION_EXTRA in configure.ac works.
>
> Now we can write code like this:
>
> #if XTABLES_VERSION_CODE < XTABLES_VERSION_CHECK(1,5,0)
> #warning You are obselete and will be assimilated.
> #endif
Looks good to me - I'll let it sit on netfilter-devel until tonight
though since my auto* knowlegde is close to zero :)
next prev parent reply other threads:[~2008-06-02 13:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-30 8:16 iptables version defines Thomas Jarosch
2008-05-30 9:41 ` Krzysztof Oledzki
2008-05-30 9:56 ` Krzysztof Oledzki
2008-05-30 10:06 ` Thomas Jarosch
2008-05-30 10:53 ` Jan Engelhardt
2008-06-01 21:13 ` Patrick McHardy
[not found] ` <200806021545.23690.thomas.jarosch@intra2net.com>
2008-06-02 13:50 ` Patrick McHardy [this message]
2008-05-30 10:05 ` Krzysztof Oledzki
-- strict thread matches above, loose matches on Subject: below --
2008-06-02 13:49 [patch] " Thomas Jarosch
2008-06-02 14:54 ` Jan Engelhardt
2008-06-02 15:32 ` Thomas Jarosch
2008-06-02 17:03 ` Jan Engelhardt
2008-06-03 13:02 ` Patrick McHardy
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=4843FAB0.9080608@trash.net \
--to=kaber@trash.net \
--cc=jengelh@medozas.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=thomas.jarosch@intra2net.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.