Skip to content

Commit 6fbe2c7

Browse files
committed
pack "s>" was introduced in perl-5.10
1 parent 1229cba commit 6fbe2c7

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Configure

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7686,22 +7686,25 @@ EOPL
76867686
# of three digit per group separate by '.'s or '_'s. Names are extended
76877687
# with ".0.0" to ensure at least three elements for the pack.
76887688
# -- H.Merijn Brand (m)'06 23-10-2006
7689+
# pack "s>" was introduced in perl-5.10, so I had to rewrite this to an
7690+
# sprintf approach to support bases systems with 5.6.x and 5.8.x
7691+
# -- H.Merijn Brand (m)'25 16-05-2025
76897692

76907693
my @inc_version_list;
76917694
my @candidates;
76927695
# XXX Redo to do opendir/readdir?
76937696
if (-d $stem) {
76947697
chdir($stem);
76957698
;@candidates = map {
7696-
[ $_, pack "s>s>s>", split m/[._]/, "$_.0.0" ] } glob("5.*");
7699+
[ $_, sprintf "%04d%04d%04d", (split m/[._]/, "$_.0.0")[0,1,2] ] } glob("5.*");
76977700
;@candidates = sort { $a->[1] cmp $b->[1]} @candidates;
76987701
}
76997702
else {
77007703
;@candidates = ();
77017704
}
77027705

77037706
my ($pversion, $aversion, $vsn5005) = map {
7704-
pack "s>s>s>", split m/[._]/, "$_.0.0" } $version, $api_versionstring, "5.005";
7707+
sprintf "%04d%04d%04d", (split m/[._]/, "$_.0.0")[0,1,2] } $version, $api_versionstring, "5.005";
77057708
foreach my $d (@candidates) {
77067709
if ($d->[1] lt $pversion) {
77077710
if ($d->[1] ge $aversion) {
@@ -13345,10 +13348,6 @@ esac
1334513348
set i_fcntl
1334613349
eval $setvar
1334713350

13348-
: see if fdopendir exists
13349-
set fdopendir d_fdopendir
13350-
eval $inlibc
13351-
1335213351
: see if fork exists
1335313352
set fork d_fork
1335413353
eval $inlibc
@@ -14066,6 +14065,10 @@ eval $inlibc
1406614065
set fdim d_fdim
1406714066
eval $inlibc
1406814067

14068+
: see if fdopendir exists
14069+
set fdopendir d_fdopendir
14070+
eval $inlibc
14071+
1406914072
: see if fegetround exists
1407014073
set fegetround d_fegetround
1407114074
eval $inlibc
@@ -25044,6 +25047,7 @@ d_fd_macros='$d_fd_macros'
2504425047
d_fd_set='$d_fd_set'
2504525048
d_fdclose='$d_fdclose'
2504625049
d_fdim='$d_fdim'
25050+
d_fdopendir='$d_fdopendir'
2504725051
d_fds_bits='$d_fds_bits'
2504825052
d_fegetround='$d_fegetround'
2504925053
d_ffs='$d_ffs'
@@ -25057,7 +25061,6 @@ d_flockproto='$d_flockproto'
2505725061
d_fma='$d_fma'
2505825062
d_fmax='$d_fmax'
2505925063
d_fmin='$d_fmin'
25060-
d_fdopendir='$d_fdopendir'
2506125064
d_fork='$d_fork'
2506225065
d_fp_class='$d_fp_class'
2506325066
d_fp_classify='$d_fp_classify'

0 commit comments

Comments
 (0)