diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/WorkspaceCreator.pm | 12 |
2 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 98f0521f7bf..55daae5eeec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Thu Aug 7 07:35:56 2003 Chad Elliott <elliott_c@ociweb.com> + + * bin/MakeProjectCreator/modules/WorkspaceCreator.pm: + + Corrected a bug in the dependency sorting logic by removing the + use of splice and manually moving the array entries. + Thu Aug 7 06:18:57 2003 Chad Elliott <elliott_c@ociweb.com> * include/makeinclude/rules.local.GNU: diff --git a/bin/MakeProjectCreator/modules/WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm index b2f7cf1f1d4..93228a55f3d 100644 --- a/bin/MakeProjectCreator/modules/WorkspaceCreator.pm +++ b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm @@ -763,9 +763,15 @@ sub sort_dependencies { ## See if the dependency is listed after this project for(my $j = $i; $j <= $#list; $j++) { if ($list[$j] eq $full && $i != $j) { - ## If so, move it in front of the current project - splice(@list, $i, 0, $full); - splice(@list, $j + 1, 1); + ## If so, move it in front of the current project. + ## The original code, which had splices, didn't always + ## work correctly (especially on AIX for some reason). + for(my $k = $j; $k > $i; --$k) { + $list[$k] = $list[$k - 1]; + } + $list[$i] = $full; + + ## Mark that an entry has been moved $moved = 1; $j--; } |