diff options
| author | Paul Eggert | 2020-12-25 01:38:31 -0800 |
|---|---|---|
| committer | Paul Eggert | 2020-12-25 01:40:39 -0800 |
| commit | ec8a17e938c3ef213709ea6b6b3e565333a9c508 (patch) | |
| tree | 1558c79f3c269d9ae1b068bb7c66fce04707b32c /admin | |
| parent | b8b17038e140fe215a76f2e899c00b9b95614886 (diff) | |
| download | emacs-ec8a17e938c3ef213709ea6b6b3e565333a9c508.tar.gz emacs-ec8a17e938c3ef213709ea6b6b3e565333a9c508.zip | |
Adjust to recent Gnulib changes
The latest Gnulib merge brought in free-posix, which causes 'free'
to preserve errno. This lets us simplify some Emacs code that
calls 'free'.
* admin/merge-gnulib (GNULIB_MODULES): Add free-posix.
This module is pulled in by canonicalize-lgpl anyway,
so we might as well rely on it.
* lib-src/emacsclient.c (get_current_dir_name):
Sync better with src/sysdep.c.
* lib-src/etags.c (process_file_name, etags_mktmp):
* lib-src/update-game-score.c (unlock_file):
* src/fileio.c (file_accessible_directory_p):
* src/sysdep.c (get_current_dir_name_or_unreachable):
Simplify by assuming that 'free' preserves errno.
* src/alloc.c (malloc_unblock_input):
Preserve errno, so that xfree preserves errno.
* src/sysdep.c (get_current_dir_name_or_unreachable):
Simplify by using strdup instead of malloc+memcpy.
No need for realloc (and the old code leaked memory anyway on
failure); just use free+malloc.
Diffstat (limited to 'admin')
| -rwxr-xr-x | admin/merge-gnulib | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/admin/merge-gnulib b/admin/merge-gnulib index 164300e1db6..880dc5eef53 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib | |||
| @@ -34,7 +34,8 @@ GNULIB_MODULES=' | |||
| 34 | d-type diffseq double-slash-root dtoastr dtotimespec dup2 | 34 | d-type diffseq double-slash-root dtoastr dtotimespec dup2 |
| 35 | environ execinfo explicit_bzero faccessat | 35 | environ execinfo explicit_bzero faccessat |
| 36 | fchmodat fcntl fcntl-h fdopendir | 36 | fchmodat fcntl fcntl-h fdopendir |
| 37 | filemode filename filevercmp flexmember fpieee fstatat fsusage fsync futimens | 37 | filemode filename filevercmp flexmember fpieee |
| 38 | free-posix fstatat fsusage fsync futimens | ||
| 38 | getloadavg getopt-gnu getrandom gettime gettimeofday gitlog-to-changelog | 39 | getloadavg getopt-gnu getrandom gettime gettimeofday gitlog-to-changelog |
| 39 | ieee754-h ignore-value intprops largefile libgmp lstat | 40 | ieee754-h ignore-value intprops largefile libgmp lstat |
| 40 | manywarnings memmem-simple mempcpy memrchr minmax mkostemp mktime nstrftime | 41 | manywarnings memmem-simple mempcpy memrchr minmax mkostemp mktime nstrftime |