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=; - 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() { - chomp; + $windows_os ? $_ =~ s/\r?\n$// : chomp; my $l = $_; my $column = 0; diff --git a/lib/config-win32ce.h b/lib/config-win32ce.h index 9d6499819..a723fd188 100644 --- a/lib/config-win32ce.h +++ b/lib/config-win32ce.h @@ -443,6 +443,6 @@ #define ENOMEM 2 #define EAGAIN 3 -extern int stat(const char *path,struct stat *buffer ); +extern int stat(const char *path, struct stat *buffer); #endif /* HEADER_CURL_CONFIG_WIN32CE_H */ diff --git a/projects/checksrc.bat b/projects/checksrc.bat index d81ce7de0..1e8373420 100644 --- a/projects/checksrc.bat +++ b/projects/checksrc.bat @@ -46,7 +46,7 @@ rem *************************************************************************** if not exist "%SRC_DIR%" goto nosrc :start - for /f "delims=" %%i in ('dir %SRC_DIR%\src\*.c.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\src "%%i" + for /f "delims=" %%i in ('dir %SRC_DIR%\src\*.c.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\src -Wtool_hugehelp.c "%%i" for /f "delims=" %%i in ('dir %SRC_DIR%\src\*.h.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\src "%%i" for /f "delims=" %%i in ('dir %SRC_DIR%\lib\*.c.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\lib "%%i" for /f "delims=" %%i in ('dir %SRC_DIR%\lib\*.h.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\lib -Wcurl_config.h.cmake "%%i"