mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: "son of unifdef"
Date: Sun, 25 Nov 2007 00:17:42 -0500 (EST)	[thread overview]
Message-ID: <alpine.LFD.0.9999.0711250012470.7266@localhost.localdomain> (raw)


  just for the entertainment value, i ran "make headers_install" on my
x86 box using the newer "sunifdef" utility, which has the advantage
that it will remove parts of compound preprocessor conditionals.
here's the diff output between the old and the new generated header
directories:

diff -r include.orig/asm/posix_types_32.h include.sunifdef/asm/posix_types_32.h
42c42
< #if defined(__KERNEL__) || defined(__USE_ALL)
---
> #if defined(__USE_ALL)
49c49
< #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
---
> #if !defined(__GLIBC__) || __GLIBC__ < 2
diff -r include.orig/linux/acct.h include.sunifdef/linux/acct.h
62d61
< #if !defined(CONFIG_M68K) || !defined(__KERNEL__)
64d62
< #endif
diff -r include.orig/linux/ext2_fs.h include.sunifdef/linux/ext2_fs.h
240c240
< #if defined(__KERNEL__) || defined(__linux__)
---
> #if defined(__linux__)
diff -r include.orig/linux/ext3_fs.h include.sunifdef/linux/ext3_fs.h
295c295
< #if defined(__KERNEL__) || defined(__linux__)
---
> #if defined(__linux__)
diff -r include.orig/linux/nfs3.h include.sunifdef/linux/nfs3.h
99c99
< #if defined(__KERNEL__) || defined(NFS_NEED_KERNEL_TYPES)
---
> #if defined(NFS_NEED_KERNEL_TYPES)
diff -r include.orig/linux/socket.h include.sunifdef/linux/socket.h
19c19
< #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
---
> #if !defined(__GLIBC__) || __GLIBC__ < 2
diff -r include.orig/linux/soundcard.h include.sunifdef/linux/soundcard.h
1036c1036
< #if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS)
---
> #if  !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL) || defined(USE_SEQ_MACROS)
diff -r include.orig/linux/stat.h include.sunifdef/linux/stat.h
5c5
< #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
---
> #if !defined(__GLIBC__) || __GLIBC__ < 2
diff -r include.orig/linux/videodev.h include.sunifdef/linux/videodev.h
17d16
< #if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__)
297d295
< #endif /* CONFIG_VIDEO_V4L1_COMPAT */
diff -r include.orig/video/edid.h include.sunifdef/video/edid.h
4d3
< #if !defined(__KERNEL__) || defined(CONFIG_X86)
11d9
< #endif

  in addition, sunifdef whined as follows:

UNIFDEF include/linux/netlink.h
sunifdef: /home/rpjday/k/git/include/linux/netlink.h: line 205:
warning 0x02070: Garbage following preprocessor directive in "#if PAGE_SIZE < 8192UL" (#if line 152 depth 2)

  i'm guessing it's that "UL" suffix it doesn't like.

rday

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

                 reply	other threads:[~2007-11-25  5:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=alpine.LFD.0.9999.0711250012470.7266@localhost.localdomain \
    --to=rpjday@crashcourse.ca \
    --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®