diff options
author | Roland McGrath <roland@gnu.org> | 2002-08-22 08:36:06 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-08-22 08:36:06 +0000 |
commit | 89f08aa95076b801e71b52506075df9aa13d5a83 (patch) | |
tree | 37c52afc53936058c7b06307854db8ae34ed00e9 | |
parent | b5e987d473bbdd8076278a7981f6056991eb4c4f (diff) | |
download | glibc-89f08aa95076b801e71b52506075df9aa13d5a83.tar.gz glibc-89f08aa95076b801e71b52506075df9aa13d5a83.tar.xz glibc-89f08aa95076b801e71b52506075df9aa13d5a83.zip |
2002-08-22 Roland McGrath <roland@redhat.com>
* scripts/firstversions.awk: When encountering a version newer than the specified earliest version, be sure to emit the specified earliest version first if any renaming of an older version to that has been. 2002-03-22 H.J. Lu <hjl@gnu.org> * scripts/firstversions.awk: Check the first version. 2002-02-06 Roland McGrath <roland@frob.com> * scripts/firstversions.awk: Handle libraries that don't have each particular version named in the third column of shlib-versions. * scripts/firstversions.awk: Don't mess with GLIBC_PRIVATE.
-rw-r--r-- | scripts/firstversions.awk | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/scripts/firstversions.awk b/scripts/firstversions.awk index 7f1c2edf52..8da92ae485 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]]; @@ -21,16 +21,42 @@ $1 == "}" { next; } -{ - v = firstversion[thislib, idx[thislib]]; +/GLIBC_PRIVATE/ { print; next } - if (! v) - print; - else if ($1 == v) { - print; - firstversion[thislib, idx[thislib]] = 0; - idx[thislib]++; +{ + 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. + f = v = firstversion[thislib, idx[thislib]]; + while ($1 >= v) { + delete firstversion[thislib, idx[thislib]]; + idx[thislib]++; + if ((thislib, idx[thislib]) in firstversion) + v = firstversion[thislib, idx[thislib]]; + else + break; + } + if ($1 == v || $1 == f) + # This version was the specified earliest version itself. + print; + 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; + } } else - print $1, "=", v; + print; } |