X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=regcomp.pl;h=225882a576274d605450294cc181123d6e7e63d0;hb=b891b7335194e891dcfaf5a5077012facb06d75b;hp=6ae847882d49aa0217a3c77f91acf6c5eab46f6b;hpb=22d4bb9ccb8701e68f9243547d7e3a3c55f70908;p=p5sagit%2Fp5-mst-13.2.git diff --git a/regcomp.pl b/regcomp.pl index 6ae8478..225882a 100644 --- a/regcomp.pl +++ b/regcomp.pl @@ -1,3 +1,7 @@ +BEGIN { + # Get function prototypes + require 'regen.pl'; +} #use Fatal qw(open close rename chmod unlink); open DESC, 'regcomp.sym'; $ind = 0; @@ -112,8 +116,6 @@ static const int reg_num = $tot; EOP -close OUT; +close OUT or die "close $tmp_h: $!"; -chmod 0666, 'regnodes.h'; -unlink 'regnodes.h'; -rename $tmp_h, 'regnodes.h'; +safer_rename $tmp_h, 'regnodes.h';