aboutsummaryrefslogtreecommitdiffstats
path: root/lib/string.in.h
diff options
context:
space:
mode:
authorPaul Eggert2023-02-04 14:45:11 -0800
committerPaul Eggert2023-02-04 15:14:16 -0800
commit04d97e76a96854a9a9f4778cb1202a87537731de (patch)
tree9c70da51ec099c2c1c0ca95dbace29190e563f8a /lib/string.in.h
parent7e1c7db1cb5a33a66115bb767224bdc79a257266 (diff)
downloademacs-04d97e76a96854a9a9f4778cb1202a87537731de.tar.gz
emacs-04d97e76a96854a9a9f4778cb1202a87537731de.zip
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'lib/string.in.h')
-rw-r--r--lib/string.in.h42
1 files changed, 37 insertions, 5 deletions
diff --git a/lib/string.in.h b/lib/string.in.h
index b227a178873..aa088213927 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -308,16 +308,32 @@ _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - "
308/* Copy N bytes of SRC to DEST, return pointer to bytes after the 308/* Copy N bytes of SRC to DEST, return pointer to bytes after the
309 last written byte. */ 309 last written byte. */
310#if @GNULIB_MEMPCPY@ 310#if @GNULIB_MEMPCPY@
311# if ! @HAVE_MEMPCPY@ 311# if @REPLACE_MEMPCPY@
312# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
313# undef mempcpy
314# define mempcpy rpl_mempcpy
315# endif
316_GL_FUNCDECL_RPL (mempcpy, void *,
317 (void *restrict __dest, void const *restrict __src,
318 size_t __n)
319 _GL_ARG_NONNULL ((1, 2)));
320_GL_CXXALIAS_RPL (mempcpy, void *,
321 (void *restrict __dest, void const *restrict __src,
322 size_t __n));
323# else
324# if !@HAVE_MEMPCPY@
312_GL_FUNCDECL_SYS (mempcpy, void *, 325_GL_FUNCDECL_SYS (mempcpy, void *,
313 (void *restrict __dest, void const *restrict __src, 326 (void *restrict __dest, void const *restrict __src,
314 size_t __n) 327 size_t __n)
315 _GL_ARG_NONNULL ((1, 2))); 328 _GL_ARG_NONNULL ((1, 2)));
316# endif 329# endif
317_GL_CXXALIAS_SYS (mempcpy, void *, 330_GL_CXXALIAS_SYS (mempcpy, void *,
318 (void *restrict __dest, void const *restrict __src, 331 (void *restrict __dest, void const *restrict __src,
319 size_t __n)); 332 size_t __n));
333# endif
334# if __GLIBC__ >= 2
320_GL_CXXALIASWARN (mempcpy); 335_GL_CXXALIASWARN (mempcpy);
336# endif
321#elif defined GNULIB_POSIXCHECK 337#elif defined GNULIB_POSIXCHECK
322# undef mempcpy 338# undef mempcpy
323# if HAVE_RAW_DECL_MEMPCPY 339# if HAVE_RAW_DECL_MEMPCPY
@@ -406,14 +422,28 @@ _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - "
406 422
407/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ 423/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
408#if @GNULIB_STPCPY@ 424#if @GNULIB_STPCPY@
409# if ! @HAVE_STPCPY@ 425# if @REPLACE_STPCPY@
426# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
427# undef stpcpy
428# define stpcpy rpl_stpcpy
429# endif
430_GL_FUNCDECL_RPL (stpcpy, char *,
431 (char *restrict __dst, char const *restrict __src)
432 _GL_ARG_NONNULL ((1, 2)));
433_GL_CXXALIAS_RPL (stpcpy, char *,
434 (char *restrict __dst, char const *restrict __src));
435# else
436# if !@HAVE_STPCPY@
410_GL_FUNCDECL_SYS (stpcpy, char *, 437_GL_FUNCDECL_SYS (stpcpy, char *,
411 (char *restrict __dst, char const *restrict __src) 438 (char *restrict __dst, char const *restrict __src)
412 _GL_ARG_NONNULL ((1, 2))); 439 _GL_ARG_NONNULL ((1, 2)));
413# endif 440# endif
414_GL_CXXALIAS_SYS (stpcpy, char *, 441_GL_CXXALIAS_SYS (stpcpy, char *,
415 (char *restrict __dst, char const *restrict __src)); 442 (char *restrict __dst, char const *restrict __src));
443# endif
444# if __GLIBC__ >= 2
416_GL_CXXALIASWARN (stpcpy); 445_GL_CXXALIASWARN (stpcpy);
446# endif
417#elif defined GNULIB_POSIXCHECK 447#elif defined GNULIB_POSIXCHECK
418# undef stpcpy 448# undef stpcpy
419# if HAVE_RAW_DECL_STPCPY 449# if HAVE_RAW_DECL_STPCPY
@@ -448,7 +478,9 @@ _GL_CXXALIAS_SYS (stpncpy, char *,
448 (char *restrict __dst, char const *restrict __src, 478 (char *restrict __dst, char const *restrict __src,
449 size_t __n)); 479 size_t __n));
450# endif 480# endif
481# if __GLIBC__ >= 2
451_GL_CXXALIASWARN (stpncpy); 482_GL_CXXALIASWARN (stpncpy);
483# endif
452#elif defined GNULIB_POSIXCHECK 484#elif defined GNULIB_POSIXCHECK
453# undef stpncpy 485# undef stpncpy
454# if HAVE_RAW_DECL_STPNCPY 486# if HAVE_RAW_DECL_STPNCPY
@@ -1212,7 +1244,7 @@ _GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)
1212# endif 1244# endif
1213_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); 1245_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen));
1214# endif 1246# endif
1215# if @HAVE_DECL_STRERROR_R@ 1247# if __GLIBC__ >= 2 && @HAVE_DECL_STRERROR_R@
1216_GL_CXXALIASWARN (strerror_r); 1248_GL_CXXALIASWARN (strerror_r);
1217# endif 1249# endif
1218#elif defined GNULIB_POSIXCHECK 1250#elif defined GNULIB_POSIXCHECK