aboutsummaryrefslogtreecommitdiff
path: root/scripts/firstversions.awk
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/firstversions.awk')
-rw-r--r--scripts/firstversions.awk13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/firstversions.awk b/scripts/firstversions.awk
index 89bbe5e871..736ef0365c 100644
--- a/scripts/firstversions.awk
+++ b/scripts/firstversions.awk
@@ -11,7 +11,7 @@ NF > 2 && $2 == ":" {
NF == 2 && $2 == "{" { thislib = $1; print; next }
$1 == "}" {
- if (firstversion[thislib, idx[thislib]]) {
+ if ((thislib, idx[thislib]) in firstversion) {
# We haven't seen the stated version, but have produced
# others pointing to it, so we synthesize it now.
printf " %s\n", firstversion[thislib, idx[thislib]];
@@ -25,12 +25,19 @@ $1 == "}" {
{
if ((thislib, idx[thislib]) in firstversion) {
+ # XXX relative string comparison loses if we ever have multiple digits
+ # between dots in GLIBC_x.y[.z] names.
v = firstversion[thislib, idx[thislib]];
- if ($1 == v) {
- print;
+ while ($1 >= v) {
firstversion[thislib, idx[thislib]] = 0;
idx[thislib]++;
+ if ((thislib, idx[thislib]) in firstversion)
+ v = firstversion[thislib, idx[thislib]];
+ else
+ break;
}
+ if ($1 >= v)
+ print;
else
print $1, "=", v;
}