diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-01-28 16:15:44 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-01-28 16:15:44 +0000 |
commit | c2b2234990dd7c3bd316e2e01d27654ee3944e66 (patch) | |
tree | 9d349c7113b95d262d2b50e19c2035ba55dc26e2 /lib/sbin/CST | |
parent | 57b25274df391b698495e63d865738de250dae63 (diff) |
Fixed a bug when sorting out the order of libs in the thorn linklist.
This closes PR Compiler/1369 and probably also Cactus/1323.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3115 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/CST')
-rw-r--r-- | lib/sbin/CST | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/sbin/CST b/lib/sbin/CST index f2741638..68c5024b 100644 --- a/lib/sbin/CST +++ b/lib/sbin/CST @@ -6,7 +6,7 @@ # @desc # Parses the the configuration files for thorns. # @enddesc -# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/sbin/CST,v 1.50 2002-08-20 13:38:41 allen Exp $ +# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/sbin/CST,v 1.51 2003-01-28 16:15:44 tradke Exp $ #@@*/ # Global parameter to track the number of errors from the CST @@ -398,7 +398,7 @@ sub CreateThornLinkList my($implementation); my($lib, $liblist, $i, $j); my($cross_inherits); - my(@libs, @liblist); + my(@anchestors, @libs, @liblist); @libs = (); $cross_inherits = 0; @@ -410,7 +410,17 @@ sub CreateThornLinkList $implementation = $interface_database->{"\U$thorn\E IMPLEMENTS"}; if ($interface_database->{"IMPLEMENTATION \U$implementation\E ANCESTORS"}) { - push (@libs, split (' ', $interface_database->{"IMPLEMENTATION \U$implementation\E ANCESTORS"}), $implementation); + @anchestors = split (' ', $interface_database->{"IMPLEMENTATION \U$implementation\E ANCESTORS"}); + for ($i = $j = 0; $i <= $#libs; $i++) + { + if ($libs[$i] =~ /^$implementation$/i) + { + splice (@libs, $i, 1, @anchestors, $implementation); + $j = 1; + last; + } + } + push (@libs, @anchestors, $implementation) if (! $j); } else { |