diff options
author | Roland McGrath <roland@gnu.org> | 2005-02-10 10:29:53 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2005-02-10 10:29:53 +0000 |
commit | 0a38b835212cc8268fe547d3a8032dcc6b65f6c8 (patch) | |
tree | 370066bb482dc2b47e990a3ec45bf43af1b55018 | |
parent | 1d3be03848ec2e6852e3afe0363154aeb383fa1c (diff) | |
download | glibc-0a38b835212cc8268fe547d3a8032dcc6b65f6c8.tar.gz glibc-0a38b835212cc8268fe547d3a8032dcc6b65f6c8.tar.xz glibc-0a38b835212cc8268fe547d3a8032dcc6b65f6c8.zip |
* scripts/lib-names.awk: Always print WORDSIZE32 section first when
doing two.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | scripts/lib-names.awk | 24 |
2 files changed, 16 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog index a659bda20e..6a2a88b010 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-02-10 Roland McGrath <roland@redhat.com> + + * scripts/lib-names.awk: Always print WORDSIZE32 section first when + doing two. + 2005-02-10 Jakub Jelinek <jakub@redhat.com> * sysdeps/powerpc/powerpc32/bits/link.h: Removed. diff --git a/scripts/lib-names.awk b/scripts/lib-names.awk index 31f248f47d..45f043a8a4 100644 --- a/scripts/lib-names.awk +++ b/scripts/lib-names.awk @@ -43,24 +43,22 @@ END { lines[x[1]] = line; } - default_lines = lines["DEFAULT"]; - delete lines["DEFAULT"]; if (multi) { + # Print these in a fixed order so the result is identical + # on both sides of the coin. + if (!("WORDSIZE32" in lines)) + lines["WORDSIZE32"] = lines["DEFAULT"]; + if (!("WORDSIZE64" in lines)) + lines["WORDSIZE64"] = lines["DEFAULT"]; print "#include <bits/wordsize.h>\n"; - pfx = "#if"; - for (kind in lines) { - l = lines[kind]; - sub(/WORDSIZE/, "", kind); - print pfx, "__WORDSIZE", "==", kind; - cmd = "LC_ALL=C sort"; print l | cmd; close(cmd); - pfx = "#elif"; - } - print "#else"; - cmd = "LC_ALL=C sort"; print default_lines | cmd; close(cmd); + print "#if __WORDSIZE == 32"; + cmd = "LC_ALL=C sort"; print lines["WORDSIZE32"] | cmd; close(cmd); + print "#else" + cmd = "LC_ALL=C sort"; print lines["WORDSIZE64"] | cmd; close(cmd); print "#endif"; } else { - cmd = "LC_ALL=C sort"; print default_lines | cmd; close(cmd); + cmd = "LC_ALL=C sort"; print lines["DEFAULT"] | cmd; close(cmd); } print ""; |