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)
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++;
# 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";
/*