summaryrefslogtreecommitdiff
path: root/versions.awk
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-07-06 17:09:00 +0000
committerUlrich Drepper <drepper@redhat.com>1998-07-06 17:09:00 +0000
commit8eaaffdeedf5a34a68a785e62b181e4e5fc6cf43 (patch)
treed1c6fd49faf7237b3fa5c388885a049c46ffbad0 /versions.awk
parentdd3c89f99cf911345abd1781be699a73f699aa00 (diff)
downloadglibc-8eaaffdeedf5a34a68a785e62b181e4e5fc6cf43.tar.gz
Update.
1998-07-06 14:36 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * posix/Makefile (generated): Remove $(objpfx) from the names. 1998-07-05 Andreas Jaeger <aj@arthur.rhein-neckar.de> * stdio-common/test_rdwr.c: Use %Zu for size_t in printf format string. * libio/iofread_u.c: Include <stdio.h> for prototype. * libio/iofwrite_u.c: Likewise. 1998-07-06 Andreas Jaeger <aj@arthur.rhein-neckar.de> * db2/Versions: New file. 1998-07-04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makefile (lib-noranlib): Don't depend on sysd-versions. ($(common-objpfx)sysd-versions): Remove rule. * Makerules ($(common-objpfx)sysd-versions): Define here instead. Pass name of Versions.def file to script and redirect output to target. Include it and make all generated version maps depend on it. * versions.awk: Print out variable definition containing all generated version maps. Print error messages to stderr. Remove temp file. 1998-07-04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * posix/annexc.c (check_header): Terminate macro name before comparing. (get_null_defines): Allow builtin macros with parameters. (fmt, testfmt): Add -D_LIBC. * posix/Makefile: Remove bogus duplicate include directories from annexc test command. 1998-07-06 12:04 Ulrich Drepper <drepper@cygnus.com> * nis/nss_nis/nis-pwd.c (internal_nis_getpwent_r): Handle adjunct password scheme. (_nss_nis_getpwnam_r): Likewise. (_nss_nis_getpwuid_r): Likewise. 1998-07-05 Mark Kettenis <kettenis@phys.uva.nl> * libio/Versions: Move symbols whose source lives in stdio-common to ... * stdio-common/Versions: ... here. * stdio/Versions: Add missing symbols.
Diffstat (limited to 'versions.awk')
-rw-r--r--versions.awk29
1 files changed, 15 insertions, 14 deletions
diff --git a/versions.awk b/versions.awk
index 57660d235a..7565ee10ca 100644
--- a/versions.awk
+++ b/versions.awk
@@ -6,26 +6,24 @@
# Read definitions for the versions.
BEGIN {
nlibs=0;
- while (getline < "Versions.def") {
+ while (getline < defsfile) {
if (/^[a-zA-Z_]+ {/) {
libs[$1] = 1;
curlib = $1;
- while (getline < "Versions.def" && ! /^}/) {
+ while (getline < defsfile && ! /^}/) {
+ versions[$1] = 1;
if (NF > 1) {
- versions[$1] = 1;
- derived[curlib, $1] = (" " $2);
+ derived[curlib, $1] = " " $2;
for (n = 3; n <= NF; ++n) {
- derived[curlib, $1] = sprintf("%s, %s", derived[curlib, $1], $n);
+ derived[curlib, $1] = derived[curlib, $1] ", " $n;
}
- } else {
- versions[$1] = 1;
}
}
}
}
- close("Versions.def");
+ close(defsfile);
- tmpfile = (buildroot "/Versions.tmp");
+ tmpfile = (buildroot "Versions.tmp");
sort = ("sort -n >" tmpfile);
}
@@ -37,8 +35,8 @@ BEGIN {
# This matches the beginning of the version information for a new library.
/^[a-zA-Z_]+/ {
actlib = $1;
- if (libs[$1] != 1) {
- printf("no versions defined for %s\n", $1);
+ if (!libs[$1]) {
+ printf("no versions defined for %s\n", $1) > "/dev/stderr";
exit 1;
}
next;
@@ -47,8 +45,8 @@ BEGIN {
# This matches the beginning of a new version for the current library.
/^ [A-Za-z_]/ {
actver = $1;
- if (versions[$1] != 1) {
- printf("version %s not defined\n", $1);
+ if (!versions[$1]) {
+ printf("version %s not defined\n", $1) > "/dev/stderr";
exit 1;
}
next;
@@ -75,6 +73,7 @@ END {
close(sort);
oldlib="";
oldver="";
+ printf("all-version-maps =");
while(getline < tmpfile) {
if ($1 != oldlib) {
if (oldlib != "") {
@@ -85,6 +84,7 @@ END {
oldlib = $1;
outfile = (buildroot oldlib ".map");
firstinfile = 1;
+ printf(" $(common-objpfx)%s.map", oldlib);
}
if ($2 != oldver) {
if (oldver != "") {
@@ -99,7 +99,8 @@ END {
}
printf("\n") > outfile;
}
+ printf("\n");
closeversion(oldver);
close(outfile);
- rm tmpfile;
+ system("rm " tmpfile);
}