aboutsummaryrefslogtreecommitdiff
path: root/lib/checksrc.pl
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2015-03-30 16:22:58 -0400
committerDaniel Stenberg <daniel@haxx.se>2015-03-30 22:39:13 +0200
commit6419aee248d76b0cf53d1ff78b31a855fbff6f03 (patch)
tree975d2dc1d1bfc3ceda58a6ccb5f24466f4bd1bd5 /lib/checksrc.pl
parent5b668606527613179d0349f21b4ab0df2971e3d2 (diff)
checksrc: Windows-specific input fixes
lib/config-win32ce.h - Fix whitespace for checksrc compliance. lib/checksrc.pl - Remove trailing carriage returns from input. projects/checksrc.bat - Ignore tool_hugehelp.c.
Diffstat (limited to 'lib/checksrc.pl')
-rwxr-xr-xlib/checksrc.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/checksrc.pl b/lib/checksrc.pl
index 4e04f3cf8..292ad3424 100755
--- a/lib/checksrc.pl
+++ b/lib/checksrc.pl
@@ -30,14 +30,15 @@ my $supressed; # whitelisted problems
my $file;
my $dir=".";
my $wlist;
+my $windows_os = $^O eq 'MSWin32' || $^O eq 'msys' || $^O eq 'cygwin';
my %whitelist;
sub readwhitelist {
open(W, "<$dir/checksrc.whitelist");
my @all=<W>;
- for(@all) {
- chomp;
+ for(@all) {
+ $windows_os ? $_ =~ s/\r?\n$// : chomp;
$whitelist{$_}=1;
}
close(W);
@@ -120,7 +121,7 @@ sub scanfile {
my $copyright=0;
while(<R>) {
- chomp;
+ $windows_os ? $_ =~ s/\r?\n$// : chomp;
my $l = $_;
my $column = 0;