X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=regcomp.pl;h=1809da3b2552f5b3f8fc4bcd76d8816d21c659dd;hb=b76f91fcea858b4c9ff8318bb0e9892afb37cbc8;hp=6ae847882d49aa0217a3c77f91acf6c5eab46f6b;hpb=22d4bb9ccb8701e68f9243547d7e3a3c55f70908;p=p5sagit%2Fp5-mst-13.2.git diff --git a/regcomp.pl b/regcomp.pl index 6ae8478..1809da3 100644 --- a/regcomp.pl +++ b/regcomp.pl @@ -1,3 +1,7 @@ +BEGIN { + # Get function prototypes + require 'regen_lib.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';