mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-06-12 08:21:54 +03:00
Accept Windows line endings on inputs on any platform
Accept Windows line endings in input files on any platform. This makes the scripts work even when running a Unix perl with a source tree that has Windows line endings, as happens for example on our Travis Windows instances. This change is harmless in the common case where the input has the platform's default line endings. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@ -56,7 +56,7 @@ my @high_level_modules = qw( CIPHER DHM ECP MD
|
||||
my $line_separator = $/;
|
||||
undef $/;
|
||||
|
||||
open(FORMAT_FILE, "$error_format_file") or die "Opening error format file '$error_format_file': $!";
|
||||
open(FORMAT_FILE, '<:crlf', "$error_format_file") or die "Opening error format file '$error_format_file': $!";
|
||||
my $error_format = <FORMAT_FILE>;
|
||||
close(FORMAT_FILE);
|
||||
|
||||
@ -66,7 +66,7 @@ my @files = <$include_dir/*.h>;
|
||||
my @necessary_include_files;
|
||||
my @matches;
|
||||
foreach my $file (@files) {
|
||||
open(FILE, "$file");
|
||||
open(FILE, '<:crlf', "$file");
|
||||
my @grep_res = grep(/^\s*#define\s+MBEDTLS_ERR_\w+\s+\-0x[0-9A-Fa-f]+/, <FILE>);
|
||||
push(@matches, @grep_res);
|
||||
close FILE;
|
||||
|
Reference in New Issue
Block a user