diff options
| author | Paul Eggert | 2023-08-12 12:50:15 -0700 |
|---|---|---|
| committer | Paul Eggert | 2023-08-12 12:57:35 -0700 |
| commit | 5315e6e8d7e7233d54cce2b4c1bc8cf3b7acf4dc (patch) | |
| tree | 5dc35aa709e829e1a67dcb868e643eee85c3449a /admin | |
| parent | f3868cb9d1806b35186eabc0262393316ebe689a (diff) | |
| download | emacs-5315e6e8d7e7233d54cce2b4c1bc8cf3b7acf4dc.tar.gz emacs-5315e6e8d7e7233d54cce2b4c1bc8cf3b7acf4dc.zip | |
Avoid stpncpy
It’s not worth the porting hassle, and as the glibc manual says,
“this function is generally a poor choice for processing strings”.
* admin/merge-gnulib (GNULIB_MODULES): Remove stpncpy.
* exec/configure.ac: Do not check for stpncpy.
* exec/exec.c (rpl_stpncpy, stpncpy): Remove this replacement.
(exec_0): Properly clear buffer1. Use memcpy instead of
stpncpy to add the trailing name. This code is clearly
still suboptimal but efficiency is not that important here
and I tried to minimize the change.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
Diffstat (limited to 'admin')
| -rwxr-xr-x | admin/merge-gnulib | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/admin/merge-gnulib b/admin/merge-gnulib index f64c0670bcf..2a713beb01a 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib | |||
| @@ -45,7 +45,7 @@ GNULIB_MODULES=' | |||
| 45 | pathmax pipe2 pselect pthread_sigmask | 45 | pathmax pipe2 pselect pthread_sigmask |
| 46 | qcopy-acl readlink readlinkat regex | 46 | qcopy-acl readlink readlinkat regex |
| 47 | sig2str sigdescr_np socklen stat-time std-gnu11 stdbool stdckdint stddef stdio | 47 | sig2str sigdescr_np socklen stat-time std-gnu11 stdbool stdckdint stddef stdio |
| 48 | stpcpy stpncpy strnlen strnlen strtoimax symlink sys_stat sys_time | 48 | stpcpy strnlen strnlen strtoimax symlink sys_stat sys_time |
| 49 | tempname time-h time_r time_rz timegm timer-time timespec-add timespec-sub | 49 | tempname time-h time_r time_rz timegm timer-time timespec-add timespec-sub |
| 50 | update-copyright unlocked-io utimensat | 50 | update-copyright unlocked-io utimensat |
| 51 | vla warnings year2038 | 51 | vla warnings year2038 |