From: Steve Hay Date: Tue, 16 Nov 2004 10:55:20 +0000 (+0000) Subject: Make all scripts run by regen.pl write output with UNIX style EOL's. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dfb1454fc4d475052564cd52d54284a5565a13e1;p=p5sagit%2Fp5-mst-13.2.git Make all scripts run by regen.pl write output with UNIX style EOL's. (autodoc.pl was already done by change 23371.) p4raw-id: //depot/perl@23501 --- diff --git a/bytecode.pl b/bytecode.pl index d3ca4c8..d471763 100644 --- a/bytecode.pl +++ b/bytecode.pl @@ -43,6 +43,7 @@ safer_unlink "ext/ByteLoader/byterun.c", "ext/ByteLoader/byterun.h", "ext/B/B/As # Start with boilerplate for Asmdata.pm # open(ASMDATA_PM, ">ext/B/B/Asmdata.pm") or die "ext/B/B/Asmdata.pm: $!"; +binmode ASMDATA_PM; print ASMDATA_PM $perl_header, <<'EOT'; package B::Asmdata; @@ -67,6 +68,7 @@ EOT # Boilerplate for byterun.c # open(BYTERUN_C, ">ext/ByteLoader/byterun.c") or die "ext/ByteLoader/byterun.c: $!"; +binmode BYTERUN_C; print BYTERUN_C $c_header, <<'EOT'; #define PERL_NO_GET_CONTEXT @@ -198,6 +200,7 @@ EOT # Write the instruction and optype enum constants into byterun.h # open(BYTERUN_H, ">ext/ByteLoader/byterun.h") or die "ext/ByteLoader/byterun.h: $!"; +binmode BYTERUN_H; print BYTERUN_H $c_header, <<'EOT'; struct byteloader_fdata { SV *datasv; diff --git a/embed.pl b/embed.pl index 2ccd8b3..0a878d6 100755 --- a/embed.pl +++ b/embed.pl @@ -95,6 +95,7 @@ sub walk_table (&@) { else { safer_unlink $filename; open F, ">$filename" or die "Can't open $filename: $!"; + binmode F; $F = \*F; } print $F $leader if $leader; @@ -338,6 +339,7 @@ sub multoff ($$) { safer_unlink 'embed.h'; open(EM, '> embed.h') or die "Can't create embed.h: $!\n"; +binmode EM; print EM do_not_edit ("embed.h"), <<'END'; @@ -547,6 +549,7 @@ close(EM) or die "Error closing EM: $!"; safer_unlink 'embedvar.h'; open(EM, '> embedvar.h') or die "Can't create embedvar.h: $!\n"; +binmode EM; print EM do_not_edit ("embedvar.h"), <<'END'; @@ -654,7 +657,9 @@ close(EM) or die "Error closing EM: $!"; safer_unlink 'perlapi.h'; safer_unlink 'perlapi.c'; open(CAPI, '> perlapi.c') or die "Can't create perlapi.c: $!\n"; +binmode CAPI; open(CAPIH, '> perlapi.h') or die "Can't create perlapi.h: $!\n"; +binmode CAPIH; print CAPIH do_not_edit ("perlapi.h"), <<'EOT'; diff --git a/keywords.pl b/keywords.pl index 2cc50b5..b4b048b 100755 --- a/keywords.pl +++ b/keywords.pl @@ -3,6 +3,7 @@ require 'regen_lib.pl'; safer_unlink ("keywords.h"); open(KW, ">keywords.h") || die "Can't create keywords.h: $!\n"; +binmode KW; select KW; print <$opcode_new") || die "Can't create $opcode_new: $!\n"; +binmode OC; open(ON, ">$opname_new") || die "Can't create $opname_new: $!\n"; +binmode ON; select OC; # Read data. @@ -293,7 +295,9 @@ $pp_proto_new = 'pp_proto.h-new'; $pp_sym_new = 'pp.sym-new'; open PP, ">$pp_proto_new" or die "Error creating $pp_proto_new: $!"; +binmode PP; open PPSYM, ">$pp_sym_new" or die "Error creating $pp_sym_new: $!"; +binmode PPSYM; print PP <<"END"; /* !!!!!!! DO NOT EDIT THIS FILE !!!!!!! diff --git a/regcomp.pl b/regcomp.pl index 1809da3..97403ba 100644 --- a/regcomp.pl +++ b/regcomp.pl @@ -22,6 +22,7 @@ $tmp_h = 'tmp_reg.h'; unlink $tmp_h if -f $tmp_h; open OUT, ">$tmp_h"; +binmode OUT; print OUT <warnings.h") || die "Can't create warnings.h: $!\n"; +binmode WARN; open(PM, ">lib/warnings.pm") || die "Can't create lib/warnings.pm: $!\n"; +binmode PM; print WARN <<'EOM' ; /* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!