Skip to content

Commit

Permalink
UAPI: Strip _UAPI prefix on header install no matter the whitespace
Browse files Browse the repository at this point in the history
Commit 56c176c ("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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dhowells authored and torvalds committed Jan 3, 2013
1 parent 3d33fcc commit 8a7eab2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/headers_install.pl
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
$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;
Expand Down

0 comments on commit 8a7eab2

Please sign in to comment.