From: Andrew Morton <akpm@linux-foundation.org>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: linux-kernel@vger.kernel.org, sam@ravnborg.org
Subject: Re: [PATCH] unifdef: teach it about defined(FOO) syntax
Date: Fri, 26 Jun 2009 15:04:53 -0700 [thread overview]
Message-ID: <20090626150453.77425669.akpm@linux-foundation.org> (raw)
In-Reply-To: <1158166a0906211121q51a8d320j1d9ab0e1570373da@mail.gmail.com>
On Sun, 21 Jun 2009 20:21:32 +0200
Denys Vlasenko <vda.linux@googlemail.com> wrote:
> Hi,
>
> uclibc project patched unifdef.c (which we stole from kernel)
> so that it understands defined(FOO) in addition to defined FOO,
> and also taught it to understand short-circuited evaluation
> of && and ||
>
> The patch is attached. (Sorry, not inline, I fear Google
> web mail interface may mangle it).
>
> I ran these commands in unpatched and patched tree:
>
> make ARCH=i386 CROSS_COMPILE=i486-linux-uclibc- defconfig
> ln -s asm-x86 include/asm
> make ARCH=i386 CROSS_COMPILE=i486-linux-uclibc- headers_install
>
> and then diffed usr/*. The difference clearly shows that
> new unifdef works better than old one:
>
>
> linux-2.6.30.test/usr/include/linux/acct.h:
> @@ -59,9 +59,7 @@ struct acct
> comp_t ac_majflt; /* Major Pagefaults */
> comp_t ac_swaps; /* Number of Swaps */
> /* m68k had no padding here. */
> -#if !defined(CONFIG_M68K) || !defined(__KERNEL__)
> __u16 ac_ahz; /* AHZ */
> -#endif
> __u32 ac_exitcode; /* Exitcode */
> char ac_comm[ACCT_COMM + 1]; /* Command Name */
> __u8 ac_etime_hi; /* Elapsed Time MSB */
>
>
> linux-2.6.30.test/usr/include/linux/soundcard.h:
> @@ -1033,7 +1033,6 @@ typedef struct mixer_vol_table {
> */
> #define LOCL_STARTAUDIO 1
>
> -#if !defined(__KERNEL__) || defined(USE_SEQ_MACROS)
> /*
> * Some convenience macros to simplify programming of the
> * /dev/sequencer interface
> @@ -1275,4 +1274,3 @@ void seqbuf_dump(void); /* This function
> (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
>
> #endif
> -#endif
>
> ...
>
eek. Please avoid quoting anything which looks like a patch in the
changelog. Because when some poor schmuck comes along and tries to
apply it, patch(1) goes sniffing around in the changelog, thinks it
sees a patch and makes a huge mess of everything.
> Please apply.
Unfortunately unifdef.c got changed after 2.6.30 and this patch throws
more rejects than I am comfortable about fixing.
next prev parent reply other threads:[~2009-06-26 22:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-21 18:21 [PATCH] unifdef: teach it about defined(FOO) syntax Denys Vlasenko
2009-06-26 22:04 ` Andrew Morton [this message]
2009-06-26 22:12 ` Sam Ravnborg
2009-07-05 13:07 ` Denys Vlasenko
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=20090626150453.77425669.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=vda.linux@googlemail.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.