aboutsummaryrefslogtreecommitdiffstats
path: root/lib/string.in.h
diff options
context:
space:
mode:
authorPaul Eggert2025-12-07 15:34:42 -0800
committerPaul Eggert2025-12-07 15:45:20 -0800
commitb211e5489b95f39f07baa769fc581b05b393c4a3 (patch)
tree34f59c09f3779fdf25f32bccbe8aa48491ee5b4f /lib/string.in.h
parent0d43f2a562c84ff440da978a9275fc44e6f5d9da (diff)
downloademacs-b211e5489b95f39f07baa769fc581b05b393c4a3.tar.gz
emacs-b211e5489b95f39f07baa769fc581b05b393c4a3.zip
Update from Gnulib by running admin/merge-gnulib
* admin/merge-gnulib (AVOIDED_MODULES): Add strncpy, as Emacs is not likely to exercise the FreeBSD 15 strncpy bug that this module fixes. * lib/issymlinkat.h: New file, taken from Gnulib.
Diffstat (limited to 'lib/string.in.h')
-rw-r--r--lib/string.in.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/string.in.h b/lib/string.in.h
index a323b1cd6da..f316878b4c9 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -840,6 +840,35 @@ _GL_WARN_ON_USE (strncat, "strncat is unportable - "
840# endif 840# endif
841#endif 841#endif
842 842
843/* Copy no more than N bytes of SRC to DST, returning DST. */
844#if @GNULIB_STRNCPY@
845# if @REPLACE_STRNCPY@
846# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
847# undef strncpy
848# define strncpy rpl_strncpy
849# endif
850_GL_FUNCDECL_RPL (strncpy, char *,
851 (char *restrict __dst, char const *restrict __src,
852 size_t __n),
853 _GL_ARG_NONNULL ((1, 2)));
854_GL_CXXALIAS_RPL (strncpy, char *,
855 (char *restrict __dst, char const *restrict __src,
856 size_t __n));
857# else
858_GL_CXXALIAS_SYS (strncpy, char *,
859 (char *restrict __dst, char const *restrict __src,
860 size_t __n));
861# endif
862# if __GLIBC__ >= 2
863_GL_CXXALIASWARN (strncpy);
864# endif
865#elif defined GNULIB_POSIXCHECK
866# if HAVE_RAW_DECL_STRNCPY
867_GL_WARN_ON_USE (strncpy, "strncpy is unportable - "
868 "use gnulib module strncpy for portability");
869# endif
870#endif
871
843/* Return a newly allocated copy of at most N bytes of STRING. */ 872/* Return a newly allocated copy of at most N bytes of STRING. */
844#if @GNULIB_STRNDUP@ 873#if @GNULIB_STRNDUP@
845# if @REPLACE_STRNDUP@ 874# if @REPLACE_STRNDUP@