aboutsummaryrefslogtreecommitdiff
path: root/scripts/firstversions.awk
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-02-07 05:25:11 +0000
committerRoland McGrath <roland@gnu.org>2002-02-07 05:25:11 +0000
commit48a5e01019cd75b1a9f01773d583e0f0f923aa42 (patch)
treeb8b53418a9f02490a10b280de797e46dc1a8da9a /scripts/firstversions.awk
parent9813e10395627340586f7788a31ef22b80fe1b17 (diff)
downloadglibc-48a5e01019cd75b1a9f01773d583e0f0f923aa42.tar
glibc-48a5e01019cd75b1a9f01773d583e0f0f923aa42.tar.gz
glibc-48a5e01019cd75b1a9f01773d583e0f0f923aa42.tar.bz2
glibc-48a5e01019cd75b1a9f01773d583e0f0f923aa42.zip
* scripts/versions.awk: Improve error message for missing version.
Each version inherits from the last one only if they have the same nonnumeric prefix, i.e. GLIBC_x.y and GLIBC_x.z or FOO_x and FOO_y but not GLIBC_x and FOO_y. * scripts/firstversions.awk: Handle libraries that don't have each particular version named in the third column of shlib-versions.
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;
}