2000-03-19 21:36:44 +01:00
|
|
|
# Script to generate <abi-versions.h> header file from Versions.all list.
|
|
|
|
# See include/shlib-compat.h comments for explanation.
|
|
|
|
|
2000-12-02 00:15:18 +01:00
|
|
|
# This script expects the following variables to be defined:
|
|
|
|
# oldest_abi the oldest ABI supported
|
|
|
|
|
2000-03-19 21:36:44 +01:00
|
|
|
BEGIN {
|
|
|
|
print "/* This file is automatically generated by abi-versions.awk.";
|
|
|
|
print " It defines symbols used by shlib-compat.h, which see. */";
|
|
|
|
print "\n#ifndef _ABI_VERSIONS_H\n#define _ABI_VERSIONS_H";
|
|
|
|
}
|
|
|
|
|
|
|
|
NF == 2 && $2 == "{" {
|
|
|
|
thislib = $1;
|
|
|
|
gsub(/[^A-Za-z0-9_ ]/, "_"); libid = $1;
|
|
|
|
printf "\n/* start %s */\n", thislib;
|
2000-03-22 06:43:53 +01:00
|
|
|
n = 0;
|
2000-12-02 00:15:18 +01:00
|
|
|
start = 0;
|
2000-03-19 21:36:44 +01:00
|
|
|
next;
|
|
|
|
}
|
|
|
|
$1 == "}" {
|
|
|
|
printf "/* end %s */\n", thislib;
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
|
|
|
|
$2 == "=" {
|
2000-03-22 06:43:53 +01:00
|
|
|
old = $1; new = $3;
|
|
|
|
gsub(/[^A-Za-z0-9_ ]/, "_");
|
|
|
|
oldid = $1; newid = $3;
|
|
|
|
|
|
|
|
printf "#define ABI_%s_%s\tABI_%s_%s\n", libid, oldid, libid, newid;
|
|
|
|
printf "#define VERSION_%s_%s\t%s\n", libid, oldid, new;
|
2008-04-09 07:39:54 +02:00
|
|
|
|
|
|
|
if ("GLIBC_" oldest_abi == old)
|
|
|
|
oldest_abi = "default";
|
2000-03-19 21:36:44 +01:00
|
|
|
next;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
vers = $1;
|
2000-03-22 06:43:53 +01:00
|
|
|
gsub(/[^A-Za-z0-9_ ]/, "_");
|
|
|
|
versid = $1;
|
|
|
|
|
|
|
|
printf "#define ABI_%s_%s\t%d\t/* support %s */\n", libid, versid, ++n, vers;
|
|
|
|
printf "#define VERSION_%s_%s\t%s\n", libid, versid, vers;
|
2000-12-02 00:15:18 +01:00
|
|
|
if ("GLIBC_" oldest_abi == vers)
|
|
|
|
start = 1;
|
|
|
|
if (start == 0 && oldest_abi != "default")
|
|
|
|
--n;
|
2000-03-19 21:36:44 +01:00
|
|
|
next;
|
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
|
|
|
print "\n#endif /* abi-versions.h */";
|
|
|
|
}
|