mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
8d8c6efa78
1999-02-06 Ulrich Drepper <drepper@cygnus.com> * Versions.def: Add versions for ld.so. * csu/Versions: Remove __libc_stack_end here. * elf/Versions: Split libc definitions in libc and ld.so definitions. * elf/Makefile (ld-map): Change to ld.so.map. * scripts/versions.awk: Recognize dot in library names. * ctype/ctype.h: Remove definitions of __tolower and __toupper. Don't use __tolower and __toupper in inline functions. Add optimizing macros for tolower and toupper. * ctype/ctype-extn.c (_tolower): Don't use __tolower. (_toupper): Don't use __toupper. * ctype/ctype.c (tolower): Don't use __tolower. (toupper): Don't use toupper. * nscd/cache.c (prune_cache): Correct printing of debugging messages. * resolv/Versions (libresolv): Export __ns_name_unpack and __ns_name_ntop. * resolv/res_comp.c: Rename ns_name_unpack to __ns_name_unpack and make it global. Change all users. Similar for ns_name_ntop. * resolv/nss_dns/dns-host.c: Don't use dn_expand when extracting in user-provided buffer. Use __ns_name_unpack and __ns_name_ntop directly to detect too small buffer. * stdio-common/Makefile (tests): Add scanf12. * stdio-common/scanf12.c: New file. * stdio-common/scanf12.input: New file. * stdio-common/vfscanf.c (__vfscanf): Handle +/- at beginning of floating-point correctly if the number is invalid. * stdio-common/vfscanf.c: Don't use non-reentrant multibyte conversion * stdio-common/printf_fphex.c: Likewise. * stdio-common/vfprintf.c: Likewise. See ChangeLog.9 for earlier changes.
118 lines
2.7 KiB
Awk
118 lines
2.7 KiB
Awk
# Combine version map fragments into version files for the generated
|
|
# shared object.
|
|
# (C) Copyright 1998, 1999 Free Software Foundation, Inc.
|
|
# Written by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
|
|
|
# This script expects the following variables to be defined:
|
|
# defsfile name of Versions.def file
|
|
# buildroot name of build directory with trailing slash
|
|
# move_if_change move-if-change command
|
|
|
|
# Read definitions for the versions.
|
|
BEGIN {
|
|
nlibs=0;
|
|
while (getline < defsfile) {
|
|
if (/^[a-zA-Z0-9_.]+ \{/) {
|
|
libs[$1] = 1;
|
|
curlib = $1;
|
|
while (getline < defsfile && ! /^}/) {
|
|
versions[$1] = 1;
|
|
if (NF > 1) {
|
|
derived[curlib, $1] = " " $2;
|
|
for (n = 3; n <= NF; ++n) {
|
|
derived[curlib, $1] = derived[curlib, $1] ", " $n;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
close(defsfile);
|
|
|
|
tmpfile = buildroot "Versions.tmp";
|
|
sort = "sort -n > " tmpfile;
|
|
}
|
|
|
|
# Remove comment lines.
|
|
/^ *#/ {
|
|
next;
|
|
}
|
|
|
|
# This matches the beginning of the version information for a new library.
|
|
/^[a-zA-Z0-9_.]+/ {
|
|
actlib = $1;
|
|
if (!libs[$1]) {
|
|
printf("no versions defined for %s\n", $1) > "/dev/stderr";
|
|
exit 1;
|
|
}
|
|
next;
|
|
}
|
|
|
|
# This matches the beginning of a new version for the current library.
|
|
/^ [A-Za-z_]/ {
|
|
actver = $1;
|
|
if (!versions[$1]) {
|
|
printf("version %s not defined\n", $1) > "/dev/stderr";
|
|
exit 1;
|
|
}
|
|
next;
|
|
}
|
|
|
|
# This matches lines with names to be added to the current version in the
|
|
# current library. This is the only place where we print something to
|
|
# the intermediate file.
|
|
/^ / {
|
|
printf("%s %s %s\n", actlib, actver, $0) | sort;
|
|
}
|
|
|
|
|
|
function closeversion(name) {
|
|
if (firstinfile) {
|
|
printf(" local:\n *;\n") > outfile;
|
|
firstinfile = 0;
|
|
}
|
|
printf("}%s;\n", derived[oldlib, name]) > outfile;
|
|
}
|
|
|
|
function close_and_move(name, real_name) {
|
|
close(name);
|
|
system(move_if_change " " name " " real_name " >&2");
|
|
}
|
|
|
|
# Now print the accumulated information.
|
|
END {
|
|
close(sort);
|
|
oldlib = "";
|
|
oldver = "";
|
|
printf("version-maps =");
|
|
while(getline < tmpfile) {
|
|
if ($1 != oldlib) {
|
|
if (oldlib != "") {
|
|
closeversion(oldver);
|
|
oldver = "";
|
|
close_and_move(outfile, real_outfile);
|
|
}
|
|
oldlib = $1;
|
|
real_outfile = buildroot oldlib ".map";
|
|
outfile = real_outfile "T";
|
|
firstinfile = 1;
|
|
printf(" %s.map", oldlib);
|
|
}
|
|
if ($2 != oldver) {
|
|
if (oldver != "") {
|
|
closeversion(oldver);
|
|
}
|
|
printf("%s {\n global:\n", $2) > outfile;
|
|
oldver = $2;
|
|
}
|
|
printf(" ") > outfile;
|
|
for (n = 3; n <= NF; ++n) {
|
|
printf(" %s", $n) > outfile;
|
|
}
|
|
printf("\n") > outfile;
|
|
}
|
|
printf("\n");
|
|
closeversion(oldver);
|
|
close_and_move(outfile, real_outfile);
|
|
system("rm -f " tmpfile);
|
|
}
|