aboutsummaryrefslogtreecommitdiffstats
path: root/lib/gnulib.mk.in
diff options
context:
space:
mode:
authorPaul Eggert2023-08-12 12:50:15 -0700
committerPaul Eggert2023-08-12 12:57:35 -0700
commit5315e6e8d7e7233d54cce2b4c1bc8cf3b7acf4dc (patch)
tree5dc35aa709e829e1a67dcb868e643eee85c3449a /lib/gnulib.mk.in
parentf3868cb9d1806b35186eabc0262393316ebe689a (diff)
downloademacs-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 'lib/gnulib.mk.in')
-rw-r--r--lib/gnulib.mk.in12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index 78ecb544c6e..785bdc70c5c 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -157,7 +157,6 @@
157# stddef \ 157# stddef \
158# stdio \ 158# stdio \
159# stpcpy \ 159# stpcpy \
160# stpncpy \
161# strnlen \ 160# strnlen \
162# strtoimax \ 161# strtoimax \
163# symlink \ 162# symlink \
@@ -336,7 +335,6 @@ GL_COND_OBJ_SIGDESCR_NP_CONDITION = @GL_COND_OBJ_SIGDESCR_NP_CONDITION@
336GL_COND_OBJ_STDIO_READ_CONDITION = @GL_COND_OBJ_STDIO_READ_CONDITION@ 335GL_COND_OBJ_STDIO_READ_CONDITION = @GL_COND_OBJ_STDIO_READ_CONDITION@
337GL_COND_OBJ_STDIO_WRITE_CONDITION = @GL_COND_OBJ_STDIO_WRITE_CONDITION@ 336GL_COND_OBJ_STDIO_WRITE_CONDITION = @GL_COND_OBJ_STDIO_WRITE_CONDITION@
338GL_COND_OBJ_STPCPY_CONDITION = @GL_COND_OBJ_STPCPY_CONDITION@ 337GL_COND_OBJ_STPCPY_CONDITION = @GL_COND_OBJ_STPCPY_CONDITION@
339GL_COND_OBJ_STPNCPY_CONDITION = @GL_COND_OBJ_STPNCPY_CONDITION@
340GL_COND_OBJ_STRNLEN_CONDITION = @GL_COND_OBJ_STRNLEN_CONDITION@ 338GL_COND_OBJ_STRNLEN_CONDITION = @GL_COND_OBJ_STRNLEN_CONDITION@
341GL_COND_OBJ_STRTOIMAX_CONDITION = @GL_COND_OBJ_STRTOIMAX_CONDITION@ 339GL_COND_OBJ_STRTOIMAX_CONDITION = @GL_COND_OBJ_STRTOIMAX_CONDITION@
342GL_COND_OBJ_STRTOLL_CONDITION = @GL_COND_OBJ_STRTOLL_CONDITION@ 340GL_COND_OBJ_STRTOLL_CONDITION = @GL_COND_OBJ_STRTOLL_CONDITION@
@@ -3454,16 +3452,6 @@ endif
3454endif 3452endif
3455## end gnulib module stpcpy 3453## end gnulib module stpcpy
3456 3454
3457## begin gnulib module stpncpy
3458ifeq (,$(OMIT_GNULIB_MODULE_stpncpy))
3459
3460ifneq (,$(GL_COND_OBJ_STPNCPY_CONDITION))
3461libgnu_a_SOURCES += stpncpy.c
3462endif
3463
3464endif
3465## end gnulib module stpncpy
3466
3467## begin gnulib module string 3455## begin gnulib module string
3468ifeq (,$(OMIT_GNULIB_MODULE_string)) 3456ifeq (,$(OMIT_GNULIB_MODULE_string))
3469 3457