summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
43d0699)
isn't actually a frequently looked up value.
p4raw-id: //depot/perl@23562
my $list = join ',', reverse(2..$s);
my $format = 'a'x$s;
$byteorder_code = <<"EOT";
my $list = join ',', reverse(2..$s);
my $format = 'a'x$s;
$byteorder_code = <<"EOT";
my \$i = 0;
foreach my \$c ($list) { \$i |= ord(\$c); \$i <<= 8 }
\$i |= ord(1);
my \$i = 0;
foreach my \$c ($list) { \$i |= ord(\$c); \$i <<= 8 }
\$i |= ord(1);
} else {
$byteorder_code = "our \$byteorder = '?'x$s;\n";
}
} else {
$byteorder_code = "our \$byteorder = '?'x$s;\n";
}
-print CONFIG $byteorder_code;
print CONFIG_HEAVY @non_v, "\n";
print CONFIG_HEAVY @non_v, "\n";
-print CONFIG_HEAVY join("", @v_fast, sort @v_others);
+print CONFIG_HEAVY join('', @v_fast, sort @v_others), "!END!\n";
+
+# Only need the dynamic byteorder code in Config.pm if 'byteorder' is one of
+# the precached keys
+if ($Common{byteorder}) {
+ print CONFIG $byteorder_code;
+} else {
+ print CONFIG_HEAVY $byteorder_code;
+}
print CONFIG_HEAVY <<'EOT';
print CONFIG_HEAVY <<'EOT';
s/(byteorder=)(['"]).*?\2/$1$2$Config::byteorder$2/m;
my $config_sh_len = length $_;
s/(byteorder=)(['"]).*?\2/$1$2$Config::byteorder$2/m;
my $config_sh_len = length $_;
}
$Common{$key} = "$qkey => $value";
}
}
$Common{$key} = "$qkey => $value";
}
-my $fast_config = join '', map { " $_,\n" }
- sort (values %Common, 'byteorder => $byteorder');
+
+if ($Common{byteorder}) {
+ $Common{byteorder} = 'byteorder => $byteorder';
+}
+my $fast_config = join '', map { " $_,\n" } sort values %Common;
print CONFIG sprintf <<'ENDOFTIE', $fast_config;
print CONFIG sprintf <<'ENDOFTIE', $fast_config;