summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2004-11-16 10:55:20 +0000
committerSteve Hay <SteveHay@planit.com>2004-11-16 10:55:20 +0000
commitdfb1454fc4d475052564cd52d54284a5565a13e1 (patch)
tree8afc37835ece95d079f371b69b4f113f51698ec1
parent3d036c2b4a16bfabb30adc0a1c9a65f0f7823869 (diff)
downloadperl-dfb1454fc4d475052564cd52d54284a5565a13e1.tar.gz
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
-rw-r--r--bytecode.pl3
-rwxr-xr-xembed.pl5
-rwxr-xr-xkeywords.pl1
-rwxr-xr-xopcode.pl4
-rw-r--r--regcomp.pl1
-rw-r--r--warnings.pl2
6 files changed, 16 insertions, 0 deletions
diff --git a/bytecode.pl b/bytecode.pl
index d3ca4c8453..d471763a9f 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 2ccd8b38e6..0a878d6ddc 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 2cc50b5779..b4b048b08a 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 <<EOM;
diff --git a/opcode.pl b/opcode.pl
index 70516d0eee..d9c81b3c81 100755
--- a/opcode.pl
+++ b/opcode.pl
@@ -7,7 +7,9 @@ BEGIN {
$opcode_new = 'opcode.h-new';
$opname_new = 'opnames.h-new';
open(OC, ">$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 1809da3b25..97403ba7d4 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 <<EOP;
/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
diff --git a/warnings.pl b/warnings.pl
index 24246f5366..aae186efad 100644
--- a/warnings.pl
+++ b/warnings.pl
@@ -253,7 +253,9 @@ if (@ARGV && $ARGV[0] eq "tree")
unlink "warnings.h";
unlink "lib/warnings.pm";
open(WARN, ">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 !!!!!!!