2000-03-20 04:36:44 +08:00
|
|
|
# Script to preprocess Versions.all lists based on "earliest version"
|
|
|
|
# specifications in the shlib-versions file.
|
|
|
|
|
2000-03-22 04:36:53 +08:00
|
|
|
NF > 2 && $2 == ":" {
|
|
|
|
for (i = 0; i <= NF - 3; ++i)
|
|
|
|
firstversion[$1, i] = $(3 + i);
|
|
|
|
idx[$1] = 0;
|
|
|
|
next;
|
|
|
|
}
|
2000-03-20 04:36:44 +08:00
|
|
|
|
|
|
|
NF == 2 && $2 == "{" { thislib = $1; print; next }
|
|
|
|
|
|
|
|
$1 == "}" {
|
2002-02-07 13:25:11 +08:00
|
|
|
if ((thislib, idx[thislib]) in firstversion) {
|
2000-03-20 04:36:44 +08:00
|
|
|
# We haven't seen the stated version, but have produced
|
|
|
|
# others pointing to it, so we synthesize it now.
|
2000-03-22 04:36:53 +08:00
|
|
|
printf " %s\n", firstversion[thislib, idx[thislib]];
|
|
|
|
idx[thislib]++;
|
2000-03-20 04:36:44 +08:00
|
|
|
}
|
|
|
|
print;
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
|
2002-02-07 12:33:51 +08:00
|
|
|
/GLIBC_PRIVATE/ { print; next }
|
2000-03-22 04:36:53 +08:00
|
|
|
|
2002-02-07 12:33:51 +08:00
|
|
|
{
|
|
|
|
if ((thislib, idx[thislib]) in firstversion) {
|
2002-02-07 13:25:11 +08:00
|
|
|
# XXX relative string comparison loses if we ever have multiple digits
|
|
|
|
# between dots in GLIBC_x.y[.z] names.
|
2002-08-22 15:22:03 +08:00
|
|
|
f = v = firstversion[thislib, idx[thislib]];
|
2002-02-07 13:25:11 +08:00
|
|
|
while ($1 >= v) {
|
2002-08-22 15:22:03 +08:00
|
|
|
delete firstversion[thislib, idx[thislib]];
|
2002-02-07 12:33:51 +08:00
|
|
|
idx[thislib]++;
|
2002-02-07 13:25:11 +08:00
|
|
|
if ((thislib, idx[thislib]) in firstversion)
|
|
|
|
v = firstversion[thislib, idx[thislib]];
|
|
|
|
else
|
|
|
|
break;
|
2002-02-07 12:33:51 +08:00
|
|
|
}
|
2002-08-22 15:22:03 +08:00
|
|
|
if ($1 == v || $1 == f)
|
|
|
|
# This version was the specified earliest version itself.
|
2002-02-07 13:25:11 +08:00
|
|
|
print;
|
2002-08-22 15:22:03 +08:00
|
|
|
else if ($1 < v) {
|
|
|
|
# This version is older than the specified earliest version.
|
|
|
|
print " " $1, "=", v;
|
|
|
|
# Record that V has been referred to, so we will be sure to emit it
|
|
|
|
# if we hit a later one without hitting V itself.
|
|
|
|
usedversion[thislib, v] = 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
# This version is newer than the specified earliest version.
|
|
|
|
# We haven't seen that version itself or else we wouldn't be here
|
|
|
|
# because we would have removed it from the firstversion array.
|
|
|
|
# If there were any earlier versions that used that one, emit it now.
|
|
|
|
if ((thislib, v) in usedversion) {
|
|
|
|
print " " v;
|
|
|
|
}
|
|
|
|
print " " $1;
|
|
|
|
}
|
2000-03-20 04:36:44 +08:00
|
|
|
}
|
|
|
|
else
|
2002-02-07 12:33:51 +08:00
|
|
|
print;
|
2000-03-20 04:36:44 +08:00
|
|
|
}
|