summaryrefslogtreecommitdiff
path: root/util/perl
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2022-11-15 16:33:21 +0100
committerDr. David von Oheimb <dev@ddvo.net>2022-11-18 07:47:44 +0100
commitc507db9678f50482df5f6c58e42572fe6fe3007c (patch)
tree20ec6c9d221bd189ded3cfc2c358f65307f38807 /util/perl
parentcab5b3a344199d54dd4432dbc6d4b361e10e11d1 (diff)
downloadopenssl-new-c507db9678f50482df5f6c58e42572fe6fe3007c.tar.gz
ParseC.pm: gracefully handle DOS-style end-of-line in source files
When header files happen to have \r\n at line end, prevent hick-ups like: Unmatched parentheses at include/openssl/asn1.h line 520 make[1]: *** [Makefile:4757: util/libcrypto.num] Error 255 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:3387: build_sw] Error 2 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/19686)
Diffstat (limited to 'util/perl')
-rw-r--r--util/perl/OpenSSL/ParseC.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/perl/OpenSSL/ParseC.pm b/util/perl/OpenSSL/ParseC.pm
index 3f14cac9cd..661bd11818 100644
--- a/util/perl/OpenSSL/ParseC.pm
+++ b/util/perl/OpenSSL/ParseC.pm
@@ -822,7 +822,7 @@ sub parse {
# We use ¦undef¦ as a marker for a new line from the file.
# Since we convert one line to several and unshift that into @lines,
# that's the only safe way we have to track the original lines
- my @lines = map { ( undef, $_ ) } split $/, $line;
+ my @lines = map { ( undef, $_ ) } split m|\R|, $line;
# Remember that extra # we added above? Now we remove it
pop @lines;