2000-03-19 20:36:44 +00:00
|
|
|
# Script to preprocess Versions.all lists based on "earliest version"
|
|
|
|
# specifications in the shlib-versions file.
|
|
|
|
|
2000-03-21 20:36:53 +00:00
|
|
|
NF > 2 && $2 == ":" {
|
|
|
|
for (i = 0; i <= NF - 3; ++i)
|
|
|
|
firstversion[$1, i] = $(3 + i);
|
|
|
|
idx[$1] = 0;
|
|
|
|
next;
|
|
|
|
}
|
2000-03-19 20:36:44 +00:00
|
|
|
|
|
|
|
NF == 2 && $2 == "{" { thislib = $1; print; next }
|
|
|
|
|
|
|
|
$1 == "}" {
|
2002-02-07 05:25:11 +00:00
|
|
|
if ((thislib, idx[thislib]) in firstversion) {
|
2000-03-19 20:36:44 +00:00
|
|
|
# We haven't seen the stated version, but have produced
|
|
|
|
# others pointing to it, so we synthesize it now.
|
2000-03-21 20:36:53 +00:00
|
|
|
printf " %s\n", firstversion[thislib, idx[thislib]];
|
|
|
|
idx[thislib]++;
|
2000-03-19 20:36:44 +00:00
|
|
|
}
|
|
|
|
print;
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
|
2002-02-07 04:33:51 +00:00
|
|
|
/GLIBC_PRIVATE/ { print; next }
|
2000-03-21 20:36:53 +00:00
|
|
|
|
2002-02-07 04:33:51 +00:00
|
|
|
{
|
|
|
|
if ((thislib, idx[thislib]) in firstversion) {
|
2002-02-07 05:25:11 +00:00
|
|
|
# XXX relative string comparison loses if we ever have multiple digits
|
|
|
|
# between dots in GLIBC_x.y[.z] names.
|
2002-04-03 06:59:37 +00:00
|
|
|
f = firstversion[thislib, idx[thislib]];
|
|
|
|
v = f;
|
2002-02-07 05:25:11 +00:00
|
|
|
while ($1 >= v) {
|
2002-02-07 04:33:51 +00:00
|
|
|
firstversion[thislib, idx[thislib]] = 0;
|
|
|
|
idx[thislib]++;
|
2002-02-07 05:25:11 +00:00
|
|
|
if ((thislib, idx[thislib]) in firstversion)
|
|
|
|
v = firstversion[thislib, idx[thislib]];
|
|
|
|
else
|
|
|
|
break;
|
2002-02-07 04:33:51 +00:00
|
|
|
}
|
2002-04-03 06:59:37 +00:00
|
|
|
if ($1 >= v || $1 == f)
|
2002-02-07 05:25:11 +00:00
|
|
|
print;
|
2002-02-07 04:33:51 +00:00
|
|
|
else
|
|
|
|
print $1, "=", v;
|
2000-03-19 20:36:44 +00:00
|
|
|
}
|
|
|
|
else
|
2002-02-07 04:33:51 +00:00
|
|
|
print;
|
2000-03-19 20:36:44 +00:00
|
|
|
}
|