1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00
emacs/lib
Paul Eggert f9caea8233 Vector-sorting fixes.
It's not safe to call qsort or qsort_r, since they have undefined
behavior if the user-specified predicate is not a total order.
Also, watch out for garbage-collection while sorting vectors.
* admin/merge-gnulib (GNULIB_MODULES): Add vla.
* configure.ac (qsort_r): Remove, as we no longer use qsort-like
functions.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/vla.h, m4/vararrays.m4: New files, copied from gnulib.
* lib/stdlib.in.h, m4/stdlib_h.m4: Sync from gnulib, incorporating:
2014-08-29 qsort_r: new module, for GNU-style qsort_r
The previous two files' changes are boilerplate generated by
admin/merge-gnulib, and should not affect Emacs.
* src/fns.c: Include <vla.h>.
(sort_vector_predicate) [!HAVE_QSORT_R]: Remove.
(sort_vector_compare): Remove, replacing with ....
(inorder, merge_vectors, sort_vector_inplace, sort_vector_copy):
... these new functions.
(sort_vector): Rewrite to use the new functions.
GCPRO locals, since the predicate can invoke the GC.
Since it's in-place return void; caller changed.
(merge): Use 'inorder', for clarity.

Fixes: debbugs:18361
2014-08-30 15:59:39 -07:00
..
acl_entries.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
acl-errno-valid.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
acl-internal.h Merge from gnulib. 2014-06-01 16:58:38 -07:00
acl.h Omit redundant extern decls. 2014-06-17 09:09:19 -07:00
alloca.in.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
allocator.c Update from gnulib. 2011-04-08 14:53:30 -07:00
allocator.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
at-func.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
binary-io.c Port recent close-on-exec changes to Cygwin. 2013-07-09 10:16:21 -07:00
binary-io.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
byteswap.in.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
c-ctype.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
c-ctype.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
c-strcase.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
c-strcasecmp.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
c-strncasecmp.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
careadlinkat.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
careadlinkat.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
close-stream.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
close-stream.h Fix data-loss with --batch. 2012-11-03 11:54:17 -07:00
COPYING * lib/COPYING: New file, a copy of COPYING. 2011-01-08 23:43:55 -08:00
count-one-bits.c Improve support for popcount and counting trailing zeros. 2013-10-07 14:37:19 -07:00
count-one-bits.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
count-trailing-zeros.c Improve support for popcount and counting trailing zeros. 2013-10-07 14:37:19 -07:00
count-trailing-zeros.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
dirent.in.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
dosname.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
dtoastr.c Regenerate. 2011-01-08 17:20:28 -08:00
dtotimespec.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
dup2.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
errno.in.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
euidaccess.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
execinfo.c * lib/execinfo.c, lib/execinfo.in.h, m4/execinfo.m4: New files. 2012-08-24 21:27:32 -07:00
execinfo.in.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
faccessat.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
fcntl.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
fcntl.in.h Backport fcntl.h AIX fix from the trunk. 2014-06-11 13:03:46 -07:00
fdatasync.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
fdopendir.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
file-has-acl.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
filemode.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
filemode.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
fpending.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
fpending.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
fstatat.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
fsync.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
ftoastr.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
ftoastr.h Merge from gnulib. 2014-06-01 16:58:38 -07:00
getdtablesize.c Merge from gnulib. 2014-08-08 23:57:59 -07:00
getgroups.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
getloadavg.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
getopt1.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
getopt_.h Fix copyright years by hand. 2014-01-01 00:31:29 -08:00
getopt_int.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
getopt.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
getopt.in.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
gettext.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
gettime.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
gettimeofday.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
gnulib.mk Vector-sorting fixes. 2014-08-30 15:59:39 -07:00
group-member.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
intprops.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
inttypes.in.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
lstat.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Makefile.am Parallelize clean rules using GNU make features 2014-06-14 17:17:21 -07:00
makefile.w32-in Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
md5.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
md5.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
memrchr.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
min-max.h [ChangeLog] 2011-02-21 15:22:34 -08:00
mkostemp.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
mktime-internal.h Regenerate. 2011-01-08 22:57:07 -08:00
mktime.c Merge from gnulib, incorporating: 2014-07-12 13:02:44 -07:00
openat-die.c Use fdopendir, fstatat and readlinkat, for efficiency. 2013-01-31 22:30:51 -08:00
openat-priv.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
openat-proc.c Merge from gnulib. 2014-05-26 22:55:18 -07:00
openat.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
pathmax.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
pipe2.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
pselect.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
pthread_sigmask.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
putenv.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
qcopy-acl.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
qset-acl.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
readlink.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
readlinkat.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
root-uid.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
save-cwd.c Simplify previous patch. 2014-08-10 14:06:07 -07:00
save-cwd.h Don't prevent random file systems from being unmounted. 2014-08-10 13:40:57 -07:00
secure_getenv.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
sha1.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
sha1.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
sha256.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
sha256.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
sha512.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
sha512.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
sig2str.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
sig2str.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
signal.in.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
stat-time.c Merge from gnulib. 2012-08-02 17:42:11 -07:00
stat-time.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
stat.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
stdalign.in.h Merge from gnulib. 2014-01-20 12:48:14 -08:00
stddef.in.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
stdint.in.h Merge from gnulib. 2014-03-07 10:57:11 -08:00
stdio.in.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
stdlib.in.h Vector-sorting fixes. 2014-08-30 15:59:39 -07:00
strftime.c Merge from gnulib. 2014-03-25 21:16:13 -07:00
strftime.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
string.in.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
strtoimax.c Merge from gnulib. 2014-01-20 12:48:14 -08:00
strtol.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
strtoll.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
strtoul.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
strtoull.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
strtoumax.c * Makefile.in (GNULIB_MODULES): Add strtoumax. 2011-04-21 12:12:13 -07:00
symlink.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
sys_select.in.h Merge from gnulib. 2014-08-08 23:57:59 -07:00
sys_stat.in.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
sys_time.in.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
sys_types.in.h Merge from gnulib. 2014-03-07 10:57:11 -08:00
tempname.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
tempname.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
time_r.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
time.in.h Merge from gnulib. 2014-02-05 11:41:03 -08:00
timespec-add.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
timespec-sub.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
timespec.c Merge from gnulib. 2012-08-02 17:42:11 -07:00
timespec.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
u64.c Merge from gnulib. 2012-08-02 17:42:11 -07:00
u64.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
unistd.c Merge from gnulib for 'inline'. 2012-11-30 10:25:59 -08:00
unistd.in.h Merge from gnulib. 2014-02-25 11:21:05 -08:00
unsetenv.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
utimens.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
utimens.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
verify.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
vla.h Vector-sorting fixes. 2014-08-30 15:59:39 -07:00
xalloc-oversized.h Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00