mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: torvalds@linux-foundation.org
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] UAPI: Strip _UAPI prefix on header install no matter the whitespace
Date: Fri, 21 Dec 2012 12:48:47 +0000	[thread overview]
Message-ID: <20121221124847.9484.75554.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <20121221124840.9484.93112.stgit@warthog.procyon.org.uk>

The following commit:

	commit 56c176c9cac9a77249fa1736bfd792f379d61942
	Author: David Howells <dhowells@redhat.com>
	Date:   Mon Nov 26 16:29:39 2012 -0800
	Subject: UAPI: strip the _UAPI prefix from header guards during header installation

strips the _UAPI prefix from header guards, but only if there's a single space
between the cpp directive and the label.  Make it more flexible and able to
handle tabs and multiple white space characters.

Signed-off-by: David Howells <dhowell@redhat.com>
---

 scripts/headers_install.pl |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl
index 6c353ae..581ca99 100644
--- a/scripts/headers_install.pl
+++ b/scripts/headers_install.pl
@@ -42,9 +42,9 @@ foreach my $filename (@files) {
 		$line =~ s/(^|\s)(inline)\b/$1__$2__/g;
 		$line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g;
 		$line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g;
-		$line =~ s/#ifndef _UAPI/#ifndef /;
-		$line =~ s/#define _UAPI/#define /;
-		$line =~ s!#endif /[*] _UAPI!#endif /* !;
+		$line =~ s/#ifndef\s+_UAPI/#ifndef /;
+		$line =~ s/#define\s+_UAPI/#define /;
+		$line =~ s!#endif\s+/[*]\s*_UAPI!#endif /* !;
 		printf {$out} "%s", $line;
 	}
 	close $out;


  reply	other threads:[~2012-12-21 12:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-21 12:48 [PATCH 1/2] UAPI: Remove empty Kbuild files David Howells
2012-12-21 12:48 ` David Howells [this message]
2013-01-02 15:12 David Howells
2013-01-02 15:13 ` [PATCH 2/2] UAPI: Strip _UAPI prefix on header install no matter the whitespace David Howells

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=20121221124847.9484.75554.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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®