From b1eeb65d491c0fec94b29cfbbd2e384c9f3765cc Mon Sep 17 00:00:00 2001 From: Chris Demetriou Date: Fri, 2 Mar 2012 09:32:45 +0100 Subject: 2012-03-01 Chris Demetriou * sysdeps/gnu/errlist-compat.awk: Don't depend on AWK internals * to have predictable order. --- ChangeLog | 5 +++++ sysdeps/gnu/errlist-compat.awk | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9f81c1a247..29c5dc28f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-03-01 Chris Demetriou + + * sysdeps/gnu/errlist-compat.awk: Don't depend on AWK internals to + have predictable order. + 2012-03-01 David S. Miller * sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c: Delete. diff --git a/sysdeps/gnu/errlist-compat.awk b/sysdeps/gnu/errlist-compat.awk index 0e97d05d66..4f70e927c5 100644 --- a/sysdeps/gnu/errlist-compat.awk +++ b/sysdeps/gnu/errlist-compat.awk @@ -84,7 +84,10 @@ END { printf "#define ERR_MAX %d\n\n", highest; } - for (old in compat) { + # same regardless of awk's ordering of the associative array. + num_compat_elems = asorti(compat, compat_indices) + for (i = 1; i <= num_compat_elems; i++) { + old = compat_indices[i] new = compat[old]; n = vcount[old]; printf "#if SHLIB_COMPAT (libc, %s, %s)\n", old, new; -- cgit v1.2.3