1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00
emacs/lib
Paul Eggert a6ad98ad66 Improve make-temp-file performance on local files
For the motivation behind this patch, please see Bug#28023 and:
http://emacshorrors.com/posts/make-temp-name.html
Although, given the recent changes to Tramp, the related security
problem in make-temp-file is already fixed, make-temp-file still has
several unnecessary system calls.  In the typical case on GNU/Linux,
this patch replaces 8 syscalls (symlink, open, close, readlinkat, uname,
getpid, unlink, umask) by 2 (open, close).
* admin/merge-gnulib (GNULIB_MODULES): Add tempname, now
that Emacs is using it directly.
* configure.ac (AUTO_DEPEND): Remove AC_SYS_LONG_FILE_NAMES;
no longer needed.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lisp/files.el (files--make-magic-temp-file): Rename from
make-temp-file.
(make-temp-file): Use make-temp-file-internal for
non-magic file names.
* src/fileio.c: Include tempname.h.
(make_temp_name_tbl, make_temp_name_count)
(make_temp_name_count_initialized_p, make_temp_name): Remove.
(Fmake_temp_file_internal): New function.
(Fmake_temp_name): Use it.
* src/filelock.c (get_boot_time): Use Fmake_temp_file_internal
instead of make_temp_name.
2017-08-12 15:14:45 -07:00
..
_Noreturn.h Merge from gnulib 2017-03-14 14:50:02 -07:00
acl_entries.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
acl-errno-valid.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
acl-internal.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
acl-internal.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
acl.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
alloca.in.h Merge from gnulib 2017-01-01 01:32:56 -08:00
allocator.c Update from gnulib. 2011-04-08 14:53:30 -07:00
allocator.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
arg-nonnull.h Merge from gnulib 2017-03-14 14:50:02 -07:00
at-func.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
binary-io.c Merge from gnulib 2017-02-23 09:15:06 -08:00
binary-io.h Merge from gnulib 2017-02-23 09:15:06 -08:00
byteswap.in.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
c-ctype.c Merge from gnulib 2015-09-25 00:23:18 -07:00
c-ctype.h Merge from gnulib 2017-02-02 07:50:22 -08:00
c-strcase.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
c-strcasecmp.c Merge from gnulib 2017-01-01 01:32:56 -08:00
c-strncasecmp.c Merge from gnulib 2017-01-01 01:32:56 -08:00
c++defs.h Merge from gnulib 2017-03-14 14:50:02 -07:00
careadlinkat.c Merge from gnulib 2017-01-01 01:32:56 -08:00
careadlinkat.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
close-stream.c Merge from gnulib 2017-01-01 01:32:56 -08: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-leading-zeros.c logb now works correctly on large integers 2017-03-03 09:19:08 -08:00
count-leading-zeros.h logb now works correctly on large integers 2017-03-03 09:19:08 -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 2017 2016-12-31 19:42:26 -08: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 2017 2016-12-31 19:42:26 -08:00
diffseq.h Merge from gnulib 2017-06-17 15:13:21 -07:00
dirent.in.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
dirfd.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
dosname.h Merge from gnulib 2017-01-01 01:32:56 -08:00
dtoastr.c Regenerate. 2011-01-08 17:20:28 -08:00
dtotimespec.c Merge from gnulib 2017-03-05 13:31:33 -08:00
dup2.c Merge from gnulib 2017-05-14 01:29:29 -07:00
errno.in.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
euidaccess.c Merge from origin/emacs-25 2017-01-01 01:10:47 -08: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 2017 2016-12-31 19:42:26 -08:00
explicit_bzero.c Use explicit_bzero to clear GnuTLS keys 2017-07-16 16:29:12 -07:00
faccessat.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
fcntl.c Merge from gnulib 2017-05-14 01:29:29 -07:00
fcntl.in.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
fdatasync.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
fdopendir.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
filemode.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
filemode.h Merge from gnulib 2017-01-01 01:32:56 -08:00
filevercmp.c Merge from gnulib 2017-01-01 01:32:56 -08:00
filevercmp.h Merge from gnulib 2017-01-01 01:32:56 -08:00
flexmember.h Merge from gnulib 2017-01-01 01:32:56 -08:00
fpending.c Merge from gnulib 2017-07-13 19:24:49 -07:00
fpending.h Merge from gnulib 2017-01-01 01:32:56 -08:00
fstatat.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
fsync.c Merge from gnulib 2017-05-14 01:29:29 -07:00
ftoastr.c Merge from gnulib 2017-04-27 15:24:07 -07:00
ftoastr.h Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
get-permissions.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
getdtablesize.c Merge from gnulib 2017-07-16 16:29:11 -07:00
getgroups.c Merge from gnulib 2017-01-01 01:32:56 -08:00
getloadavg.c Merge from gnulib 2017-01-01 01:32:56 -08:00
getopt1.c Merge from gnulib 2017-04-06 16:30:09 -07:00
getopt_.h Fix copyright years by hand 2017-01-01 04:01:41 +00:00
getopt_int.h Merge from gnulib 2017-04-06 16:30:09 -07:00
getopt-cdefs.in.h Merge from gnulib (Bug#26398) 2017-04-09 00:55:23 -07:00
getopt-core.h Merge from gnulib (Bug#26398) 2017-04-09 00:55:23 -07:00
getopt-ext.h Merge from gnulib (Bug#26398) 2017-04-09 00:55:23 -07:00
getopt-pfx-core.h Merge from gnulib 2017-06-11 17:30:06 -07:00
getopt-pfx-ext.h Merge from gnulib 2017-06-11 17:30:06 -07:00
getopt.c Merge from gnulib 2017-05-14 01:29:29 -07:00
getopt.in.h Merge from gnulib (Bug#26398) 2017-04-09 00:55:23 -07:00
gettext.h * lib/gettext.h: Merge from gnulib. 2017-06-17 15:22:13 -07:00
gettime.c Merge from gnulib 2017-01-01 01:32:56 -08:00
gettimeofday.c Merge from gnulib 2017-05-14 01:29:29 -07:00
gnulib.mk.in Improve make-temp-file performance on local files 2017-08-12 15:14:45 -07:00
group-member.c Merge from gnulib 2017-01-01 01:32:56 -08:00
ignore-value.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
intprops.h Merge from gnulib 2017-05-25 00:13:33 -07:00
inttypes.in.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
limits.in.h Merge from gnulib 2017-03-19 13:09:31 -07:00
localtime-buffer.c Merge from gnulib 2017-05-01 15:33:26 -07:00
localtime-buffer.h Merge from gnulib 2017-05-01 15:33:26 -07:00
lstat.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
Makefile.in Fix 'make clean' in lib subdirectory 2017-04-06 13:43:06 -07:00
md5.c Merge from gnulib 2017-04-06 16:30:09 -07:00
md5.h Merge from gnulib 2017-04-06 16:30:09 -07:00
memrchr.c Merge from gnulib 2017-01-01 01:32:56 -08:00
min-max.h [ChangeLog] 2011-02-21 15:22:34 -08:00
minmax.h Add command to replace buffer contents 2017-06-17 15:40:58 +02:00
mkostemp.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
mktime-internal.h Merge from gnulib 2017-01-01 01:32:56 -08:00
mktime.c Merge from gnulib 2017-05-14 01:29:29 -07:00
nstrftime.c Merge from gnulib 2017-07-23 22:23:49 -07:00
openat-die.c Limit <config.h>’s includes 2016-09-30 12:38:52 -07:00
openat-priv.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
openat-proc.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
openat.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
pipe2.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
pselect.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
pthread_sigmask.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
putenv.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
qcopy-acl.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
readlink.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
readlinkat.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
root-uid.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
save-cwd.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
save-cwd.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
set-permissions.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
sha1.c Merge from gnulib 2017-04-06 16:30:09 -07:00
sha1.h Merge from gnulib 2017-04-06 16:30:09 -07:00
sha256.c Merge from gnulib 2017-04-06 16:30:09 -07:00
sha256.h Merge from gnulib 2017-04-06 16:30:09 -07:00
sha512.c Merge from gnulib 2017-04-06 16:30:09 -07:00
sha512.h Merge from gnulib 2017-04-06 16:30:09 -07:00
sig2str.c Merge from gnulib 2017-01-01 01:32:56 -08:00
sig2str.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
signal.in.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
stat-time.c Merge from gnulib. 2012-08-02 17:42:11 -07:00
stat-time.h Merge from gnulib 2017-05-14 12:40:03 -07:00
stdalign.in.h Merge from gnulib 2017-03-19 13:09:31 -07:00
stddef.in.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
stdint.in.h Merge from gnulib 2017-03-19 13:09:31 -07:00
stdio-impl.h Merge from gnulib 2017-07-13 19:24:49 -07:00
stdio.in.h Merge from gnulib 2017-01-01 01:32:56 -08:00
stdlib.in.h Merge from gnulib 2017-01-01 01:32:56 -08:00
stpcpy.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
strftime.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
string.in.h Merge from gnulib 2017-07-16 16:29:11 -07:00
strtoimax.c Merge from gnulib 2017-01-01 01:32:56 -08:00
strtol.c Merge from gnulib 2017-01-01 01:32:56 -08:00
strtoll.c Merge from gnulib 2017-01-01 01:32:56 -08:00
symlink.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
sys_select.in.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
sys_stat.in.h Merge from gnulib 2017-05-14 01:29:29 -07:00
sys_time.in.h Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
sys_types.in.h Merge from gnulib 2017-05-14 12:40:03 -07:00
tempname.c Merge from gnulib 2017-08-09 11:46:06 -07:00
tempname.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
time_r.c Merge from gnulib 2017-01-01 01:32:56 -08:00
time_rz.c Merge from gnulib 2017-05-01 15:33:26 -07:00
time-internal.h Merge from gnulib 2017-02-02 07:50:22 -08:00
time.in.h Merge from gnulib 2017-05-01 15:33:26 -07:00
timegm.c Merge from gnulib 2017-01-01 01:32:56 -08:00
timespec-add.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
timespec-sub.c Update copyright year to 2017 2016-12-31 19:42:26 -08:00
timespec.c Merge from gnulib. 2012-08-02 17:42:11 -07:00
timespec.h Merge from gnulib 2017-03-19 13:09:31 -07:00
u64.c Merge from gnulib 2015-10-13 23:34:47 -07:00
u64.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
unistd.c Merge from gnulib 2015-10-13 23:34:47 -07:00
unistd.in.h Merge from gnulib 2017-05-14 01:29:29 -07:00
unlocked-io.h Use unlocked stdio more systematically 2017-06-22 11:22:53 -07:00
utimens.c Merge from gnulib 2017-05-14 01:29:29 -07:00
utimens.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
verify.h Merge from gnulib 2017-02-02 07:50:22 -08:00
vla.h Update copyright year to 2017 2016-12-31 19:42:26 -08:00
warn-on-use.h Merge from gnulib 2017-03-14 14:50:02 -07:00
xalloc-oversized.h Merge from gnulib 2017-07-13 19:24:49 -07:00