]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Make 'make errors' work again
authorRichard Levitte <levitte@openssl.org>
Fri, 4 Sep 2020 06:53:11 +0000 (08:53 +0200)
committerMatt Caswell <matt@openssl.org>
Sun, 13 Sep 2020 10:11:57 +0000 (11:11 +0100)
util/mkerr.pl detects if a header is now a '.in' template, and adjusts
the header file it reads accordingly.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12781)

util/mkerr.pl

index 44332d423ec5c92c147b6d7b9270dce31dea29e6..16ca06ef836a17956bf6cbd3d87f1b91b210d704 100755 (executable)
@@ -263,7 +263,9 @@ while ( ( my $hdr, my $lib ) = each %libinc ) {
     my $linenr = 0;
     my $cpp = 0;
 
-    open(IN, "<$hdr") || die "Can't open $hdr, $!,";
+    open(IN, "<$hdr")
+        || open(IN, "<$hdr.in")
+        || die "Can't open $hdr or $hdr.in, $!,";
     while ( <IN> ) {
         $linenr++;
 
@@ -435,7 +437,6 @@ foreach my $lib ( keys %errorfile ) {
     # Rewrite the header file
 
     my $hfile = $hinc{$lib};
-    $hfile =~ s/.h$/err.h/ if $internal;
     open( OUT, ">$hfile" ) || die "Can't write to $hfile, $!,";
     print OUT <<"EOF";
 /*